How mounika-mahankali/chatbot-using-rag works
This is a document-aware AI chat application with both a Streamlit interface and a FastAPI interface. Users create chat sessions, upload documents or images, ask questions, and receive model-generated responses; chat messages and session metadata are stored in SQLite. Document questions use session-scoped text retrieval in the RAG module, while image questions use multimodal inference. The excerpts show both entry points calling shared services, but do not establish that they share session-scoped retrieval state. The README was empty; links below are based on the supplied source excerpts.
Main entry points: app.py Streamlit chat · api.py FastAPI routes · multimodal.py Multimodal model client · db.py Chat database
Components 13
User interfaces
- Streamlit chat
app.py - FastAPI routes
api.py
Chat and sessions
- Chat database
db.py - Memory summary
langchain_memory.py - Chat summarizer
summary.py
Document and image AI
- Document ingestion
rag.py - Session retrieval
rag.py - RAG answering
rag.py - Image answering
rag.py
Model integration
- Multimodal model client
multimodal.py
Other components
- User
- HTTP client
- Groq API
Connections 21
- User → Streamlit chat: uses
app.py - User → HTTP client: initiates
- HTTP client → FastAPI routes: calls routes
- Streamlit chat → Chat database: reads and writes
app.py - FastAPI routes → Chat database: reads and writes
api.py - Streamlit chat → Document ingestion: uploads documents
app.py - FastAPI routes → Document ingestion: uploads documents
api.py - Document ingestion → Session retrieval: builds session index
rag.py - Streamlit chat → Session retrieval: loads RAG
app.py - FastAPI routes → RAG answering: asks question
api.py - Session retrieval → RAG answering: retrieves context
rag.py - Streamlit chat → Image answering: asks about image
app.py - FastAPI routes → Image answering: uploads image
api.py - RAG answering → Multimodal model client: generates answer
rag.py - Image answering → Multimodal model client: generates image response
rag.py - Streamlit chat → Multimodal model client: summarizes memory
app.py - FastAPI routes → Multimodal model client: summarizes conversation
api.py - Chat summarizer → Multimodal model client: summarizes messages
summary.py - Multimodal model client → Groq API: sends prompts
multimodal.py - Streamlit chat → Chat database: saves response
app.py - FastAPI routes → Chat database: saves response
api.py