https://github.com/ercogx/filament-openai-assistant
Filament OpenAI Assistant is a filament plugin that adds a chat page with an Open AI assistant
https://github.com/ercogx/filament-openai-assistant
filament-plugin laravel openai openai-assistants
Last synced: 3 months ago
JSON representation
Filament OpenAI Assistant is a filament plugin that adds a chat page with an Open AI assistant
- Host: GitHub
- URL: https://github.com/ercogx/filament-openai-assistant
- Owner: Ercogx
- License: mit
- Created: 2024-06-25T11:50:34.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-25T21:38:39.000Z (7 months ago)
- Last Synced: 2025-07-04T02:04:54.013Z (3 months ago)
- Topics: filament-plugin, laravel, openai, openai-assistants
- Language: PHP
- Homepage:
- Size: 673 KB
- Stars: 18
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# OpenAI Assistant Integration
Filament OpenAI Assistant is a filament plugin that adds a chat page with an Open AI assistant
Preview:

Dark Mode:
## Feature
- Integrate with OpenAI Assistant
- Easy to Setup
- Multiple Assistants
- Multiple Threads
- Support for dark mode## Usage
### Installation
First, you need install the package via composer:
```bash
composer require ercogx/filament-openai-assistant
```### Publish Migration
Then need publish migration:
```bash
php artisan vendor:publish --tag="filament-openai-assistant-migrations"
```Optional you can change foreign id for auth user if you use a different model instead of the ```\App\Models\User::class```
### Publish Config
Next, you can publish the config files with:
```bash
php artisan vendor:publish --tag="filament-openai-assistant-config"
```This will create a `config/filament-openai-assistant.php` configuration file in your project, which you can modify to your needs using environment variables:
```
OPENAI_API_KEY=sk-***
OPENAI_ASSISTANT_ID=asst_***
OPENAI_ASSISTANT_NAME=Assistant
```You can also add more assistants to the ```assistants``` array as needed
### Add To Filament Panels
The last step add the Plugin to your Panel's configuration. This will register the plugin's page with the Panel.
```php
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
\Ercogx\FilamentOpenaiAssistant\OpenaiAssistantPlugin::make()
]);
}
```You can also change the chat page to customize it
```php
\Ercogx\FilamentOpenaiAssistant\OpenaiAssistantPlugin::make()
->setRegistrablePages([
\App\Filament\Pages\ChatPage::class
])
``````php