Closed
Description
Description
When sending a file to assistants in the last version and using streaming, it raises an exception with the following message: "Undefined array key "outputs".
Steps To Reproduce
- Create an assistant;
- Create a thread;
- Create a message in the thread and stream the response, like below:
OpenAI::threads()->messages()->create($chat->thread_id, [
'role' => 'user',
'content' => 'analyze this file and provide an overview for me',
'file_ids' => {your_file_ids},
]);
$stream = OpenAI::threads()->runs()->createStreamed(
threadId: {your_thread_id},
parameters: [
'assistant_id' => {your_assistant_id},
],
)
foreach ($stream as $chunk) {
// code
}
OpenAI PHP Client Version
v0.9.0
PHP Version
8.3.6
Notes
I was using the assistants streaming feature before it was released to the main branch, after it was released, some things changed and this behavior started to happen.