Git Product home page Git Product logo

Comments (7)

haydar avatar haydar commented on June 5, 2024

I cant get the what you try. Could you provide code?

from laravel.

gbarrios9670 avatar gbarrios9670 commented on June 5, 2024

I have the same issue, Class "OpenAI\Laravel\Facades\OpenAI" not found, please help.

from laravel.

pb30 avatar pb30 commented on June 5, 2024

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?

from laravel.

gbarrios9670 avatar gbarrios9670 commented on June 5, 2024

I ran composer require openai-php/laravel
in a fresh instalation or laravel 10

from laravel.

pb30 avatar pb30 commented on June 5, 2024

Where are you seeing the error?

from laravel.

gbarrios9670 avatar gbarrios9670 commented on June 5, 2024

here is the code
image
image
sometimes a get Class "OpenAI\Laravel\Facades\OpenAI" not found

from laravel.

pb30 avatar pb30 commented on June 5, 2024

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']));
});

from laravel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.