A lightweight chatbot powered by Google Gemini (via google-genai) that can be used through:
- a CLI (
cli-onlyfolder) - a Flask web UI (
chatbot-webv2folder) - a Streamlit UI (
streamlit_app_v2.py)
- Google Gemini integration (default model:
gemini-2.0-flash, configurable viaGEMINI_MODEL) - Multiple interfaces: CLI, Flask, and Streamlit
- Configurable generation parameters (temperature, top_p, top_k, max tokens)
- Chat history persistence (JSON files)
LLM-Chat-Bot/
cli-only/
app.py
generate_secrets.py
chatbot-webv2/
app.py
generate_secrets.py
static/
style.css
script.js
templates/
index.html
streamlit_app_v2.py
generate_secrets.py
requirements.txt
README.md
- Python 3.9+ (use a virtual environment if possible)
- Google Gemini API key (from Google AI Studio)
- Required Python packages (see
requirements.txt)
git clone https://github.com/weiss-rn/LLM-Chat-Bot.git
cd LLM-Chat-Bot
python -m venv venvWindows:
venv\Scripts\activatemacOS / Linux:
source venv/bin/activateInstall dependencies:
pip install -r requirements.txtThe project expects a secrets.toml (for Streamlit) or config.toml (for CLI/Flask) containing:
GOOGLE_API_KEY = "YOUR_API_KEY"Windows:
python generate_secrets.py
python cli-only\generate_secrets.py
python chatbot-webv2\generate_secrets.pyLinux / macOS:
python3 generate_secrets.py
python3 cli-only/generate_secrets.py
python3 chatbot-webv2/generate_secrets.pyCLI only:
cd cli-only
python app.pyFlask web UI:
cd chatbot-webv2
python app.pyThe Flask server starts at http://0.0.0.0:5000.
Streamlit UI:
streamlit run streamlit_app_v2.pyThe Streamlit app will be available at http://localhost:8501.
Apache 2.0. See LICENSE.