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

Unrecognized request argument supplied: messages

jayomayan opened this issue · comments

I'm not sure what I'm doing wrong in this :

   $result = OpenAI::completions()->create([
        'model' => 'gpt-3.5-turbo',
        'messages' =>  [
                ['role' => 'system', 'content' => 'you are a proffessional assistant.'],
                ['role' => 'user', 'content' => 'Who are you?' ],
                ],
        ]);

it spits an error "Unrecognized request argument supplied: messages"

$result = OpenAI::completions()->create
to
$result = OpenAI::chat()->create

Use "chat" and still fails same messaje