What’s new?
We’ve made three updates to function calling in the API:
“JSON mode” now enables the model to output strings that parse to valid JSON
The ability to call multiple functions from a single message
Improved performance on matching the desired properties or schema, if provided
What is JSON mode?
By setting response_format: { type: "json_object" }
when calling gpt-4-visual-preview
or gpt-3.5-turbo
, these models will constrain their output to generate strings that parse into valid JSON. Read our guide on function calling for more information on how to configure this setting properly.