新增斗鱼Dify工作流配置文件
1. 参考群总结AI.yml导出格式创建斗鱼日报AI工作流。\n2. 补充斗鱼插件调用所需输入字段:task_type、system_prompt、user_prompt、report_payload_json、room_id、anchor_day、nickname、max_length。\n3. 配置workflow输出字段为text,便于直接对接斗鱼插件workflow_output_key=text。\n4. 提示词中增加任务路由规则,兼容daily_report与danmu_summary两种生成模式。
This commit is contained in:
291
plugins/douyu/斗鱼日报AI.yml
Normal file
291
plugins/douyu/斗鱼日报AI.yml
Normal file
@@ -0,0 +1,291 @@
|
||||
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: llm
|
||||
id: 200000001-source-200000002-target
|
||||
source: '200000001'
|
||||
sourceHandle: source
|
||||
target: '200000002'
|
||||
targetHandle: target
|
||||
type: custom
|
||||
zIndex: 0
|
||||
- data:
|
||||
isInIteration: false
|
||||
isInLoop: false
|
||||
sourceType: llm
|
||||
targetType: end
|
||||
id: 200000002-source-200000003-target
|
||||
source: '200000002'
|
||||
sourceHandle: source
|
||||
target: '200000003'
|
||||
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
|
||||
- default: daily_report
|
||||
hint: daily_report 或 danmu_summary
|
||||
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: 420
|
||||
id: '200000001'
|
||||
position:
|
||||
x: 80
|
||||
y: 210
|
||||
positionAbsolute:
|
||||
x: 80
|
||||
y: 210
|
||||
selected: false
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 260
|
||||
- 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: 00000000-0000-0000-0000-000000000001
|
||||
role: system
|
||||
text: |
|
||||
你是「斗鱼直播日报助手」。
|
||||
你会收到 task_type、提示词和结构化弹幕材料。
|
||||
|
||||
输出总原则:
|
||||
1. 只根据给定材料生成内容,不编造。
|
||||
2. 使用中文自然表达,不要输出代码块。
|
||||
3. 输出纯文本,不要添加额外前后缀说明。
|
||||
4. 严格遵守长度约束:不超过 max_length。
|
||||
|
||||
任务路由规则:
|
||||
- 当 task_type=danmu_summary:输出“弹幕总结”风格,偏现场氛围、观众情绪与高频梗,不写运营策略。
|
||||
- 当 task_type=daily_report:输出“完整日报正文”风格,包含主线、运营观察、热点时段、高频梗等。
|
||||
|
||||
若 system_prompt 非空,优先遵循其格式和结构要求。
|
||||
- id: 00000000-0000-0000-0000-000000000002
|
||||
role: user
|
||||
text: |
|
||||
【task_type】
|
||||
{{#200000001.task_type#}}
|
||||
|
||||
【长度限制 max_length】
|
||||
{{#200000001.max_length#}}
|
||||
|
||||
【system_prompt】
|
||||
{{#200000001.system_prompt#}}
|
||||
|
||||
【user_prompt】
|
||||
{{#200000001.user_prompt#}}
|
||||
|
||||
【query(兼容字段)】
|
||||
{{#200000001.query#}}
|
||||
|
||||
【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: 3
|
||||
retry_enabled: true
|
||||
retry_interval: 1000
|
||||
selected: true
|
||||
title: LLM
|
||||
type: llm
|
||||
vision:
|
||||
enabled: false
|
||||
height: 118
|
||||
id: '200000002'
|
||||
position:
|
||||
x: 380
|
||||
y: 282
|
||||
positionAbsolute:
|
||||
x: 380
|
||||
y: 282
|
||||
selected: true
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 242
|
||||
- data:
|
||||
outputs:
|
||||
- value_selector:
|
||||
- '200000002'
|
||||
- text
|
||||
value_type: string
|
||||
variable: text
|
||||
selected: false
|
||||
title: 输出
|
||||
type: end
|
||||
height: 88
|
||||
id: '200000003'
|
||||
position:
|
||||
x: 682
|
||||
y: 282
|
||||
positionAbsolute:
|
||||
x: 682
|
||||
y: 282
|
||||
sourcePosition: right
|
||||
targetPosition: left
|
||||
type: custom
|
||||
width: 242
|
||||
viewport:
|
||||
x: 60
|
||||
y: 40
|
||||
zoom: 1
|
||||
rag_pipeline_variables: []
|
||||
Reference in New Issue
Block a user