mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
fix: update variable name in from_response example (#59)
This commit is contained in:
+2
-2
@@ -125,7 +125,7 @@ Note that we have omitted the additional parameters that can be included in the
|
||||
To deserialize the response from the `ChatCompletion` API back into an instance of the `UserDetails` class, we can use the `from_response` method.
|
||||
|
||||
```python hl_lines="1"
|
||||
user = UserDetails.from_response(response)
|
||||
user = UserDetails.from_response(completion)
|
||||
print(user.name) # Output: John Doe
|
||||
print(user.age) # Output: 30
|
||||
```
|
||||
@@ -138,4 +138,4 @@ This quick start guide provided you with a basic understanding of how to use Ope
|
||||
|
||||
If you have any questions, feel free to leave an issue or reach out to the library's author on [Twitter](https://twitter.com/jxnlco). For a more comprehensive solution with additional features, consider checking out [MarvinAI](https://www.askmarvin.ai/).
|
||||
|
||||
To see more examples of how we can create interesting models check out some [examples.](examples/index.md)
|
||||
To see more examples of how we can create interesting models check out some [examples.](examples/index.md)
|
||||
|
||||
Reference in New Issue
Block a user