An interactive AI-powered chatbot built using FastAPI, LangChain, Gemini (Google Generative AI), and FAISS. It loads FAQ content from a CSV file and provides intelligent, contextual answers to user questions through a frontend interface.
- 📁 Load FAQs from CSV
- 🤖 Answer questions using Gemini (via LangChain)
- 📚 Vector search with FAISS
- 🖥️ Beautiful chat UI with typing animation
- 🌐 Full-stack with FastAPI + Bootstrap frontend
- 📦 Modular and extensible codebase
- 📄 download the live chat History
| Layer | Technology |
|---|---|
| Frontend | HTML, CSS (Bootstrap), JavaScript |
| Backend | FastAPI, LangChain |
| Embeddings | GoogleGenerativeAIEmbeddings (Gemini) |
| LLM | Gemini 1.5 Flash |
| Vector DB | FAISS |
| Hosting | Localhost (Uvicorn) |
FAQ/
├── app/
│ ├── main.py # FastAPI entry point
│ ├── routers/
│ │ └── faq_chain.py # LLM chain logic with LangChain + Gemini
│ ├── schemas/
│ │ └── models.py # Pydantic models
├── static/
│ ├── app.js # Frontend logic
│ ├── style.css # UI styling
├── template/
│ └── index.html # Chat UI
├── data/
│ └── faqs.csv # FAQ dataset
├── .env # Gemini API Key
├── requirements.txt # All dependencies
git clone https://github.com/18Prashanth/FAQ.git
cd FAQ
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
Create a .env file in the root directory:
GOOGLE_API_KEY=your-gemini-api-key-here
🧪 Run the App
uvicorn app.main:app --reload
http://localhost:8000
| Method | Endpoint | Description |
|---|---|---|
| POST | /faq_question |
Ask a question and get a response |
| GET | / |
Loads the frontend (chat UI) |
Prashanth Gowda A S

