Files
abot/config.yaml
2026-05-06 11:07:47 +08:00

146 lines
5.2 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}"
plugin_hot_reload:
# 线上默认关闭插件热加载扫描:
# 1. 避免后台线程周期性扫盘;
# 2. 降低 discover_plugins 带来的额外 IO
# 3. 如确实需要热更新,再单独通过环境变量打开。
enabled: "${ABOT_PLUGIN_HOT_RELOAD_ENABLED:false}"
interval_seconds: "${ABOT_PLUGIN_HOT_RELOAD_INTERVAL:600}"
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:}"
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"