Skip to content

Commit

Permalink
doc: fix config document
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Jul 23, 2024
1 parent 71d8ec9 commit ae6d594
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 38 deletions.
48 changes: 25 additions & 23 deletions doc/cn/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@

为每个用户通用的配置,只能在Workers配置界面或者toml中配置填写,不支持通过Telegram发送消息来修改。

数组为空字符串,表示没有设置值,如果需要设置值,设置为`'value1,value2'`,多个值用逗号分隔。

### 基础配置

| KEY | 名称 | 默认值 | 描述 |
Expand All @@ -25,13 +27,13 @@
| KEY | 名称 | 默认值 | 描述 |
|---------------------------|----------------|-----------------------------|-----------------------------------------|
| TELEGRAM_API_DOMAIN | Telegram API域名 | `https://api.telegram.org/` | Telegram API的域名 |
| TELEGRAM_AVAILABLE_TOKENS | 可用的Telegram令牌 | `[]` | 允许访问的Telegram Token,设置时以逗号分隔 |
| TELEGRAM_AVAILABLE_TOKENS | 可用的Telegram令牌 | `''//()` | 允许访问的Telegram Token,设置时以逗号分隔 |
| DEFAULT_PARSE_MODE | 默认解析模式 | `Markdown` | 默认消息解析模式 |
| I_AM_A_GENEROUS_PERSON | 允许所有人使用 | `false` | 是否允许所有人使用 |
| CHAT_WHITE_LIST | 聊天白名单 | `[] ` | 允许使用的聊天ID白名单 |
| CHAT_WHITE_LIST | 聊天白名单 | `''//(array string)` | 允许使用的聊天ID白名单 |
| LOCK_USER_CONFIG_KEYS | 锁定的用户配置键 | 默认值为所有API的URL | 防止被替换导致token泄露的配置键 |
| TELEGRAM_BOT_NAME | Telegram机器人名称 | `[]` | 允许访问的Telegram Token对应的Bot Name,设置时以逗号分隔 |
| CHAT_GROUP_WHITE_LIST | 群组白名单 | `[]` | 允许使用的群组ID白名单 |
| TELEGRAM_BOT_NAME | Telegram机器人名称 | `''//(array string)` | 允许访问的Telegram Token对应的Bot Name,设置时以逗号分隔 |
| CHAT_GROUP_WHITE_LIST | 群组白名单 | `''//(array string)` | 允许使用的群组ID白名单 |
| GROUP_CHAT_BOT_ENABLE | 群组机器人开关 | `true` | 是否启用群组机器人 |
| GROUP_CHAT_BOT_SHARE_MODE | 群组机器人共享模式 | `false` | 开启后同个群组的人使用同一个聊天上下文 |

Expand All @@ -51,15 +53,15 @@

### 特性开关

| KEY | 名称 | 默认值 | 描述 |
|-------------------------|----------|---------|-----------------|
| HIDE_COMMAND_BUTTONS | 隐藏命令按钮 | `[]` | 修改后需要重新init |
| SHOW_REPLY_BUTTON | 显示快捷回复按钮 | `false` | 是否显示快捷回复按钮 |
| EXTRA_MESSAGE_CONTEXT | 额外消息上下文 | `false` | 引用的消息也会假如上下文 |
| STREAM_MODE | 流模式 | `true` | 打字机模式 |
| SAFE_MODE | 安全模式 | `true` | 开启后会保存最新一条消息的ID |
| DEBUG_MODE | 调试模式 | `false` | 开启后会保存最新一条消息 |
| DEV_MODE | 开发模式 | `false` | 开启后会展示更多调试信息 |
| KEY | 名称 | 默认值 | 描述 |
|-----------------------|----------|----------------------|-----------------|
| HIDE_COMMAND_BUTTONS | 隐藏命令按钮 | `''//(array string)` | 修改后需要重新init |
| SHOW_REPLY_BUTTON | 显示快捷回复按钮 | `false` | 是否显示快捷回复按钮 |
| EXTRA_MESSAGE_CONTEXT | 额外消息上下文 | `false` | 引用的消息也会假如上下文 |
| STREAM_MODE | 流模式 | `true` | 打字机模式 |
| SAFE_MODE | 安全模式 | `true` | 开启后会保存最新一条消息的ID |
| DEBUG_MODE | 调试模式 | `false` | 开启后会保存最新一条消息 |
| DEV_MODE | 开发模式 | `false` | 开启后会展示更多调试信息 |

## 用户配置

Expand All @@ -76,16 +78,16 @@

### OpenAI

| KEY | 名称 | 默认值 |
|--------------------------|-------------------------|------------------------------------------------------------|
| OPENAI_API_KEY | OpenAI API Key | `[]` |
| OPENAI_CHAT_MODEL | OpenAI的模型名称 | `gpt-3.5-turbo` |
| OPENAI_API_BASE | OpenAI API BASE | `https://api.openai.com/v1` |
| OPENAI_API_EXTRA_PARAMS | OpenAI API Extra Params | {} |
| DALL_E_MODEL | DALL-E的模型名称 | `dall-e-2` |
| DALL_E_IMAGE_SIZE | DALL-E图片尺寸 | `512x512` |
| DALL_E_IMAGE_QUALITY | DALL-E图片质量 | `standard` |
| DALL_E_IMAGE_STYLE | DALL-E图片风格 | `vivid` |
| KEY | 名称 | 默认值 |
|-------------------------|-------------------------|-----------------------------|
| OPENAI_API_KEY | OpenAI API Key | `''//(array string)` |
| OPENAI_CHAT_MODEL | OpenAI的模型名称 | `gpt-3.5-turbo` |
| OPENAI_API_BASE | OpenAI API BASE | `https://api.openai.com/v1` |
| OPENAI_API_EXTRA_PARAMS | OpenAI API Extra Params | `{}` |
| DALL_E_MODEL | DALL-E的模型名称 | `dall-e-2` |
| DALL_E_IMAGE_SIZE | DALL-E图片尺寸 | `512x512` |
| DALL_E_IMAGE_QUALITY | DALL-E图片质量 | `standard` |
| DALL_E_IMAGE_STYLE | DALL-E图片风格 | `vivid` |

### Azure OpenAI

Expand Down
32 changes: 17 additions & 15 deletions doc/en/CONFIG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ It is recommended to fill in environment variables in the Workers configuration

The configuration that is common to each user can only be configured and filled in through the Workers configuration interface or toml, and it is not supported to modify it by sending messages through Telegram.

An empty string in the array indicates that no value has been set. If a value needs to be set, it should be set as `'value1,value2'`, with multiple values separated by commas.

### Basic configuration

| KEY | Name | Default | Description |
Expand All @@ -25,13 +27,13 @@ The configuration that is common to each user can only be configured and filled
| KEY | Name | Default | Description |
|---------------------------|--------------------------------|--------------------------------------------|---------------------------------------------------------------------------------------------------------------|
| TELEGRAM_API_DOMAIN | Telegram API Domain | `https://api.telegram.org/` | Telegram API domain |
| TELEGRAM_AVAILABLE_TOKENS | Available Telegram tokens. | `[]` | Telegram Tokens allowed to access, separated by commas when setting. |
| TELEGRAM_AVAILABLE_TOKENS | Available Telegram tokens. | `''//(array string)` | Telegram Tokens allowed to access, separated by commas when setting. |
| DEFAULT_PARSE_MODE | Default parsing mode. | `Markdown` | Default message parsing mode. |
| I_AM_A_GENEROUS_PERSON | Allow everyone to use. | `false` | Is it allowed for everyone to use? |
| CHAT_WHITE_LIST | Chat whitelist | `[] ` | Allowed Chat ID Whitelist |
| CHAT_WHITE_LIST | Chat whitelist | `''//(array string)` | Allowed Chat ID Whitelist |
| LOCK_USER_CONFIG_KEYS | Locked user configuration key. | The default value is the URL for all APIs. | Configuration key to prevent token leakage caused by replacement. |
| TELEGRAM_BOT_NAME | Telegram bot name | `[]` | The Bot Name corresponding to the Telegram Token that is allowed to access, separated by commas when setting. |
| CHAT_GROUP_WHITE_LIST | Group whitelist | `[]` | Allowed group ID whitelist. |
| TELEGRAM_BOT_NAME | Telegram bot name | `''//(array string)` | The Bot Name corresponding to the Telegram Token that is allowed to access, separated by commas when setting. |
| CHAT_GROUP_WHITE_LIST | Group whitelist | `''//(array string)` | Allowed group ID whitelist. |
| GROUP_CHAT_BOT_ENABLE | Whether to enable group bots. | `true` | Whether to enable group robots. |
| GROUP_CHAT_BOT_SHARE_MODE | Group robot sharing mode | `false` | After opening, people in the same group use the same chat context. |

Expand All @@ -51,15 +53,15 @@ The configuration that is common to each user can only be configured and filled

### Feature configuration

| KEY | Name | Default | Description |
|-----------------------|-------------------------|---------|-------------------------------------------------------------|
| HIDE_COMMAND_BUTTONS | Hide command buttons | `[]` | Need to re-initiate after modification |
| SHOW_REPLY_BUTTON | Show quick reply button | `false` | Whether to display the quick reply button |
| EXTRA_MESSAGE_CONTEXT | Extra message context | `false` | The referenced message will also be included in the context |
| STREAM_MODE | Stream mode | `true` | Typewriter mode |
| SAFE_MODE | Safe mode | `true` | When enabled, the ID of the latest message will be saved |
| DEBUG_MODE | Debug mode | `false` | When enabled, the latest message will be saved |
| DEV_MODE | Development mode | `false` | When enabled, more debugging information will be displayed |
| KEY | Name | Default | Description |
|-----------------------|-------------------------|----------------------------|-------------------------------------------------------------|
| HIDE_COMMAND_BUTTONS | Hide command buttons | `''//(array string)` | Need to re-initiate after modification |
| SHOW_REPLY_BUTTON | Show quick reply button | `false` | Whether to display the quick reply button |
| EXTRA_MESSAGE_CONTEXT | Extra message context | `false` | The referenced message will also be included in the context |
| STREAM_MODE | Stream mode | `true` | Typewriter mode |
| SAFE_MODE | Safe mode | `true` | When enabled, the ID of the latest message will be saved |
| DEBUG_MODE | Debug mode | `false` | When enabled, the latest message will be saved |
| DEV_MODE | Development mode | `false` | When enabled, more debugging information will be displayed |

## User configuration

Expand All @@ -78,10 +80,10 @@ Each user's custom configuration can only be modified by sending a message throu

| KEY | Name | Default |
|-------------------------|-------------------------|-----------------------------|
| OPENAI_API_KEY | OpenAI API Key | `[]` |
| OPENAI_API_KEY | OpenAI API Key | `''//(array string)` |
| OPENAI_CHAT_MODEL | OpenAI Model | `gpt-3.5-turbo` |
| OPENAI_API_BASE | OpenAI API BASE | `https://api.openai.com/v1` |
| OPENAI_API_EXTRA_PARAMS | OpenAI API Extra Params | {} |
| OPENAI_API_EXTRA_PARAMS | OpenAI API Extra Params | `{}` |
| DALL_E_MODEL | DALL-E model name. | `dall-e-2` |
| DALL_E_IMAGE_SIZE | DALL-E Image size | `512x512` |
| DALL_E_IMAGE_QUALITY | DALL-E Image quality | `standard` |
Expand Down

0 comments on commit ae6d594

Please sign in to comment.