codewithngoni/filament-ask-ai
Composer 安装命令:
composer require codewithngoni/filament-ask-ai
包简介
Adds AI-power on Filament forms fields.
README 文档
README
Filament Ask AI is a Laravel package that adds AI-powered hint actions to Filament form fields. It integrates with AI models (like Mistral, Gemini, and Claude) to provide a "hint action" in your form fields, allowing users to interact with AI directly within your Laravel Filament forms.
Installation
To install the package, run the following command:
composer require codewithngoni/filament-ask-ai
Usage
After installing, run the package installation command:
php artisan vendor:publish --tag=filament-ask-ai-config
This command will:
Publish the configuration file for Filament AI settings.
Publish the configuration file for openai-php/laravel settings.
Create a symbolic link for storage.
We use Gemini and Mistral for API keys. Add the following to your .env file:
MISTRAL_API_KEY=your_mistral_api_key GEMINI_API_KEY=your_gemini_api_key
Configuration
You can configure the AI keys by modifying the config/filament-ask-ai.php file. Ensure that the correct API keys for Mistral, Gemini, and Claude are set.
Usage for Developers
Adding AI to Built-in Filament Form Fields You can add AI generation capabilities to TextInput, Textarea, and RichEditor fields using the AskMistral(), AskGemini(), or AskClaude() methods:
Without Options
use Filament\Forms\Components\TextInput; use Filament\Forms\Components\Textarea; use Filament\Forms\Components\RichEditor; TextInput::make('title') ->AskMistral() Textarea::make('description') ->AskGemini()
With Options
TextInput::make('title') ->AskMistral([ 'model' => 'mistral-large-latest', 'temperature' => 0.7, ]) Textarea::make('description') ->AskGemini([ 'model' => 'gemini-2.0-flash', 'max_tokens' => 200, ]) RichEditor::make('content') ->AskClaude([ 'model' => 'claude-2', 'temperature' => 0.8, ])
Credits
- Ngoni Sendama CodeWithNgoni
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
codewithngoni/filament-ask-ai 适用场景与选型建议
codewithngoni/filament-ask-ai 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 04 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 codewithngoni/filament-ask-ai 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 codewithngoni/filament-ask-ai 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 16
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-30