Skip to content

tmlnv/chatgpt_telegram_bot

Repository files navigation

chatgpt_telegram_bot

This is a Telegram bot that allows you to interact with ChatGPT, an advanced chatbot powered by OpenAI. The bot is designed to run via Docker Compose, making it easy to deploy and manage in any environment.

Features

  • Code highlighting
  • Chat modes: 🛎 Assistant, 💻 Code Assistant, 📝 Text Improver , ⚫ Blank
  • List of allowed Telegram users
  • Message streaming

Bot commands

  • /new – Start new conversation
  • /mode – Select chat mode
  • /retry – Regenerate last bot answer
  • /help – Show help

Setup

  1. Get your Telegram bot token from @BotFather

  2. Edit config/config.example.yml to set your telegram token and Hugging Face api key (write permissions necessary) 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

And now run:

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

References

  1. Build ChatGPT from GPT-3
  2. Reverse Engineered ChatGPT API by OpenAI
  3. OpenAI Davinci API Telegram Bot
  4. Kandinsky 2.2
  5. OpenAI API Free Reverse Proxy
  6. GPT4FREE