diff --git a/ai-data/generative-apis/how-to/use-structured-outputs.mdx b/ai-data/generative-apis/how-to/use-structured-outputs.mdx index f438fac275..02c3d78ccf 100644 --- a/ai-data/generative-apis/how-to/use-structured-outputs.mdx +++ b/ai-data/generative-apis/how-to/use-structured-outputs.mdx @@ -162,6 +162,7 @@ extract = client.chat.completions.create( response_format={ "type": "json_schema", "json_schema": { + "name": "VoiceNote", "schema": VoiceNote.model_json_schema(), } }, @@ -203,6 +204,7 @@ extract = client.chat.completions.create( response_format={ "type": "json_schema", "json_schema": { + "name": "VoiceNote", "schema": { "type": "object", "properties": { @@ -243,4 +245,4 @@ By choosing between JSON mode and Structured outputs with JSON schema, you contr - **JSON mode** is flexible but less predictable. - **Structured outputs** provide strict adherence to a predefined schema, ensuring consistency. -Experiment with both methods to determine which best fits your application's requirements. \ No newline at end of file +Experiment with both methods to determine which best fits your application's requirements.