docs: Ask AI chat grounded in the docs vector store · simstudioai/sim@20577ea · GitHub
Skip to content

Commit 20577ea

Browse files
ouiliameclaude
andcommitted
docs: Ask AI chat grounded in the docs vector store
Adds an Ask AI chat to the docs site. A floating launcher opens a chat panel backed by the Vercel AI SDK (OpenAI provider, OPENAI_API_KEY from the environment). A searchDocs tool runs locale-scoped vector/keyword search over the existing docs embeddings so answers cite real pages. The public endpoint is hardened: per-request size/token/step caps, message sanitization (no client-injected tool results or system prompts), origin checks, and a per-IP rate limit. Non-English retrieval uses keyword search; English vector search applies a similarity threshold. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 7640af0 commit 20577ea

5 files changed

Lines changed: 535 additions & 1 deletion

File tree

apps/docs/app/[lang]/layout.tsx

Lines changed: 2 additions & 0 deletions

apps/docs/app/api/chat/route.ts

Lines changed: 302 additions & 0 deletions

0 commit comments

Comments
 (0)