laravel icon indicating copy to clipboard operation
laravel copied to clipboard

"Undefined array key \"file_ids\""

Open alihemadeh opened this issue 1 year ago • 1 comments

$threadRun = $openAi->threads() ->createAndRun([ 'assistant_id' => $assistantId, 'thread' => [ 'messages' => [ [ 'role' => 'user', 'content' => $message, ], ], ], ]);

exception : "ErrorException" file : "/usr/src/app/vendor/openai-php/client/src/Responses/Threads/Runs/ThreadRunResponse.php" line : 89 message : "Undefined array key "file_ids""

namespace OpenAI\Responses\Threads\Runs;
If I put on ThreadRunResponse.php line 89 $attributes['file_ids'] ?? [] it works

alihemadeh avatar Jul 23 '24 16:07 alihemadeh

have same problem, happend after migrating from v1 to v2

nanoeray avatar Jul 25 '24 14:07 nanoeray

Looks like this is already nullable - must have been fixed already.

https://github.com/openai-php/client/blob/main/src/Responses/Threads/Messages/Delta/ThreadMessageDeltaObject.php#L51

Closing.

iBotPeaches avatar Apr 10 '25 01:04 iBotPeaches