config.yaml.example 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. # 唯一的百炼 DashScope Key,所有模型探测共用
  2. api_key: "sk-xxxx"
  3. # 检测频次:每隔多少分钟跑一轮(360 = 每 6 小时一次)
  4. interval_minutes: 720
  5. # ================= 邮箱(收 + 发) =================
  6. mail:
  7. imap_host: "imap.exmail.qq.com"
  8. imap_port: 993
  9. inbox_folder: "INBOX"
  10. # 已发送文件夹;腾讯企业邮为 "Sent Messages",程序会自动回退尝试
  11. # "Sent Messages" -> "Sent" -> "已发送"
  12. sent_folder: "Sent Messages"
  13. smtp_host: "smtp.exmail.qq.com"
  14. smtp_port: 465 # 465=SSL;587 时把 smtp_ssl 改成 false
  15. smtp_ssl: true
  16. username: "cat@example.com"
  17. password: "1234567"
  18. # 发出下线告警后,额外用 IMAP APPEND 归档到已发送文件夹。
  19. # 保持 true 可确保去重标记一定存在(部分邮箱 SMTP 发信不会自动归档到已发送)
  20. append_to_sent: true
  21. # 下线通知转发 + 可用性告警的群发收件人列表
  22. notify_emails:
  23. - "user@qq.com"
  24. # ================= 模块 A:模型下线通知检测 =================
  25. # 逻辑:近 N 天收件箱中,发件人域名属于 sender_domains 且正文/标题含 keyword 的邮件即为需告警;
  26. # (状态存在已发送邮件里,本地不落盘)
  27. offline_notice:
  28. keyword: "模型下线通知"
  29. # 发件人**域名**白名单(不是完整邮箱地址)。
  30. # 只校验域名,好处是:阿里云换了哪个具体邮箱号发都能收到,不会因为地址填错而漏消息;
  31. # 同时又拦住了外部陌生人发含关键词的骚扰邮件。
  32. # 匹配规则:域名相等或为其子域。aliyun.com 可命中 mail.aliyun.com,
  33. # 但不会命中 notaliyun.com、aliyun.com.evil.cn。
  34. sender_domains:
  35. - "gxx12138.space" # 联调测试用
  36. - "aliyun.com" # 正式上线打开
  37. # - "aliyuncs.com"
  38. lookback_days: 3
  39. # ================= 模块 B:模型可用性检测 =================
  40. # 按 API 端点分类,你只需要往对应分组的 models 列表里填模型名。
  41. # 端点地址/探测参数已内置默认值(见 config.py 的 ENDPOINTS),需要覆盖时在分组下写同名字段即可。
  42. models:
  43. # 文本对话:https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
  44. chat:
  45. enabled: true
  46. models:
  47. - "qwen3.5-plus"
  48. - "qwen3.5-flash"
  49. # 文本转语音:wss://dashscope.aliyuncs.com/api-ws/v1/inference/
  50. # 只建连接 + 等 task-started,不发送待合成文本,所以基本不产生用量
  51. tts:
  52. enabled: true
  53. voice: "longxiaochun_v2" # 音色需与模型匹配,报错 InvalidParameter 时改这里
  54. models:
  55. - "cosyvoice-v3-flash"
  56. # 语音转文本:https://dashscope.aliyuncs.com/api/v1/services/audio/asr/transcription
  57. asr:
  58. enabled: true
  59. models:
  60. - "fun-asr"
  61. # 文生图:https://dashscope.aliyuncs.com/api/v1/services/aigc/text2image/image-synthesis
  62. text2image:
  63. enabled: true
  64. # probe_mode:
  65. # validate(默认,推荐)不传 prompt。阿里云是"先解析模型、再校验参数"的顺序,
  66. # 所以模型在线会返回 400 "input.prompt should not be null",模型下线返回
  67. # 400 "Model not exist.",两者可区分 —— 不出图、零费用。
  68. # submit 真实提交生成任务,端到端验证,但会产生生成费用。
  69. probe_mode: "validate"
  70. models:
  71. - "wan2.2-t2i-flash"
  72. # 文生视频:https://dashscope.aliyuncs.com/api/v1/services/aigc/video-generation/video-synthesis
  73. # 视频生成单次费用远高于其他端点,务必保持 probe_mode: validate
  74. text2video:
  75. enabled: true
  76. probe_mode: "validate"
  77. models:
  78. - "wanx2.1-t2v-turbo"
  79. # ================= 钉钉机器人 =================
  80. # 凭证二选一:推荐只填 access_token;也可把整条 webhook 粘进 webhook 字段。
  81. # 支持 ${ENV} 注入,例如 access_token: "${DINGTALK_DEV_NOTIFY_TOKEN}"
  82. dingtalk:
  83. enabled: true
  84. # 运维工作提醒机器人 dev_notify
  85. access_token: "ss-xxx"
  86. secret: "as-xxx"
  87. webhook: "" # 留空则用官方地址 oapi.dingtalk.com/robot/send
  88. at_all: false # true = @所有人
  89. timeout_seconds: 15
  90. at_mobiles: # 需要 @ 的成员手机号
  91. # - "13800000000"