Local agent that helps you learn TinyGrad and updates you on the bounties!
- Uses SentenceTransformer's "all-MiniLM-L6-v2" model for embeddings
- ChromaDB for vector storage and similarity search
- OpenAI's GPT model for response generation
- Combines retrieved documents with user query
- Indexes:
- Tinygrad repo
- Bounties
- mesozoic-egg tutorials
- batch processing for efficient embedding generation
- Rich text-based terminal interface
- Queries and their answers logged to a SQLite database.
- This database is stored as
chat_history.db
- Create and activate virtual env:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Dependencies:
pip install -r requirements.txt
- OpenAI API key:
# Create a .env file in the project root
echo "OPENAI_API_KEY=your-key-here" > .env
Run the main script to update and index all data:
python main.py
This will:
- Update the tinygrad repo
- Update on bounties
- Scrape tutorials
- Index and embed all data for semantic search (patiently wait to finish)
- Launch chat
Once the data is indexed, you can start TinyPilot instantly using:
python tinypilot.py
This will:
- Skip the data collection and indexing steps
- Load the existing indexed data
- Start the interface immediately
- Python-based RAG system
- Vector database and embeddings
- OpenAI integration
- Rich terminal UI