PHPackages                             filaforge/filament-huggingface-chat - 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. filaforge/filament-huggingface-chat

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

filaforge/filament-huggingface-chat
===================================

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.

1.0.1(8mo ago)00MITPHPPHP ^8.1

Since Aug 19Pushed 8mo agoCompare

[ Source](https://github.com/filaforge/filament-huggingface-chat)[ Packagist](https://packagist.org/packages/filaforge/filament-huggingface-chat)[ Docs](https://github.com/filaforge/huggingface-chat)[ RSS](/packages/filaforge-filament-huggingface-chat/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (7)Versions (6)Used By (0)

Filaforge HuggingFace Chat
==========================

[](#filaforge-huggingface-chat)

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

Features
--------

[](#features)

- **HuggingFace AI Integration**: Chat with thousands of AI models from HuggingFace
- **Conversation Management**: Save, organize, and continue chat conversations
- **Model Selection**: Choose from a wide variety of AI models
- **Customizable Settings**: Configure API tokens, models, and chat parameters
- **Real-time Chat**: Live chat experience with streaming responses
- **Conversation History**: Keep track of all your AI conversations
- **Export Conversations**: Save and share chat transcripts
- **Role-based Access**: Configurable user permissions and access control
- **Multi-model Support**: Switch between different HuggingFace models
- **Context Awareness**: Maintain conversation context across sessions

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

[](#installation)

### 1. Install via Composer

[](#1-install-via-composer)

```
composer require filaforge/huggingface-chat
```

### 2. Publish &amp; Migrate

[](#2-publish--migrate)

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

# Run migrations
php artisan migrate
```

### 3. Register Plugin

[](#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\HuggingfaceChat\Providers\HfChatPanelPlugin::make());
}
```

Setup
-----

[](#setup)

### Configuration

[](#configuration)

The plugin will automatically:

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

### HuggingFace API Configuration

[](#huggingface-api-configuration)

Configure your HuggingFace API in the published config file:

```
// config/hf-chat.php
return [
    'api_token' => env('HF_API_TOKEN'),
    'base_url' => env('HF_BASE_URL', 'https://api-inference.huggingface.co'),
    'default_model' => env('HF_MODEL_ID', 'meta-llama/Meta-Llama-3-8B-Instruct'),
    'max_length' => env('HF_MAX_LENGTH', 512),
    'temperature' => env('HF_TEMPERATURE', 0.7),
    'stream' => env('HF_STREAM', false),
    'timeout' => env('HF_TIMEOUT', 60),
    'use_openai_format' => env('HF_USE_OPENAI', true),
];
```

### Environment Variables

[](#environment-variables)

Add these to your `.env` file:

```
HF_API_TOKEN=your_huggingface_api_token_here
HF_BASE_URL=https://api-inference.huggingface.co
HF_MODEL_ID=meta-llama/Meta-Llama-3-8B-Instruct
HF_MAX_LENGTH=512
HF_TEMPERATURE=0.7
HF_STREAM=false
HF_TIMEOUT=60
HF_USE_OPENAI=true
```

### Getting Your HuggingFace API Token

[](#getting-your-huggingface-api-token)

1. Visit [HuggingFace](https://huggingface.co/)
2. Create an account or sign in
3. Go to your profile settings
4. Navigate to "Access Tokens"
5. Generate a new token
6. Copy the token to your `.env` file

Usage
-----

[](#usage)

### Accessing HuggingFace Chat

[](#accessing-huggingface-chat)

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

### Starting a Conversation

[](#starting-a-conversation)

1. **Select Model**: Choose from available HuggingFace models
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
5. **Continue Chat**: Keep the conversation going

### Managing Conversations

[](#managing-conversations)

1. **New Chat**: Start a fresh conversation
2. **Save Chat**: Automatically save important conversations
3. **Load Chat**: Resume previous conversations
4. **Export Chat**: Download conversation transcripts
5. **Delete Chat**: Remove unwanted conversations

### Advanced Features

[](#advanced-features)

- **Model Selection**: Switch between different HuggingFace models
- **Parameter Tuning**: Adjust temperature, max length, and other settings
- **Context Management**: Maintain conversation context across sessions
- **Streaming Responses**: Real-time AI responses (when supported)

Troubleshooting
---------------

[](#troubleshooting)

### Common Issues

[](#common-issues)

- **API token errors**: Verify your HuggingFace API token is correct
- **Rate limiting**: Check your HuggingFace API rate limits and usage
- **Model not available**: Ensure the selected model is available and loaded
- **Connection timeouts**: Check network connectivity and timeout settings

### Debug Steps

[](#debug-steps)

1. Check the plugin configuration:

```
php artisan config:show hf-chat
```

2. Verify routes are registered:

```
php artisan route:list | grep hf-chat
```

3. Test API connectivity:

```
php artisan tinker
# Test your API token manually
```

4. Check environment variables:

```
php artisan tinker
echo env('HF_API_TOKEN');
```

5. Clear caches:

```
php artisan optimize:clear
```

6. Check logs for errors:

```
tail -f storage/logs/laravel.log
```

### API Error Codes

[](#api-error-codes)

- **401 Unauthorized**: Invalid or expired API token
- **429 Too Many Requests**: Rate limit exceeded
- **503 Service Unavailable**: Model is currently loading or unavailable
- **Timeout**: Request took too long to complete

Security Considerations
-----------------------

[](#security-considerations)

### Access Control

[](#access-control)

- **Role-based permissions**: Restrict access to authorized users only
- **API token security**: Never expose API tokens in client-side code
- **User isolation**: Ensure users can only access their own conversations
- **Audit logging**: Track all chat activities and API usage

### Best Practices

[](#best-practices)

- Use environment variables for API tokens
- Implement proper user authentication
- Monitor API usage and costs
- Regularly rotate API tokens
- Set appropriate rate limits

Uninstall
---------

[](#uninstall)

### 1. Remove Plugin Registration

[](#1-remove-plugin-registration)

Remove the plugin from your panel provider:

```
// remove ->plugin(\Filaforge\HuggingfaceChat\Providers\HfChatPanelPlugin::make())
```

### 2. Roll Back Migrations (Optional)

[](#2-roll-back-migrations-optional)

```
php artisan migrate:rollback
# or roll back specific published files if needed
```

### 3. Remove Published Assets (Optional)

[](#3-remove-published-assets-optional)

```
rm -f config/hf-chat.php
rm -rf resources/views/vendor/hf-chat
```

### 4. Remove Package and Clear Caches

[](#4-remove-package-and-clear-caches)

```
composer remove filaforge/huggingface-chat
php artisan optimize:clear
```

### 5. Clean Up Environment Variables

[](#5-clean-up-environment-variables)

Remove these from your `.env` file:

```
HF_API_TOKEN=your_huggingface_api_token_here
HF_BASE_URL=https://api-inference.huggingface.co
HF_MODEL_ID=meta-llama/Meta-Llama-3-8B-Instruct
HF_MAX_LENGTH=512
HF_TEMPERATURE=0.7
HF_STREAM=false
HF_TIMEOUT=60
HF_USE_OPENAI=true
```

Support
-------

[](#support)

- **Documentation**: [GitHub Repository](https://github.com/filaforge/huggingface-chat)
- **Issues**: [GitHub Issues](https://github.com/filaforge/huggingface-chat/issues)
- **Discussions**: [GitHub Discussions](https://github.com/filaforge/huggingface-chat/discussions)

Contributing
------------

[](#contributing)

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

License
-------

[](#license)

This plugin is open-sourced software licensed under the [MIT license](LICENSE).

---

**Made with ❤️ by the Filaforge Team**

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance58

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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 ~0 days

Total

4

Last Release

265d ago

Major Versions

0.1.2 → v1.0.02025-08-19

### Community

Maintainers

![](https://www.gravatar.com/avatar/e7ccd0e302c517e0c6bc2b4ef05008e5beb1621bf5a64b17b82cdceb19566389?d=identicon)[filaforge](/maintainers/filaforge)

---

Top Contributors

[![blhk0532](https://avatars.githubusercontent.com/u/221689993?v=4)](https://github.com/blhk0532 "blhk0532 (5 commits)")

---

Tags

laravelaichatmachine learningfilamentfilament-pluginllmdeepseekollamahuggingface

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/filaforge-filament-huggingface-chat/health.svg)

```
[![Health](https://phpackages.com/badges/filaforge-filament-huggingface-chat/health.svg)](https://phpackages.com/packages/filaforge-filament-huggingface-chat)
```

###  Alternatives

[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[schmeits/filament-character-counter

This is a Filament character counter TextField and Textarea form field for Filament v4 and v5

33184.7k6](/packages/schmeits-filament-character-counter)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12247.8k](/packages/jibaymcs-filament-tour)[howdu/filament-record-switcher

Resource level navigation with search

1512.5k](/packages/howdu-filament-record-switcher)

PHPackages © 2026

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