openai
openai copied to clipboard
feat: Support dynamic responseFormat
trafficstars
OpenAI recently introduced Structured outputs in their API. This is done by passing the desired JSON schema in the "response_format" parameter as described here: https://openai.com/index/introducing-structured-outputs-in-the-api/
Since the JSON schema is an object i.e. Map<String, dynamic> and not a String, we should remove the type requirement for "response_format" and use dynamic instead, similar to "logitBias"