hiddenhatpress / openai-assistants

A PHP client for OpenAI's assistants API
Apache License 2.0
6 stars 3 forks source link

I get an error when checking the status #2

Open alexeydovolny opened 1 week ago

alexeydovolny commented 1 week ago

Undefined array key "status" in

while($runresp['status'] != "completed") {}

The request cannot be executed

$runresp = $runservice->create($threadid, GPT_ASSIST);

{"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"}}

getinstancemz commented 1 week ago

I have confirmed this issue -- I will need to upgrade this library to work with Assistants API V2.

I'll leave this ticket open until this work is complete. Meanwhile the workaround it is to use an older model such as gpt-4-turbo which will work with Assistants API V1.