A minimal command-line chatbot powered by Google Gemini via the google-genai Python SDK.
- Interactive terminal chat loop
- Configurable model via environment variables
- Automatic retry with backoff on server errors
- Optional local
.envsupport for development
- Python 3.8+
google-genaipython-dotenv(optional)- A Google Gemini API key
git clone https://github.com/sumitadhalkar/basic-ai-chatbot.git
cd basic-ai-chatbot
python -m venv .venv
.venv\Scripts\activate
pip install google-genai python-dotenvCreate a local .env file for development (do not commit this file):
GEMINI_API_KEY=your-api-key-hereAlternatively set the environment variable directly:
$env:GEMINI_API_KEY="your-api-key-here"python aibot.pyType exit to quit the chatbot.
.envis intentionally excluded from version control.- This project is a minimal CLI chatbot example, not a production deployment.