Skip to content

Latest commit

 

History

History
62 lines (45 loc) · 3.32 KB

README.md

File metadata and controls

62 lines (45 loc) · 3.32 KB

ChatGPT-Telegram-Workers

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.

Branches

  • master version with few bugs after testing
  • dev version with some new features, but not fully tested, and basically usable

Configuration

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.

Deployment Process

For more information, see Deployment Process.

Automatic Update

Automatically update using Github Action, for more information, see Automatic Update.

Supported Commands

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

Best Practices

Create multiple robots bound to the same workers, set TELEGRAM_AVAILABLE_TOKENS, and assign each robot a different SYSTEM_INIT_MESSAGE. Enable group chat mode, create multiple group chats, each with its own robot, and give each robot a different 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.

Known Issues

  • Group messages can only be called by administrators of the bot
  • Long messages are truncated by Telegram

Update Log

  • 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.

Contributors

This project exists thanks to all the people who contribute. Contribute.

License

ChatGPT-Telegram-Workers is released under the MIT license. See LICENSE for details.