Skip to content

ChatGPT Telegram Bot - minimal configuration for self-host.

License

Notifications You must be signed in to change notification settings

tp-open/chatgpt-telegram-bot

Repository files navigation

ChatGPT Telegram Bot: minimal configuration for self-host.

Release

Project fork from karfly/ChatGPT and customized to minimal configuration for self-host.

Get started

  1. Get your OpenAI API key

  2. Get your Telegram bot token from @BotFather

  3. Get MongoDB from MongoDB Atlas or MongoDB

  4. Setup Docker and Docker Compose

  5. Edit environment .env file:

mv sample.env .env
  1. And now run, see docker-docs for more details
```bash
docker-compose up --build

Features

  • Support health check
  • Low latency replies (it usually takes about 3-5 seconds)
  • No request limits
  • Message streaming (watch demo)
  • GPT-4 support
  • Group Chat support (/help_group_chat to get instructions)
  • DALLE 2 (choose 👩‍🎨 Artist mode to generate images)
  • Voice message recognition
  • Code highlighting
  • Support chat modes
  • Support of ChatGPT API
  • List of allowed Telegram users
  • Track $ balance spent on OpenAI API

News

  • 06 Aug 2023: Added support health check
  • 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

LICENSE

Copyright © 2023 TP-Open.
Licensed under the MIT License. See LICENSE for details.