From afbf272c32f0437bdb445a18e0ef0385b392b9ca Mon Sep 17 00:00:00 2001 From: Phodaie Date: Mon, 1 Jan 2024 17:23:36 -0500 Subject: [PATCH] json scheme example change (#316) Co-authored-by: payman hodaie --- docs/blog/posts/chain-of-density.md | 5 +++-- examples/validators/llm_validator.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/blog/posts/chain-of-density.md b/docs/blog/posts/chain-of-density.md index ab87c15..2a5d715 100644 --- a/docs/blog/posts/chain-of-density.md +++ b/docs/blog/posts/chain-of-density.md @@ -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" + ] + } } ] diff --git a/examples/validators/llm_validator.py b/examples/validators/llm_validator.py index e4d6a63..ada72e4 100644 --- a/examples/validators/llm_validator.py +++ b/examples/validators/llm_validator.py @@ -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.",