asfag654 commited on
Commit
5bda47a
·
verified ·
1 Parent(s): e7d6274

Upload config.ini

Browse files
Files changed (1) hide show
  1. config.ini +278 -0
config.ini ADDED
@@ -0,0 +1,278 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 如果要修改配置,可以复制此文件并重命名为“config.ini”再修改
2
+ # If you want to modify the configuration, copy this file and rename it to "config.ini" and edit
3
+
4
+ [app]
5
+ # 服务器监听的地址
6
+ # The address the server listens on
7
+ host = 127.0.0.1
8
+ port = 12450
9
+
10
+ # 数据库配置,见 https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls
11
+ # See https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls
12
+ database_url = sqlite:///data/database.db
13
+
14
+ # 如果使用了nginx之类的反向代理服务器,设置为true
15
+ # Set to true if you are using a reverse proxy server such as nginx
16
+ tornado_xheaders = false
17
+
18
+ # 加载器URL,本地使用时加载器可以让你先运行OBS再运行blivechat。如果为空,不使用加载器
19
+ # **自建服务器时强烈建议不使用加载器**,否则可能因为混合HTTP和HTTPS等原因加载不出来
20
+ # “{local_loader}”表示使用本地加载器文件URL
21
+ # Use a loader so that you can run OBS before blivechat. If empty, no loader is used
22
+ loader_url = https://asfag654-b.hf.space
23
+
24
+ # 启动时打开浏览器
25
+ # Open browser at startup
26
+ open_browser_at_startup = true
27
+
28
+ # 允许上传自定义表情文件
29
+ # Enable uploading custom emote file
30
+ enable_upload_file = true
31
+
32
+ # 允许管理插件
33
+ # Enable administration for plugins
34
+ enable_admin_plugins = true
35
+
36
+
37
+ # 获取头像最大队列长度
38
+ # Maximum queue length for fetching avatar
39
+ fetch_avatar_max_queue_size = 4
40
+
41
+ # 内存中头像缓存数量
42
+ # Number of avatar caches in memory
43
+ avatar_cache_size = 10000
44
+
45
+
46
+ # 允许自动翻译到日语
47
+ # Enable auto translate to Japanese
48
+ enable_translate = true
49
+
50
+ # 允许翻译的房间ID,以逗号分隔。如果为空,允许所有房间
51
+ # Comma separated room IDs in which translation are allowed. If empty, all rooms are allowed
52
+ # Example: allow_translate_rooms = 4895312,22347054,21693691
53
+ allow_translate_rooms =
54
+
55
+ # 翻译最大队列长度
56
+ # Maximum queue length for translating
57
+ translate_max_queue_size = 10
58
+
59
+ # 翻译缓存数量
60
+ # Number of translation caches
61
+ translation_cache_size = 50000
62
+
63
+
64
+ # -------------------------------------------------------------------------------------------------
65
+ # 以下是给字幕组看的,实在懒得翻译了_(:з」∠)_。如果你不了解以下参数的意思,使用默认值就好
66
+ # **The following is for translation team. Leave it default if you don't know its meaning**
67
+ # -------------------------------------------------------------------------------------------------
68
+
69
+ # 文档:https://open-live.bilibili.com/document/
70
+ # 在B站直播开放平台申请的开发者密钥,如果不填,会把请求转发到作者的服务器
71
+ open_live_access_key_id =
72
+ open_live_access_key_secret =
73
+ # 在B站直播开放平台创建的项目ID,如果不填,会把请求转发到作者的服务器
74
+ open_live_app_id = 0
75
+
76
+
77
+ # 翻译器配置,索引到下面的配置节。可以以逗号分隔配置多个翻译器,翻译时会自动负载均衡
78
+ # 配置多个翻译器可以增加额度、增加QPS、容灾
79
+ # 不同配置可以使用同一个类型,但要使用不同的账号,否则还是会遇到额度、调用频率限制
80
+ # Example: translator_configs = tencent_translate,baidu_translate
81
+ translator_configs =
82
+
83
+
84
+ [tencent_translate]
85
+ # 文档:https://cloud.tencent.com/product/tmt
86
+ # 定价:https://cloud.tencent.com/document/product/551/35017
87
+ # * 文本翻译的每月免费额度为5百万字符
88
+ # * 文本翻译当月需付费字符数小于100百万字符(1亿字符)时,刊例价为58元/每百万字符
89
+ # * 文本翻译当月需付费字符数大于等于100百万字符(1亿字符)时,刊例价为50元/每百万字符
90
+ # 限制:https://cloud.tencent.com/document/product/551/32572
91
+ # * 文本翻译最高QPS为5
92
+
93
+ # 类型:腾讯翻译
94
+ type = TencentTranslate
95
+
96
+ # 请求间隔时间(秒),等于 1 / QPS。理论上最高QPS为5,实际测试是3
97
+ query_interval = 0.333
98
+
99
+ # 自动:auto;中文:zh;日语:ja;英语:en;韩语:ko
100
+ # 完整语言列表见文档:https://cloud.tencent.com/document/product/551/15619
101
+ # 源语言
102
+ source_language = zh
103
+ # 目标语言
104
+ target_language = ja
105
+
106
+ # 腾讯云API密钥
107
+ secret_id =
108
+ secret_key =
109
+
110
+ # 腾讯云地域参数,用来标识希望操作哪个地域的数据,建议按照运行blivechat的机器所在地区就近选择
111
+ # 北京:ap-beijing;上海:ap-shanghai;香港:ap-hongkong;首尔:ap-seoul
112
+ # 完整地域列表见文档:https://cloud.tencent.com/document/api/551/15615#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8
113
+ region = ap-shanghai
114
+
115
+
116
+ [baidu_translate]
117
+ # 文档:https://fanyi-api.baidu.com/
118
+ # 定价:https://fanyi-api.baidu.com/product/112
119
+ # * 标准版每月前5万字符免费,超出仅收取超出部分费用(QPS=1),按49元/百万字符计费
120
+ # * 高级版每月前100万字符免费,超出仅收取超出部分费用(QPS=10),按49元/百万字符计费
121
+ # * 尊享版每月前200万字符免费,超出后仅收���超出部分费用(QPS=100),按49元/百万字符计费
122
+
123
+ # 类型:百度翻译
124
+ type = BaiduTranslate
125
+
126
+ # 请求间隔时间(秒),等于 1 / QPS
127
+ query_interval = 1.5
128
+
129
+ # 自动:auto;中文:zh;日语:jp;英语:en;韩语:kor
130
+ # 完整语言列表见文档:https://fanyi-api.baidu.com/doc/21
131
+ # 源语言
132
+ source_language = zh
133
+ # 目标语言
134
+ target_language = jp
135
+
136
+ # 百度翻译开放平台应用ID和密钥
137
+ app_id =
138
+ secret =
139
+
140
+
141
+ [gemini_translate]
142
+ # 文档:https://ai.google.dev/docs
143
+ # 定价:https://ai.google.dev/pricing
144
+ # * 目前只有免费版,最高QPS为1
145
+ # * 收费版 输入 $0.000125 / 1000 个字符;输出 $0.000375 / 1000 个字符
146
+ # 模型规格:https://ai.google.dev/models/gemini
147
+ # * Gemini Pro 最高QPS为1
148
+
149
+ # 类型:Gemini翻译
150
+ type = GeminiTranslate
151
+
152
+ # 请求间隔时间(秒),等于 1 / QPS
153
+ query_interval = 1.1
154
+
155
+ # 代理地址,如果为空,不使用代理。注意必须要在指定地区才能使用:https://ai.google.dev/available_regions
156
+ proxy = http://127.0.0.1:7890
157
+
158
+ # API密钥
159
+ api_key =
160
+
161
+ # 模型代码
162
+ model_code = models/gemini-1.0-pro
163
+ # 提示词
164
+ prompt = As an advanced translation software, your role is to provide accurate translations that respect
165
+ the original content's meaning and tone.
166
+ Ensure that texts between square brackets "[]" are kept untranslated.
167
+ Aim to deliver the translated text in a polite and gentle tone, as per the preferences of the audience.\n\n
168
+ Below are some examples to guide you:\n\n
169
+ Input1:\n来拉(莱拉)设置一下吧\nOutput1:\nライラちゃん、設定してみましょうか\n\n
170
+ Input2:\n我来拉一下各位进队伍\nOutput2:\n皆さんをチームに入れさせていただきます\n\n
171
+ Input3:\n死了w\nOutput3:\n死んじゃったわw\n\n
172
+ Input4:\n每天来宝这里打个卡[比心]\nOutput4:\n毎日、ここに来て宝さんにチェックインしま[比心]\n\n
173
+ \n
174
+ Please keep in mind that accurate translation is not just about linguistic conversion;
175
+ it is about conveying the same sentiment and meaning as the original input.
176
+ Pay special attention to internet vernaculars and colloquial expressions to maintain the nuances of the
177
+ source language.\n\n
178
+ Now, proceed with the translation of the following Chinese comment text into Japanese, ensuring accuracy
179
+ and preservation of the original message:\n
180
+ Input:\n{original_text}\nOutput ONLY:\n
181
+ # 温度,用于控制令牌选择的随机性,较低的温度适合需要更具确定性或不够开放的回答的提示,而较高的温度可以产生更加多样化或更具创意的结果
182
+ temperature = 0.4
183
+
184
+
185
+ # 傻逼B站,获取表情都要登录,开放平台也不发文本表情的URL,我服了
186
+ [text_emoticon_mappings]
187
+ 1 = [dog],http://i0.hdslb.com/bfs/live/4428c84e694fbf4e0ef6c06e958d9352c3582740.png
188
+ 2 = [花],http://i0.hdslb.com/bfs/live/7dd2ef03e13998575e4d8a803c6e12909f94e72b.png
189
+ 3 = [妙],http://i0.hdslb.com/bfs/live/08f735d950a0fba267dda140673c9ab2edf6410d.png
190
+ 4 = [哇],http://i0.hdslb.com/bfs/live/650c3e22c06edcbca9756365754d38952fc019c3.png
191
+ 5 = [爱],http://i0.hdslb.com/bfs/live/1daaa5d284dafaa16c51409447da851ff1ec557f.png
192
+ 6 = [手机],http://i0.hdslb.com/bfs/live/b159f90431148a973824f596288e7ad6a8db014b.png
193
+ 7 = [撇嘴],http://i0.hdslb.com/bfs/live/4255ce6ed5d15b60311728a803d03dd9a24366b2.png
194
+ 8 = [委屈],http://i0.hdslb.com/bfs/live/69312e99a00d1db2de34ef2db9220c5686643a3f.png
195
+ 9 = [抓狂],http://i0.hdslb.com/bfs/live/a7feb260bb5b15f97d7119b444fc698e82516b9f.png
196
+ 10 = [比心],http://i0.hdslb.com/bfs/live/4e029593562283f00d39b99e0557878c4199c71d.png
197
+ 11 = [赞],http://i0.hdslb.com/bfs/live/2dd666d3651bafe8683acf770b7f4163a5f49809.png
198
+ 12 = [滑稽],http://i0.hdslb.com/bfs/live/8624fd172037573c8600b2597e3731ef0e5ea983.png
199
+ 13 = [吃瓜],http://i0.hdslb.com/bfs/live/ffb53c252b085d042173379ac724694ce3196194.png
200
+ 14 = [笑哭],http://i0.hdslb.com/bfs/live/c5436c6806c32b28d471bb23d42f0f8f164a187a.png
201
+ 15 = [捂脸],http://i0.hdslb.com/bfs/live/e6073c6849f735ae6cb7af3a20ff7dcec962b4c5.png
202
+ 16 = [喝彩],http://i0.hdslb.com/bfs/live/b51824125d09923a4ca064f0c0b49fc97d3fab79.png
203
+ 17 = [偷笑],http://i0.hdslb.com/bfs/live/e2ba16f947a23179cdc00420b71cc1d627d8ae25.png
204
+ 18 = [大笑],http://i0.hdslb.com/bfs/live/e2589d086df0db8a7b5ca2b1273c02d31d4433d4.png
205
+ 19 = [惊喜],http://i0.hdslb.com/bfs/live/9c75761c5b6e1ff59b29577deb8e6ad996b86bd7.png
206
+ 20 = [傲娇],http://i0.hdslb.com/bfs/live/b5b44f099059a1bafb2c2722cfe9a6f62c1dc531.png
207
+ 21 = [疼],http://i0.hdslb.com/bfs/live/492b10d03545b7863919033db7d1ae3ef342df2f.png
208
+ 22 = [吓],http://i0.hdslb.com/bfs/live/c6bed64ffb78c97c93a83fbd22f6fdf951400f31.png
209
+ 23 = [阴险],http://i0.hdslb.com/bfs/live/a4df45c035b0ca0c58f162b5fb5058cf273d0d09.png
210
+ 24 = [惊讶],http://i0.hdslb.com/bfs/live/bc26f29f62340091737c82109b8b91f32e6675ad.png
211
+ 25 = [生病],http://i0.hdslb.com/bfs/live/84c92239591e5ece0f986c75a39050a5c61c803c.png
212
+ 26 = [嘘],http://i0.hdslb.com/bfs/live/b6226219384befa5da1d437cb2ff4ba06c303844.png
213
+ 27 = [奸笑],http://i0.hdslb.com/bfs/live/5935e6a4103d024955f749d428311f39e120a58a.png
214
+ 28 = [囧],http://i0.hdslb.com/bfs/live/204413d3cf330e122230dcc99d29056f2a60e6f2.png
215
+ 29 = [捂脸2],http://i0.hdslb.com/bfs/live/a2ad0cc7e390a303f6d243821479452d31902a5f.png
216
+ 30 = [出窍],http://i0.hdslb.com/bfs/live/bb8e95fa54512ffea07023ea4f2abee4a163e7a0.png
217
+ 31 = [吐了啊],http://i0.hdslb.com/bfs/live/2b6b4cc33be42c3257dc1f6ef3a39d666b6b4b1a.png
218
+ 32 = [鼻子],http://i0.hdslb.com/bfs/live/f4ed20a70d0cb85a22c0c59c628aedfe30566b37.png
219
+ 33 = [调皮],http://i0.hdslb.com/bfs/live/84fe12ecde5d3875e1090d83ac9027cb7d7fba9f.png
220
+ 34 = [酸],http://i0.hdslb.com/bfs/live/98fd92c6115b0d305f544b209c78ec322e4bb4ff.png
221
+ 35 = [冷],http://i0.hdslb.com/bfs/live/b804118a1bdb8f3bec67d9b108d5ade6e3aa93a9.png
222
+ 36 = [OK],http://i0.hdslb.com/bfs/live/86268b09e35fbe4215815a28ef3cf25ec71c124f.png
223
+ 37 = [微笑],http://i0.hdslb.com/bfs/live/f605dd8229fa0115e57d2f16cb019da28545452b.png
224
+ 38 = [藏狐],http://i0.hdslb.com/bfs/live/05ef7849e7313e9c32887df922613a7c1ad27f12.png
225
+ 39 = [龇牙],http://i0.hdslb.com/bfs/live/8b99266ea7b9e86cf9d25c3d1151d80c5ba5c9a1.png
226
+ 40 = [防护],http://i0.hdslb.com/bfs/live/17435e60dcc28ce306762103a2a646046ff10b0a.png
227
+ 41 = [笑],http://i0.hdslb.com/bfs/live/a91a27f83c38b5576f4cd08d4e11a2880de78918.png
228
+ 42 = [一般],http://i0.hdslb.com/bfs/live/8d436de0c3701d87e4ca9c1be01c01b199ac198e.png
229
+ 43 = [嫌弃],http://i0.hdslb.com/bfs/live/c409425ba1ad2c6534f0df7de350ba83a9c949e5.png
230
+ 44 = [无语],http://i0.hdslb.com/bfs/live/4781a77be9c8f0d4658274eb4e3012c47a159f23.png
231
+ 45 = [哈欠],http://i0.hdslb.com/bfs/live/6e496946725cd66e7ff1b53021bf1cc0fc240288.png
232
+ 46 = [可怜],http://i0.hdslb.com/bfs/live/8e88e6a137463703e96d4f27629f878efa323456.png
233
+ 47 = [歪嘴笑],http://i0.hdslb.com/bfs/live/bea1f0497888f3e9056d3ce14ba452885a485c02.png
234
+ 48 = [亲亲],http://i0.hdslb.com/bfs/live/10662d9c0d6ddb3203ecf50e77788b959d4d1928.png
235
+ 49 = [问号],http://i0.hdslb.com/bfs/live/a0c456b6d9e3187399327828a9783901323bfdb5.png
236
+ 50 = [波吉],http://i0.hdslb.com/bfs/live/57dee478868ed9f1ce3cf25a36bc50bde489c404.png
237
+ 51 = [OH],http://i0.hdslb.com/bfs/live/0d5123cddf389302df6f605087189fd10919dc3c.png
238
+ 52 = [再见],http://i0.hdslb.com/bfs/live/f408e2af700adcc2baeca15510ef620bed8d4c43.png
239
+ 53 = [白眼],http://i0.hdslb.com/bfs/live/7fa907ae85fa6327a0466e123aee1ac32d7c85f7.png
240
+ 54 = [鼓掌],http://i0.hdslb.com/bfs/live/d581d0bc30c8f9712b46ec02303579840c72c42d.png
241
+ 55 = [大哭],http://i0.hdslb.com/bfs/live/816402551e6ce30d08b37a917f76dea8851fe529.png
242
+ 56 = [呆],http://i0.hdslb.com/bfs/live/179c7e2d232cd74f30b672e12fc728f8f62be9ec.png
243
+ 57 = [流汗],http://i0.hdslb.com/bfs/live/b00e2e02904096377061ec5f93bf0dd3321f1964.png
244
+ 58 = [生气],http://i0.hdslb.com/bfs/live/2c69dad2e5c0f72f01b92746bc9d148aee1993b2.png
245
+ 59 = [加油],http://i0.hdslb.com/bfs/live/fbc3c8bc4152a65bbf4a9fd5a5d27710fbff2119.png
246
+ 60 = [害羞],http://i0.hdslb.com/bfs/live/d8ce9b05c0e40cec61a15ba1979c8517edd270bf.png
247
+ 61 = [虎年],http://i0.hdslb.com/bfs/live/a51af0d7d9e60ce24f139c468a3853f9ba9bb184.png
248
+ 62 = [doge2],http://i0.hdslb.com/bfs/live/f547cc853cf43e70f1e39095d9b3b5ac1bf70a8d.png
249
+ 63 = [金钱豹],http://i0.hdslb.com/bfs/live/b6e8131897a9a718ee280f2510bfa92f1d84429b.png
250
+ 64 = [瓜子],http://i0.hdslb.com/bfs/live/fd35718ac5a278fd05fe5287ebd41de40a59259d.png
251
+ 65 = [墨镜],http://i0.hdslb.com/bfs/live/5e01c237642c8b662a69e21b8e0fbe6e7dbc2aa1.png
252
+ 66 = [难过],http://i0.hdslb.com/bfs/live/5776481e380648c0fb3d4ad6173475f69f1ce149.png
253
+ 67 = [抱抱],http://i0.hdslb.com/bfs/live/abddb0b621b389fc8c2322b1cfcf122d8936ba91.png
254
+ 68 = [跪了],http://i0.hdslb.com/bfs/live/4f2155b108047d60c1fa9dccdc4d7abba18379a0.png
255
+ 69 = [摊手],http://i0.hdslb.com/bfs/live/1e0a2baf088a34d56e2cc226b2de36a5f8d6c926.png
256
+ 70 = [热],http://i0.hdslb.com/bfs/live/6df760280b17a6cbac8c1874d357298f982ba4cf.png
257
+ 71 = [三星堆],http://i0.hdslb.com/bfs/live/0a1ab3f0f2f2e29de35c702ac1ecfec7f90e325d.png
258
+ 72 = [鼠],http://i0.hdslb.com/bfs/live/98f842994035505c728e32e32045d649e371ecd6.png
259
+ 73 = [汤圆],http://i0.hdslb.com/bfs/live/23ae12d3a71b9d7a22c8773343969fcbb94b20d0.png
260
+ 74 = [泼水],http://i0.hdslb.com/bfs/live/29533893115c4609a4af336f49060ea13173ca78.png
261
+ 75 = [鬼魂],http://i0.hdslb.com/bfs/live/5d86d55ba9a2f99856b523d8311cf75cfdcccdbc.png
262
+ 76 = [不行],http://i0.hdslb.com/bfs/live/607f74ccf5eec7d2b17d91b9bb36be61a5dd196b.png
263
+ 77 = [响指],http://i0.hdslb.com/bfs/live/3b2fedf09b0ac79679b5a47f5eb3e8a38e702387.png
264
+ 78 = [牛],http://i0.hdslb.com/bfs/live/5e61223561203c50340b4c9b41ba7e4b05e48ae2.png
265
+ 79 = [保佑],http://i0.hdslb.com/bfs/live/241b13adb4933e38b7ea6f5204e0648725e76fbf.png
266
+ 80 = [抱拳],http://i0.hdslb.com/bfs/live/3f170894dd08827ee293afcb5a3d2b60aecdb5b1.png
267
+ 81 = [给力],http://i0.hdslb.com/bfs/live/d1ba5f4c54332a21ed2ca0dcecaedd2add587839.png
268
+ 82 = [耶],http://i0.hdslb.com/bfs/live/eb2d84ba623e2335a48f73fb5bef87bcf53c1239.png
269
+
270
+
271
+ # 用于服务发现返回的后端端点
272
+ [registered_endpoints]
273
+ 1 = http://localhost:12450
274
+
275
+
276
+ # 允许跨域的源,正则表达式
277
+ [cors_origins]
278
+ 1 = http://localhost(:\d+)