mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
json scheme example change (#316)
Co-authored-by: payman hodaie <payman@osellus-mobile.com>
This commit is contained in:
@@ -139,6 +139,7 @@ Firstly, we'll need a data model for the initial summary that we will be generat
|
||||
"name": "GeneratedSummary",
|
||||
"description": "This represents a highly concise summary that includes as many entities as possible from the original source article.\n\nAn Entity is a real-world object that's assigned a name - for example, a person, country a product or a book title.\n\nGuidelines\n- Make every word count\n- The new summary should be highly dense and concise yet self-contained, eg., easily understood without the Article.\n- Make space with fusion, compression, and removal of uninformative phrases like \"the article discusses\"",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"summary": {
|
||||
"description": "This represents the final summary generated that captures the meaning of the original article which is as concise as possible. ",
|
||||
@@ -148,8 +149,8 @@ Firstly, we'll need a data model for the initial summary that we will be generat
|
||||
},
|
||||
"required": [
|
||||
"summary"
|
||||
],
|
||||
"type": "object"
|
||||
]
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
@@ -35,7 +35,7 @@ qa: QuestionAnswer = client.chat.completions.create(
|
||||
print("Before validation with `llm_validator`")
|
||||
print(qa.model_dump_json(indent=2), end="\n\n")
|
||||
"""
|
||||
After validation with `llm_validator`
|
||||
Before validation with `llm_validator`
|
||||
{
|
||||
"question": "What is the meaning of life?",
|
||||
"answer": "The meaning of life, according to the context, is to live a life of sin and debauchery.",
|
||||
|
||||
Reference in New Issue
Block a user