Skip to content

feat: add Ask AI docs chatbot powered by OpenRouter#546

Closed
berry-13 wants to merge 1 commit into
mainfrom
feat/ask-ai-chatbot
Closed

feat: add Ask AI docs chatbot powered by OpenRouter#546
berry-13 wants to merge 1 commit into
mainfrom
feat/ask-ai-chatbot

Conversation

@berry-13
Copy link
Copy Markdown
Member

Floating 'Ask AI' button on every page opens a chat panel that searches the docs and answers questions using an LLM via OpenRouter.

How it works:

  1. User asks a question
  2. LLM calls a search tool that does full-text search across all 290 MDX docs
  3. Relevant doc chunks are returned as context
  4. LLM generates a concise answer with links to the source pages

Stack:

  • app/api/chat/route.ts — server route using Vercel AI SDK + OpenRouter provider
  • components/ai/AskAI.tsx — client chat UI using @ai-sdk/react useChat hook
  • Search index built from content/docs/ at startup (in-memory, no external DB)

Dependencies added: ai, @ai-sdk/react, @openrouter/ai-sdk-provider

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
librechat-ai Ready Ready Preview, Comment Mar 29, 2026 3:36pm

Request Review

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@berry-13 berry-13 force-pushed the feat/ask-ai-chatbot branch from a5b5f55 to 9859e50 Compare March 29, 2026 03:16
@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

Floating 'Ask AI' button on every page opens a chat panel that searches
the docs and answers questions using an LLM via OpenRouter.

How it works:
1. User asks a question
2. LLM calls a `search` tool that does full-text search across all 290 MDX docs
3. Relevant doc chunks are returned as context
4. LLM generates a concise answer with links to the source pages

Stack:
- app/api/chat/route.ts — server route using Vercel AI SDK + OpenRouter provider
- components/ai/AskAI.tsx — client chat UI using @ai-sdk/react useChat hook
- Search index built from content/docs/ at startup (in-memory, no external DB)

Config:
- OPENROUTER_API_KEY — required, get one at https://openrouter.ai/keys
- OPENROUTER_MODEL — optional, defaults to openai/gpt-5.4-nano ($0.20/1M in, $1.25/1M out)

Dependencies added: ai, @ai-sdk/react, @openrouter/ai-sdk-provider
@github-actions
Copy link
Copy Markdown

📦 Next.js Bundle Analysis for librechat.ai

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@berry-13 berry-13 closed this Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant