AI-powered RAG system for querying Twitter/X influencer data with vector search and citations.
# Install dependencies
pip install -r infra/requirements.txt
# Run API
uvicorn app.api:app --reload
# Enable Web UI
ENABLE_WEB_UI=true uvicorn app.api:app --reload
# Run tests
pytest -qAccess: API at http://127.0.0.1:8000, Web UI at http://127.0.0.1:8000/ui
Create .env file:
OPENAI_API_KEY=your_key_here
OPENAI_MODEL=gpt-4o-mini
VECTOR_TOP_K=3
ENABLE_WEB_UI=true| Method | Path | Description |
|---|---|---|
| GET | /healthz |
Health check |
| POST | /ingest |
Ingest dataset |
| POST | /query |
Ask questions |
| POST | /upload_dataset |
File upload |
app/
├── api.py # FastAPI app
├── embeddings.py # Vector search
├── pipeline.py # ETL pipeline
├── rag.py # RAG engine
├── webui.py # Web interface
└── templates/ # HTML templates
# Build & run
docker build -t twitter-assistant .
docker run -p 8000:8000 -e ENABLE_WEB_UI=true twitter-assistant
# Or use compose
docker-compose -f infra/docker-compose.yml up --buildMIT License - Copyright (c) 2025 Siddhartha Srivastava

