-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apply more fixes for Pydantic schema incompatibilities with OpenAI structured outputs #1659
Comments
@RobertCraigie Thanks for fixing one of the issues! Do you have an ETA on the fix for the "format" issue? |
There are currently no plans to automatically remove We're considering opt-in flags to remove certain features that the API doesn't support yet but I don't have an ETA to share unfortunately. |
Currently typical users of I understand fields with some of these features (such as min/max values) can't easily be degraded to become OpenAI compatible, but at least for those that can, it would be fantastic to at least have the flag described by @RobertCraigie to simply automatically remove them from the schema. Even the Anything that helps avoid having to maintain redundant model classes would be a huge win. |
Somewhat related, how feasible would it be to convert |
Confirm this is a feature request for the Python library and not the underlying OpenAI API.
Describe the feature or improvement you're requesting
I noticed that you guys are doing some manipulation of Pydantic's generated schema to ensure compatibility with the API's schema validation. I found a few more instances that can be addressed:
Issues:
The test cases below builds on your
to_strict_json_schema
function and removes addresses these problematic fields with theremove_property_from_schema
function:Additional context
No response
The text was updated successfully, but these errors were encountered: