async-openai
async-openai copied to clipboard
Add support for the structured output response format
OpenAI recently introduced the Structured Outputs feature which ensures that responses will adhere to a predefined JSON schema.
Last year at DevDay, we introduced JSON mode—a useful building block for developers looking to build reliable applications with our models. While JSON mode improves model reliability for generating valid JSON outputs, it does not guarantee that the model’s response will conform to a particular schema. Today we’re introducing Structured Outputs in the API, a new feature designed to ensure model-generated outputs will exactly match JSON Schemas provided by developers.
The documentation for using structured outputs is here.