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

Install command

ijpatricio opened this issue · comments

Hey,

So I came late to the party, now installing this package, and got into some roadblocks:

After requiring the package with composer, running php artisan openai:install doesn't work.
Check picture below
image

In the vendor dir, there's no Commands dir or class, nor the Provider is registering any commands.

I was about to submit a PR to change README, regarding the install command, to change it to...

php artisan vendor:publish --provider=OpenAI\\Laravel\\ServiceProvider

... but it does appear on the README.md, and it seems the main branch is ahead of current release.

I can gladly advance with it, just wanted to check in first.

Hi @ijpatricio

That's strange. The current release is v0.8.1 which is not behind main.

If I run composer require openai-php/laravel in a fresh Laravel application I receive v0.8.1 and the openai:install command works.

In your screenshot, I can see that you have v0.8.0 installed. Do you have any idea why you do not have the latest version?

Hi @gehrisandro

I'm not sure, but it seems to me because of the current composer.lock state at that moment.
After a composer update, everything is working ok.

Nice touch, adding the keys to .env and .env.example! 👌

@nunomaduro after long talks already closed this, so that's ok! 😃

image