Files
abot/config.yaml
Liu 0d1362f97e 为长任务插件接入后台任务模式
1. 为消息插件新增可配置的前台/后台分发模式,并在 robot 主链路中加入独立后台任务池,避免长任务长期占用前台 20 个消息处理槽位。

2. 放宽插件执行超时上限到 1800 秒,支持 200 秒以上长任务,同时保留熔断、统计和异常记录。

3. 为群聊总结和 AI 绘图启用后台执行配置,并将菜单插件默认输出改回文本模式。
2026-05-01 11:23:52 +08:00

149 lines
5.4 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.
environment: "${ABOT_ENVIRONMENT:development}"
plugin_dir: "${ABOT_PLUGIN_DIR:plugins}"
runtime:
# 后台长任务插件专用并发池大小:
# 1. 当前前台消息处理仍然保留固定 20 并发槽位;
# 2. 配置为 background 的长任务插件会转入这个独立池执行,不再长期占住前台槽位;
# 3. 如果模型/截图/报表类任务较多,可以适当调大;若机器较弱,建议保守一些。
background_plugin_max_concurrency: "${ABOT_BACKGROUND_PLUGIN_MAX_CONCURRENCY:6}"
db_config:
pool_name: "${ABOT_DB_POOL_NAME:wechat_boot_pool}"
pool_size: "${ABOT_DB_POOL_SIZE:10}"
host: "${ABOT_DB_HOST:127.0.0.1}"
# 新配置统一使用 portprot 仅作为历史兼容字段保留。
port: "${ABOT_DB_PORT:3306}"
prot: "${ABOT_DB_PORT:3306}"
user: "${ABOT_DB_USER:root}"
password: "${ABOT_DB_PASSWORD}"
database: "${ABOT_DB_NAME:message_archive}"
charset: "${ABOT_DB_CHARSET:utf8mb4}"
use_unicode: true
get_warnings: true
pool_reset_session: true
redis_config:
host: "${ABOT_REDIS_HOST:127.0.0.1}"
port: "${ABOT_REDIS_PORT:6379}"
password: "${ABOT_REDIS_PASSWORD:}"
db: "${ABOT_REDIS_DB:0}"
decode_responses: true
# 邮件发送配置
email_config:
smtp_server: "${ABOT_EMAIL_SMTP_SERVER:smtp.163.com}"
smtp_port: "${ABOT_EMAIL_SMTP_PORT:465}"
sender_email: "${ABOT_EMAIL_SENDER:}"
sender_password: "${ABOT_EMAIL_PASSWORD:}"
alert_recipient: "${ABOT_EMAIL_ALERT_RECIPIENT:}"
glances:
host: "${ABOT_GLANCES_HOST:127.0.0.1}"
port: "${ABOT_GLANCES_PORT:61208}"
wx_config:
# 微信管理账号,用于接收部分管理员指令。
admin: [ "${ABOT_WX_ADMIN:admin}" ]
llm:
default_backend: "${ABOT_LLM_DEFAULT_BACKEND:dify_workflow_chat}"
backends:
dify_workflow_chat:
provider: "dify"
mode: "workflow"
api_key: "${ABOT_LLM_DIFY_WORKFLOW_CHAT_API_KEY:}"
api_base_url: "${ABOT_LLM_DIFY_API_BASE_URL:http://127.0.0.1:8080/v1}"
endpoint: "workflows/run"
response_mode: "blocking"
request_timeout: 120
max_retries: 1
retry_delay_seconds: 1.0
dify_workflow_member_context:
provider: "dify"
mode: "workflow"
api_key: "${ABOT_LLM_DIFY_MEMBER_CONTEXT_API_KEY:}"
api_base_url: "${ABOT_LLM_DIFY_API_BASE_URL:http://127.0.0.1:8080/v1}"
endpoint: "workflows/run"
workflow_output_key: "text"
response_mode: "streaming"
request_timeout: 240
dify_workflow_message_summary:
provider: "dify"
mode: "workflow"
api_key: "${ABOT_LLM_DIFY_MESSAGE_SUMMARY_API_KEY:}"
api_base_url: "${ABOT_LLM_DIFY_API_BASE_URL:http://127.0.0.1:8080/v1}"
endpoint: "workflows/run"
workflow_output_key: "text"
response_mode: "streaming"
request_timeout: 180
dify_workflow_douyu_daily_report:
provider: "dify"
mode: "workflow"
api_key: "${ABOT_LLM_DIFY_DOUYU_REPORT_API_KEY:}"
api_base_url: "${ABOT_LLM_DIFY_API_BASE_URL:http://127.0.0.1:8080/v1}"
endpoint: "workflows/run"
workflow_output_key: "text"
response_mode: "blocking"
request_timeout: 240
dify_chat_global_news:
provider: "dify"
mode: "chat"
api_key: "${ABOT_LLM_DIFY_GLOBAL_NEWS_API_KEY:}"
api_base_url: "${ABOT_LLM_DIFY_API_BASE_URL:http://127.0.0.1:8080/v1}"
endpoint: "chat-messages"
response_mode: "blocking"
request_timeout: 60
openai_compatible_game_task:
provider: "openai_compatible"
api_url: "${ABOT_LLM_GAME_TASK_API_URL:https://api.example.com/v1/chat/completions}"
api_key: "${ABOT_LLM_GAME_TASK_API_KEY:}"
model: "${ABOT_LLM_GAME_TASK_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: "${ABOT_LLM_AUTO_REPLY_API_BASE_URL:https://api.example.com/v1}"
endpoint: "chat/completions"
api_key: "${ABOT_LLM_AUTO_REPLY_API_KEY:}"
model: "${ABOT_LLM_AUTO_REPLY_MODEL:gpt-5.4}"
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: "${ABOT_LLM_DIFY_AUTO_REPLY_API_KEY:}"
api_base_url: "${ABOT_LLM_DIFY_API_BASE_URL:http://127.0.0.1:8080/v1}"
endpoint: "workflows/run"
workflow_output_key: "result_json"
response_mode: "blocking"
request_timeout: 15
max_retries: 1
retry_delay_seconds: 1.0
openai_compatible_ai_gen_image:
provider: "openai_compatible"
api_base_url: "${ABOT_LLM_IMAGE_API_BASE_URL:https://api.example.com/v1}"
endpoint: "chat/completions"
api_key: "${ABOT_LLM_IMAGE_API_KEY:}"
model: "${ABOT_LLM_IMAGE_MODEL:gpt-image-1}"
stream: false
timeout_seconds: 300
max_retries: 2
retry_delay_seconds: 1.0
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"
"member_roast": "openai_compatible_ai_auto_response"
"image.generate": "openai_compatible_ai_gen_image"