定制 filaforge/filament-chat-ai 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

filaforge/filament-chat-ai

Composer 安装命令:

composer require filaforge/filament-chat-ai

包简介

Comprehensive Filament panel plugin for chatting with AI models from multiple providers including HuggingFace, Ollama, and DeepSeek. Features conversation management, model profiles, and user-specific settings.

README 文档

README

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

Features

  • AI Chat Interface: Seamless chat experience with AI models
  • Multiple AI Providers: Support for various AI services
  • Conversation History: Keep track of all your AI conversations
  • Customizable Prompts: Create and save custom prompt templates
  • File Upload Support: Send files to AI for analysis
  • Response Export: Save and share AI responses
  • Real-time Chat: Live chat experience with streaming responses

Installation

1. Install via Composer

composer require filaforge/chat-ai

2. Publish & Migrate

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

# 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\ChatAi\Providers\ChatAiPanelPlugin::make());
}

Setup

Configuration

The plugin will automatically:

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

AI Provider Configuration

Configure your AI provider in the published config file:

// config/chat-ai.php
return [
    'default_provider' => 'openai',
    'providers' => [
        'openai' => [
            'api_key' => env('OPENAI_API_KEY'),
            'model' => 'gpt-4',
        ],
        'anthropic' => [
            'api_key' => env('ANTHROPIC_API_KEY'),
            'model' => 'claude-3-sonnet',
        ],
    ],
];

Environment Variables

Add these to your .env file:

OPENAI_API_KEY=your_openai_api_key_here
ANTHROPIC_API_KEY=your_anthropic_api_key_here

Usage

Accessing the Chat AI

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

Starting a Conversation

  1. Select AI Model: Choose from available AI providers
  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

Advanced Features

  • File Uploads: Send documents, images, or other files
  • Prompt Templates: Save and reuse common prompts
  • Conversation Export: Download chat history
  • Custom Settings: Adjust AI parameters and behavior

Troubleshooting

Common Issues

  • API key errors: Verify your API keys are correct and have sufficient credits
  • Rate limiting: Check your AI provider's rate limits
  • Model not available: Ensure the selected model is available in your plan
  • File upload issues: Check file size limits and supported formats

Debug Steps

  1. Check the plugin configuration:
php artisan config:show chat-ai
  1. Verify routes are registered:
php artisan route:list | grep chat-ai
  1. Test API connectivity:
php artisan tinker
# Test your API keys manually
  1. Clear caches:
php artisan optimize:clear
  1. Check logs for errors:
tail -f storage/logs/laravel.log

Uninstall

1. Remove Plugin Registration

Remove the plugin from your panel provider:

// remove ->plugin(\Filaforge\ChatAi\Providers\ChatAiPanelPlugin::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/chat-ai.php
rm -rf resources/views/vendor/chat-ai

4. Remove Package and Clear Caches

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

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-chat-ai 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

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