The latest OpenAI models allow passing json_schema as the response_format type property, and supplying the schema itself under the schema property. This enforces conformance to the schema by validating output tokens, rather than best LLM effort.
Announced here: https://openai.com/index/introducing-structured-outputs-in-the-api/
This is obviously massively useful to any application using json output, especially when deserialising the json to C# types.
Please consider adding support for these properties through the SemanticKernel abstractions and .Net client in the short term.
The latest OpenAI models allow passing
json_schemaas theresponse_formattypeproperty, and supplying the schema itself under theschemaproperty. This enforces conformance to the schema by validating output tokens, rather than best LLM effort.Announced here: https://openai.com/index/introducing-structured-outputs-in-the-api/
This is obviously massively useful to any application using json output, especially when deserialising the json to C# types.
Please consider adding support for these properties through the SemanticKernel abstractions and .Net client in the short term.