Skip to content

Fork of chatgpt_telegram_bot that uses Redis instead of mongo for easy hosting on fly.io

License

Notifications You must be signed in to change notification settings

patmood/chatgpt_telegram_bot

 
 

Repository files navigation

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

This is a fork of https://github.com/karfly/chatgpt_telegram_bot, updated to use redis instead of mongo so that it can easily be hosted for free on fly.io



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 support
  • Voice message recognition
  • Code highlighting
  • Special chat modes: 👩🏼‍🎓 Assistant, 👩🏼‍💻 Code Assistant, 📝 Text Improver and 🎬 Movie Expert. 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

  • 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. It's enabled by default and can be disabled with use_chatgpt_api option in config. Don't forget to rebuild you docker image (--build).

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/config.example.env config/config.env
  4. 🔥 And now run:

    docker-compose --env-file config/config.env up --build

References

  1. Build ChatGPT from GPT-3

About

Fork of chatgpt_telegram_bot that uses Redis instead of mongo for easy hosting on fly.io

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.8%
  • Dockerfile 1.2%