Files
abot/config.example.yaml

168 lines
6.4 KiB
YAML
Raw Permalink 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}" ]
wechat_ipad:
# wechat_ipad 静态连接配置统一走环境变量:
# 1. 用户只需要维护 `.env`,不必再手工同步独立 TOML
# 2. 登录态缓存会单独写入 provider 自己目录下的状态文件,避免把运行期字段混进用户配置;
# 3. `state_file` 留空时会按 `server_type` 自动落到对应 provider 目录;
# 4. `legacy_config_path` 仅用于兼容历史仓库中的 `wechat_ipad/config.toml`。
server_url: "${WECHAT_SERVER_URL:http://127.0.0.1:8059/}"
server_ip: "${WECHAT_SERVER_IP:127.0.0.1}"
server_port: "${WECHAT_SERVER_PORT:8059}"
server_type: "${WECHAT_SERVER_TYPE:legacy_855}"
# 当 server_type=server_864 时必须提供固定 key855/859 可留空。
server_key: "${WECHAT_SERVER_KEY:}"
# 864 登录二维码接口:默认优先尝试 new_x再按 provider 内部逻辑回退。
login_qr_api: "${WECHAT_LOGIN_QR_API:new_x}"
# 当使用 GetLoginQrCodeNewX 时,常用值可为 mac / win / harmony / car / watch。
login_way: "${WECHAT_LOGIN_WAY:mac}"
wxid: "${WECHAT_WXID:}"
device_name: "${WECHAT_DEVICE_NAME:}"
device_id: "${WECHAT_DEVICE_ID:}"
state_file: "${WECHAT_STATE_FILE:}"
legacy_config_path: "${WECHAT_LEGACY_CONFIG_PATH:wechat_ipad/config.toml}"
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"