ChatGPT-Telegram-Bot
[中文简体]
ChatGPT and Telegram bot, based on Node.js.
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.
How to deploy
Locally
-
Copy the
.env
file to.env.prod
,- Add Telegram bot token to
TELEGRAM_BOT_TOKEN
(How to create a Telegram bot) - Add ChatGPT token to
CHATGPT_TOKEN
(How to get ChatGPT token)
- Add Telegram bot token to
-
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
- Finish
Unlock Thought Control
function, let lover free - More functional keyboard shortcuts
- Support setting ChatGPT token in Telegram
- Support different users to use different ChatGPT tokens (maybe)
- …
License
MIT © DaWangRaoMing