承接 broqit/fields-ai 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

broqit/fields-ai

Composer 安装命令:

composer require broqit/fields-ai

包简介

fields-ai is a powerful FilamentPHP plugin that integrates ChatGPT AI-powered features directly into your Filament forms.

README 文档

README

fields-ai is a powerful FilamentPHP plugin that integrates AI-powered features directly into your Filament forms.

What's New in Fields AI v0.1.1

  1. Support for Multiple OpenAI Endpoints:

    • The latest OpenAI models, including the gpt-4 and gpt-3.5-turbo, now use the Chat API endpoint, improving performance and response flexibility.
    • The gpt-3.5-turbo-instruct model will continue using the Completion API endpoint.
  2. Completion Models Now Considered Legacy:

    • Please note that the models using the Completion endpoint, such as gpt-3.5-turbo-instruct, are now considered legacy models.
    • We highly recommend trying out the latest models for improved results and future-proofing. You can explore them here: OpenAI Models Documentation.

Installation

composer require broqit/fields-ai

Usage

  1. After downloading, Run the package installation command:
php artisan fields-ai:install

This command will:

  • Publish the configuration file for Fields AI Settings.
  • Publish the configiration file for openai-php/laravel Settings.
  • Create a symbolic link for storage
  1. We use openai-php/laravel package to connect with OpenAI API. Blank environment variables for the OpenAI API key and organization id are already appended to your .env file, Add your API key here.
OPENAI_API_KEY=sk-...
OPENAI_ORGANIZATION=org-...

Configuration

The config/fields-ai.php file allows you to set default values and templates:

  • Set default AI models, max tokens, and temperature
  • Add custom content templates

Usage for Developers

Adding AI to Built-in Filament Form Fields

You can add AI generation capabilities to TextInput, Textarea, RichEditor, TinyEditor and EditorJS fields using the withAI() method:

Without Options

use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\RichEditor;
use Broqit\FilamentEditorJs\Forms\Components\EditorJs;
use Mohamedsabil83\FilamentFormsTinyeditor\Components\TinyEditor;

TextInput::make('title')
    ->withAI()

Textarea::make('description')
    ->withAI()

RichEditor::make('content')
    ->withAI()

EditorJS::make('content')
    ->withAI()

TinyEditor::make('content')
    ->withAI()

With Options

TextInput::make('title')
    ->withAI([
        'model' => 'gpt-4',
        'max_tokens' => 100,
        'temperature' => 0.7,
    ])

Textarea::make('description')
    ->withAI([
        'model' => 'gpt-3.5-turbo',
        'max_tokens' => 200,
        'temperature' => 0.5,
    ])

RichEditor::make('content')
    ->withAI([
        'model' => 'gpt-4',
        'max_tokens' => 500,
        'temperature' => 0.8,
    ])

EditorJS::make('content')
    ->withAI([
        'model' => 'gpt-4',
        'max_tokens' => 500,
        'temperature' => 0.8,
    ])

TinyEditor::make('content')
    ->withAI([
        'model' => 'gpt-4',
        'max_tokens' => 500,
        'temperature' => 0.8,
    ])

Usage for End-Users

Generating Content

  1. In a form with AI-enabled fields, users will see a "Generate with AI" link right upper to the field.
  2. Clicking this link opens a modal where users can:
    • Enter a custom prompt
    • Choose from pre-defined templates (if configured)
    • Use existing content for modification
  3. If modifying existing content, users can choose to:
    • Refine: Improve the existing text
    • Expand: Add more details to the existing text
    • Shorten: Summarize the existing text
  4. After entering the prompt, selecting a template, or choosing a modification option, click "Generate" to create or modify the content.
  5. The generated or modified content will be inserted into the form field.

Advanced Features

  • The package automatically checks for required dependencies and their versions, logging warnings if any are missing or outdated.
  • Developers can add custom templates and prompts through the configuration file.

License

The MIT License (MIT). Please see License File for more information.

broqit/fields-ai 适用场景与选型建议

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

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

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-30