I’m encountering an error when using Assistant API with gpt-4o.
I got this error;
Error: Error code: 400 - {‘error’: {‘message’: “The requested model ‘gpt-4o’ cannot be used with the Assistants API in v1. Follow the migration guide to upgrade to v2: https://platform.openai.com/docs/assistants/migration.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘model’, ‘code’: ‘unsupported_model’}}
It seems like this error happened the code below;
# Create the run
run = await client.beta.threads.runs.create(
thread_id=thread_id, assistant_id=assistant_id
)
I created client instance;
client = AsyncOpenAI(api_key=api_key)
I installed openai=1.20.0 and This Assistant version is v2.
Thanks for any help or info