You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very convenient if, for Pydantic V2 models, the dereferencing of these fields was optional.
Particularly inside the convert_pydantic_to_openai_function.
I would be happy to contribute in the implementation.
Motivation
That would dramatically reduce the length of tool definitions, which would offer lower input token costs and speed up inference times when calling OpenAI models.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Checked
Feature request
It looks like OpenAI now supports definitions and references inside the json schema of functions / tools.
It would be very convenient if, for Pydantic V2 models, the dereferencing of these fields was optional.
Particularly inside the convert_pydantic_to_openai_function.
I would be happy to contribute in the implementation.
Motivation
That would dramatically reduce the length of tool definitions, which would offer lower input token costs and speed up inference times when calling OpenAI models.
Proposal (If applicable)
No response
Beta Was this translation helpful? Give feedback.
All reactions