ngvritishvili / open_ai_cli
Integrate OpenAI with PHP for CLI support
dev-main / 1.0.0.x-dev
2024-01-15 13:47 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.2
- laravel/prompts: ^0.1.15
- laravel/sanctum: ^3.3
- laravel/tinker: ^2.8
- openai-php/laravel: ^0.8.1
Requires (Dev)
- laravel/framework: ^9
- phpunit/phpunit: ^9.4|^10.1
This package is auto-updated.
Last update: 2024-05-15 14:28:39 UTC
README
Integrate AI CLI for you laravel project to communicate with open AI directly from command line.
Requirements
- Laravel ^10
Install
composer require ngvritishvili/open_ai_cli:dev-main --with-all-dependencies
After installation run command to install open-ai: php artisan openai:install
Add variable in .env file :
OPENAI_API_KEY=
OPENAI_ORGANIZATION=
OPENAI_REQUEST_TIMEOUT=
You can generate key from open-ai "https://platform.openai.com/api-keys"
And organization : "https://platform.openai.com/account/organization"
Usage
You can start chat with AI with artisan command : ai-cli:chat
Congratulation
Good luck