A new feature called Structured Outputs from the OpenAI API is not fully supported in the current version of this package (V5.0.0).
The new feature allows to specify a JSON Schema in the 'response_format' parameter when creating a new chat/stream. Currently, only Map<String, String>? data type is supported, but to pass a JSON schema, Map<String, dynamic>? would be required in the Chat API.
A new feature called Structured Outputs from the OpenAI API is not fully supported in the current version of this package (V5.0.0). The new feature allows to specify a JSON Schema in the 'response_format' parameter when creating a new chat/stream. Currently, only
Map<String, String>?
data type is supported, but to pass a JSON schema,Map<String, dynamic>?
would be required in the Chat API.Code Lines to be adapted: https://github.com/anasfik/openai/blob/v5.0.0/lib/src/instance/chat/chat.dart#L83 https://github.com/anasfik/openai/blob/v5.0.0/lib/src/instance/chat/chat.dart#L175 https://github.com/anasfik/openai/blob/v5.0.0/lib/src/instance/chat/chat.dart#L224