A smart AI chatbot with Groq AI (Llama 3.3 70B) and Unsplash image integration.
Created by Jainam Maru
🌐 Live: dev9269.github.io/ai-chatbot
- Chat with Groq AI (Llama 3.3 70B)
- Relevant images shown for every reply (Unsplash)
- Light / Dark mode
- Chat history saved in browser
- Clean, responsive UI
git clone https://github.com/Dev9269/ai-chatbot.git
cd ai-chatbot
python -m pip install -r requirements.txt
Copy the example env file:
cp .env.example .env
Then open .env and fill in your keys:
GROQ_KEY=your_groq_api_key_here
UNSPLASH_KEY=your_unsplash_access_key_here
Get your free API keys here:
- Groq → https://console.groq.com (free, fast AI)
- Unsplash → https://unsplash.com/developers (free, 50 req/hour)
python server.py
Open index.html in your browser (double-click or use Live Server in VS Code).
├── index.html → UI structure
├── style.css → All styling
├── app.js → Frontend logic
├── api.js → Talks to Python backend
├── server.py → Python backend (Groq + Unsplash)
├── .env → Your API keys (NOT on GitHub)
├── .env.example → Template for others to fill in
├── .gitignore → Blocks .env from GitHub
├── .dockerignore → Files excluded from Docker build
├── Dockerfile → Container build instructions
├── requirements.txt → Python dependencies
└── .github/
├── FUNDING.yml → Sponsor links
└── workflows/
├── ci.yml → Lint check on push/PR
└── deploy.yml → GitHub Pages deployment
# Build the image
docker build -t ai-chatbot .
# Run the container
docker run -d -p 5000:5000 --env-file .env ai-chatbotOr use with Docker Compose:
services:
chatbot:
build: .
ports:
- "5000:5000"
env_file: .env
restart: unless-stoppedThe frontend (index.html, style.css, app.js) is automatically deployed to GitHub Pages via the deploy.yml workflow on every push to master.
# Build the image
docker build -t ai-chatbot .
# Run the container
docker run -d -p 5000:5000 --env-file .env ai-chatbotOr using Docker Compose:
services:
chatbot:
build: .
ports:
- "5000:5000"
env_file: .env
restart: unless-stopped# Install dependencies
python -m pip install -r requirements.txt
# Set environment variables
export GROQ_KEY=your_groq_api_key
export UNSPLASH_KEY=your_unsplash_access_key
# Start the server
python server.py| Variable | Required | Description |
|---|---|---|
GROQ_KEY |
Yes | Groq API key for Llama 3.3 70B |
UNSPLASH_KEY |
Yes | Unsplash API access key |
- Use a reverse proxy (nginx/Caddy) in front of the Python backend
- Enable HTTPS with Let's Encrypt
- Set
PYTHONUNBUFFERED=1for proper log streaming - Monitor with
--workers 2for handling concurrent requests
- Instagram → https://www.instagram.com/jainammaru_/
- GitHub → https://github.com/dev9269
- LinkedIn → https://www.linkedin.com/in/jainam-maru-007803386/