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
Confirm this is an issue with the Python library and not an underlying OpenAI API
This is an issue with the Python library
Describe the bug
When I try to create a json schema assistant, I get this error "error": "Error code: 400 - {'error': {'message': \"Missing required parameter: 'response_format.json_schema.schema'. You provided 'schema_', did you mean to provide 'schema'?\", 'type': 'invalid_request_error', 'param': 'response_format.json_schema.schema', 'code': 'missing_required_parameter'}}"
When I go into the response_format_json_schema.py file and update JSONSchema.schema_ to JSONSchema.schema, the problem disappears.
To Reproduce
Call openai.AsyncOpenAI().beta.assistants.create with a response_format parameter
To address this issue, you can modify the library's source code to ensure that schema_ is correctly serialized as schema in the API request. This involves updating the serialization logic within the response_format_json_schema.py file. By changing the attribute from schema_ to schema, the API will recognize the parameter, resolving the error.
Hi @Dhruv-net, thank you for your response but I have already mentioned that fix in my description above and I do not wish to fork the repo for my deployments!
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
When I try to create a json schema assistant, I get this error
"error": "Error code: 400 - {'error': {'message': \"Missing required parameter: 'response_format.json_schema.schema'. You provided 'schema_', did you mean to provide 'schema'?\", 'type': 'invalid_request_error', 'param': 'response_format.json_schema.schema', 'code': 'missing_required_parameter'}}"
When I go into the
response_format_json_schema.py
file and updateJSONSchema.schema_
toJSONSchema.schema
, the problem disappears.To Reproduce
Call openai.AsyncOpenAI().beta.assistants.create with a response_format parameter
Code snippets
OS
MacOS Sonoma 14.6.1
Python version
Python v3.12.2
Library version
openai v1.54.4
The text was updated successfully, but these errors were encountered: