react-ai-faq-chat
v1.1.2
Published
A smart AI-powered FAQ chatbot
Maintainers
Readme
react-ai-faq-chat
🚀 Turn your documentation into a smart AI-powered FAQ chatbot in minutes – no backend, no APIs, 100% free.
🔹 Why Use This Package?
Imagine your users opening your Help Center and asking questions like:
“How do I reset my password?”
“Where can I find the latest API docs?”
…and instantly getting answers from your own PDFs, Word docs, or Excel sheets – without building complex AI systems or paying for APIs.
react-ai-faq-chat does all the heavy lifting for you:
- Scans your documentation files
- Indexes them for fast answers
- Uses a free, local AI model (Mistral-7B) to reply intelligently
- Works out-of-the-box in React and Next.js
All in one tiny package. 💡
🔹 Key Features
- ✅ Supports PDF, Word (.docx), and Excel (.xlsx)
- ✅ Ephemeral chat – conversation exists while the page is open
- ✅ No database required
- ✅ No API keys, 100% free
- ✅ React + Next.js compatible
- ✅ Minimal config: just point to your docs folder
- ✅ Provides hook + ready-to-use ChatBot component
🔹 Installation
npm install react-ai-faq-chator
yarn add react-ai-faq-chat🔹 Usage
Simply point
docsFolderto the folder containing your PDF, Word, or Excel documentation. That’s it.
Using the Hook
import { useAIFAQChat } from "react-ai-faq-chat";
export default function CustomChat() {
const { messages, sendMessage, loading } = useAIFAQChat({ docsFolder: "./public/docs" });
return (
<div>
{messages.map((msg, idx) => (
<p key={idx} style={{ textAlign: msg.user ? "right" : "left" }}>{msg.text}</p>
))}
<input
placeholder="Ask me anything..."
onKeyDown={async (e) => {
if (e.key === "Enter") await sendMessage((e.target as HTMLInputElement).value);
}}
/>
{loading && <p>Loading...</p>}
</div>
);
}Perfect if you want to build a custom UI for your chatbot.
🔹 How It Works (Simplified)
- The package reads all your docs (PDF, Word, Excel)
- Splits them into small chunks for AI understanding
- Indexes them in a fast local vector database (FAISS)
- Uses Mistral-7B AI (completely local, free) to answer questions
- Returns answers in real-time to your React app
All this happens behind the scenes, no AI or backend setup required.
🔹 Who Should Use This
- Product teams that want instant FAQ chatbots
- Customer support portals
- Developers who want zero-cost AI integration
- Anyone who has documentation in PDF, Word, or Excel
🔹 Why It's Different
| Feature | react-ai-faq-chat | Other Solutions | |---------|-----------------|----------------| | Local AI (free) | ✅ | ❌ | | Works without backend | ✅ | ❌ | | Supports multiple doc types | ✅ | ❌ | | Easy React integration | ✅ | ❌ | | Ephemeral chat | ✅ | ❌ |
🔹 Minimal Config
All you need is:
{
docsFolder: "./path-to-your-docs"
}No API keys, no setup, no fuss.
🔹 License
MIT © 2025
🔹 Ready to Try?
npm install react-ai-faq-chatThen drop it in your React/Next.js page and watch your docs come alive! 🚀
