-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed as not planned
Labels
bugSomething isn't workingSomething isn't working
Description
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
Code snippets
await openai.AsyncOpenAI().beta.assistants.create(
model=assistant.model,
description=assistant.description,
instructions=assistant.instructions,
name=assistant.name,
response_format=assistant.response_format,
temperature=assistant.temperature,
tool_resources=assistant.tool_resources,
tools=assistant.tools,
top_p=assistant.top_p,
)
OS
MacOS Sonoma 14.6.1
Python version
Python v3.12.2
Library version
openai v1.54.4
Pydantic Version
2.9.2
tattuu
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working