Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions ai-data/generative-apis/how-to/use-structured-outputs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ extract = client.chat.completions.create(
"items": {"type": "string"}
}
},
"additionalProperties": false,
"required": ["title", "summary", "actionItems"]
}
}
Expand All @@ -237,6 +238,10 @@ Output example:
}
```

<Message type="tip">
When using the OpenAI SDKs like in the examples above, you are expected to set `additionalProperties` to false, and to specify all your properties as required.
</Message>

## Conclusion

Using structured outputs with LLMs can significantly enhance data handling in your applications.
Expand Down