How saikumarbolishetty/nutrivibe-ai-rag-chatbot works
Project type and purpose
• NutriVibe is a full-stack web application with:
• A FastAPI backend exposing REST and file-upload endpoints
• A simple static frontend (single-page UI in static/index.html)
• AI-powered features: ChatGPT integration (via OpenAI API), Retrieval-Augmented Generation (RAG) with Milvus, and optional image analysis (OCR + vision)
File structure
• Top-level files:
• main.py: FastAPI app definition & endpoint wiring
• rag_service.py: Encapsulates vector DB (Milvus) access and retrieval logic
• requirements.txt, .gitignore, .env (for API keys & Milvus creds)
• Static assets:
• static/index.html: UI shell, JS code to call backend endpoints
• No separate “frontend” or “backend” folder—static UI is served by the same FastAPI server
README for additional insights
• Lists core features and endpoints (/ask, /analyze-image, /documents, /documents/search, /documents/count)
• Describes external dependencies: OpenAI API, managed Milvus cluster, Tesseract OCR (optional)
• Mentions how RAG works: semantic search → augment ChatGPT context
Detail
• Sequence:
1. User asks question →
2. FastAPI /ask →
3. rag_service queries Milvus →
4. retrieved docs + user prompt sent to OpenAI →
5. response back to FastAPI →
6. JSON to Browser
• Mirror similar flow for /analyze-image, /documents, etc.