How junaidulhassan/webpilot-chromeextension works
WebPilot is a browser-extension RAG assistant for asking questions about web pages, PDFs, and YouTube videos, with conversation history and configurable model, tone, and embeddings. The main flow runs from the extension popup to the FastAPI service, which prepares source content for retrieval and streams grounded answers back. Sampled code shows FAISS rather than the README’s Chroma description, and the sampled model registry shows Google and Groq providers; unsampled details are not expanded.
Main entry points: backend.py HTTP API · RAG_QnA.py RAG chat model · popup.js Extension UI · RAG.py Source ingestion
Components 18
Browser extension
- Extension UI
popup/popup.js - Conversation history
popup/storage.js
Backend API
- HTTP API
Backend/backend.py - Source detection
Backend/backend.py
RAG processing
- Source ingestion
Backend/RAG.py - Document chunking
Backend/RAG.py - Vector index
Backend/RAG.py - RAG chat model
Backend/RAG_QnA.py - Context retrieval
Backend/RAG_QnA.py - Chat memory
Backend/RAG_QnA.py - Prompt assembly
Backend/RAG_QnA.py
Models and state
- Model and tone settings
Backend/RAG_QnA.py - Backend logging
Backend/logging_config.py
Other components
- User
- Active page
- YouTube transcripts
- Generation providers
- Embedding providers
Connections 20
- User → Extension UI: asks or configures
README.md - Active page → Extension UI: provides page context
- Extension UI → Conversation history: saves history
popup/popup.js - Extension UI → HTTP API: posts page and chat
popup/popup.js - HTTP API → Extension UI: streams answers
popup/popup.js - HTTP API → Source detection: classifies source
Backend/backend.py - HTTP API → Source ingestion: loads source
Backend/backend.py - Source ingestion → YouTube transcripts: fetches transcript
Backend/RAG.py - Source ingestion → Document chunking: splits documents
Backend/RAG.py - Document chunking → Vector index: indexes chunks
Backend/RAG.py - HTTP API → RAG chat model: streams response
Backend/backend.py - RAG chat model → Context retrieval: retrieves context
Backend/RAG_QnA.py - Context retrieval → Vector index: searches vectors
Backend/RAG_QnA.py - RAG chat model → Chat memory: loads chat history
Backend/RAG_QnA.py - RAG chat model → Prompt assembly: assembles prompt
Backend/RAG_QnA.py - Prompt assembly → Generation providers: generates answer
- RAG chat model → Embedding providers: builds embeddings
- HTTP API → Model and tone settings: updates settings
Backend/backend.py - HTTP API → Backend logging: records activity
Backend/backend.py - RAG chat model → Backend logging: logs operations
Backend/RAG_QnA.py