Skip to content

Commit

Permalink
doc: 修复COMMAND_DESCRIPTION文档错误
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Sep 6, 2024
1 parent 6b10498 commit 8c99bc8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
24 changes: 12 additions & 12 deletions doc/cn/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,22 +204,22 @@ CUSTOM_COMMAND_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "你是一个翻译下

下面是一些自定义指令帮助信息例子

| 指令描述 | 描述 ||
|-----------------------------|------------------------------|-------------------------------------------------------------------------------------------------------------------|
| COMMAND_DESCRIPTION_azure | 切换AI提供商为Azure | `/setenvs {"AI_PROVIDER": "azure"}` |
| COMMAND_DESCRIPTION_workers | 切换AI提供商为Workers | `/setenvs {"AI_PROVIDER": "workers"}` |
| COMMAND_DESCRIPTION_gpt3 | 切换AI提供商为OpenAI GPT-3.5 Turbo | `/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-3.5-turbo"}` |
| COMMAND_DESCRIPTION_gpt4 | 切换AI提供商为OpenAI GPT-4 | `/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}` |
| COMMAND_DESCRIPTION_cn2en | 将对话内容翻译成英文 | `/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}` |
| 指令描述 | 描述 |
|-----------------------------|------------------------------|
| COMMAND_DESCRIPTION_azure | 切换AI提供商为Azure |
| COMMAND_DESCRIPTION_workers | 切换AI提供商为Workers |
| COMMAND_DESCRIPTION_gpt3 | 切换AI提供商为OpenAI GPT-3.5 Turbo |
| COMMAND_DESCRIPTION_gpt4 | 切换AI提供商为OpenAI GPT-4 |
| COMMAND_DESCRIPTION_cn2en | 将对话内容翻译成英文 |

如果你是用toml进行配置,可以使用下面的方式:

```toml
COMMAND_DESCRIPTION_azure = '/setenvs {"AI_PROVIDER": "azure"}'
COMMAND_DESCRIPTION_workers = '/setenvs {"AI_PROVIDER": "workers"}'
COMMAND_DESCRIPTION_gpt3 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-3.5-turbo"}'
COMMAND_DESCRIPTION_gpt4 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}'
COMMAND_DESCRIPTION_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}'
COMMAND_DESCRIPTION_azure = '切换AI提供商为Azure'
COMMAND_DESCRIPTION_workers = '切换AI提供商为Workers'
COMMAND_DESCRIPTION_gpt3 = '切换AI提供商为OpenAI GPT-3.5 Turbo'
COMMAND_DESCRIPTION_gpt4 = '切换AI提供商为OpenAI GPT-4'
COMMAND_DESCRIPTION_cn2en = '将对话内容翻译成英文'
```

如果你想将自定义命令绑定到telegram的菜单中,你可以添加如下环境变量`COMMAND_SCOPE_azure = "all_private_chats,all_group_chats,all_chat_administrators"`,这样插件就会在所有的私聊,群聊和群组中生效。
24 changes: 12 additions & 12 deletions doc/en/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,22 +203,22 @@ If you want to add help information for a custom command, you can use environmen

The following are some examples of custom command help information.

| Command | Description | Value |
|-----------------------------|--------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|
| COMMAND_DESCRIPTION_azure | Switch AI provider to Azure. | `/setenvs {"AI_PROVIDER": "azure"}` |
| COMMAND_DESCRIPTION_workers | Switch AI provider to Workers | `/setenvs {"AI_PROVIDER": "workers"}` |
| COMMAND_DESCRIPTION_gpt3 | Switch AI provider to OpenAI GPT-3.5 Turbo. | `/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-3.5-turbo"}` |
| COMMAND_DESCRIPTION_gpt4 | Switch AI provider to OpenAI GPT-4. | `/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}` |
| COMMAND_DESCRIPTION_cn2en | Translate the conversation content into English. | `/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}` |
| Command | Value |
|-----------------------------|--------------------------------------------------|
| COMMAND_DESCRIPTION_azure | Switch AI provider to Azure. |
| COMMAND_DESCRIPTION_workers | Switch AI provider to Workers |
| COMMAND_DESCRIPTION_gpt3 | Switch AI provider to OpenAI GPT-3.5 Turbo. |
| COMMAND_DESCRIPTION_gpt4 | Switch AI provider to OpenAI GPT-4. |
| COMMAND_DESCRIPTION_cn2en | Translate the conversation content into English. |

If you are using TOML for configuration, you can use the following method:

```toml
COMMAND_DESCRIPTION_azure = '/setenvs {"AI_PROVIDER": "azure"}'
COMMAND_DESCRIPTION_workers = '/setenvs {"AI_PROVIDER": "workers"}'
COMMAND_DESCRIPTION_gpt3 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-3.5-turbo"}'
COMMAND_DESCRIPTION_gpt4 = '/setenvs {"AI_PROVIDER": "openai", "OPENAI_CHAT_MODEL": "gpt-4"}'
COMMAND_DESCRIPTION_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}'
COMMAND_DESCRIPTION_azure = 'Switch AI provider to Azure.'
COMMAND_DESCRIPTION_workers = 'Switch AI provider to Workers'
COMMAND_DESCRIPTION_gpt3 = 'Switch AI provider to OpenAI GPT-3.5 Turbo.'
COMMAND_DESCRIPTION_gpt4 = 'Switch AI provider to OpenAI GPT-4.'
COMMAND_DESCRIPTION_cn2en = 'Translate the conversation content into English.'
```

If you want to bind custom commands to the menu of Telegram, you can add the following environment variable `COMMAND_SCOPE_azure = "all_private_chats,all_group_chats,all_chat_administrators"`, so that the plugin will take effect in all private chats, group chats and groups.

0 comments on commit 8c99bc8

Please sign in to comment.