Open asim-shrestha opened 1 month ago
That was fast!
it looks like oai took much inspiration from here 😬
+1. Looks like support was added for adding the strict=True
argument for tool calls (https://github.com/jxnl/instructor/pull/938), but will there be a corresponding Mode.JSON_STRICT
update using the new "json_schema" support in OpenAI's response_model
parameter? It would be nice to get guaranteed structured output back as well, besides just in tool calls.
Is your feature request related to a problem? Please describe. OpenAI just released more strict structured output adherence: https://openai.com/index/introducing-structured-outputs-in-the-api/.
Taking a look at the instructor client code, it seems we're already passing in
strict=True
by default but it would be good to also support the newjson_schema
field for the gpt-4o models that support itRelevant quote describing json_schema from the blogpost