Undefined array key "file_id"
latrell opened this issue · 0 comments
latrell commented
I added a message with a picture to the thread and an exception occurred
$message_content = [
['type' => 'text', 'text' => '666'],
['type' => 'image_url', 'image_url' => ['url' => 'https://www.xxx.xxx/xxx.jpg']],
];
OpenAI::threads()->messages()->create($thread_id, [
'role' => 'user',
'content' => $message_content,
]);
Undefined array key "file_id" {"exception":"[object] (ErrorException(code: 0): Undefined array key \"file_id\" at /var/www/html/vendor/openai-php/client/src/Responses/Threads/Messages/ThreadMessageResponseContentImageUrl.php:37)
I found this file and printed $attributes and got the following
{"url":"https://www.xxx.xxx/xxx.jpg","detail":"auto"}