mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
Update index.md
This commit is contained in:
+5
-3
@@ -52,10 +52,12 @@ First, import the required libraries and apply the patch function to the OpenAI
|
||||
|
||||
```python
|
||||
import openai
|
||||
import instructor
|
||||
from pydantic import BaseModel
|
||||
from instructor import patch
|
||||
|
||||
patch()
|
||||
# This enables response_model keyword
|
||||
# from openai.ChatCompletion.create
|
||||
instructor.patch()
|
||||
```
|
||||
|
||||
### Step 2: Define the Pydantic Model
|
||||
@@ -262,4 +264,4 @@ To see more examples of how we can create interesting models check out some [exa
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under ther terms of the MIT License.
|
||||
This project is licensed under ther terms of the MIT License.
|
||||
|
||||
Reference in New Issue
Block a user