修复斗鱼日报Dify 400请求并增强错误诊断
变更项:\n1. 在斗鱼插件新增 daily_report_include_structured_inputs 配置(默认 false),Dify 入参默认改为精简字段(task_type/query/system_prompt/user_prompt/room_id 等),避免复杂对象输入触发 400。\n2. 调整 _build_dify_daily_report_inputs:仅在 include_structured_inputs=true 时才附带 report_payload_json,大幅降低 Workflow 入参类型不匹配风险。\n3. 在初始化流程中读取 report_api.include_structured_inputs,支持按环境开关结构化入参。\n4. 在 UnifiedLLMClient 的 Dify 调用中新增 HTTPError 细粒度处理,last_error 与日志会追加 response_body 片段,便于快速定位 Dify 侧具体报错原因。\n5. 更新 douyu 配置模板注释,明确复杂输入导致 400 的风险与开关用途,方便后续维护。
This commit is contained in:
@@ -29,3 +29,6 @@ audience_stats_sample_interval_seconds = 0
|
||||
[Douyu.report_api]
|
||||
# 切换到 Dify 斗鱼日报专用工作流;对应配置位于根目录 config.yaml 的 llm.backends。
|
||||
backend = "dify_workflow_douyu_daily_report"
|
||||
# 是否把完整结构化 payload(JSON 大对象)作为输入传给 Dify。
|
||||
# 某些 Workflow 对复杂输入类型校验严格,会导致 400,默认关闭以保证可用性。
|
||||
include_structured_inputs = false
|
||||
|
||||
Reference in New Issue
Block a user