Natgho / chatgpt_telegram_bot

This repo is a fork of the original repo that remains up to date. Since the original repo is not being updated by anyone, it's becoming obsolete day by day, so you are looking at a version kept alive by me, a volunteer :)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


We all love [chat.openai.com](https://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.

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
  • Group Chat support (/help_group_chat to get instructions)
  • DALLE 2 (choose πŸ‘©β€πŸŽ¨ Artist mode to generate images)
  • Voice message recognition
  • Code highlighting
  • 17 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
  • Multi-language support


News

  • 24 Feb 2024:
    • Added Multi-language support. Now you can easily switch between languages using config.yml file.
    • Turkish language translation added
    • Unauthorized users warning added
  • 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.
  • 1 Aug 2023: Added OpenAI API Base to config (useful while using OpenAI-compatible API like LocalAI)
  • 15 Nov 2023: Added support of GPT-4 Turbo

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):

    mv config/config.example.yml config/config.yml
    mv config.example.env .env
  4. πŸ”₯ And now run:

    docker-compose -f docker-compose.yml up --build

Language support

You can easily switch between languages using config.yml file. Just change language parameter to en, de, tr or es and restart the bot.

For help with translations, open LOCALES file and translate the strings in base.po file. Then create a PR with your translation.

References

  1. Build ChatGPT from GPT-3

About

This repo is a fork of the original repo that remains up to date. Since the original repo is not being updated by anyone, it's becoming obsolete day by day, so you are looking at a version kept alive by me, a volunteer :)

License:MIT License


Languages

Language:Python 94.3%Language:Makefile 4.3%Language:Dockerfile 1.4%