AI-Powered Chatbot Integration for WardhaMetroFlow
Feature Request: AI-Powered Chatbot Integration for WardhaMetroFlow
Issue Description
Problem Statement
The WardhaMetroFlow website currently lacks an interactive way for passengers to get real-time information about metro services, routes, fares, and schedules. Users have to navigate through multiple pages to find basic information.
Proposed Solution
Implement an AI-powered chatbot that uses LangChain and Google Gemini AI to provide intelligent, context-aware responses based on comprehensive website documentation. The chatbot should be able to answer questions about:
- Metro routes and station information
- Fare structures and pricing
- Operating hours and schedules
- Lost & found procedures
- Contact information and emergency contacts
- General metro etiquette and policies
Feature Requirements
Frontend Integration
- [ ] Floating chat widget on all website pages
- [ ] Responsive design for mobile and desktop
- [ ] Typing indicators and smooth animations
- [ ] Suggestion chips for common queries
- [ ] Error handling with fallback responses
Backend Implementation
- [ ] FastAPI endpoint for chatbot communication (
/api/assistant) - [ ] LangChain integration with Google Gemini AI
- [ ] Document loading from comprehensive website knowledge base
- [ ] Vector embeddings for semantic search
- [ ] Intelligent intent detection and response generation
Knowledge Base
- [ ] Comprehensive documentation file (
docs/website_info.txt) - [ ] Structured information about all 17 metro stations
- [ ] Route mappings and directions
- [ ] Fare structures and payment methods
- [ ] Contact information and emergency procedures
- [ ] Operating hours and service schedules
AI Features
- [ ] Natural language processing for user queries
- [ ] Contextual responses based on website data
- [ ] Fallback handling for unclear queries
- [ ] Multi-turn conversation support
- [ ] Response suggestions for follow-up questions
Technical Stack
Frontend
- HTML5/CSS3/JavaScript
- Floating chat widget with modern UI
- AJAX calls to backend API
- Timeout handling and error recovery
Backend
- FastAPI framework
- LangChain for AI orchestration
- Google Gemini AI for conversational responses
- FAISS vector store for document retrieval
- Comprehensive logging and error handling
AI/ML
- LangChain Core for RAG (Retrieval-Augmented Generation)
- Google Generative AI embeddings
- Document chunking and vectorization
- Semantic search capabilities
Files to be Modified/Created
New Files
docs/website_info.txt # Comprehensive knowledge base
backend/.env # Environment variables
Modified Files
backend/requirements.txt # Add LangChain dependencies
backend/routers/assistant.py # Replace with LangChain implementation
frontend/components/chatbot.js # Update for new API structure
Environment Setup
Required Dependencies
langchain==0.1.0
langchain-google-genai==1.0.1
google-generativeai==0.3.2
faiss-cpu
Environment Variables
GOOGLE_API_KEY=your_gemini_api_key_here
Testing Requirements
Functional Tests
- [ ] Chatbot widget appears on homepage
- [ ] API endpoint responds correctly
- [ ] AI generates accurate responses from knowledge base
- [ ] Error handling works for invalid queries
- [ ] Mobile responsiveness verified
Integration Tests
- [ ] End-to-end conversation flow
- [ ] Knowledge base accuracy validation
- [ ] API timeout and fallback behavior
- [ ] CORS configuration verification
Labels
- enhancement
- AI/ML
- frontend
- backend
- hacktoberfest
- hacktoberfest-accepted
Timeline
Target Completion: Before October 31st, 2025 Priority: High Assignee: Available for Hacktoberfest contribution
Hacktoberfest Contribution
This issue is perfect for Hacktoberfest! It involves:
- Modern AI/ML integration
- Full-stack development (frontend + backend)
- Real-world application with transportation domain
- Comprehensive documentation and testing
Please assign this issue to me for Hacktoberfest participation!
Can the PR be merged before October 31st to count towards Hacktoberfest?
Thank you for raising this issue!
We'll review it as soon as possible. We truly appreciate your contributions! ✨
Meanwhile make sure you've visited the README.md, CONTRIBUTING.md, CODE_OF_CONDUCT.md and our discord before creating a PR for this. Also, please do NOT create a PR until this issue has been assigned to you 😊.
@Manjushwarofficial will commit the changes by 2-3 hrs
@Manjushwarofficial Please assign it under hactoberfest
@Hiteshydv001 make sure to maintain the theme and integrity and make the gui simple and clean them only it will be accepted.
Okay @Manjushwarofficial