PHP code example of llm-agents / openai-client

1. Go to this page and download the library: Download llm-agents/openai-client library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

llm-agents / openai-client example snippets


class Kernel extends \Spiral\Framework\Kernel
{
   public function defineBootloaders(): array
   {
       return [
           // ... other bootloaders ...
           \LLM\Agents\OpenAI\Client\Integration\Spiral\OpenAIClientBootloader::class,
       ];
   }
}
bash
composer 
bash
php artisan openai:install