-
Notifications
You must be signed in to change notification settings - Fork 16.8k
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
openai[patch]: accept json schema response format directly #27623
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
assert actual == response_format | ||
|
||
actual = _convert_to_openai_response_format(response_format["json_schema"]) | ||
assert actual == response_format |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we add a test that expects strict
to be passed in
) -> Union[Dict, TypeBaseModel]: | ||
if isinstance(schema, type) and is_basemodel_subclass(schema): | ||
return schema | ||
elif "json_schema" in schema and schema.get("type") == "json_schema": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be worth adding a check to confirm that passed in strict
and schema strict
agree and throw error if not
Co-authored-by: Erick Friis <erick@langchain.dev>
… into bagatur/fix_25460
fix #25460