Skip to content

Bug with GPT Vision ?  #68

@ThibautPV

Description

@ThibautPV

Hello,

I don't know whether it's me who has a problem with my code or whether the API isn't yet working with GPT Vision:

Here is my code

$result = OpenAI::chat()->create([
            'model' => 'gpt-4-vision-preview',
            'messages' => [
                [
                    'role' => 'user',
                    'content' => [
                        ['type' => 'text', 'text' => 'Describe image'],
                        ['type' => 'image_url', 'image_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' => 900,
        ]);

And here is the error returned by Laravel:
Undefined array key "finish_reason"

Thanks for you help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions