back1ng/chatgptlaravelignition

Adds the ChatGPT response to the error hint from laravel-ignition

v0.2.0 2023-02-01 19:35 UTC

This package is auto-updated.

Last update: 2024-04-30 00:51:30 UTC


README

Example of usage

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.