back1ng / chatgptlaravelignition
Adds the ChatGPT response to the error hint from laravel-ignition
v0.2.0
2023-02-01 19:35 UTC
Requires
- php: >=8.1
- laravel/framework: ^8.0|^9.0
- openai-php/client: ^0.3.0
- spatie/laravel-ignition: ^1.0|^2.0
Requires (Dev)
README
Installation:
Install package via composer with --dev flag:
composer require back1ng/chatgptlaravelignition --dev
Add this solution to your ignition.php config
'solution_providers' => [ \Back1ng\ChatGPTLaravelIgnition\Solutions\ChatGPTSolution::class, ],
Publish configuration file:
php artisan vendor:publish --provider="Back1ng\ChatGPTLaravelIgnition\ServiceProvider"
Add OPENAI_API_KEY to your .env
OPENAI_API_KEY=sk-... OPENAI_MAX_TOKENS=256 //optional
Now for each error, there will be a request to ChatGPT.