JSON mode vs Function Calling

(I work on JSON mode at OpenAI)

JSON mode is always enabled for the generation of function arguments, so those are guaranteed to parse.

JSON mode is opt in for regular messages.

Note that JSON mode sadly doesn’t guarantee that the output will match your schema (though the model tries to do this and is continually getting better at it), only that it is JSON that will parse.

So TL;DR is that you can use either functions or messages, and in both cases know you will get parseable JSON back :+1:

17 Likes