PHPackages                             broqit/fields-ai - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. broqit/fields-ai

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

broqit/fields-ai
================

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

2.1.0(4mo ago)0134MITPHPPHP ^8.3

Since Sep 21Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/broqit/fields-ai)[ Packagist](https://packagist.org/packages/broqit/fields-ai)[ Docs](https://github.com/broqit/fields-ai)[ RSS](/packages/broqit-fields-ai/feed)WikiDiscussions master Synced today

READMEChangelog (10)Dependencies (16)Versions (18)Used By (0)

Fields AI:- Build AI-powered Filament forms.
============================================

[](#fields-ai--build-ai-powered-filament-forms)

**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
------------------------------

[](#whats-new-in-fields-ai-v011)

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](https://platform.openai.com/docs/models).

Installation
------------

[](#installation)

```
composer require broqit/fields-ai
```

Usage
-----

[](#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

2. We use [openai-php/laravel](https://github.com/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
-------------

[](#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
--------------------

[](#usage-for-developers)

### Adding AI to Built-in Filament Form Fields

[](#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

[](#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

[](#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
-------------------

[](#usage-for-end-users)

### Generating Content

[](#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
-----------------

[](#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
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance78

Regular maintenance activity

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Recently: every ~38 days

Total

17

Last Release

122d ago

Major Versions

0.1.2 → 2.0.02025-08-24

PHP version history (5 changes)0.0.1PHP ^8.1

0.1.0PHP ^8.2

0.1.1PHP ^8.2|^8.3|^8.4

2.0.0PHP ^8.3|^8.4|^8.5

2.0.4PHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b0183fae593d83cd5fb3426199ba05ec2d2513b0eb40187e4793a9145256e9d?d=identicon)[broqit](/maintainers/broqit)

---

Top Contributors

[![broqit](https://avatars.githubusercontent.com/u/27624002?v=4)](https://github.com/broqit "broqit (7 commits)")

---

Tags

laravellaravel-packagefilament-pluginfilamentphplaravel-aiai-content-generationbroqitfields-ai

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/broqit-fields-ai/health.svg)

```
[![Health](https://phpackages.com/badges/broqit-fields-ai/health.svg)](https://phpackages.com/packages/broqit-fields-ai)
```

###  Alternatives

[jiten14/jitone-ai

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

223.6k](/packages/jiten14-jitone-ai)[stephenjude/filament-feature-flags

Filament implementation of feature flags and segmentation with Laravel Pennant.

122177.8k1](/packages/stephenjude-filament-feature-flags)[relaticle/custom-fields

User Defined Custom Fields for Laravel Filament

16354.2k](/packages/relaticle-custom-fields)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6649.5k1](/packages/marcelweidum-filament-passkeys)[marcelweidum/filament-expiration-notice

Customize the livewire expiration notice

94135.4k5](/packages/marcelweidum-filament-expiration-notice)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
