This is a command-line based chatbot application built in Python using the Google Gemini API (via Vertex AI). The chatbot responds to user queries in real-time, simulating a streaming-like response similar to ChatGPT.
- Real-time response to any user prompt.
- Simulates line-by-line typing using a streaming effect.
- Error handling for API rate limits and invalid inputs.
- Simple and clean command-line interface.
- Built with Google Cloud's Gemini 1.5 Pro model via Vertex AI.
gemni/
├── app.py # Main chatbot interface
├── search.py # Gemini API integration logic
├── requirements.txt # Python dependencies
├── README.md # Project documentation
git clone https://github.com/ankan005/gemni-chatbot.git
cd gemni-chatbotpython -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activatepip install -r requirements.txt- Enable Vertex AI API on Google Cloud.
- Generate a service account and download the JSON key.
- Set environment variable:
export GOOGLE_APPLICATION_CREDENTIALS="path/to/your/key.json"python app.pySample interaction:
🤖 Real-Time ChatBot (type 'exit' to quit)
You: What is the capital of India?
Bot: The capital of India is New Delhi.
- Python 3.10+
- Google Cloud Vertex AI
- Gemini 1.5 Pro API
vertexaiPython SDK
This project is licensed under the MIT License. See the LICENSE file for more info.
Built with ❤️ by Ankan Ghosh