Download the PHP package sentix/ai-chatbot without Composer
On this page you can find all versions of the php package sentix/ai-chatbot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sentix/ai-chatbot
More information about sentix/ai-chatbot
Files in sentix/ai-chatbot
Package ai-chatbot
Short Description Smart, multi-provider AI chatbot widget package with automatic Eloquent context extraction for Laravel.
License MIT
Informations about the package ai-chatbot
Sentix AI Chatbot Package (sentix/ai-chatbot) v1.5.0
A lightweight, framework-agnostic (zero Tailwind/Bootstrap dependency), driver-architected AI Chatbot widget for Laravel with real-time SSE streaming, automatic Eloquent context extraction, SaaS Multi-Tenant settings resolution, Provider Auto-Failover switching, RAG relevance ranking, Quick Action Chips, Text-to-Speech, IndexedDB persistence, Function Calling Tools, built-in rate limiting, and zero-scrollbar modern UI.
🆕 What's New in v1.5.0
- 🏢 SaaS Multi-Tenant Database Settings Resolution: Automatically checks
setting('gemini_api_key'),setting('gemini_model'),setting('active_provider')for multi-tenant SaaS apps before falling back to Laravelconfig(). - 🔄 Provider Auto-Failover Switching (Max 3 Attempts): If active AI provider returns quota limits (HTTP 429) or errors, the chatbot automatically switches to the next configured fallback provider seamlessly.
- 🛡️ User-Facing Clean Fallback Error Message: Raw 429 status codes or API provider names are hidden from end-users; friendly fallback string displayed while full technical details are logged to
storage/logs/ai-chatbot.log.
🌟 Key Features
- 🏗️ Driver-Based Architecture (
AiDriverInterface): Drivers are decoupled inSentix\AiChatbot\Drivers\. Easily extend and add custom LLM drivers! - 🤖 7 Built-in AI Drivers: Google Gemini, OpenAI ChatGPT, Anthropic Claude, DeepSeek, Groq, Mistral, Perplexity.
- ⚡ Response Cache Management: Built-in caching support to save API costs and speed up response times.
- 🧩 Trait Driven Context Extraction (
HasAiContext): Adduse HasAiContext;to any Eloquent model and defineprotected $aiFields = ['field1', 'field2'];. - 🔗 Automatic Relationship Traversal: Automatically detects and extracts nested related models if they also use the
HasAiContexttrait. - 🎨 Framework Agnostic Styling: Built with custom, self-contained CSS. Works in any application regardless of whether it uses Tailwind, Bootstrap, or plain HTML.
🚀 Installation & Setup
1. Add Repository to composer.json
Add the local package path to your main Laravel application's composer.json:
Then run:
2. Publish Configuration & Assets
Publish configuration file and static assets:
3. Add Widget to Blade Views
Render the chatbot widget in your main layout file (e.g., resources/views/layouts/app.blade.php) right before </body>:
🧩 Eloquent Context Extraction & Relationships (HasAiContext)
The package automatically extracts Eloquent model data and relationship hierarchies to provide live database context to the AI Chatbot.
1. Add Trait to your Eloquent Models
Add Sentix\AiChatbot\Traits\HasAiContext trait to any Eloquent model and define the $aiFields property to specify which database columns the AI is allowed to see:
2. Enable Trait on Related Models (Relationship Traversal)
When the package queries Product, it scans all relationship methods (category, reviews). If the related model (Category or Review) also uses HasAiContext, relationship data is automatically nested into the AI context prompt!
3. Register Models in config/ai-chatbot.php
List all top-level Eloquent models in config/ai-chatbot.php under context_models:
4. User-Scoped Data Filtering (Multi-Tenant / Personal Data)
If your app requires the AI chatbot to only answer questions about the currently logged-in user's data (e.g. "Show my orders"):
-
Enable user scoping in
.env: - The package will automatically filter records matching
user_id == auth()->id(), or you can define a customscopeUserScoped($query, $userId)scope on your model:
5. Custom Knowledge Base & Static App Guides (custom_context)
You can define custom static knowledge base arrays, feature FAQs, menu navigation guides, or form filling instructions in config/ai-chatbot.php under custom_context:
🛠️ Registering Custom AI Tools (Function Calling)
You can register custom PHP tools implementing Sentix\AiChatbot\Contracts\AiToolInterface:
🔌 Adding Custom AI Drivers
You can easily register a custom AI driver implementing Sentix\AiChatbot\Contracts\AiDriverInterface:
⚙️ Environment Variables (.env)
📄 License
MIT License. Created by Sentix.
All versions of ai-chatbot with dependencies
illuminate/support Version ^9.0|^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^9.0|^10.0|^11.0|^12.0|^13.0