Chatgpt Telegram Bot

πŸ’¬ Telegram bot with ChatGPT & Claude Python-based, using OpenAI's API.

AI & Machine LearningPythonMIT

Abstract

Chatgpt Telegram Bot is an open-source AI & Machine Learning project. πŸ’¬ Telegram bot with ChatGPT & Claude Python-based, using OpenAI's API. Web chatbots are great β€” but they're often laggy, rate-limited, and locked behind a browser tab. This project puts the best models from OpenAI and Anthropic right inside Telegram, with your own API keys and no daily limits. It is built using Python, OpenAI API. Key capabilities include: Low latency β€” replies usually take 3–5 seconds; No request limits β€” you pay your API provider directly, nothing in between; Message streaming β€” answers stream into Telegram word-by-word. The complete source code is publicly available on GitHub under the MIT License, making it a useful reference for students building an AI & Machine Learning mini project or final-year project.

1. Introduction

Web chatbots are great β€” but they're often laggy, rate-limited, and locked behind a browser tab. This project puts the best models from OpenAI and Anthropic right inside Telegram, with your own API keys and no daily limits.

Try the live bot: @jadvebot Β· Web: jadve.com β€” or deploy your own in two commands (Quick start ↓).

Models are config-driven β€” add or remove any in config/models.yml with no code changes.

2. Objective

πŸ’¬ Telegram bot with ChatGPT & Claude Python-based, using OpenAI's API.

This project demonstrates how Python, OpenAI API can be applied to a real-world AI & Machine Learning problem.

3. Key Features / Modules

  • Low latency β€” replies usually take 3–5 seconds.
  • No request limits β€” you pay your API provider directly, nothing in between.
  • Message streaming β€” answers stream into Telegram word-by-word.
  • Frontier models β€” GPT-5.5 and Anthropic Claude (Opus 4.8 / Sonnet / Haiku) via OpenRouter, plus fast & cheap defaults out of the box.
  • Vision β€” send an image and any vision-capable model (GPT-5.5, Claude, …) will read it.
  • Image generation β€” create images with OpenAI gpt-image-1 (switch to ‍ Artist mode).
  • Voice messages β€” record a voice note and Whisper transcribes it for you.
  • 15 chat modes β€” Assistant, Code Assistant, Psychologist, Elon Musk and more. Add your own in config/chat_modes.yml.
  • Group chat support β€” run /help_group_chat for setup instructions.
  • Code highlighting β€” formatted, readable code blocks.

4. Technology Stack

PythonOpenAI API

5. System Requirements

General requirements for this technology stack β€” check the README for exact versions.

  • Python 3.8 or later
  • pip / virtualenv for dependencies
  • VS Code, PyCharm or Jupyter Notebook
  • Git (to clone the repository)

6. Installation & Setup

git clone https://github.com/father-bot/chatgpt_telegram_bot.git
cd chatgpt_telegram_bot
mv config/config.example.yml config/config.yml
mv config/config.example.env config/config.env
# then edit config/config.yml β€” set telegram_token, openai_api_key (and openrouter_api_key for Claude/GPT-5.5)
docker-compose --env-file config/config.env up --build

Full setup instructions are in the project README.

7. Future Enhancements

Suggested extensions you can add to make this your own project.

  • Deploy the model as a web app with Streamlit, Flask or FastAPI
  • Compare against an additional model and report the metric difference
  • Add explainability (SHAP / Grad-CAM)

8. Viva / Review Questions

Common questions examiners ask for projects in this domain.

  1. What dataset does the project use and how was it pre-processed?
  2. Which algorithm / model architecture is used and why was it chosen over alternatives?
  3. How are training and testing data split, and how is overfitting avoided?
  4. Which evaluation metrics (accuracy, precision, recall, F1) are reported and what do they mean here?
  5. How would you deploy this model for real users?

9. Source Code & License

This project is developed by father-bot and published on GitHub under the MIT License. Please follow the license terms and credit the original author when you use or modify this code.

Want to build this as your internship project?

Work on an AI & Machine Learning project like this with mentor guidance, weekly reviews and an internship certificate from Training Trains, Erode β€” online or offline.

Apply for AI & Machine Learning Internship