The easiest and fastest way to deploy your own ChatGPT Telegram bot. Using Cloudflare Workers, it is a single file that can be copied and pasted directly without any dependencies, local development environment configuration, domain name, or server. You can customize the system initialization information so that your debugged personality never disappears.
master
version with few bugs after testingdev
version with some new features, but not fully tested, and basically usable
It is recommended to fill in the environment variables in the Workers configuration interface, rather than directly modifying the variables in the js code. For more information, see Configuration.
For more information, see Deployment Process.
Automatically update using Github Action, for more information, see Automatic Update.
Command | Description | Example |
---|---|---|
/help |
Get command help | /help |
/new |
Start a new conversation | /new |
/start |
Get your ID and start a new conversation | /start |
/img |
Generate an image | /img image description |
/version |
Get the current version number and check for updates | /version |
/setenv |
Set user configuration | /setenv KEY=VALUE |
/delenv |
Delete user configuration | /delenv KEY |
/usage |
Get usage statistics for the current bot | /usage |
/system |
View some current system information | /system |
/role |
Set a preset identity | /role |
/redo |
Modify the previous question or switch to a different answer | /redo modified content or /redo |
/echo |
Echo the message, only available in development mode | /echo |
Create multiple robots bound to the same workers, set Enable group chat mode, create multiple group chats, each with its own robot, and give each robot a different TELEGRAM_AVAILABLE_TOKENS
, and assign each robot a different SYSTEM_INIT_MESSAGE
.SYSTEM_INIT_MESSAGE
, such as translation expert, copywriting expert, and code expert. Then, chat with the robots in different groups according to your needs, so you don't have to switch configuration properties frequently.
Group messages can only be called by administrators of the botLong messages are truncated by Telegram
- v1.5.0
- perf: Adjust command order
- perf: Send loading message before sending requests to OpenAI
- feat: Add support for streaming output (enabled by default). Use
STREAM_MODE=false
to disable. - feat: Add security mode (enabled by default) to address Telegram's infinite retry issue
- feat: Add support for multiple keys and randomly select a key to use
- feat: Add quick buttons
/new
,/redo
For other update logs, see CHANGELOG.md.
This project exists thanks to all the people who contribute. Contribute.
ChatGPT-Telegram-Workers is released under the MIT license. See LICENSE for details.