MCPcopy
hub / github.com/father-bot/chatgpt_telegram_bot

github.com/father-bot/chatgpt_telegram_bot @v1.6 sqlite

repository ↗ · DeepWiki ↗ · release v1.6 ↗
53 symbols 216 edges 5 files 0 documented · 0%
README

ChatGPT Telegram Bot: GPT-4. Fast. No daily limits. Special chat modes

We all love chat.openai.com, but... It's TERRIBLY laggy, has daily limits, and is only accessible through an archaic web interface.

This repo is ChatGPT re-created as Telegram Bot. And it works great.

You can deploy your own bot, or use mine: @jadvebot (Our web: https://jadve.com)

Features

  • Low latency replies (it usually takes about 3-5 seconds)
  • No request limits
  • Message streaming (watch demo)
  • GPT-4 and GPT-4 Turbo support
  • GPT-4o and GPT-4o mini support (GPT-4o mini is the default model)
  • Newest models incl. GPT-5.5 and Anthropic Claude (Opus / Sonnet / Haiku) via OpenRouter
  • GPT-4 Vision support
  • Group Chat support (/help_group_chat to get instructions)
  • DALLE 2 (choose 👩‍🎨 Artist mode to generate images)
  • Voice message recognition
  • Code highlighting
  • 15 special chat modes: 👩🏼‍🎓 Assistant, 👩🏼‍💻 Code Assistant, 👩‍🎨 Artist, 🧠 Psychologist, 🚀 Elon Musk and other. You can easily create your own chat modes by editing config/chat_modes.yml
  • Support of ChatGPT API
  • List of allowed Telegram users
  • Track $ balance spent on OpenAI API


News

  • Mar 2026: Added OpenRouter provider support — use Anthropic Claude (Opus / Sonnet / Haiku) and GPT-5.5 alongside OpenAI models. Set openrouter_api_key in config/config.yml and pick the model in /settings
  • Feb 2026: Migrated to the OpenAI Python 1.x SDK; gpt-4o-mini is now the default model and the Docker image runs on Python 3.12. See CHANGELOG.md
  • Dec 2025: Added GPT-4o and GPT-4o mini support
  • 2 Apr 2024: Added GPT-4 Vision support
  • 15 Nov 2023: Added support of GPT-4 Turbo
  • 1 Aug 2023: Added OpenAI API Base to config (useful while using OpenAI-compatible API like LocalAI)
  • 21 Apr 2023:
    • DALLE 2 support
    • Group Chat support (/help_group_chat to get instructions)
    • 10 new hot chat modes and updated chat mode menu with pagination: 🇬🇧 English Tutor, 🧠 Psychologist, 🚀 Elon Musk, 📊 SQL Assistant and other.
  • 24 Mar 2023: GPT-4 support. Run /settings command to choose model
  • 15 Mar 2023: Added message streaming. Now you don't have to wait until the whole message is ready, it's streamed to Telegram part-by-part (watch demo)
  • 9 Mar 2023: Now you can easily create your own Chat Modes by editing config/chat_modes.yml
  • 8 Mar 2023: Added voice message recognition with OpenAI Whisper API. Record a voice message and ChatGPT will answer you!
  • 2 Mar 2023: Added support of ChatGPT API.

Bot commands

  • /retry – Regenerate last bot answer
  • /new – Start new dialog
  • /mode – Select chat mode
  • /balance – Show balance
  • /settings – Show settings
  • /help – Show help

Setup

  1. Get your OpenAI API key

  2. Get your Telegram bot token from @BotFather

  3. Edit config/config.example.yml to set your tokens and run 2 commands below (if you're advanced user, you can also edit config/config.example.env): bash mv config/config.example.yml config/config.yml mv config/config.example.env config/config.env

  4. 🔥 And now run: bash docker-compose --env-file config/config.env up --build

❤️ Top donations

You can be in this list:

  1. LilRocco. Donation: 11000$ (!!!)

  2. Mr V. Donation 250$

  3. unexpectedsunday. Donation: 150$

  4. Sem. Donation: 100$

  5. Miksolo. Donation: 81$

    Message: Thank you. Using this docker container every day! Actually created the same project but its good to see that this one is being supported often. Will continue using it! Good architecture choices made in the code 💪!

  6. Ryo. Donation: 80$

  7. Ilias Ism. Donation: 69$

    Message: I wanted to thank you for your amazing code! It helped me start my own Telegram ChatGPT bot and add a bunch of cool features. I really appreciate your hard work on this project. For anyone interested in trying my bot, feel free to check it out here: magicbuddy.chat 🤖 Thanks again! 😊

  8. Sebastian. Donation: 55$

  9. Alexander Zimin. Donation: 50$

  10. Kbaji20. Donation: 30$

  11. Hans Blinken. Donation: 10$

Contributors

References

  1. Build ChatGPT from GPT-3

Core symbols most depended-on inside this repo

set_user_attribute
called by 25
bot/database.py
get_user_attribute
called by 23
bot/database.py
register_user_if_not_exists
called by 16
bot/bot.py
start_new_dialog
called by 8
bot/database.py
is_previous_message_not_answered_yet
called by 8
bot/bot.py
check_if_user_exists
called by 7
bot/database.py
get_dialog_messages
called by 7
bot/database.py
send_message
called by 5
bot/openai_utils.py

Shape

Function 33
Method 18
Class 2

Languages

Python100%

Modules by API surface

bot/bot.py29 symbols
bot/openai_utils.py14 symbols
bot/database.py10 symbols

Dependencies from manifests, versioned

PyYAML6.0.2 · 1×
openai1.40.0 · 1×
pymongo4.6.3 · 1×
python-dotenv1.0.1 · 1×
tiktoken0.7.0 · 1×

Datastores touched

(mongodb)Database · 1 repos

For agents

$ claude mcp add chatgpt_telegram_bot \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact