Skip to content

[Bug]: ErrorException: Undefined array key "outputs" #404

Closed
@arturspon

Description

@arturspon

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

  1. Create an assistant;
  2. Create a thread;
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions