Files
abot/config.yaml
liuwei 7cee7a99e2 优化 ai_auto_response 队列过期丢弃与超时策略
- 为 ai_auto_response 队列消息记录入队时刻,并增加消息过期丢弃机制
- 在出队前与发送前各检查一次消息是否过期,避免补发过时群聊回复
- 为 skip 日志补充 age 字段,便于观察排队老化情况
- 将 ai_auto_response 外层总超时收紧到 20 秒,并新增 message_expire_sec=12 配置
- 将 Dify auto_reply.group 请求超时收紧到 15 秒,并关闭重试以提升群聊时效性
2026-04-24 15:03:35 +08:00

134 lines
4.3 KiB
YAML
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.
db_config:
pool_name: "wechat_boot_pool"
pool_size: 10
host: "192.168.2.41"
prot: "3306"
user: "root"
password: "lw123456"
database: "message_archive"
charset: "utf8mb4"
use_unicode: true
get_warnings: true
pool_reset_session: true
redis_config:
host: "192.168.2.40"
port: 6379
password: ""
db: 0
decode_responses: true
# 邮件发送配置
email_config:
smtp_server: "smtp.163.com"
smtp_port: 465
sender_email: "bovine_liu@163.com"
sender_password: "CCWpEQzSdxQUqhDE"
alert_recipient: "bovine_liu@163.com" # 警报邮件接收者
glances:
host: "192.168.2.170"
port: 61208
wx_config:
#微信管理账号,用于接收部分管理员指令
#菜单调整和系统更新
admin: [ "Jyunere" ]
llm:
default_backend: "dify_workflow_chat"
backends:
dify_workflow_chat:
provider: "dify"
mode: "workflow"
api_key: "app-u5EnYq3ill19bm6pWJwGkY4D"
api_base_url: "http://192.168.2.240/v1"
endpoint: "workflows/run"
response_mode: "blocking"
request_timeout: 40
dify_workflow_member_context:
provider: "dify"
mode: "workflow"
api_key: "app-b2cj03DipGCIAmgBfcx7SKsT"
api_base_url: "http://192.168.2.240/v1"
endpoint: "workflows/run"
workflow_output_key: "text"
response_mode: "streaming"
request_timeout: 240
dify_workflow_message_summary:
provider: "dify"
mode: "workflow"
api_key: "app-shCA6bo5l2VDmnvhg2BtuJbk"
api_base_url: "http://192.168.2.240/v1"
endpoint: "workflows/run"
workflow_output_key: "text"
response_mode: "streaming"
request_timeout: 180
dify_workflow_douyu_daily_report:
provider: "dify"
mode: "workflow"
# 斗鱼日报专用工作流:请替换为你在 Dify 上创建的“斗鱼日报”应用 Key。
api_key: "app-S1oyi2udgIn197Vu0oOGUgAl"
api_base_url: "http://192.168.2.240/v1"
endpoint: "workflows/run"
# 工作流最终输出字段建议固定为 text便于统一客户端直接读取结果文本。
workflow_output_key: "text"
response_mode: "blocking"
# 斗鱼日报 payload 较大,适当提高超时时间,避免高峰时段超时回退。
request_timeout: 240
dify_chat_global_news:
provider: "dify"
mode: "chat"
api_key: "app-rhhKkbvHd2IAQoGX7xTzXZJj"
api_base_url: "http://192.168.2.240/v1"
endpoint: "chat-messages"
response_mode: "blocking"
request_timeout: 60
openai_compatible_game_task:
provider: "openai_compatible"
api_url: "https://ark.cn-beijing.volces.com/api/v3/chat/completions"
api_key: "b8586595-eb81-483d-8e91-a35cc789729e"
model: "doubao-1-5-lite-32k-250115"
stream: false
temperature: 0.2
max_tokens: 1000
timeout_seconds: 60
openai_compatible_ai_auto_response:
provider: "openai_compatible"
api_base_url: "https://freeapi.dgbmc.top/v1"
endpoint: "chat/completions"
api_key: "sk-3PMmqVRRKbKTHxtlnGxVHMGbeygqBhhY5QbBXEQW23iaxuO3"
model: "grok-4.20-0309"
stream: true
temperature: 0.35
max_tokens: 120
timeout_seconds: 45
max_retries: 3
retry_delay_seconds: 1.0
dify_workflow_ai_auto_response:
provider: "dify"
mode: "workflow"
api_key: "app-ukHWWGoleANS5aZVmx28UAQ4"
api_base_url: "http://192.168.2.240/v1"
endpoint: "workflows/run"
workflow_output_key: "result_json"
response_mode: "blocking"
# 群聊自动回复强调时效性:
# 1. Dify 请求不能等太久,否则容易出现“过了场子再补回”的违和感;
# 2. 这里把单次请求超时收紧,并关闭重试,让过期消息尽快放弃。
request_timeout: 15
max_retries: 1
retry_delay_seconds: 1.0
# 场景路由层:插件建议优先使用 scene而不是直接绑定 backend。
# 这样当模型或供应商切换时,只需要改这里,不需要逐个改插件配置。
scenes:
"chat.main": "dify_workflow_chat"
"member.profile": "dify_workflow_member_context"
"summary.daily": "dify_workflow_message_summary"
"douyu.daily_report": "dify_workflow_douyu_daily_report"
"news.global": "dify_chat_global_news"
"game.task": "openai_compatible_game_task"
"auto_reply.group": "dify_workflow_ai_auto_response"