filaforge/filament-deepseek-chat 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

filaforge/filament-deepseek-chat

Composer 安装命令:

composer require filaforge/filament-deepseek-chat

包简介

Filament panel plugin providing a DeepSeek chat page with admin-manageable API key.

README 文档

README

A powerful Filament plugin that integrates DeepSeek AI chat capabilities directly into your admin panel.

Features

  • DeepSeek AI Integration: Chat with advanced AI models powered by DeepSeek
  • Conversation Management: Save, organize, and continue chat conversations
  • Customizable Settings: Configure API keys, models, and chat parameters
  • Real-time Chat: Live chat experience with streaming responses
  • Conversation History: Keep track of all your AI conversations
  • Export Conversations: Save and share chat transcripts
  • Role-based Access: Configurable user permissions and access control
  • Multi-model Support: Switch between different DeepSeek models
  • Context Awareness: Maintain conversation context across sessions

Installation

1. Install via Composer

composer require filaforge/deepseek-chat

2. Publish & Migrate

# Publish provider groups (config, views, migrations)
php artisan vendor:publish --provider="Filaforge\\DeepseekChat\\Providers\\DeepseekChatServiceProvider"

# Run migrations
php artisan migrate

3. Register Plugin

Add the plugin to your Filament panel provider:

use Filament\Panel;

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

Setup

Configuration

The plugin will automatically:

  • Publish configuration files to config/deepseek-chat.php
  • Publish view files to resources/views/vendor/deepseek-chat/
  • Publish migration files to database/migrations/
  • Register necessary routes and middleware

DeepSeek API Configuration

Configure your DeepSeek API in the published config file:

// 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),
];

Environment Variables

Add these to your .env file:

DEEPSEEK_API_KEY=your_deepseek_api_key_here
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_MODEL=deepseek-chat
DEEPSEEK_MAX_TOKENS=4096
DEEPSEEK_TEMPERATURE=0.7
DEEPSEEK_STREAM=true
DEEPSEEK_TIMEOUT=60

Getting Your DeepSeek API Key

  1. Visit DeepSeek Platform
  2. Create an account or sign in
  3. Navigate to API Keys section
  4. Generate a new API key
  5. Copy the key to your .env file

Usage

Accessing DeepSeek Chat

  1. Navigate to your Filament admin panel
  2. Look for the "DeepSeek Chat" menu item
  3. Start chatting with AI models

Starting a Conversation

  1. Select Model: Choose from available DeepSeek models
  2. Type Your Message: Enter your question or prompt
  3. Send Message: Submit your message to the AI
  4. View Response: See the AI's response in real-time
  5. Continue Chat: Keep the conversation going

Managing Conversations

  1. New Chat: Start a fresh conversation
  2. Save Chat: Automatically save important conversations
  3. Load Chat: Resume previous conversations
  4. Export Chat: Download conversation transcripts
  5. Delete Chat: Remove unwanted conversations

Advanced Features

  • Model Selection: Switch between different DeepSeek models
  • Parameter Tuning: Adjust temperature, max tokens, and other settings
  • Context Management: Maintain conversation context across sessions
  • Streaming Responses: Real-time AI responses for better user experience

Troubleshooting

Common Issues

  • API key errors: Verify your DeepSeek API key is correct and has sufficient credits
  • Rate limiting: Check your DeepSeek API rate limits and usage
  • Model not available: Ensure the selected model is available in your plan
  • Connection timeouts: Check network connectivity and timeout settings

Debug Steps

  1. Check the plugin configuration:
php artisan config:show deepseek-chat
  1. Verify routes are registered:
php artisan route:list | grep deepseek-chat
  1. Test API connectivity:
php artisan tinker
# Test your API key manually
  1. Check environment variables:
php artisan tinker
echo env('DEEPSEEK_API_KEY');
  1. Clear caches:
php artisan optimize:clear
  1. Check logs for errors:
tail -f storage/logs/laravel.log

API Error Codes

  • 401 Unauthorized: Invalid or expired API key
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: DeepSeek service issue
  • Timeout: Request took too long to complete

Security Considerations

Access Control

  • Role-based permissions: Restrict access to authorized users only
  • API key security: Never expose API keys in client-side code
  • User isolation: Ensure users can only access their own conversations
  • Audit logging: Track all chat activities and API usage

Best Practices

  • Use environment variables for API keys
  • Implement proper user authentication
  • Monitor API usage and costs
  • Regularly rotate API keys
  • Set appropriate rate limits

Uninstall

1. Remove Plugin Registration

Remove the plugin from your panel provider:

// remove ->plugin(\Filaforge\DeepseekChat\Providers\DeepseekChatPanelPlugin::make())

2. Roll Back Migrations (Optional)

php artisan migrate:rollback
# or roll back specific published files if needed

3. Remove Published Assets (Optional)

rm -f config/deepseek-chat.php
rm -rf resources/views/vendor/deepseek-chat

4. Remove Package and Clear Caches

composer remove filaforge/deepseek-chat
php artisan optimize:clear

5. Clean Up Environment Variables

Remove these from your .env file:

DEEPSEEK_API_KEY=your_deepseek_api_key_here
DEEPSEEK_BASE_URL=https://api.deepseek.com
DEEPSEEK_MODEL=deepseek-chat
DEEPSEEK_MAX_TOKENS=4096
DEEPSEEK_TEMPERATURE=0.7
DEEPSEEK_STREAM=true
DEEPSEEK_TIMEOUT=60

Support

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This plugin is open-sourced software licensed under the MIT license.

Made with ❤️ by the Filaforge Team

filaforge/filament-deepseek-chat 适用场景与选型建议

filaforge/filament-deepseek-chat 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 08 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「laravel」 「platform」 「filament」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 filaforge/filament-deepseek-chat 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 filaforge/filament-deepseek-chat 我们能提供哪些服务?
定制开发 / 二次开发

基于 filaforge/filament-deepseek-chat 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 19
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-08-19