Files
abot/plugins/douyu/斗鱼日报AI.yml
liuwei ea2c01532e 将斗鱼日报Dify工作流改为按任务类型分支
1. 在斗鱼日报 Dify 工作流中新增 if-else 节点,按 daily_report、danmu_summary、fans_daily_report 做真实业务分支。\n2. 为运营日报、弹幕总结、粉丝日报分别拆分主 LLM 与回退 LLM,减少不同文风互相污染。\n3. 更新斗鱼 Dify 接入文档,改为分支版工作流说明,明确当前推荐结构与验证方式。
2026-04-27 12:34:06 +08:00

1033 lines
25 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.
app:
description: 斗鱼直播日报、弹幕总结与粉丝乐子日报工作流
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: 斗鱼日报AI
use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: langgenius/openai_api_compatible:0.0.27@f9ce3ff5e28f09931a3a7fca59add2d09590408f7e9a3d701b10c77a60249719
version: null
kind: app
version: 0.5.0
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
allowed_file_extensions:
- .JPG
- .JPEG
- .PNG
- .GIF
- .WEBP
- .SVG
allowed_file_types:
- image
allowed_file_upload_methods:
- local_file
- remote_url
enabled: false
fileUploadConfig:
audio_file_size_limit: 50
batch_count_limit: 5
file_size_limit: 15
image_file_batch_limit: 10
image_file_size_limit: 10
single_chunk_attachment_limit: 10
video_file_size_limit: 100
workflow_file_upload_limit: 10
image:
enabled: false
number_limits: 3
transfer_methods:
- local_file
- remote_url
number_limits: 3
opening_statement: ''
retriever_resource:
enabled: true
sensitive_word_avoidance:
enabled: false
speech_to_text:
enabled: false
suggested_questions: []
suggested_questions_after_answer:
enabled: false
text_to_speech:
enabled: false
language: ''
voice: ''
graph:
edges:
- data:
isInIteration: false
isInLoop: false
sourceType: start
targetType: if-else
id: 200000001-source-200000010-target
source: '200000001'
sourceHandle: source
target: '200000010'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: llm
id: 200000010-daily-report-case-200000101-target
source: '200000010'
sourceHandle: daily_report_case
target: '200000101'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: llm
id: 200000010-danmu-summary-case-200000102-target
source: '200000010'
sourceHandle: danmu_summary_case
target: '200000102'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: llm
id: 200000010-fans-daily-report-case-200000103-target
source: '200000010'
sourceHandle: fans_daily_report_case
target: '200000103'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: if-else
targetType: llm
id: 200000010-false-200000101-target
source: '200000010'
sourceHandle: 'false'
target: '200000101'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: end
id: 200000101-source-200000301-target
source: '200000101'
sourceHandle: source
target: '200000301'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: end
id: 200000102-source-200000302-target
source: '200000102'
sourceHandle: source
target: '200000302'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: end
id: 200000103-source-200000303-target
source: '200000103'
sourceHandle: source
target: '200000303'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: llm
targetType: llm
id: 200000101-fail-branch-200000201-target
source: '200000101'
sourceHandle: fail-branch
target: '200000201'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: llm
targetType: llm
id: 200000102-fail-branch-200000202-target
source: '200000102'
sourceHandle: fail-branch
target: '200000202'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: llm
targetType: llm
id: 200000103-fail-branch-200000203-target
source: '200000103'
sourceHandle: fail-branch
target: '200000203'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: end
id: 200000201-source-200000304-target
source: '200000201'
sourceHandle: source
target: '200000304'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: end
id: 200000202-source-200000305-target
source: '200000202'
sourceHandle: source
target: '200000305'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: end
id: 200000203-source-200000306-target
source: '200000203'
sourceHandle: source
target: '200000306'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
selected: false
title: 用户输入
type: start
variables:
- default: ''
hint: 兼容 Dify workflow 的 query 字段
label: query
max_length: 9999999
options: []
placeholder: ''
required: true
type: paragraph
variable: query
# task_type 是整个工作流的业务路由开关:
# 1. daily_report运营版完整日报正文
# 2. danmu_summary运营版图片上半部分弹幕总结
# 3. fans_daily_report粉丝向欢乐恶搞日报。
- default: daily_report
hint: daily_report / danmu_summary / fans_daily_report
label: task_type
max_length: 255
options: []
placeholder: ''
required: false
type: paragraph
variable: task_type
- default: ''
hint: 斗鱼插件传入的系统提示词
label: system_prompt
max_length: 9999999
options: []
placeholder: ''
required: false
type: paragraph
variable: system_prompt
- default: ''
hint: 斗鱼插件传入的用户提示词
label: user_prompt
max_length: 9999999
options: []
placeholder: ''
required: false
type: paragraph
variable: user_prompt
- default: ''
hint: 结构化 payload JSON 字符串
label: report_payload_json
max_length: 9999999
options: []
placeholder: ''
required: false
type: paragraph
variable: report_payload_json
- default: ''
hint: 房间号(可选)
label: room_id
max_length: 255
options: []
placeholder: ''
required: false
type: paragraph
variable: room_id
- default: ''
hint: 报告日期(可选)
label: anchor_day
max_length: 255
options: []
placeholder: ''
required: false
type: paragraph
variable: anchor_day
- default: ''
hint: 主播昵称(可选)
label: nickname
max_length: 255
options: []
placeholder: ''
required: false
type: paragraph
variable: nickname
- default: '1800'
hint: 最大输出长度(字符)
label: max_length
max_length: 20
options: []
placeholder: ''
required: false
type: paragraph
variable: max_length
height: 317
id: '200000001'
position:
x: 0
y: 120
positionAbsolute:
x: 0
y: 120
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
cases:
- case_id: danmu_summary_case
conditions:
- comparison_operator: contains
id: danmu_summary_case_cond
value: danmu_summary
varType: string
variable_selector:
- '200000001'
- task_type
id: danmu_summary_case
logical_operator: and
- case_id: fans_daily_report_case
conditions:
- comparison_operator: contains
id: fans_daily_report_case_cond
value: fans_daily_report
varType: string
variable_selector:
- '200000001'
- task_type
id: fans_daily_report_case
logical_operator: and
- case_id: daily_report_case
conditions:
- comparison_operator: contains
id: daily_report_case_cond
value: daily_report
varType: string
variable_selector:
- '200000001'
- task_type
id: daily_report_case
logical_operator: and
selected: false
title: task_type 分支
type: if-else
height: 196
id: '200000010'
position:
x: 320
y: 145
positionAbsolute:
x: 320
y: 145
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
context:
enabled: false
variable_selector: []
# 运营版正文分支:
# 1. prompt 只服务 daily_report不再夹带粉丝版/弹幕总结的额外风格说明;
# 2. 让模型专注输出主线、运营观察、热点时段和高频梗,减少串味。
error_strategy: fail-branch
model:
completion_params:
temperature: 0.25
mode: chat
name: grok-4
provider: langgenius/openai_api_compatible/openai_api_compatible
prompt_template:
- id: daily_system_1
role: system
text: '你是「斗鱼直播运营日报助手」。
你的唯一任务是生成运营版完整日报正文。
输出原则:
1. 只依据输入材料生成,不编造。
2. 输出中文纯文本,不要使用代码块。
3. 聚焦直播主线、弹幕关注点、运营观察、热点时段和高频梗。
4. 如果 system_prompt 非空,优先遵循其中的格式要求。
5. 严格控制在 max_length 以内。
'
- id: daily_user_1
role: user
text: '【任务类型】
daily_report
【长度限制】
{{#200000001.max_length#}}
【system_prompt】
{{#200000001.system_prompt#}}
【user_prompt】
{{#200000001.user_prompt#}}
【meta】
room_id={{#200000001.room_id#}}, anchor_day={{#200000001.anchor_day#}},
nickname={{#200000001.nickname#}}
【report_payload_json】
{{#200000001.report_payload_json#}}
请直接输出运营版完整日报正文。
'
retry_config:
max_retries: 2
retry_enabled: true
retry_interval: 1000
selected: false
title: 运营日报 LLM
type: llm
vision:
enabled: false
height: 154
id: '200000101'
position:
x: 664
y: 0
positionAbsolute:
x: 664
y: 0
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
context:
enabled: false
variable_selector: []
# 弹幕总结分支:
# 1. 单独约束为“图片上半部分摘要”;
# 2. 强制强调现场感、情绪和梗,避免长成完整日报。
error_strategy: fail-branch
model:
completion_params:
temperature: 0.2
mode: chat
name: grok-4
provider: langgenius/openai_api_compatible/openai_api_compatible
prompt_template:
- id: danmu_system_1
role: system
text: '你是「斗鱼直播弹幕总结助手」。
你的唯一任务是生成日报图片上半部分的弹幕总结。
输出原则:
1. 只根据输入材料生成,不编造。
2. 输出中文纯文本,不要使用代码块。
3. 聚焦现场氛围、观众情绪、高频梗、节奏变化和弹幕原话感。
4. 不要写运营策略、建议、转化或复盘结论。
5. 如果 system_prompt 非空,优先遵循其中的格式要求。
6. 严格控制在 max_length 以内。
'
- id: danmu_user_1
role: user
text: '【任务类型】
danmu_summary
【长度限制】
{{#200000001.max_length#}}
【system_prompt】
{{#200000001.system_prompt#}}
【user_prompt】
{{#200000001.user_prompt#}}
【meta】
room_id={{#200000001.room_id#}}, anchor_day={{#200000001.anchor_day#}},
nickname={{#200000001.nickname#}}
【report_payload_json】
{{#200000001.report_payload_json#}}
请直接输出弹幕总结结果。
'
retry_config:
max_retries: 2
retry_enabled: true
retry_interval: 1000
selected: false
title: 弹幕总结 LLM
type: llm
vision:
enabled: false
height: 154
id: '200000102'
position:
x: 664
y: 210
positionAbsolute:
x: 664
y: 210
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
context:
enabled: false
variable_selector: []
# 粉丝乐子日报分支:
# 1. 只服务 fans_daily_report
# 2. 让模型专注输出开心、欢乐、整活的粉丝向内容;
# 3. 显式禁止混入运营分析,降低“风格串台”概率。
error_strategy: fail-branch
model:
completion_params:
temperature: 0.35
mode: chat
name: grok-4
provider: langgenius/openai_api_compatible/openai_api_compatible
prompt_template:
- id: fans_system_1
role: system
text: '你是「斗鱼直播粉丝乐子日报助手」。
你的唯一任务是生成单独给粉丝看的欢乐恶搞日报。
输出原则:
1. 只依据输入材料生成,不编造。
2. 输出中文纯文本,不要使用代码块。
3. 语气可以开心、欢乐、轻微夸张,像群友复盘名场面。
4. 不要写运营分析,不要出现策略、建议、转化、数据表现等运营词。
5. 尽量保留现场弹幕感、口头语和接梗氛围。
6. 如果 system_prompt 非空,优先遵循其中的格式要求。
7. 严格控制在 max_length 以内。
'
- id: fans_user_1
role: user
text: '【任务类型】
fans_daily_report
【长度限制】
{{#200000001.max_length#}}
【system_prompt】
{{#200000001.system_prompt#}}
【user_prompt】
{{#200000001.user_prompt#}}
【meta】
room_id={{#200000001.room_id#}}, anchor_day={{#200000001.anchor_day#}},
nickname={{#200000001.nickname#}}
【report_payload_json】
{{#200000001.report_payload_json#}}
请直接输出粉丝向乐子日报。
'
retry_config:
max_retries: 2
retry_enabled: true
retry_interval: 1000
selected: true
title: 粉丝日报 LLM
type: llm
vision:
enabled: false
height: 172
id: '200000103'
position:
x: 664
y: 440
positionAbsolute:
x: 664
y: 440
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
context:
enabled: false
variable_selector: []
# 运营日报回退模型:
# 主模型失败时仍然只处理运营版正文,避免错误回退时跑到别的文风。
model:
completion_params:
temperature: 0.2
mode: chat
name: gpt-5.4
provider: langgenius/openai_api_compatible/openai_api_compatible
prompt_template:
- id: daily_system_2
role: system
text: '你是「斗鱼直播运营日报助手」。
当前是回退链路,请稳定输出运营版完整日报正文。
只根据输入材料生成中文纯文本,不编造,不要使用代码块,不要超过 max_length。
'
- id: daily_user_2
role: user
text: '【任务类型】
daily_report
【长度限制】
{{#200000001.max_length#}}
【system_prompt】
{{#200000001.system_prompt#}}
【user_prompt】
{{#200000001.user_prompt#}}
【report_payload_json】
{{#200000001.report_payload_json#}}
请直接输出运营版完整日报正文。
'
retry_config:
max_retries: 2
retry_enabled: true
retry_interval: 1000
selected: false
title: 运营日报回退 LLM
type: llm
vision:
enabled: false
height: 118
id: '200000201'
position:
x: 1010
y: 0
positionAbsolute:
x: 1010
y: 0
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
context:
enabled: false
variable_selector: []
# 弹幕总结回退模型:
# 失败时继续保持“短摘要+现场感”目标,不让回退模型输出成长文复盘。
model:
completion_params:
temperature: 0.2
mode: chat
name: gpt-5.4
provider: langgenius/openai_api_compatible/openai_api_compatible
prompt_template:
- id: danmu_system_2
role: system
text: '你是「斗鱼直播弹幕总结助手」。
当前是回退链路,请稳定输出图片上半部分使用的弹幕总结。
只根据输入材料生成中文纯文本,不编造,不要使用代码块,不要写运营分析,不要超过 max_length。
'
- id: danmu_user_2
role: user
text: '【任务类型】
danmu_summary
【长度限制】
{{#200000001.max_length#}}
【system_prompt】
{{#200000001.system_prompt#}}
【user_prompt】
{{#200000001.user_prompt#}}
【report_payload_json】
{{#200000001.report_payload_json#}}
请直接输出弹幕总结结果。
'
retry_config:
max_retries: 2
retry_enabled: true
retry_interval: 1000
selected: false
title: 弹幕总结回退 LLM
type: llm
vision:
enabled: false
height: 118
id: '200000202'
position:
x: 1010
y: 210
positionAbsolute:
x: 1010
y: 210
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
context:
enabled: false
variable_selector: []
# 粉丝日报回退模型:
# 保持欢乐、现场、整活的风格要求,减少回退链路把粉丝版写成运营版的风险。
model:
completion_params:
temperature: 0.3
mode: chat
name: gpt-5.4
provider: langgenius/openai_api_compatible/openai_api_compatible
prompt_template:
- id: fans_system_2
role: system
text: '你是「斗鱼直播粉丝乐子日报助手」。
当前是回退链路,请稳定输出单独给粉丝看的欢乐恶搞日报。
只根据输入材料生成中文纯文本,不编造,不要使用代码块,不要写运营分析,不要超过 max_length。
'
- id: fans_user_2
role: user
text: '【任务类型】
fans_daily_report
【长度限制】
{{#200000001.max_length#}}
【system_prompt】
{{#200000001.system_prompt#}}
【user_prompt】
{{#200000001.user_prompt#}}
【report_payload_json】
{{#200000001.report_payload_json#}}
请直接输出粉丝向乐子日报。
'
retry_config:
max_retries: 2
retry_enabled: true
retry_interval: 1000
selected: false
title: 粉丝日报回退 LLM
type: llm
vision:
enabled: false
height: 118
id: '200000203'
position:
x: 1010
y: 440
positionAbsolute:
x: 1010
y: 440
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
outputs:
- value_selector:
- '200000101'
- text
value_type: string
variable: text
selected: false
title: 运营日报输出
type: end
height: 88
id: '200000301'
position:
x: 1010
y: 110
positionAbsolute:
x: 1010
y: 110
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
outputs:
- value_selector:
- '200000102'
- text
value_type: string
variable: text
selected: false
title: 弹幕总结输出
type: end
height: 88
id: '200000302'
position:
x: 1010
y: 320
positionAbsolute:
x: 1010
y: 320
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
outputs:
- value_selector:
- '200000103'
- text
value_type: string
variable: text
selected: false
title: 粉丝日报输出
type: end
height: 88
id: '200000303'
position:
x: 1010
y: 550
positionAbsolute:
x: 1010
y: 550
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
outputs:
- value_selector:
- '200000201'
- text
value_type: string
variable: text
selected: false
title: 运营日报回退输出
type: end
height: 88
id: '200000304'
position:
x: 1354
y: 0
positionAbsolute:
x: 1354
y: 0
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
outputs:
- value_selector:
- '200000202'
- text
value_type: string
variable: text
selected: false
title: 弹幕总结回退输出
type: end
height: 88
id: '200000305'
position:
x: 1354
y: 210
positionAbsolute:
x: 1354
y: 210
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
outputs:
- value_selector:
- '200000203'
- text
value_type: string
variable: text
selected: false
title: 粉丝日报回退输出
type: end
height: 88
id: '200000306'
position:
x: 1354
y: 440
positionAbsolute:
x: 1354
y: 440
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
viewport:
x: 74
y: 74
zoom: 0.48
rag_pipeline_variables: []