I’ve been trying to get the structured outputs working with the Assistants API / Python SDK with file_search enabled but getting a variety of errors - I’ve had no problem using the exact same logic with Chat Completions.
assistant = self.client.beta.assistants.create(
name=file.filename,
instructions='You are an AI assistant that helps Commercial Real Estate professionals find data inside Property Brochures',
model='gpt-4o-mini',
tools=[{"type": "file_search"}, openai.pydantic_function_tool(<PydanticModel>)],
)
this returns the error
openai.BadRequestError: Error code: 400 - {'error': {'message': "Unknown parameter: 'tools[1].function.strict'.", 'type': 'invalid_request_error', 'param': 'tools[1].function.strict', 'code': 'unknown_parameter'}}
i’ve also tried using response_format but get results saying this needs to be ‘json_object’ or ‘text’.
I’m using version openai v1.51.2 (wrapped in using AzureOpenAI).
Any similar issues/solutions?