π€ Local AI Chatbot - Complete Setup
π€ Local AI Chatbot - Complete Setup
π― What You Have
A fully functional AI chatbot that:
- Runs 100% locally on your Mac (no cloud, no API costs)
- Knows everything about you from your resume
- Answers questions naturally using Llama 3.2
- Works on your portfolio website
- Costs $0 to run forever
π Documentation Files
Start Here
QUICK-START.mdβ‘ - 3 commands to get running (START HERE!)SETUP-SUMMARY.mdπ - Complete overview of what you got
Detailed Guides
CHATBOT-README.mdπ - Full chatbot documentationsetup-local-llm.mdπ§ - Detailed Ollama setup instructionsARCHITECTURE.mdποΈ - How everything works together
Scripts & Tools
start-chatbot.shπ - Automated setup (run this!)test-chatbot.shπ§ͺ - Verify everything workstest-chatbot.htmlπ - Standalone test page
π Quick Start
# 1. Install Ollama
brew install ollama
# 2. Run setup
./start-chatbot.sh
# 3. Start website
python3 -m http.server 8000
Open: http://localhost:8000
Thatβs it! Click the chat icon (π¬) in bottom-right corner.
π What Was Created
Core Files
chatbot.js- Chatbot logic with Ollama integrationchatbot.css- Beautiful chat widget stylingModelfile- Your custom AI model with resume data
Updated Files
index.html- Added chatbot scripts
Setup Files
start-chatbot.sh- Automated setuptest-chatbot.sh- Testing scripttest-chatbot.html- Test page
Documentation (9 files)
- All the guides listed above
π¬ Try These Questions
Once running, ask the chatbot:
Skills
- βWhat programming languages does Darya know?β
- βTell me about Daryaβs machine learning experienceβ
Research
- βWhat research is Darya doing?β
- βTell me about her work with Graph Neural Networksβ
Projects
- βWhat projects has Darya built?β
- βTell me about the quantitative trading projectβ
General
- βHow can I contact Darya?β
- βIs Darya looking for internships?β
π¨ What It Looks Like
βββββββββββββββββββββββββββββββββββββββ
β Your Website β
β β
β [Your content here] β
β β
β β
β ββββββββββ β
β β π¬ β β β Chat button
β ββββββββββ β
βββββββββββββββββββββββββββββββββββββββ
Click the button:
βββββββββββββββββββββββββββββββββββββββ
β Darya's AI Assistant [Γ] β
βββββββββββββββββββββββββββββββββββββββ€
β Bot: Hi! Ask me anything about β
β Darya's skills and experience β
β β
β You: What are her technical skills?β
β β
β Bot: Darya has strong skills in β
β C++, Python, PyTorch... β
β β
βββββββββββββββββββββββββββββββββββββββ€
β [Type your message...] [β] β
βββββββββββββββββββββββββββββββββββββββ
β¨ Features
- π 100% Local - No cloud, no API
- π° $0 Cost - Completely free
- π Private - Data stays on your machine
- β‘ Fast - 1-2 second responses
- π± Mobile Ready - Works on all devices
- π Theme Aware - Matches dark/light mode
- π― Smart - Trained on your resume
- π¬ Natural - Conversational AI
π§ Customization
Update Your Info
# Edit Modelfile, then:
ollama create darya-assistant -f Modelfile
Change Appearance
Edit chatbot.css for colors, position, animations
Adjust AI Behavior
Edit Modelfile parameters:
temperature- Creativity (0.0-1.0)num_ctx- Context windowtop_p- Response diversity
π§ͺ Testing
Option 1: Test Page
python3 -m http.server 8000
open http://localhost:8000/test-chatbot.html
Option 2: Command Line
ollama run darya-assistant
# Ask questions, type /bye to exit
Option 3: Automated
./test-chatbot.sh
β Troubleshooting
Chatbot not appearing?
- Check browser console (F12)
- Verify files loaded correctly
βOllama not runningβ?
ollama serve
Model not found?
ollama create darya-assistant -f Modelfile
Slow responses?
# Use smaller model
ollama pull llama3.2:3b
Still stuck?
./test-chatbot.sh # Runs diagnostics
π Performance
Current Setup (Llama 3.2 3B)
- Model Size: ~2GB
- RAM Needed: 4GB min, 8GB recommended
- Response Time: 1-2 seconds
- Quality: Excellent
Alternative Models
# Faster
ollama pull phi3:3.8b
# Better quality
ollama pull llama3.1:8b
# Best quality (slower)
ollama pull llama3.1:70b
π° Cost
Your Setup (Local)
- Installation: $0
- Running: $0
- Electricity: ~$0.01/hour
- Total: FREE β
Alternative (OpenAI)
- GPT-3.5: ~$0.002/1K tokens
- GPT-4: ~$0.03/1K tokens
- Est: $10-50/month πΈ
π Privacy
β All conversations stay on your machine β No data sent to third parties β No API keys needed β Works offline β Complete control
π Deployment
Current: Local Only
Perfect for demos and development
Option: Deploy to Server
- Get VPS (DigitalOcean, AWS)
- Install Ollama on server
- Update endpoint in
chatbot.js - Add authentication
Option: Hybrid
- Local for development
- OpenAI for production
π Learn More
- Ollama: https://ollama.ai
- Llama 3.2: https://ollama.ai/library/llama3.2
- Models: https://ollama.ai/library
π Support
Quick Checks
ollama ps # Is it running?
ollama list # List models
curl http://localhost:11434/api/tags # Test API
Get Help
- Check
CHATBOT-README.md - Run
./test-chatbot.sh - Check browser console (F12)
- Review
setup-local-llm.md
π― Next Steps
- β
Read
QUICK-START.md - β
Run
./start-chatbot.sh - β
Test with
test-chatbot.html - β Try on your main website
- β¬ Customize appearance
- β¬ Update your info
- β¬ Deploy (optional)
π Youβre Ready!
Your AI chatbot is set up and ready to answer questions about your skills, experience, and projects!
To start:
./start-chatbot.sh
python3 -m http.server 8000
Then open http://localhost:8000 and click the chat icon! π
Questions? Check the documentation files above.
Issues? Run ./test-chatbot.sh for diagnostics.
Want to customize? Edit Modelfile and chatbot.css.
| Status: β Ready to use | Cost: $0 | Privacy: 100% local |