I am using python==3.11.11 and mistral:latest that has 4.1 GB size.
- Install dependencies:
pip install -r requirements.txt- Install Ollama (https://ollama.ai/) and pull the Mistral model:
ollama pull mistral- Create a data directory and add your documents:
mkdir data
# Add your .txt or .md files to the data directory- Ingest your documents:
python ingest_documents.pypython chatbot.pypython cli.py --query "Your question here"python cli.pyuvicorn api:app --reloadThen access the API at http://localhost:8000
local_rag.py: Main RAG implementationingest_documents.py: Document ingestion scriptapi.py: FastAPI servercli.py: Command-line interfacedata/: Directory for your documentschroma_db/: Directory where ChromaDB stores embeddings