PHP code example of filaforge / filament-deepseek-chat

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

    

filaforge / filament-deepseek-chat example snippets


use Filament\Panel;

public function panel(Panel $panel): Panel
{
    return $panel
        // ... other configuration
        ->plugin(\Filaforge\DeepseekChat\Providers\DeepseekChatPanelPlugin::make());
}

// config/deepseek-chat.php
return [
    'api_key' => env('DEEPSEEK_API_KEY'),
    'base_url' => env('DEEPSEEK_BASE_URL', 'https://api.deepseek.com'),
    'default_model' => env('DEEPSEEK_MODEL', 'deepseek-chat'),
    'max_tokens' => env('DEEPSEEK_MAX_TOKENS', 4096),
    'temperature' => env('DEEPSEEK_TEMPERATURE', 0.7),
    'stream' => env('DEEPSEEK_STREAM', true),
    'timeout' => env('DEEPSEEK_TIMEOUT', 60),
];

// remove ->plugin(\Filaforge\DeepseekChat\Providers\DeepseekChatPanelPlugin::make())
bash
# Publish provider groups (config, views, migrations)
php artisan vendor:publish --provider="Filaforge\\DeepseekChat\\Providers\\DeepseekChatServiceProvider"

# Run migrations
php artisan migrate
bash
php artisan tinker
# Test your API key manually
bash
php artisan tinker
echo env('DEEPSEEK_API_KEY');
bash
php artisan optimize:clear
bash
composer remove filaforge/deepseek-chat
php artisan optimize:clear