-
Notifications
You must be signed in to change notification settings - Fork 857
/
Copy pathwrangler-example.toml
204 lines (183 loc) · 6.03 KB
/
wrangler-example.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
# 这里的 name 改成你自己的workers 的名字
name = 'chatgpt-telegram-workers'
compatibility_date = "2024-11-11"
main = './dist/index.js' # 先使用vite编译 然后再使用编译产物部署
# 修改 main = './dist/index.js' 为对应模块dist/index.js 或 src/index.ts,
# pnpm run deploy:workers
#main = './packages/apps/workers/dist/index.js'
#main = './packages/apps/workers/src/index.ts'
# pnpm run deploy:workersnext
#main = './packages/apps/workers-next/dist/index.js'
#main = './packages/apps/workers-next/src/index.ts'
workers_dev = true
compatibility_flags = ["nodejs_compat_v2"]
# 这里的 id 为必填项 请填写你的 kv namespace id
# preview_id 只在调试时使用,不需要请删除
kv_namespaces = [
{ binding = 'DATABASE', id = '', preview_id = '' }
]
[vars]
# 更多参数使用请查看README.md
# 没有注释的参数为必填项
# 写了参数的选项为该参数的默认值
# 要使用前面有#的属性请去掉#号
# 所有变量必须为字符串,多个参数的值之间用逗号隔开
## -- 通用 --
##
## 多语言支持
#LANGUAGE = 'zh-cn'
## 检查更新的分支
#UPDATE_BRANCH = 'master'
## Chat Complete API Timeout
#CHAT_COMPLETE_API_TIMEOUT = 0
## -- Telegram 相关 --
##
## Telegram API Domain
#TELEGRAM_API_DOMAIN = 'https://api.telegram.org'
## 允许访问的Telegram Token, 设置时以逗号分隔
TELEGRAM_AVAILABLE_TOKENS = 'TOKEN1,TOKEN2'
## 默认消息模式
#DEFAULT_PARSE_MODE = 'Markdown'
## -- 权限相关 --
##
## 允许所有人使用
#I_AM_A_GENEROUS_PERSON = 'false'
## 白名单
CHAT_WHITE_LIST = 'USER_ID1,USER_ID2'
## 用户配置
#LOCK_USER_CONFIG_KEYS = 'OPENAI_API_BASE,GOOGLE_COMPLETIONS_API,MISTRAL_API_BASE,COHERE_API_BASE,ANTHROPIC_API_BASE,AZURE_COMPLETIONS_API,AZURE_DALLE_API'
## -- 群组相关 --
##
## 允许访问的Telegram Token 对应的Bot Name, 设置时以逗号分隔
TELEGRAM_BOT_NAME = 'BOT_NAME1,BOT_NAME2'
## 群组白名单
CHAT_GROUP_WHITE_LIST = 'GROUP_ID1,GROUP_ID2'
## 群组机器人开关
GROUP_CHAT_BOT_ENABLE = 'true'
## 群组机器人共享模式,关闭后,一个群组只有一个会话和配置。开启的话群组的每个人都有自己的会话上下文
#GROUP_CHAT_BOT_SHARE_MODE = 'false'
## -- 历史记录相关 --
##
## 为了避免4096字符限制,将消息删减
#AUTO_TRIM_HISTORY = 'true'
## 最大历史记录长度
#MAX_HISTORY_LENGTH = 20
## 最大消息长度
#MAX_TOKEN_LENGTH = -1
## -- 特性开关 --
##
## 隐藏部分命令按钮
#HIDE_COMMAND_BUTTONS = []
## 显示快捷回复按钮
#SHOW_REPLY_BUTTON = false
## 而外引用消息开关
#EXTRA_MESSAGE_CONTEXT = 'false'
## -- 模式开关 --
##
## 使用流模式
#STREAM_MODE = 'true'
## 安全模式
#SAFE_MODE = 'true'
## 调试模式
#DEBUG_MODE = 'false'
## 开发模式
#DEV_MODE = 'false'
## -- 通用配置 --
##
## AI提供商: auto, openai, azure, workers, gemini, mistral, cohere, anthropic
AI_PROVIDER = 'auto'
## AI图片提供商: auto, openai, azure, workers
AI_IMAGE_PROVIDER = 'auto'
## 全局默认初始化消息
#SYSTEM_INIT_MESSAGE = 'You are a useful assistant.'
## 全局默认初始化消息角色
#SYSTEM_INIT_MESSAGE_ROLE = 'system'
## -- Open AI 配置 --
##
# OpenAI API Key
OPENAI_API_KEY = 'SK-1,SK-2'
## OpenAI的模型名称
#OPENAI_CHAT_MODEL = 'gpt-4o-mini'
## OpenAI API BASE ``
#OPENAI_API_BASE = 'https://api.openai.com/v1'
## OpenAI API Extra Params
#OPENAI_API_EXTRA_PARAMS = '{}'
## -- DALLE 配置 --
##
## DALL-E的模型名称
#DALL_E_MODEL = 'dall-e-3'
## DALL-E图片尺寸
#DALL_E_IMAGE_SIZE = '512x512'
## DALL-E图片质量
#DALL_E_IMAGE_QUALITY = 'standard'
## DALL-E图片风格
#DALL_E_IMAGE_STYLE = 'vivid'
## -- AZURE 配置 --
##
## Azure API Key
#AZURE_API_KEY = ''
## Azure Completions API
## https://RESOURCE_NAME.openai.azure.com/openai/deployments/MODEL_NAME/chat/completions?api-version=VERSION_NAME
#AZURE_COMPLETIONS_API = ''
## Azure DallE API
## https://RESOURCE_NAME.openai.azure.com/openai/deployments/MODEL_NAME/images/generations?api-version=VERSION_NAME
#AZURE_DALLE_API = ''
## -- Workers 配置 --
##
## Cloudflare Account ID
#CLOUDFLARE_ACCOUNT_ID = ''
## Cloudflare Token
#CLOUDFLARE_TOKEN = ''
## Text Generation Model
#WORKERS_CHAT_MODEL = '@cf/mistral/mistral-7b-instruct-v0.1 '
## Text-to-Image Model
#WORKERS_IMAGE_MODEL = '@cf/stabilityai/stable-diffusion-xl-base-1.0'
## -- Gemini 配置 --
##
## Google Gemini API Key
#GOOGLE_API_KEY = ''
## Google Gemini API
#GOOGLE_COMPLETIONS_API = 'https://generativelanguage.googleapis.com/v1beta/models/'
## Google Gemini Model
#GOOGLE_COMPLETIONS_MODEL = 'gemini-pro'
## -- Mistral 配置 --
##
## mistral api key
#MISTRAL_API_KEY = ''
## mistral api base
#MISTRAL_API_BASE = 'https://api.mistral.ai/v1'
## mistral api model
#MISTRAL_CHAT_MODEL = 'mistral-tiny'
## -- Cohere 配置 --
##
## cohere api key
#COHERE_API_KEY = ''
## cohere api base
#COHERE_API_BASE = 'https://api.cohere.com/v1'
## cohere api model
#COHERE_CHAT_MODEL = 'command-r-plus'
## -- Anthropic 配置 --
##
## Anthropic api key
#ANTHROPIC_API_KEY = ''
## Anthropic api base
#ANTHROPIC_API_BASE = 'https://api.anthropic.com/v1'
## Anthropic api model
#ANTHROPIC_CHAT_MODEL = 'claude-3-haiku-20240307'
#CUSTOM_COMMAND_azure= '/setenvs {"AI_PROVIDER": "azure"}'
#COMMAND_DESCRIPTION_azure = 'Switch to Azure AI provider'
#
#CUSTOM_COMMAND_workers = '/setenvs {"AI_PROVIDER": "workers"}'
#COMMAND_DESCRIPTION_workers = 'Switch to Workers AI provider'
#
#CUSTOM_COMMAND_openai = '/setenvs {"AI_PROVIDER": "openai"}'
#COMMAND_DESCRIPTION_openai = 'Switch to OpenAI AI provider'
#
#CUSTOM_COMMAND_cn2en = '/setenvs {"SYSTEM_INIT_MESSAGE": "You are a translator. Please translate everything I say below into English."}'
#COMMAND_DESCRIPTION_cn2en = 'Switch to Chinese to English translation mode'
#
#PLUGIN_COMMAND_dns = "https://raw.githubusercontent.com/TBXark/ChatGPT-Telegram-Workers/dev/plugins/dns.json"
#PLUGIN_DESCRIPTION_dns = "DNS查询 /dns <类型> <域名>"
#
#PLUGIN_COMMAND_dicten = "https://raw.githubusercontent.com/TBXark/ChatGPT-Telegram-Workers/dev/plugins/dicten.json"
#PLUGIN_DESCRIPTION_dicten = "英文字典 /dicten <单词>"