群总结工作流支持markdown/template双提示词分支

- 在 Dify 工作流新增 summary_mode 输入变量,支持 markdown/template 模式识别\n- 新增 if-else 分支节点,根据 summary_mode 路由到不同 LLM 提示词\n- 保留原 Markdown 提示词链路,新增 Template 专用紧凑提示词链路\n- 为 template 分支补充独立输出节点,并接入失败回退链路\n- 在 message_summary 插件请求输入中新增 summary_mode 字段,传递当前渲染模式
This commit is contained in:
liuwei
2026-04-23 10:38:18 +08:00
parent 6ff211fdd3
commit cc231506cb
2 changed files with 488 additions and 0 deletions

View File

@@ -1316,6 +1316,10 @@ class MessageSummaryPlugin(MessagePluginInterface):
"query": prompt,
"group_name": group_name,
"chat_content": content_compress,
# 传给 Dify 工作流做提示词分流:
# - markdown: 走历史 Markdown 风格提示词;
# - template: 走模板友好的紧凑结构提示词。
"summary_mode": self._summary_image_mode,
}
self.LOG.info(f"群聊总结请求准备: group={group_name}, mode={self._api_mode}, response_mode={self._response_mode}")