How shrikantnaidu/chat-with-repo works
Project type and purpose
• RepoChat is a full-stack, AI-powered chat application built in Python with Streamlit for the UI, LangChain orchestration, Groq LLMs for generation, and DeepLake for vector storage.
• Its purpose is to allow interactive, context-aware conversations over any GitHub repository’s code.
File structure
• Top level:
• main.py (Streamlit app entry point & UI)
• repos/ (local or cached repository clones or dataset folders)
• utils/process.py (handles cloning, file parsing, embedding & indexing)
• utils/chat.py (handles retrieval from vector store & LLM calls)
• requirements.txt, README.md, config (.gitignore, LICENSE)
• No separate “frontend” vs “backend” folders, but the app logically splits into UI (main.py) and service layers (utils).
Extract architecture hints from README
• Streamlit web interface
• GitHub repo ingestion → file parsing → vector embedding → DeepLake storage
• Chat interface → query embeddings → LLM (Groq) call
• External dependencies: GitHub API, Groq API, ActiveLoop/DeepLake
Main components and interactions
a. Components
1. User’s Browser (UI)
2. Streamlit App (main.py)
3. Repo Processor (utils/process.py)
4. Vector Store (DeepLake)
5. Chat Engine (utils/chat.py + LangChain)
6. LLM Service (Groq API)
7. GitHub API / Repo Source
b. Relationships / Data flow
1. User → Streamlit UI: inputs keys, repo URL, file filters
2. UI → Repo Processor: “Process Repository” action
3. Repo Processor → GitHub API: clone/fetch files → local repo folder
4. Repo Processor → file parsing → embeddings → DeepLake
5. User → Streamlit UI: ask question
6. UI → Chat Engine: query text
7. Chat Engine → DeepLake: retrieve relevant embeddings/chunks
8. Chat Engine → Groq API: send prompt + context
9. Groq API → Chat Engine: LLM response
10. Chat Engine → Streamlit UI: display answer
c. Architectural patterns
– Layered/Pipeline: UI layer, ingestion layer, storage layer, retrieval + LLM layer
– Modular service: distinct process vs chat modules
– External services: vector DB & LLM as black-boxed microservices
d. Key technologies
– Python & Streamlit (UI)
– LangChain (orchestration, prompt templates)
– Groq API (LLM inference)
– DeepLake (vector database/storage)
– GitHub API (repo ingestion)