Not working even after installing.
shahidkarimi opened this issue · comments
Class "OpenAI\Laravel\Facades\OpenAI" not found
tried to use:
`\OpenAI\Laravel\Facades\OpenAI
\OpenAI\Laravel\Facades\OpenAI\OpenAI`
I cant get the what you try. Could you provide code?
I have the same issue, Class "OpenAI\Laravel\Facades\OpenAI" not found, please help.
Any change if you run this? composer require openai-php/laravel:^0.7.0
Can you share some example code where you are trying to use it?
I ran composer require openai-php/laravel
in a fresh instalation or laravel 10
Where are you seeing the error?
Unsupported operand types: string * int
Either set a value for OPENAI_REQUEST_TIMEOUT or comment it out. Issue occurs when it is left blank
Could not reproduce Class Not Found error:
laravel new test
cd test
composer require openai-php/laravel
php artisan vendor:publish --provider="OpenAI\Laravel\ServiceProvider"
php artisan serve
use OpenAI\Laravel\Facades\OpenAI;
Route::get('/', function () {
dd(OpenAI:: completions()->create([
'model' => 'text-davinci-003',
'prompt' => 'PHP is']));
});