mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
add comment
This commit is contained in:
@@ -37,7 +37,9 @@ The function **`classify`** will perform the single-label classification.
|
||||
import openai
|
||||
import instructor
|
||||
|
||||
instructor.patch()
|
||||
# Patch the OpenAI API to use the `ChatCompletion`
|
||||
# endpoint with `response_model` enabled.
|
||||
instructor.patch()
|
||||
|
||||
def classify(data: str) -> SinglePrediction:
|
||||
"""Perform single-label classification on the input text."""
|
||||
@@ -51,7 +53,6 @@ def classify(data: str) -> SinglePrediction:
|
||||
},
|
||||
],
|
||||
) # type: ignore
|
||||
|
||||
```
|
||||
|
||||
### Testing and Evaluation
|
||||
|
||||
Reference in New Issue
Block a user