-
-
Save CGamesPlay/dd4f108f27e2eec145eedf5c717318f5 to your computer and use it in GitHub Desktop.
https://openai.com/index/introducing-structured-outputs-in-the-api/
Any changes from this?
I've updated the notebook to use the new tool calling interface and support the parallel tool calling option. Notable changes:
- Validations are now exposed to the model (minimum, maximum, pattern).
- Enums are no longer exposed to the model (note: it's still possible that OpenAI supports them through controlled generation, but untested)
- Type titles are now exposed to the model. If you are autogenerating the schema title from the field name, this is wasting tokens.
One interesting note is that the overhead of the parallel tool calls doesn't seem to be reflected in the prompt usage value.
Thanks for this wonderful work and details regarding the tool calling interface.
May you share some insights why OpenAI does not expose Enum to model? is it because the performance is not desirable when providing Enum items?
I noticed that "features" and "content" in send_message_tool are not exposed to the model even they are required. Any insights regarding that?
Thank you!
I don't work at OpenAI; I just documented observed behavior.
You're right about "features" and "content". I guess because they are "object" types, and they only allow a single flat object to be provided. Note: behavior may have changed since the notebook was last updated, I would advise verifying before implementing in your stack.
I've updated the notebook to use the new tool calling interface and support the parallel tool calling option. Notable changes:
One interesting note is that the overhead of the parallel tool calls doesn't seem to be reflected in the prompt usage value.