How vasaviinumula24-code/askgithub works
GitHub RAG Agent lets users index a GitHub repository and ask questions about its code. The API validates requests and delegates indexing to a service that clones and parses the repository, then stores either a full-context bundle or a FAISS index of embedded chunks. Questions retrieve the stored full context or relevant chunks, send that context to a configured language model, and return an answer with source citations. The README also documents a browser UI and alternate model providers; unsampled UI wiring is shown only as documented, not inferred from source.
Main entry points: indexer.py Indexer service · main.py FastAPI endpoints · rag.py RAG service · github.py GitHub clone
Components 19
API and UI
- Browser UI
static/index.html - FastAPI endpoints
app/main.py - API schemas
app/models.py - Settings
app/config.py
Repository ingestion
- GitHub clone
app/services/github.py - Repository parser
app/services/repo_parser.py
Indexing and storage
- Indexer service
app/services/indexer.py - Full-context bundles
app/services/repo_parser.py - Text chunking
app/utils/chunking.py - Gemini embeddings
app/services/gemini.py - FAISS vector store
app/services/faiss_store.py - Repository metadata
app/services/indexer.py
Question answering
- RAG service
app/services/rag.py - Gemini generation
app/services/gemini.py - Alternate LLM providers
app/services/rag.py
Other components
- User
- GitHub
- Google Gemini API
- OpenAI, Hugging Face, Ollama
Connections 27
- User → Browser UI: uses
README.md - Browser UI → FastAPI endpoints: calls API
README.md - User → FastAPI endpoints: submits requests
app/main.py - FastAPI endpoints → API schemas: uses schemas
app/main.py - FastAPI endpoints → Settings: reads settings
app/main.py - FastAPI endpoints → GitHub clone: validates URLs
app/main.py - FastAPI endpoints → Indexer service: indexes repositories
app/main.py - FastAPI endpoints → RAG service: asks questions
app/main.py - FastAPI endpoints → Indexer service: lists repositories
app/main.py - Indexer service → GitHub clone: clones repository
app/services/indexer.py - GitHub clone → GitHub: clones from
app/services/github.py - Indexer service → Repository parser: parses files
app/services/indexer.py - Repository parser → GitHub clone: iterates files
app/services/repo_parser.py - Indexer service → Settings: reads settings
app/services/indexer.py - Indexer service → Text chunking: chunks file text
app/services/indexer.py - Indexer service → Gemini embeddings: embeds chunks
app/services/indexer.py - Gemini embeddings → Google Gemini API: calls embedding API
app/services/gemini.py - Indexer service → FAISS vector store: saves and searches
app/services/indexer.py - Indexer service → Full-context bundles: writes bundles
app/services/indexer.py - Indexer service → Repository metadata: reads and writes
app/services/indexer.py - RAG service → Indexer service: loads or searches
app/services/rag.py - RAG service → GitHub clone: normalizes repository URL
app/services/rag.py - RAG service → Gemini generation: generates answer
app/services/rag.py - Gemini generation → Google Gemini API: calls generation API
app/services/gemini.py - RAG service → Alternate LLM providers: dispatches by provider
app/services/rag.py - Alternate LLM providers → OpenAI, Hugging Face, Ollama: calls selected provider
app/services/rag.py - RAG service → FastAPI endpoints: returns answer and citations
app/main.py