openai-php / laravel

⚡️ OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with OpenAI API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined array key "permission"

MachariaK opened this issue · comments

I have installed the package, published the configuration file the used the example in the controller as per the provided example:

`use OpenAI\Laravel\Facades\OpenAI;

$result = OpenAI::chat()->create([
'model' => 'gpt-3.5-turbo-instruct',
'messages' => [
['role' => 'user', 'content' => 'Hello!'],
],
]);

echo $result->choices[0]->message->content; // Hello! How can I assist you today?`

I am getting the following error:

[2023-11-06 07:09:24] local.ERROR: Undefined array key "permission" {"exception":"[object] (ErrorException(code: 0): Undefined array key \"permission\" at ***\\vendor\\openai-php\\client\\src\\Responses\\Models\\RetrieveResponse.php:51)