telegram-test / README.md
Ewan
Initial Telegram bot setup
77cbb2d
---
title: Telegram Test
emoji: 🤖
colorFrom: blue
colorTo: green
sdk: docker
pinned: false
---
# 🤖 Telegram Test Bot
A simple Telegram bot for testing Gemini AI integration with LangChain.
## Features
- Basic Telegram bot integration
- Google Gemini AI responses
- LangChain conversation management
- MongoDB conversation storage
## Environment Variables
Required secrets in HuggingFace Space settings:
```env
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
GOOGLE_API_KEY=your_google_api_key
MONGODB_URI=your_mongodb_connection_string
```
## Local Development
```bash
pip install -r requirements.txt
python bot.py
```
## Getting a Telegram Bot Token
1. Open Telegram and search for @BotFather
2. Send `/newbot` command
3. Follow the instructions to create your bot
4. Copy the bot token provided
5. Add it as `TELEGRAM_BOT_TOKEN` secret in HuggingFace Space settings
## Technologies
- **python-telegram-bot**: Telegram Bot API wrapper
- **LangChain**: LLM orchestration framework
- **Google Gemini**: AI language model (gemini-2.0-flash-exp)
- **MongoDB**: Conversation history storage