echo "π₯ Cloning repo..." git clone https://github.com/BhagyeshPatil2004/RAG-chatbot-Gemini-API-ollama.git cd RAG-chatbot-Gemini-API-ollama
echo "π Creating .env..." echo 'GEMINI_API_KEY="YOUR_GEMINI_API_KEY"' > .env
"ποΈ Creating .gitignore..." cat < .gitignore
pycache/ *.pyc .venv/
.env
.vscode/
chroma_db/ EOL
"π Writing README.md..." cat < README.md
This is a simple Retrieval-Augmented Generation (RAG) chatbot built using:
It uses the original codebasics FAQ dataset from this video.
Note: I did some changes in the code only β the dataset remains the same.
β
Loads CSV data of FAQs
β
Creates embeddings with Ollama (`mxbai-embed-large`)
β
Stores embeddings locally in ChromaDB
β
Uses Gemini API (or your local LLM) to generate answers
β
Runs a simple CLI chat loop
- `codebasics_faqs.csv` is sourced from the codebasics YouTube channel
- No modifications to dataset β only code improved to fit this RAG structure.
``` git clone https://github.com/BhagyeshPatil2004/RAG-chatbot-Gemini-API-ollama.git cd RAG-chatbot-Gemini-API-ollama ```
``` python -m venv .venv
.venv\Scripts\activate
source .venv/bin/activate
pip install -r requirements.txt ```
Edit `.env` and replace with your real API key.
``` ollama pull mxbai-embed-large ```
``` python "AI Agent 1/agent.py" ```
-
Ollama must be running for embeddings.
-
Gemini API generates answers.
-
Easily swap a bigger dataset for your major project.
π Bhagyesh Patil
π Repo: RAG-chatbot-Gemini-API-ollama
EOL
"π¦ Creating requirements.txt..."
langchain
langchain_community
langchain_ollama
langchain_chroma
ollama
python-dotenv
EOL
"π Creating Python venv..."
python -m venv .venv
"π Activating venv & installing..."
if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then .venv\Scripts\activate && pip install -r requirements.txt
else source .venv/bin/activate && pip install -r requirements.txt
"π§ Pulling Ollama embedding model..." ollama pull mxbai-embed-large
"" "1οΈβ£ Add your real Gemini API key in .env"
"2οΈβ£ Make sure Ollama is running"
"3οΈβ£ Run your bot: python "AI Agent 1/agent.py""
""
"π₯ Happy!"