Skip to content

[Bug]: Image read? #539

Open
Open
@striderxfossility

Description

@striderxfossility

Description

I get:

Undefined array key "choices"

Steps To Reproduce

$completion = $this->client->chat()->create([
                'model' => 'llama-3.3-70b-instruct',
                'messages' => [
                    [
                        'role' => 'system',
                        'content' => [
                            [
                                'type' => 'text',
                                'text' => 'You are a helpful assistant.'
                            ]
                        ]
                    ],
                    [
                        'role' => 'user',
                        'content' => [
                            [
                                'type' => 'text',
                                'text' => "What's in this image?"
                            ],
                            [
                                'type' => 'image_url',
                                'image_url' => [
                                    'url' => 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-nature-boardwalk.jpg/2560px-Gfp-wisconsin-madison-the-nature-boardwalk.jpg',
                                ],
                            ],
                        ],
                    ]
                ],
                'max_tokens' => 2000,
                'temperature' => 0.5,
                'stream' => false
            ]);

OpenAI PHP Client Version

v0.11.0

PHP Version

8.3.16

Notes

No response

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