Files
abot/config.yaml
liuwei 5e144fb481 新增AI绘图统一LLM配置
1. 在config.yaml中新增AI绘图专用的OpenAI兼容backend,接入用户提供的网关地址与密钥。

2. 在llm.scenes中新增image.generate场景,统一路由AI绘图插件请求。

3. 将ai_gen_image插件默认scene切换为image.generate,实现开箱即用。
2026-04-28 16:03:39 +08:00

152 lines
5.1 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: "http://192.168.2.240:3000/v1"
endpoint: "chat/completions"
api_key: "sk-hC6WMLAsTdItpywyrYdxT6pQ4E7NARGbUKuPWRH0zMheen9e"
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: "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
openai_compatible_ai_gen_image:
provider: "openai_compatible"
# AI 绘图专用网关:
# 1. 这里使用用户提供的 OpenAI 兼容服务地址;
# 2. 插件会在此 base_url 基础上请求 images/generations
# 3. endpoint 保留为图片接口默认值,便于后续统一调整。
api_base_url: "https://freeapi.dgbmc.top"
endpoint: "images/generations"
api_key: "sk-2XccrBRsX8OmxqCEsZjdDRczhHNaAG7Mn88mNVL7Y0w0tx72"
# 图片模型默认使用 gpt-image-1
# 若网关只支持其他模型,可后续直接在这里替换。
model: "gpt-image-1"
stream: false
timeout_seconds: 300
max_retries: 2
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"
"member_roast": "openai_compatible_ai_auto_response"
"image.generate": "openai_compatible_ai_gen_image"