Skip to content

A production-grade Telegram Bot powered by GPT, with clean architecture, commands, memory, and deployment readiness. Designed a scalable Telegram chatbot using OpenAI APIs to support real-world use cases across customer support, HR automation, DevOps monitoring, and AI-powered personal assistance.

License

Notifications You must be signed in to change notification settings

ramarav/ChatGPT-TelegramBot-Pro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🤖 ChatGPT-TelegramBot-Pro — Generative AI Telegram Assistant

Build Python Telegram OpenAI Async Docker License Stars

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.


🧠 Architecture Overview

User (Telegram)
      ↓
Telegram Bot API
      ↓
Async Python Handlers
      ↓
Conversation Memory Store
      ↓
OpenAI GPT API
      ↓
AI Response → Telegram

✨ Features

  • 🤖 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)

🛠 Tech Stack

  • Python 3.10+
  • python-telegram-bot (async)
  • OpenAI GPT APIs
  • dotenv
  • AsyncIO
  • Docker

📁 Project Structure

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

⚙️ Setup & Run

1️⃣ Clone Repository

git clone https://github.com/ramarav/ChatGPT-TelegramBot-Pro.git
cd ChatGPT-TelegramBot-Pro

2️⃣ Install Dependencies

pip install -r requirements.txt

3️⃣ Configure Environment

TELEGRAM_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.

4️⃣ Run the Bot

python bot.py

🐳 Docker Deployment

docker build -t chatgpt-telegrambot-pro .
docker run --env-file .env chatgpt-telegrambot-pro

🧪 Supported Commands

Command Description
/start Start the bot
/help Usage instructions
/clear Clear conversation memory

🌍 Use Cases

  • AI customer support bots
  • Personal AI assistants
  • Interview prep bots
  • Learning companions
  • SaaS chatbot backends
  • Prototype for RAG systems

📈 Roadmap

  • Persistent DB memory (Redis / SQLite)
  • Tool calling support
  • RAG with vector databases
  • Admin moderation controls
  • Webhook-based scaling
  • Analytics & logging

🤝 Contributing

Contributions are welcome!
Fork → Create feature branch → Submit PR 🚀


⭐ Support the Project

If you find this useful:

  • ⭐ Star the repo
  • 🍴 Fork it
  • 🧑‍💻 Share it with the community

🏷️ Tags

#GenerativeAI #TelegramBot #Chatbot #OpenAI #LLM
#Python #AsyncPython #AIEngineer #MachineLearning
#OpenSource #Docker #SystemDesign


👨‍💻 Author

Mekala Ramarao
Python Developer | AI/ML Engineer
GPU Systems • Generative AI • Open Source

🔗 https://github.com/ramarav


🔥 Built to demonstrate real-world Generative AI system design and engineering excellence.

About

A production-grade Telegram Bot powered by GPT, with clean architecture, commands, memory, and deployment readiness. Designed a scalable Telegram chatbot using OpenAI APIs to support real-world use cases across customer support, HR automation, DevOps monitoring, and AI-powered personal assistance.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published