async-openai icon indicating copy to clipboard operation
async-openai copied to clipboard

Add support for the structured output response format

Open q-ata opened this issue 6 months ago • 0 comments

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.

q-ata avatar Aug 08 '24 13:08 q-ata