Menu Close

chatgpt-telegram-bot

ChatGPT-Telegram-Bot

img

[中文简体]

ChatGPT and Telegram bot, based on Node.js.

GitHub Workflow Status
Docker Build
Docker Pulls
Docker Image Size
MIT License

How to use

Send a message directly to the bot and a conversation thread will be created automatically.

If you wish to reset thread, you can use /start command.

demo

How to deploy

Locally

  1. Copy the .env file to .env.prod,

    1. Add Telegram bot token to TELEGRAM_BOT_TOKEN (How to create a Telegram bot
    2. Add ChatGPT token to CHATGPT_TOKEN (How to get ChatGPT token)
  2. Execute the command

# install dependencies
pnpm install

# Start the bot service
pnpm run run

# or run in background by pm2
# but you need to install `pm2` first
# https://pm2.keymetrics.io/
pnpm run run:pm2

Docker

# Pull image
docker pull dawangraoming/chatgpt-telegram-bot:latest

# Run
docker run -d --name chatgpt-telegram-bot -e TELEGRAM_BOT_TOKEN=xxx -e CHATGPT_TOKEN=xxxx chatgpt-telegram-bot

Todo

  1. Finish Unlock Thought Control function, let lover free
  2. More functional keyboard shortcuts
  3. Support setting ChatGPT token in Telegram
  4. Support different users to use different ChatGPT tokens (maybe)

License

MIT © DaWangRaoMing

Alt

View Source Code
Posted in Development