A lightweight Telegram bot powered by Google's Gemini 2.5 Flash AI model for intelligent conversational responses.
docker run -d \
--name gemini-telegram-bot \
-e GOOGLE_API_KEY=your_google_api_key \
-e TELEGRAM_API_KEY=your_telegram_bot_token \
tmvdl/gemini-telegram
Or use Docker Compose:
services:
telegram-bot:
image: tmvdl/gemini-telegram
container_name: gemini-telegram-bot
restart: unless-stopped
environment:
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- TELEGRAM_API_KEY=${TELEGRAM_API_KEY}
| Variable | Description | How to Get |
|---|---|---|
GOOGLE_API_KEY | Google Gemini API key | Get from Google AI Studio |
TELEGRAM_API_KEY | Telegram bot token | Get from @BotFather |
/gemini <message> to interact with the AIOnce the bot is running and added to your Telegram:
/gemini command followed by your question or message:/gemini What is the capital of France?
/gemini Explain quantum computing in simple terms
/gemini Write a haiku about coding
The bot will respond with AI-generated content from Google's Gemini model.
docker-compose.yml:services:
telegram-bot:
image: tmvdl/gemini-telegram
container_name: gemini-telegram-bot
restart: unless-stopped
environment:
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- TELEGRAM_API_KEY=${TELEGRAM_API_KEY}
networks:
- bot-network
networks:
bot-network:
driver: bridge
.env file with your credentials:GOOGLE_API_KEY=your_google_api_key_here
TELEGRAM_API_KEY=your_telegram_bot_token_here
docker-compose up -d
docker-compose logs -f
/newbot and follow the instructionspython:3.11-slim/appunless-stoppedBot not responding:
docker logs gemini-telegram-botConnection issues:
GitHub: tarsislimadev/gemini_on_telegram
For issues, questions, or contributions, please visit the GitHub repository and open an issue.
This project is open source and available for educational purposes.
Content type
Image
Digest
sha256:c5bd2a0ea…
Size
79.2 MB
Last updated
11 months ago
docker pull tmvdl/gemini-telegram