PHP code example of ferarandrei1 / filament-ai-chat-widget

1. Go to this page and download the library: Download ferarandrei1/filament-ai-chat-widget 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/ */

    

ferarandrei1 / filament-ai-chat-widget example snippets


use Feraandrei1\FilamentAiChatWidget\FilamentAiChatPlugin;
use Feraandrei1\FilamentAiChatWidget\Filament\Resources\AiKnowledgeBaseResource;

public function panel(Panel $panel): Panel
{
    return $panel
        ->resources([
            AiKnowledgeBaseResource::class,
        ])
        ->plugins([
            FilamentAiChatPlugin::make(),
        ]);
}
bash
php artisan vendor:publish --tag="filament-ai-chat-widget-migrations"
php artisan migrate
bash
php artisan optimize:clear
bash
php artisan vendor:publish --tag="filament-ai-chat-widget-config"