aanfarhan/laravel-chatbot
Composer 安装命令:
composer require aanfarhan/laravel-chatbot
包简介
Context-aware chatbot package for Laravel: signed page context, OpenAI-compatible LLMs, streaming SSE, GDPR-friendly persistence.
README 文档
README
A Composer package that drops a context-aware chatbox onto any Laravel page. Declare what data the chat should see in your controller; the package handles signing, streaming, persistence, tool calling, and the frontend widget.
📚 Full documentation: aanfarhan.github.io/laravel-chatbot
Requirements
- PHP 8.2+
- Laravel 11 or 12
- An OpenAI-compatible LLM provider (OpenAI, Azure, OpenRouter, Groq, Ollama, etc.)
Install
composer require aanfarhan/laravel-chatbot php artisan chatbot:install
Use
use Aanfarhan\Chatbot\Facades\Chatbot; Route::get('/orders/{order}', function (Order $order) { Chatbot::context(['order' => new OrderResource($order)]); return view('orders.show', compact('order')); })->name('orders.show');
<body> @yield('content') @chatbot </body>
That's it. For everything else — channels, tool calling, client extractors, theming, GDPR, security, the full reference — see the documentation site.
Links
License
MIT
统计信息
- 总下载量: 37
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-05-15