ChatGPT-TelegramBot-Pro is a production-grade Telegram chatbot powered by OpenAI GPT, built using async Python, clean modular architecture, conversation memory, and Docker support.
User (Telegram)
↓
Telegram Bot API
↓
Async Python Handlers
↓
Conversation Memory Store
↓
OpenAI GPT API
↓
AI Response → Telegram
- 🤖 GPT-powered conversational AI
- 🧠 Context-aware memory per user
- ⚡ Async message handling
- 🧩 Modular handler-based design
- 🔐 Secure API key handling via
.env - 🐳 Docker support
- ♻️ Easy extensibility (RAG, tools, DB)
- Python 3.10+
- python-telegram-bot (async)
- OpenAI GPT APIs
- dotenv
- AsyncIO
- Docker
ChatGPT-TelegramBot-Pro/
├── bot.py
├── config.py
├── requirements.txt
├── .env.example
├── Dockerfile
├── handlers/
│ ├── start.py
│ ├── help.py
│ ├── clear.py
│ └── chat.py
├── services/
│ ├── openai_client.py
│ └── memory_store.py
└── README.md
git clone https://github.com/ramarav/ChatGPT-TelegramBot-Pro.git
cd ChatGPT-TelegramBot-Propip install -r requirements.txtTELEGRAM_BOT_TOKEN=your_telegram_bot_token
OPENAI_API_KEY=sk-xxxxxx
MODEL_NAME=gpt-4o-mini
MAX_HISTORY=10
SYSTEM_PROMPT=You are a helpful AI assistant.python bot.pydocker build -t chatgpt-telegrambot-pro .
docker run --env-file .env chatgpt-telegrambot-pro| Command | Description |
|---|---|
/start |
Start the bot |
/help |
Usage instructions |
/clear |
Clear conversation memory |
- AI customer support bots
- Personal AI assistants
- Interview prep bots
- Learning companions
- SaaS chatbot backends
- Prototype for RAG systems
- Persistent DB memory (Redis / SQLite)
- Tool calling support
- RAG with vector databases
- Admin moderation controls
- Webhook-based scaling
- Analytics & logging
Contributions are welcome!
Fork → Create feature branch → Submit PR 🚀
If you find this useful:
- ⭐ Star the repo
- 🍴 Fork it
- 🧑💻 Share it with the community
#GenerativeAI #TelegramBot #Chatbot #OpenAI #LLM
#Python #AsyncPython #AIEngineer #MachineLearning
#OpenSource #Docker #SystemDesign
Mekala Ramarao
Python Developer | AI/ML Engineer
GPU Systems • Generative AI • Open Source
🔥 Built to demonstrate real-world Generative AI system design and engineering excellence.