blivechat/data/config.example.ini
2023-08-26 17:01:19 +08:00

140 lines
5.2 KiB
INI
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 如果要修改配置可以复制此文件并重命名为“config.ini”再修改
# If you want to modify the configuration, copy this file and rename it to "config.ini" and edit
[app]
# 服务器监听的地址
# The address the server listens on
host = 127.0.0.1
port = 12450
# 数据库配置,见 https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls
# See https://docs.sqlalchemy.org/en/20/core/engines.html#database-urls
database_url = sqlite:///data/database.db
# 如果使用了nginx之类的反向代理服务器设置为true
# Set to true if you are using a reverse proxy server such as nginx
tornado_xheaders = false
# 加载器URL本地使用时加载器可以让你先运行OBS再运行blivechat。如果为空不使用加载器
# **自建服务器时强烈建议不使用加载器**否则可能因为混合HTTP和HTTPS等原因加载不出来
# Use a loader so that you can run OBS before blivechat. If empty, no loader is used
loader_url = https://xfgryujk.sinacloud.net/blivechat/loader.html
# 启动时打开浏览器
# Open browser at startup
open_browser_at_startup = true
# 允许上传自定义表情文件
# Enable uploading custom emote file
enable_upload_file = true
# 获取头像最大队列长度
# Maximum queue length for fetching avatar
fetch_avatar_max_queue_size = 4
# 内存中头像缓存数量
# Number of avatar caches in memory
avatar_cache_size = 10000
# 允许自动翻译到日语
# Enable auto translate to Japanese
enable_translate = true
# 允许翻译的房间ID以逗号分隔。如果为空允许所有房间
# Comma separated room IDs in which translation are allowed. If empty, all rooms are allowed
# Example: allow_translate_rooms = 4895312,22347054,21693691
allow_translate_rooms =
# 翻译最大队列长度
# Maximum queue length for translating
translate_max_queue_size = 10
# 翻译缓存数量
# Number of translation caches
translation_cache_size = 50000
# -------------------------------------------------------------------------------------------------
# 以下是给字幕组看的实在懒得翻译了_(:з」∠)_。如果你不了解以下参数的意思使用默认值就好
# **The following is for translation team. Leave it default if you don't know its meaning**
# -------------------------------------------------------------------------------------------------
# 翻译器配置,索引到下面的配置节。可以以逗号分隔配置多个翻译器,翻译时会自动负载均衡
# 配置多个翻译器可以增加额度、增加QPS、容灾
# 不同配置可以使用同一个类型,但要使用不同的账号,否则还是会遇到额度、调用频率限制
translator_configs = tencent_translate_free
[tencent_translate_free]
# 类型:腾讯翻译白嫖版。使用了网页版的接口,**将来可能失效**
type = TencentTranslateFree
# 请求间隔时间(秒),等于 1 / QPS
query_interval = 1
# 自动auto中文zh日语jp英语en韩语kr
# 完整语言列表见文档https://cloud.tencent.com/document/product/551/15619
# 源语言
source_language = zh
# 目标语言
target_language = jp
[tencent_translate]
# 文档https://cloud.tencent.com/product/tmt
# 定价https://cloud.tencent.com/document/product/551/35017
# * 文本翻译的每月免费额度为5百万字符
# * 文本翻译当月需付费字符数小于100百万字符1亿字符刊例价为58元/每百万字符
# * 文本翻译当月需付费字符数大于等于100百万字符1亿字符刊例价为50元/每百万字符
# 限制https://cloud.tencent.com/document/product/551/32572
# * 文本翻译最高QPS为5
# 类型:腾讯翻译
type = TencentTranslate
# 请求间隔时间(秒),等于 1 / QPS。理论上最高QPS为5实际测试是3
query_interval = 0.333
# 自动auto中文zh日语ja英语en韩语ko
# 完整语言列表见文档https://cloud.tencent.com/document/product/551/15619
# 源语言
source_language = zh
# 目标语言
target_language = ja
# 腾讯云API密钥
secret_id =
secret_key =
# 腾讯云地域参数用来标识希望操作哪个地域的数据建议按照运行blivechat的机器所在地区就近选择
# 北京ap-beijing上海ap-shanghai香港ap-hongkong首尔ap-seoul
# 完整地域列表见文档https://cloud.tencent.com/document/api/551/15615#.E5.9C.B0.E5.9F.9F.E5.88.97.E8.A1.A8
region = ap-shanghai
[baidu_translate]
# 文档https://fanyi-api.baidu.com/
# 定价https://fanyi-api.baidu.com/product/112
# * 标准版每月前5万字符免费超出仅收取超出部分费用QPS=1按49元/百万字符计费
# * 高级版每月前100万字符免费超出仅收取超出部分费用QPS=10按49元/百万字符计费
# * 尊享版每月前200万字符免费超出后仅收取超出部分费用QPS=100按49元/百万字符计费
# 类型:百度翻译
type = BaiduTranslate
# 请求间隔时间(秒),等于 1 / QPS
query_interval = 1.5
# 自动auto中文zh日语jp英语en韩语kor
# 完整语言列表见文档https://fanyi-api.baidu.com/doc/21
# 源语言
source_language = zh
# 目标语言
target_language = jp
# 百度翻译开放平台应用ID和密钥
app_id =
secret =