There are two ways to put the chatbot in front of visitors. Both use the same chat panel script and the same public API.
The global widget
- Open Admin > Chatbot > Settings and select the Behaviour tab.
- Check Enable global chat widget on all public pages.
- Optionally set Widget heading. The default is "Ask our collection".
- Click Save Settings.
A round chat button appears in the corner of every public site page. Clicking it opens a panel with the heading, the conversation and a question box. The widget is never shown on admin pages. It sends the current site's id and slug with each question, so answers are limited to that site's content and source links point at that site.
The widget uses the module-level Default system prompt.
The Chatbot page block
- Edit a site page, click Add new block and choose Chatbot.
- Fill in the block fields:
| Field | Default | Description |
|---|---|---|
| Heading | Ask our collection | Shown above the chat panel. Leave empty for no heading. |
| System prompt override | empty | Replaces the module-level system prompt for this block only. |
| Allow anonymous users | checked | When unchecked, visitors who are not logged in see "Please log in to use the chat" with a link to the login page instead of the chat panel. Logged-in users of any role see the panel. Blocks created before version 1.5.0 are set to checked on upgrade, because the option was not enforced before. |
| Restrict to item sets (optional) | none | One or more item sets, sent to the API as item_set_ids. Only items in at least one of the selected sets, and the media of those items, are used as evidence. Blog posts and site pages have no item sets and are excluded while a restriction is set. The global Item set filter still controls what is indexed at all; see Configuration. |
- Save the page.
The block renders an inline chat panel with no floating button. Several Chatbot blocks on one page each get their own panel.
Allow anonymous users is enforced when the block is rendered, not by the chat API, which stays public and rate limited. It keeps the panel off the page for visitors who are not logged in; it does not stop a client that calls POST /chatbot/api/chat directly.
Restrict to item sets relies on item set membership stored with each indexed chunk. Items and media indexed before version 1.5.0 have no membership recorded and are excluded from restricted blocks until they are re-indexed, so run Re-index Now after upgrading if you use this option. Membership is refreshed whenever an item is saved.
Asking questions
Type a question of up to 1000 characters and press Enter or click Send. Shift+Enter inserts a line break. While the answer is generated the panel shows "Thinking…".
The answer is rendered as paragraphs with citation markers such as [1]. Each marker links to an entry in the Sources list beneath the answer, which shows the source title (linked to the resource on the current site) and a short snippet. Only sources the model actually cited are listed. When the evidence does not cover the question, the built-in prompt tells the model to answer "I don't know."
How an answer is produced
- The question is embedded with the configured OpenAI embedding model.
- The nearest chunks are fetched from Turso: Top-K of them, three times Top-K when a site id is sent, or ten times Top-K (at most 100) when item set ids are sent, so that filtering leaves enough results.
- Chunks belonging to other sites, and chunks outside the requested item sets, are dropped and the list is cut to Top-K.
- The system prompt, the numbered evidence and the question are sent to the chat model.
[N]references in the reply become links, and sources that were not referenced are removed.
Every completed answer is logged with its question, answer, sources and timings. See Dashboard and Logs.
Styling
The widget and block load asset/css/chatbot.css from the module. Override its classes in your theme's CSS to match your site: .chatbot-fab (floating button), .chatbot-panel, .chatbot-inline, .chatbot-header, .chatbot-messages, .chatbot-message, .chatbot-input-area, .chatbot-sources, .chatbot-citation and .chatbot-login-required (the login prompt shown when anonymous use is off).