Download the PHP package mahbub/laravel-ai-chatbot without Composer
On this page you can find all versions of the php package mahbub/laravel-ai-chatbot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mahbub/laravel-ai-chatbot
More information about mahbub/laravel-ai-chatbot
Files in mahbub/laravel-ai-chatbot
Package laravel-ai-chatbot
Short Description A robust Laravel package for AI Chatbots with built-in session history.
License MIT
Informations about the package laravel-ai-chatbot
🤖 Laravel AI Chatbot
A robust, flexible, and ultra-fast Laravel package for integrating AI Chatbots — with built-in database session history.
Fully compatible with OpenAI (ChatGPT), Groq (Llama 3, Gemma), OpenRouter, and any other OpenAI-compatible API.
License
✨ Features
| ⚡ Multi-Provider Support | Works with OpenAI, Groq, OpenRouter, and more — out of the box. |
| 💾 Built-in Session History | Auto-saves every user query and AI response to the database. |
| ⚙️ Configurable System Prompts | Easily set up different personalities for your chatbot. |
| 🛣️ Pre-configured API Routes | Ready-made endpoints for instant integration with React, Vue, or mobile apps. |
📦 Installation
1. Install via Composer
2. Publish the configuration file
3. Publish & run the migrations
This creates the chat sessions and messages tables:
4. Set your environment variables
Add the credentials for your preferred provider to your .env file.
Option A — Official OpenAI (ChatGPT)
Option B — Groq (Free & Extremely Fast)
Option C — OpenRouter (Multi-model Free Tier)
🚀 Usage
Using the Service (Backend Logic)
Resolve the AiChatService anywhere in your application — controllers, jobs, commands, etc. — to handle custom logic:
🔌 API Reference
The package ships with a ready-to-use endpoint for instant frontend integration.
Send a Message
Request Body
Response
| Field | Type | Required | Description |
|---|---|---|---|
session_id |
string (UUID) |
❌ | Existing session to continue a conversation. Auto-generated if omitted. |
message |
string |
✅ | The user's message to send to the AI. |
📄 License
The MIT License (MIT). Please see License File for more information.
Made with ❤️ by Md. Mahbubur Rahman for the Laravel community
All versions of laravel-ai-chatbot with dependencies
illuminate/contracts Version ^10.0|^11.0|^12.0
spatie/laravel-package-tools Version ^1.16
openai-php/client Version ^0.10