mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
fixed docstring typos (#60)
This commit is contained in:
+1
-1
@@ -38,7 +38,7 @@ class UserDetails(OpenAISchema):
|
||||
age: int
|
||||
```
|
||||
|
||||
In this schema, we define a `UserDetails` class that extends `OpenAISchema`. We declare two fields, `name` and `age`, of type `str` and `int` respectively. It's important to note that since OpenAI models do not understand annotations or extra metadata like descriptions, we keep the definition clean without docstrings or field descriptions.
|
||||
In this schema, we define a `UserDetails` class that extends `OpenAISchema`. We declare two fields, `name` and `age`, of type `str` and `int` respectively.
|
||||
|
||||
### Section 2: Adding Additional Prompting
|
||||
|
||||
|
||||
+3
-3
@@ -15,9 +15,9 @@ Here are some key points to understand:
|
||||
|
||||
* **Code as prompts:** With both the DSL and the structured extraction we don't make a distinction between a code vs a `prompt template`. We believe the prompts that go into a LLM should be constructed and collocated with the code we need to execute. Prompts are created via docstrings, descriptions and functions that construct messages.
|
||||
|
||||
* **Writing Prompts:** The library also includes an experimental prompt pipeline api. The DSL is a thin wrapper that aims to improve code readability by adding light abstraction around templates as messages. It provides a slightly more syntax for working with LLMs, making the prompting easier to read.
|
||||
* **Writing Prompts:** The library also includes an experimental prompt pipeline api. The DSL is a thin wrapper that aims to improve code readability by adding light abstraction around templates as messages. It provides a slightly more intuitive syntax for working with LLMs, making the prompting easier to read.
|
||||
|
||||
* **No Abstractions for Retrieval or Execution:** The library does not impose any abstractions for retrieval or execution. Python code is considered to great glue code, and there is no need to force the use of additional abstractions. You have the freedom to use any retrieval or execution mechanism that suits your needs.
|
||||
* **No Abstractions for Retrieval or Execution:** The library does not impose any abstractions for retrieval or execution. Python code is considered to be great glue code, and there is no need to force the use of additional abstractions. You have the freedom to use any retrieval or execution mechanism that suits your needs.
|
||||
|
||||
!!! example "Roll your own"
|
||||
If you want to do retrival simply make a class that extracts a query and implement a method that calls to get the data!
|
||||
@@ -75,4 +75,4 @@ Here are some key points to understand:
|
||||
|
||||
Please note that the library is designed to be adaptable and open-ended, allowing you to customize and extend its functionality based on your specific requirements.
|
||||
|
||||
If you have any further questions or ideas hit me up on [twitter](https://twitter.com/jxnlco)
|
||||
If you have any further questions or ideas hit me up on [twitter](https://twitter.com/jxnlco)
|
||||
|
||||
Reference in New Issue
Block a user