-
-
Notifications
You must be signed in to change notification settings - Fork 539
Description
Currently the only way to pass a json schema as response_format is to use PropertyDefinition class.
But unfortunately it supports only subset of allowed JSON schema format. I.e. it doesn't support such attributes as anyof and definitions while they're fully supported by OpenAI models:
https://platform.openai.com/docs/guides/structured-outputs#for-anyof-the-nested-schemas-must-each-be-a-valid-json-schema-per-this-subset
https://platform.openai.com/docs/guides/structured-outputs#definitions-are-supported
Do you have some nearest plan to support these json schema features by adding them to PropertyDefinition class or to make possible to pass just a json schema?
I.e. official OpenAI lib uses System.BinaryData class for it:
https://github.com/openai/openai-dotnet/blob/9308b2b16acc8b259aad0d76855d436dca4f569f/src/Custom/Chat/ChatResponseFormat.cs#L92