Skip to content

LocalChatbot

pnpm dlx shadcn@latest add https://fastrag-ui.agrospai.udl.cat/r/local-chatbot.json
import { LocalChatbot } from "@fastrag-ui/chatbot"

LocalChatbot still talks to a real FastRAG backend for generation — endpoint is the same backend base URL Chatbot takes, and every generation is a real streamed answer. What’s local is only the transcript: each conversation’s messages are persisted in the browser’s IndexedDB (via dexie) rather than kept in React state, so a reload doesn’t lose the chat. Switching to a different stored chat remounts the underlying Chatbot (keyed by the local chat id), which starts a fresh server-side chat for it — the local chat id is a client-side journal key only and has no relation to the server’s own chat id.