4 ms·
For posterity, this is the "JSON mode" mentioned at the bottom of the post. The docs say it's on by default if you use function calling normally: https://platf
by minimaxir 3y ago
For posterity, this is the "JSON mode" mentioned at the bottom of the post.
The docs say it's on by default if you use function calling normally: https://platform.openai.com/docs/guides/text-generation/json-mode https://platform.openai.com/docs/guides/text-generation/json...
> Note that JSON mode is always enabled when the model is generating arguments as part of function calling.
- JoshMandel 3y agoYes -- the distinction with "function calling" is that you have to play a game of telephone where you describe your target schema in JSON Schema (only, apparently, for OpenAI to turn into a typescript interface internally) vs describing it more directly and succinctly (and with opportunities to include inline comments, order fields ordered however you want, and use advanced TS features... or even use an adhoc schema "language").
- msp26 3y agoYeah I was using hacky workarounds like this to get Object[] types in my schema. The API seemed to throw a fit if I did this in any other way. ``` {"type": "array", "items": {"type": "object", "properties": {"object": {"type": "object"}}}} ``` Somehow the thought to just write the typescript myself never occurred haha.
- o_____________o 3y agofwiw JSON Schema allows for $comment fields, which seem effective in OAPI function calls. https://json-schema.org/understanding-json-schema/reference/comments https://json-schema.org/understanding-json-schema/reference/...
- lukasb 3y agoWhat do you use $comment for that doesn't work in "description"?