Download the PHP package mydnic/volet-chatbot without Composer
On this page you can find all versions of the php package mydnic/volet-chatbot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mydnic/volet-chatbot
More information about mydnic/volet-chatbot
Files in mydnic/volet-chatbot
Package volet-chatbot
Short Description A chatbot feature for Volet. Connects your widget to any OpenAI-compatible endpoint
License MIT
Informations about the package volet-chatbot
A chatbot feature for Volet
Adds a chat UI to your Volet widget, backed by any OpenAI-compatible endpoint: OpenAI itself, or your own Laravel app's backend.
Built on Laravel's official laravel/ai package. This package only wires that up to Volet's widget host; everything else (providers, streaming, conversation storage, tools, testing fakes) is laravel/ai's own surface.
Installation
Publish laravel/ai's config and migrations (conversation history lives in its agent_conversations / agent_conversation_messages tables : this package does not add its own):
Publish this package's assets and config:
Configuration
By default this package uses config('ai.php')'s openai provider, which talks to OpenAI directly:
To point it at your own backend (or any other OpenAI-compatible endpoint) instead, override OPENAI_URL — no code change needed, openai is just an HTTP client pointed at a base URL:
The API key only ever lives server-side in this config. It is never sent to the widget's JavaScript.
(Some versions of laravel/ai also ship a separate openai-compatible provider entry in config/ai.php for this — check your installed version if you'd rather use that instead of overriding openai's URL. Either way works the same; this package defaults to openai since that entry is guaranteed to exist across versions.)
In config/volet-chatbot.php, set the provider/model/system prompt and the request rate limit:
This widget is reachable by anyone who loads the page where you are loading Volet. Every message is a paid API call. The throttle middleware in config('volet-chatbot.routes.middleware') is keyed by user id (falling back to IP), tune VOLET_CHATBOT_RATE_LIMIT (default 20,1) to your budget.
Registering the feature
In your VoletServiceProvider (see the main Volet package's README for the quickstart):
Extending the agent - tools, MCP, structured output
The widget's replies are produced by config('volet-chatbot.agent'), which defaults to Mydnic\VoletChatbot\Agents\ChatbotAgent. To add tools, MCP servers, provider failover, or anything else laravel/ai supports, don't modify this package. Extend the agent in your own app and point the config at it:
See laravel/ai's own docs for php artisan make:tool, MCP servers, structured output, and provider failover. None of it needs a Volet-specific bridge.
Conversation history
Guests are tracked by a conversation_id minted on the first message and returned to the client, which stores it (e.g. localStorage) and sends it back on continue. No account or cookie is required. If a visitor is authenticated, their user_id is recorded alongside the conversation automatically.
Scope
Not included in v1, by design: function/tool calling out of the box (bring your own via agent extension above), image/vision input, moderation of outbound messages, human handoff. Open an issue if you need one of these before building it yourself.