When calling the Assistant API and selecting the gpt-4o
or gpt-4o-mini
model, the model may attempt to call an unsupported browser
tool. The Python SDK does not define this type of ToolCall
, resulting in an exception being thrown.
with openai.beta.threads.create_and_run_stream(
assistant_id='an assistant only supports Code Interpreter',
model='gpt-4o-mini',
instructions='Use browser tool first to answer the user's question',
thread= {
'messages': [{'role': 'user', 'content': 'Who is Tom'}]
},
tool_choice='required',
) as stream:
stream.until_done()