This commit is contained in:
2025-12-01 17:21:38 +08:00
parent 32fee2b8ab
commit fab8c13cb3
7511 changed files with 996300 additions and 0 deletions

View File

@@ -0,0 +1,112 @@
app:
description: input any query, should output "prefix{{#sys.query#}}suffix"
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: answer_end_with_text
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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:
isInLoop: false
sourceType: start
targetType: answer
id: 1755077165531-source-answer-target
source: '1755077165531'
sourceHandle: source
target: answer
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1755077165531'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: prefix{{#sys.query#}}suffix
desc: ''
selected: true
title: Answer
type: answer
variables: []
height: 105
id: answer
position:
x: 384
y: 282
positionAbsolute:
x: 384
y: 282
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 178
y: 116
zoom: 1

View File

@@ -0,0 +1,275 @@
app:
description: 'This is a simple workflow contains a Iteration.
It doesn''t need any inputs, and will outputs:
```
{"output": ["output: 1", "output: 2", "output: 3"]}
```'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: test_iteration
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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: code
id: 1754683427386-source-1754683442688-target
source: '1754683427386'
sourceHandle: source
target: '1754683442688'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: code
targetType: iteration
id: 1754683442688-source-1754683430480-target
source: '1754683442688'
sourceHandle: source
target: '1754683430480'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: true
isInLoop: false
iteration_id: '1754683430480'
sourceType: iteration-start
targetType: template-transform
id: 1754683430480start-source-1754683458843-target
source: 1754683430480start
sourceHandle: source
target: '1754683458843'
targetHandle: target
type: custom
zIndex: 1002
- data:
isInIteration: false
isInLoop: false
sourceType: iteration
targetType: end
id: 1754683430480-source-1754683480778-target
source: '1754683430480'
sourceHandle: source
target: '1754683480778'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1754683427386'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
error_handle_mode: terminated
height: 178
is_parallel: false
iterator_input_type: array[number]
iterator_selector:
- '1754683442688'
- result
output_selector:
- '1754683458843'
- output
output_type: array[string]
parallel_nums: 10
selected: false
start_node_id: 1754683430480start
title: Iteration
type: iteration
width: 388
height: 178
id: '1754683430480'
position:
x: 684
y: 282
positionAbsolute:
x: 684
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 388
zIndex: 1
- data:
desc: ''
isInIteration: true
selected: false
title: ''
type: iteration-start
draggable: false
height: 48
id: 1754683430480start
parentId: '1754683430480'
position:
x: 24
y: 68
positionAbsolute:
x: 708
y: 350
selectable: false
sourcePosition: right
targetPosition: left
type: custom-iteration-start
width: 44
zIndex: 1002
- data:
code: "\ndef main() -> dict:\n return {\n \"result\": [1, 2, 3],\n\
\ }\n"
code_language: python3
desc: ''
outputs:
result:
children: null
type: array[number]
selected: false
title: Code
type: code
variables: []
height: 54
id: '1754683442688'
position:
x: 384
y: 282
positionAbsolute:
x: 384
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
isInIteration: true
isInLoop: false
iteration_id: '1754683430480'
selected: false
template: 'output: {{ arg1 }}'
title: Template
type: template-transform
variables:
- value_selector:
- '1754683430480'
- item
value_type: string
variable: arg1
height: 54
id: '1754683458843'
parentId: '1754683430480'
position:
x: 128
y: 68
positionAbsolute:
x: 812
y: 350
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
- data:
desc: ''
outputs:
- value_selector:
- '1754683430480'
- output
value_type: array[string]
variable: output
selected: false
title: End
type: end
height: 90
id: '1754683480778'
position:
x: 1132
y: 282
positionAbsolute:
x: 1132
y: 282
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -476
y: 3
zoom: 1

View File

@@ -0,0 +1,102 @@
app:
description: Simple chatflow contains only 1 LLM node.
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: basic_chatflow
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload: {}
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:
- id: 1755189262236-llm
source: '1755189262236'
sourceHandle: source
target: llm
targetHandle: target
- id: llm-answer
source: llm
sourceHandle: source
target: answer
targetHandle: target
nodes:
- data:
desc: ''
title: Start
type: start
variables: []
id: '1755189262236'
position:
x: 80
y: 282
sourcePosition: right
targetPosition: left
type: custom
- data:
context:
enabled: false
variable_selector: []
desc: ''
memory:
query_prompt_template: '{{#sys.query#}}
{{#sys.files#}}'
window:
enabled: false
size: 10
model:
completion_params:
temperature: 0.7
mode: chat
name: ''
provider: ''
prompt_template:
- role: system
text: ''
selected: true
title: LLM
type: llm
variables: []
vision:
enabled: false
id: llm
position:
x: 380
y: 282
sourcePosition: right
targetPosition: left
type: custom
- data:
answer: '{{#llm.text#}}'
desc: ''
title: Answer
type: answer
variables: []
id: answer
position:
x: 680
y: 282
sourcePosition: right
targetPosition: left
type: custom

View File

@@ -0,0 +1,156 @@
app:
description: 'Workflow with LLM node for testing auto-mock'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: llm-simple
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
enabled: false
opening_statement: ''
retriever_resource:
enabled: false
sensitive_word_avoidance:
enabled: false
speech_to_text:
enabled: false
suggested_questions: []
suggested_questions_after_answer:
enabled: false
text_to_speech:
enabled: false
graph:
edges:
- data:
isInIteration: false
isInLoop: false
sourceType: start
targetType: llm
id: start-to-llm
source: 'start_node'
sourceHandle: source
target: 'llm_node'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: end
id: llm-to-end
source: 'llm_node'
sourceHandle: source
target: 'end_node'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables:
- label: query
max_length: null
options: []
required: true
type: text-input
variable: query
height: 90
id: 'start_node'
position:
x: 30
y: 227
positionAbsolute:
x: 30
y: 227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: 'LLM Node for testing'
title: LLM
type: llm
model:
provider: openai
name: gpt-3.5-turbo
mode: chat
prompt_template:
- role: system
text: You are a helpful assistant.
- role: user
text: '{{#start_node.query#}}'
vision:
enabled: false
configs:
variable_selector: []
memory:
enabled: false
window:
enabled: false
size: 50
context:
enabled: false
variable_selector: []
structured_output:
enabled: false
retry_config:
enabled: false
max_retries: 1
retry_interval: 1000
exponential_backoff:
enabled: false
multiplier: 2
max_interval: 10000
height: 90
id: 'llm_node'
position:
x: 334
y: 227
positionAbsolute:
x: 334
y: 227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- 'llm_node'
- text
value_type: string
variable: answer
selected: false
title: End
type: end
height: 90
id: 'end_node'
position:
x: 638
y: 227
positionAbsolute:
x: 638
y: 227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 0
y: 0
zoom: 0.7

View File

@@ -0,0 +1,369 @@
app:
description: this is a simple chatflow that should output 'hello, dify!' with any
input
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: test_tool_in_chatflow
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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: tool
id: 1754336720803-source-1754336729904-target
source: '1754336720803'
sourceHandle: source
target: '1754336729904'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: tool
targetType: template-transform
id: 1754336729904-source-1754336733947-target
source: '1754336729904'
sourceHandle: source
target: '1754336733947'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: template-transform
targetType: answer
id: 1754336733947-source-answer-target
source: '1754336733947'
sourceHandle: source
target: answer
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1754336720803'
position:
x: 30
y: 258
positionAbsolute:
x: 30
y: 258
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#1754336733947.output#}}'
desc: ''
selected: false
title: Answer
type: answer
variables: []
height: 105
id: answer
position:
x: 942
y: 258
positionAbsolute:
x: 942
y: 258
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
is_team_authorization: true
output_schema: null
paramSchemas:
- auto_generate: null
default: '%Y-%m-%d %H:%M:%S'
form: form
human_description:
en_US: Time format in strftime standard.
ja_JP: Time format in strftime standard.
pt_BR: Time format in strftime standard.
zh_Hans: strftime 标准的时间格式。
label:
en_US: Format
ja_JP: Format
pt_BR: Format
zh_Hans: 格式
llm_description: null
max: null
min: null
name: format
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: string
- auto_generate: null
default: UTC
form: form
human_description:
en_US: Timezone
ja_JP: Timezone
pt_BR: Timezone
zh_Hans: 时区
label:
en_US: Timezone
ja_JP: Timezone
pt_BR: Timezone
zh_Hans: 时区
llm_description: null
max: null
min: null
name: timezone
options:
- icon: null
label:
en_US: UTC
ja_JP: UTC
pt_BR: UTC
zh_Hans: UTC
value: UTC
- icon: null
label:
en_US: America/New_York
ja_JP: America/New_York
pt_BR: America/New_York
zh_Hans: 美洲/纽约
value: America/New_York
- icon: null
label:
en_US: America/Los_Angeles
ja_JP: America/Los_Angeles
pt_BR: America/Los_Angeles
zh_Hans: 美洲/洛杉矶
value: America/Los_Angeles
- icon: null
label:
en_US: America/Chicago
ja_JP: America/Chicago
pt_BR: America/Chicago
zh_Hans: 美洲/芝加哥
value: America/Chicago
- icon: null
label:
en_US: America/Sao_Paulo
ja_JP: America/Sao_Paulo
pt_BR: América/São Paulo
zh_Hans: 美洲/圣保罗
value: America/Sao_Paulo
- icon: null
label:
en_US: Asia/Shanghai
ja_JP: Asia/Shanghai
pt_BR: Asia/Shanghai
zh_Hans: 亚洲/上海
value: Asia/Shanghai
- icon: null
label:
en_US: Asia/Ho_Chi_Minh
ja_JP: Asia/Ho_Chi_Minh
pt_BR: Ásia/Ho Chi Minh
zh_Hans: 亚洲/胡志明市
value: Asia/Ho_Chi_Minh
- icon: null
label:
en_US: Asia/Tokyo
ja_JP: Asia/Tokyo
pt_BR: Asia/Tokyo
zh_Hans: 亚洲/东京
value: Asia/Tokyo
- icon: null
label:
en_US: Asia/Dubai
ja_JP: Asia/Dubai
pt_BR: Asia/Dubai
zh_Hans: 亚洲/迪拜
value: Asia/Dubai
- icon: null
label:
en_US: Asia/Kolkata
ja_JP: Asia/Kolkata
pt_BR: Asia/Kolkata
zh_Hans: 亚洲/加尔各答
value: Asia/Kolkata
- icon: null
label:
en_US: Asia/Seoul
ja_JP: Asia/Seoul
pt_BR: Asia/Seoul
zh_Hans: 亚洲/首尔
value: Asia/Seoul
- icon: null
label:
en_US: Asia/Singapore
ja_JP: Asia/Singapore
pt_BR: Asia/Singapore
zh_Hans: 亚洲/新加坡
value: Asia/Singapore
- icon: null
label:
en_US: Europe/London
ja_JP: Europe/London
pt_BR: Europe/London
zh_Hans: 欧洲/伦敦
value: Europe/London
- icon: null
label:
en_US: Europe/Berlin
ja_JP: Europe/Berlin
pt_BR: Europe/Berlin
zh_Hans: 欧洲/柏林
value: Europe/Berlin
- icon: null
label:
en_US: Europe/Moscow
ja_JP: Europe/Moscow
pt_BR: Europe/Moscow
zh_Hans: 欧洲/莫斯科
value: Europe/Moscow
- icon: null
label:
en_US: Australia/Sydney
ja_JP: Australia/Sydney
pt_BR: Australia/Sydney
zh_Hans: 澳大利亚/悉尼
value: Australia/Sydney
- icon: null
label:
en_US: Pacific/Auckland
ja_JP: Pacific/Auckland
pt_BR: Pacific/Auckland
zh_Hans: 太平洋/奥克兰
value: Pacific/Auckland
- icon: null
label:
en_US: Africa/Cairo
ja_JP: Africa/Cairo
pt_BR: Africa/Cairo
zh_Hans: 非洲/开罗
value: Africa/Cairo
placeholder: null
precision: null
required: false
scope: null
template: null
type: select
params:
format: ''
timezone: ''
provider_id: time
provider_name: time
provider_type: builtin
selected: false
title: Current Time
tool_configurations:
format:
type: mixed
value: '%Y-%m-%d %H:%M:%S'
timezone:
type: constant
value: UTC
tool_description: A tool for getting the current time.
tool_label: Current Time
tool_name: current_time
tool_node_version: '2'
tool_parameters: {}
type: tool
height: 116
id: '1754336729904'
position:
x: 334
y: 258
positionAbsolute:
x: 334
y: 258
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
selected: false
template: hello, dify!
title: Template
type: template-transform
variables: []
height: 54
id: '1754336733947'
position:
x: 638
y: 258
positionAbsolute:
x: 638
y: 258
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -321.29999999999995
y: 225.65
zoom: 0.7

View File

@@ -0,0 +1,202 @@
app:
description: 'receive a query, output {"true": query} if query contains ''hello'',
otherwise, output {"false": query}.'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: if-else
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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: 1754154032319-source-1754217359748-target
source: '1754154032319'
sourceHandle: source
target: '1754217359748'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: if-else
targetType: end
id: 1754217359748-true-1754154034161-target
source: '1754217359748'
sourceHandle: 'true'
target: '1754154034161'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: end
id: 1754217359748-false-1754217363584-target
source: '1754217359748'
sourceHandle: 'false'
target: '1754217363584'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables:
- label: query
max_length: null
options: []
required: true
type: text-input
variable: query
height: 90
id: '1754154032319'
position:
x: 30
y: 263
positionAbsolute:
x: 30
y: 263
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1754154032319'
- query
value_type: string
variable: 'true'
selected: false
title: End
type: end
height: 90
id: '1754154034161'
position:
x: 766.1428571428571
y: 161.35714285714283
positionAbsolute:
x: 766.1428571428571
y: 161.35714285714283
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
cases:
- case_id: 'true'
conditions:
- comparison_operator: contains
id: 8c8a76f8-d3c2-4203-ab52-87b0abf486b9
value: hello
varType: string
variable_selector:
- '1754154032319'
- query
id: 'true'
logical_operator: and
desc: ''
selected: false
title: IF/ELSE
type: if-else
height: 126
id: '1754217359748'
position:
x: 364
y: 263
positionAbsolute:
x: 364
y: 263
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1754154032319'
- query
value_type: string
variable: 'false'
selected: false
title: End 2
type: end
height: 90
id: '1754217363584'
position:
x: 766.1428571428571
y: 363
positionAbsolute:
x: 766.1428571428571
y: 363
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 0
y: 0
zoom: 0.7

View File

@@ -0,0 +1,324 @@
app:
description: 'This workflow receive a ''switch'' number.
If switch == 1, output should be {"1": "Code 1", "2": "Code 2", "3": null},
otherwise, output should be {"1": null, "2": "Code 2", "3": "Code 3"}.'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: parallel_branch_test
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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: 1754230715804-source-1754230718377-target
source: '1754230715804'
sourceHandle: source
target: '1754230718377'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: code
id: 1754230718377-true-1754230738434-target
source: '1754230718377'
sourceHandle: 'true'
target: '1754230738434'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: if-else
targetType: code
id: 1754230718377-true-17542307611100-target
source: '1754230718377'
sourceHandle: 'true'
target: '17542307611100'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: if-else
targetType: code
id: 1754230718377-false-17542307611100-target
source: '1754230718377'
sourceHandle: 'false'
target: '17542307611100'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: if-else
targetType: code
id: 1754230718377-false-17542307643480-target
source: '1754230718377'
sourceHandle: 'false'
target: '17542307643480'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: code
targetType: end
id: 1754230738434-source-1754230796033-target
source: '1754230738434'
sourceHandle: source
target: '1754230796033'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: code
targetType: end
id: 17542307611100-source-1754230796033-target
source: '17542307611100'
sourceHandle: source
target: '1754230796033'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: code
targetType: end
id: 17542307643480-source-1754230796033-target
source: '17542307643480'
sourceHandle: source
target: '1754230796033'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables:
- label: switch
max_length: 48
options: []
required: true
type: number
variable: switch
height: 90
id: '1754230715804'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
cases:
- case_id: 'true'
conditions:
- comparison_operator: '='
id: bb59bde2-e97f-4b38-ba77-d2ac7c6805d3
value: '1'
varType: number
variable_selector:
- '1754230715804'
- switch
id: 'true'
logical_operator: and
desc: ''
selected: false
title: IF/ELSE
type: if-else
height: 126
id: '1754230718377'
position:
x: 384
y: 282
positionAbsolute:
x: 384
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "\ndef main() -> dict:\n return {\n \"result\": \"Code 1\"\
,\n }\n"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: Code 1
type: code
variables: []
height: 54
id: '1754230738434'
position:
x: 701
y: 225
positionAbsolute:
x: 701
y: 225
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "\ndef main() -> dict:\n return {\n \"result\": \"Code 2\"\
,\n }\n"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: Code 2
type: code
variables: []
height: 54
id: '17542307611100'
position:
x: 701
y: 353
positionAbsolute:
x: 701
y: 353
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "\ndef main() -> dict:\n return {\n \"result\": \"Code 3\"\
,\n }\n"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: Code 3
type: code
variables: []
height: 54
id: '17542307643480'
position:
x: 701
y: 483
positionAbsolute:
x: 701
y: 483
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1754230738434'
- result
value_type: string
variable: '1'
- value_selector:
- '17542307611100'
- result
value_type: string
variable: '2'
- value_selector:
- '17542307643480'
- result
value_type: string
variable: '3'
selected: false
title: End
type: end
height: 142
id: '1754230796033'
position:
x: 1061
y: 354
positionAbsolute:
x: 1061
y: 354
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -268.3522609908596
y: 37.16616977316119
zoom: 0.8271184022267809

View File

@@ -0,0 +1,363 @@
app:
description: 'This workflow receive ''query'' and ''blocking''.
if blocking == 1, the workflow will outputs the result once(because it from the
Template Node).
otherwise, the workflow will outputs the result streaming.'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: test_streaming_output
use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: langgenius/openai:0.0.30@1f5ecdef108418a467e54da2dcf5de2cf22b47632abc8633194ac9fb96317ede
kind: app
version: 0.3.1
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_size_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: 1754239042599-source-1754296900311-target
source: '1754239042599'
sourceHandle: source
target: '1754296900311'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: if-else
targetType: llm
id: 1754296900311-true-1754239044238-target
selected: false
source: '1754296900311'
sourceHandle: 'true'
target: '1754239044238'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: template-transform
id: 1754239044238-source-1754296914925-target
selected: false
source: '1754239044238'
sourceHandle: source
target: '1754296914925'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: template-transform
targetType: end
id: 1754296914925-source-1754239058707-target
selected: false
source: '1754296914925'
sourceHandle: source
target: '1754239058707'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: if-else
targetType: llm
id: 1754296900311-false-17542969329740-target
source: '1754296900311'
sourceHandle: 'false'
target: '17542969329740'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: end
id: 17542969329740-source-1754296943402-target
source: '17542969329740'
sourceHandle: source
target: '1754296943402'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables:
- label: query
max_length: null
options: []
required: true
type: text-input
variable: query
- label: blocking
max_length: 48
options: []
required: true
type: number
variable: blocking
height: 116
id: '1754239042599'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
model:
completion_params:
temperature: 0.7
mode: chat
name: gpt-4o
provider: langgenius/openai/openai
prompt_template:
- id: 11c2b96f-7c78-4587-985f-b8addf8825ec
role: system
text: ''
- id: e3b2a1be-f2ad-4d63-bf0f-c4d8cc5189f1
role: user
text: '{{#1754239042599.query#}}'
selected: false
title: LLM
type: llm
variables: []
vision:
enabled: false
height: 90
id: '1754239044238'
position:
x: 684
y: 282
positionAbsolute:
x: 684
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1754239042599'
- query
value_type: string
variable: query
- value_selector:
- '1754296914925'
- output
value_type: string
variable: text
selected: false
title: End
type: end
height: 116
id: '1754239058707'
position:
x: 1288
y: 282
positionAbsolute:
x: 1288
y: 282
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
cases:
- case_id: 'true'
conditions:
- comparison_operator: '='
id: 8880c9ae-7394-472e-86bd-45b5d6d0d6ab
value: '1'
varType: number
variable_selector:
- '1754239042599'
- blocking
id: 'true'
logical_operator: and
desc: ''
selected: false
title: IF/ELSE
type: if-else
height: 126
id: '1754296900311'
position:
x: 384
y: 282
positionAbsolute:
x: 384
y: 282
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
selected: false
template: '{{ arg1 }}'
title: Template
type: template-transform
variables:
- value_selector:
- '1754239044238'
- text
value_type: string
variable: arg1
height: 54
id: '1754296914925'
position:
x: 988
y: 282
positionAbsolute:
x: 988
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
model:
completion_params:
temperature: 0.7
mode: chat
name: gpt-4o
provider: langgenius/openai/openai
prompt_template:
- id: 11c2b96f-7c78-4587-985f-b8addf8825ec
role: system
text: ''
- id: e3b2a1be-f2ad-4d63-bf0f-c4d8cc5189f1
role: user
text: '{{#1754239042599.query#}}'
selected: false
title: LLM 2
type: llm
variables: []
vision:
enabled: false
height: 90
id: '17542969329740'
position:
x: 684
y: 425
positionAbsolute:
x: 684
y: 425
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1754239042599'
- query
value_type: string
variable: query
- value_selector:
- '17542969329740'
- text
value_type: string
variable: text
selected: false
title: End 2
type: end
height: 116
id: '1754296943402'
position:
x: 988
y: 425
positionAbsolute:
x: 988
y: 425
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -836.2703302502922
y: 139.225594124043
zoom: 0.8934541349292853

View File

@@ -0,0 +1,466 @@
app:
description: 'This is a Workflow containing a variable aggregator. The Function
of the VariableAggregator is to select the earliest result from multiple branches
in each group and discard the other results.
At the beginning of this Workflow, the user can input switch1 and switch2, where
the logic for both parameters is that a value of 0 indicates false, and any other
value indicates true.
The upper and lower groups will respectively convert the values of switch1 and
switch2 into corresponding descriptive text. Finally, the End outputs group1 and
group2.
Example:
When switch1 == 1 and switch2 == 0, the final result will be:
```
{"group1": "switch 1 on", "group2": "switch 2 off"}
```'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: test_variable_aggregator
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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: 1754405559643-source-1754405563693-target
source: '1754405559643'
sourceHandle: source
target: '1754405563693'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: start
targetType: if-else
id: 1754405559643-source-1754405599173-target
source: '1754405559643'
sourceHandle: source
target: '1754405599173'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: template-transform
id: 1754405563693-true-1754405621378-target
source: '1754405563693'
sourceHandle: 'true'
target: '1754405621378'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: template-transform
id: 1754405563693-false-1754405636857-target
source: '1754405563693'
sourceHandle: 'false'
target: '1754405636857'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: template-transform
id: 1754405599173-true-1754405668235-target
source: '1754405599173'
sourceHandle: 'true'
target: '1754405668235'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: template-transform
id: 1754405599173-false-1754405680809-target
source: '1754405599173'
sourceHandle: 'false'
target: '1754405680809'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: template-transform
targetType: variable-aggregator
id: 1754405621378-source-1754405693104-target
source: '1754405621378'
sourceHandle: source
target: '1754405693104'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: template-transform
targetType: variable-aggregator
id: 1754405636857-source-1754405693104-target
source: '1754405636857'
sourceHandle: source
target: '1754405693104'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: template-transform
targetType: variable-aggregator
id: 1754405668235-source-1754405693104-target
source: '1754405668235'
sourceHandle: source
target: '1754405693104'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: template-transform
targetType: variable-aggregator
id: 1754405680809-source-1754405693104-target
source: '1754405680809'
sourceHandle: source
target: '1754405693104'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: variable-aggregator
targetType: end
id: 1754405693104-source-1754405725407-target
source: '1754405693104'
sourceHandle: source
target: '1754405725407'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables:
- label: switch1
max_length: 48
options: []
required: true
type: number
variable: switch1
- allowed_file_extensions: []
allowed_file_types:
- image
allowed_file_upload_methods:
- local_file
- remote_url
label: switch2
max_length: 48
options: []
required: true
type: number
variable: switch2
height: 116
id: '1754405559643'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
cases:
- case_id: 'true'
conditions:
- comparison_operator: '='
id: 6113a363-95e9-4475-a75d-e0ec57c31e42
value: '1'
varType: number
variable_selector:
- '1754405559643'
- switch1
id: 'true'
logical_operator: and
desc: ''
selected: false
title: IF/ELSE
type: if-else
height: 126
id: '1754405563693'
position:
x: 389
y: 195
positionAbsolute:
x: 389
y: 195
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
cases:
- case_id: 'true'
conditions:
- comparison_operator: '='
id: e06b6c04-79a2-4c68-ab49-46ee35596746
value: '1'
varType: number
variable_selector:
- '1754405559643'
- switch2
id: 'true'
logical_operator: and
desc: ''
selected: false
title: IF/ELSE 2
type: if-else
height: 126
id: '1754405599173'
position:
x: 389
y: 426
positionAbsolute:
x: 389
y: 426
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
selected: false
template: switch 1 on
title: switch 1 on
type: template-transform
variables: []
height: 54
id: '1754405621378'
position:
x: 705
y: 149
positionAbsolute:
x: 705
y: 149
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
selected: false
template: switch 1 off
title: switch 1 off
type: template-transform
variables: []
height: 54
id: '1754405636857'
position:
x: 705
y: 303
positionAbsolute:
x: 705
y: 303
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
selected: false
template: switch 2 on
title: switch 2 on
type: template-transform
variables: []
height: 54
id: '1754405668235'
position:
x: 705
y: 426
positionAbsolute:
x: 705
y: 426
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
selected: false
template: switch 2 off
title: switch 2 off
type: template-transform
variables: []
height: 54
id: '1754405680809'
position:
x: 705
y: 549
positionAbsolute:
x: 705
y: 549
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
advanced_settings:
group_enabled: true
groups:
- groupId: a924f802-235c-47c1-85f6-922569221a39
group_name: Group1
output_type: string
variables:
- - '1754405621378'
- output
- - '1754405636857'
- output
- groupId: 940f08b5-dc9a-4907-b17a-38f24d3377e7
group_name: Group2
output_type: string
variables:
- - '1754405668235'
- output
- - '1754405680809'
- output
desc: ''
output_type: string
selected: false
title: Variable Aggregator
type: variable-aggregator
variables:
- - '1754405621378'
- output
- - '1754405636857'
- output
height: 218
id: '1754405693104'
position:
x: 1162
y: 346
positionAbsolute:
x: 1162
y: 346
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1754405693104'
- Group1
- output
value_type: object
variable: group1
- value_selector:
- '1754405693104'
- Group2
- output
value_type: object
variable: group2
selected: false
title: End
type: end
height: 116
id: '1754405725407'
position:
x: 1466
y: 346
positionAbsolute:
x: 1466
y: 346
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -613.9603256773148
y: 113.20026978990225
zoom: 0.5799498272527172

View File

@@ -0,0 +1,188 @@
app:
description: 'Workflow with HTTP Request and Tool nodes for testing auto-mock'
icon: 🔧
icon_background: '#FFEAD5'
mode: workflow
name: http-tool-workflow
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
enabled: false
opening_statement: ''
retriever_resource:
enabled: false
sensitive_word_avoidance:
enabled: false
speech_to_text:
enabled: false
suggested_questions: []
suggested_questions_after_answer:
enabled: false
text_to_speech:
enabled: false
graph:
edges:
- data:
isInIteration: false
isInLoop: false
sourceType: start
targetType: http-request
id: start-to-http
source: 'start_node'
sourceHandle: source
target: 'http_node'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: http-request
targetType: tool
id: http-to-tool
source: 'http_node'
sourceHandle: source
target: 'tool_node'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: tool
targetType: end
id: tool-to-end
source: 'tool_node'
sourceHandle: source
target: 'end_node'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables:
- label: url
max_length: null
options: []
required: true
type: text-input
variable: url
height: 90
id: 'start_node'
position:
x: 30
y: 227
positionAbsolute:
x: 30
y: 227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: 'HTTP Request Node for testing'
title: HTTP Request
type: http-request
method: GET
url: '{{#start_node.url#}}'
authorization:
type: no-auth
headers: ''
params: ''
body:
type: none
data: ''
timeout:
connect: 10
read: 30
write: 30
retry_config:
enabled: false
max_retries: 1
retry_interval: 1000
exponential_backoff:
enabled: false
multiplier: 2
max_interval: 10000
height: 90
id: 'http_node'
position:
x: 334
y: 227
positionAbsolute:
x: 334
y: 227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: 'Tool Node for testing'
title: Tool
type: tool
provider_id: 'builtin'
provider_type: 'builtin'
provider_name: 'Builtin Tools'
tool_name: 'json_parse'
tool_label: 'JSON Parse'
tool_configurations: {}
tool_parameters:
json_string: '{{#http_node.body#}}'
height: 90
id: 'tool_node'
position:
x: 638
y: 227
positionAbsolute:
x: 638
y: 227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- 'http_node'
- status_code
value_type: number
variable: status_code
- value_selector:
- 'tool_node'
- result
value_type: object
variable: parsed_data
selected: false
title: End
type: end
height: 90
id: 'end_node'
position:
x: 942
y: 227
positionAbsolute:
x: 942
y: 227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 0
y: 0
zoom: 0.7

View File

@@ -0,0 +1,233 @@
app:
description: 'this workflow run a loop until num >= 5, it outputs {"num": 5}'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: test_loop
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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: loop
id: 1754827922555-source-1754827949615-target
source: '1754827922555'
sourceHandle: source
target: '1754827949615'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: true
loop_id: '1754827949615'
sourceType: loop-start
targetType: assigner
id: 1754827949615start-source-1754827988715-target
source: 1754827949615start
sourceHandle: source
target: '1754827988715'
targetHandle: target
type: custom
zIndex: 1002
- data:
isInIteration: false
isInLoop: false
sourceType: loop
targetType: end
id: 1754827949615-source-1754828005059-target
source: '1754827949615'
sourceHandle: source
target: '1754828005059'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1754827922555'
position:
x: 30
y: 303
positionAbsolute:
x: 30
y: 303
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
break_conditions:
- comparison_operator:
id: 5969c8b0-0d1e-4057-8652-f62622663435
value: '5'
varType: number
variable_selector:
- '1754827949615'
- num
desc: ''
height: 206
logical_operator: and
loop_count: 10
loop_variables:
- id: 47c15345-4a5d-40a0-8fbb-88f8a4074475
label: num
value: '1'
value_type: constant
var_type: number
selected: false
start_node_id: 1754827949615start
title: Loop
type: loop
width: 508
height: 206
id: '1754827949615'
position:
x: 334
y: 303
positionAbsolute:
x: 334
y: 303
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 508
zIndex: 1
- data:
desc: ''
isInLoop: true
selected: false
title: ''
type: loop-start
draggable: false
height: 48
id: 1754827949615start
parentId: '1754827949615'
position:
x: 60
y: 79
positionAbsolute:
x: 394
y: 382
selectable: false
sourcePosition: right
targetPosition: left
type: custom-loop-start
width: 44
zIndex: 1002
- data:
desc: ''
isInIteration: false
isInLoop: true
items:
- input_type: constant
operation: +=
value: 1
variable_selector:
- '1754827949615'
- num
write_mode: over-write
loop_id: '1754827949615'
selected: false
title: Variable Assigner
type: assigner
version: '2'
height: 86
id: '1754827988715'
parentId: '1754827949615'
position:
x: 204
y: 60
positionAbsolute:
x: 538
y: 363
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
- data:
desc: ''
outputs:
- value_selector:
- '1754827949615'
- num
value_type: number
variable: num
selected: false
title: End
type: end
height: 90
id: '1754828005059'
position:
x: 902
y: 303
positionAbsolute:
x: 902
y: 303
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 0
y: 0
zoom: 0.7

View File

@@ -0,0 +1,258 @@
app:
description: 'This workflow tests the iteration node with flatten_output=False.
It processes [1, 2, 3], outputs [item, item*2] for each iteration.
With flatten_output=False, it should output nested arrays:
```
{"output": [[1, 2], [2, 4], [3, 6]]}
```'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: test_iteration_flatten_disabled
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
enabled: false
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
graph:
edges:
- data:
isInIteration: false
isInLoop: false
sourceType: start
targetType: code
id: start-source-code-target
source: start_node
sourceHandle: source
target: code_node
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: code
targetType: iteration
id: code-source-iteration-target
source: code_node
sourceHandle: source
target: iteration_node
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: true
isInLoop: false
iteration_id: iteration_node
sourceType: iteration-start
targetType: code
id: iteration-start-source-code-inner-target
source: iteration_nodestart
sourceHandle: source
target: code_inner_node
targetHandle: target
type: custom
zIndex: 1002
- data:
isInIteration: false
isInLoop: false
sourceType: iteration
targetType: end
id: iteration-source-end-target
source: iteration_node
sourceHandle: source
target: end_node
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: start_node
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "\ndef main() -> dict:\n return {\n \"result\": [1, 2, 3],\n\
\ }\n"
code_language: python3
desc: ''
outputs:
result:
children: null
type: array[number]
selected: false
title: Generate Array
type: code
variables: []
height: 54
id: code_node
position:
x: 384
y: 282
positionAbsolute:
x: 384
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
error_handle_mode: terminated
flatten_output: false
height: 178
is_parallel: false
iterator_input_type: array[number]
iterator_selector:
- code_node
- result
output_selector:
- code_inner_node
- result
output_type: array[array[number]]
parallel_nums: 10
selected: false
start_node_id: iteration_nodestart
title: Iteration with Flatten Disabled
type: iteration
width: 388
height: 178
id: iteration_node
position:
x: 684
y: 282
positionAbsolute:
x: 684
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 388
zIndex: 1
- data:
desc: ''
isInIteration: true
selected: false
title: ''
type: iteration-start
draggable: false
height: 48
id: iteration_nodestart
parentId: iteration_node
position:
x: 24
y: 68
positionAbsolute:
x: 708
y: 350
selectable: false
sourcePosition: right
targetPosition: left
type: custom-iteration-start
width: 44
zIndex: 1002
- data:
code: "\ndef main(arg1: int) -> dict:\n return {\n \"result\": [arg1,\
\ arg1 * 2],\n }\n"
code_language: python3
desc: ''
isInIteration: true
isInLoop: false
iteration_id: iteration_node
outputs:
result:
children: null
type: array[number]
selected: false
title: Generate Pair
type: code
variables:
- value_selector:
- iteration_node
- item
value_type: number
variable: arg1
height: 54
id: code_inner_node
parentId: iteration_node
position:
x: 128
y: 68
positionAbsolute:
x: 812
y: 350
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
- data:
desc: ''
outputs:
- value_selector:
- iteration_node
- output
value_type: array[array[number]]
variable: output
selected: false
title: End
type: end
height: 90
id: end_node
position:
x: 1132
y: 282
positionAbsolute:
x: 1132
y: 282
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -476
y: 3
zoom: 1

View File

@@ -0,0 +1,258 @@
app:
description: 'This workflow tests the iteration node with flatten_output=True.
It processes [1, 2, 3], outputs [item, item*2] for each iteration.
With flatten_output=True (default), it should output:
```
{"output": [1, 2, 2, 4, 3, 6]}
```'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: test_iteration_flatten_enabled
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
workflow:
conversation_variables: []
environment_variables: []
features:
file_upload:
enabled: false
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
graph:
edges:
- data:
isInIteration: false
isInLoop: false
sourceType: start
targetType: code
id: start-source-code-target
source: start_node
sourceHandle: source
target: code_node
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: code
targetType: iteration
id: code-source-iteration-target
source: code_node
sourceHandle: source
target: iteration_node
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: true
isInLoop: false
iteration_id: iteration_node
sourceType: iteration-start
targetType: code
id: iteration-start-source-code-inner-target
source: iteration_nodestart
sourceHandle: source
target: code_inner_node
targetHandle: target
type: custom
zIndex: 1002
- data:
isInIteration: false
isInLoop: false
sourceType: iteration
targetType: end
id: iteration-source-end-target
source: iteration_node
sourceHandle: source
target: end_node
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: start_node
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "\ndef main() -> dict:\n return {\n \"result\": [1, 2, 3],\n\
\ }\n"
code_language: python3
desc: ''
outputs:
result:
children: null
type: array[number]
selected: false
title: Generate Array
type: code
variables: []
height: 54
id: code_node
position:
x: 384
y: 282
positionAbsolute:
x: 384
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
error_handle_mode: terminated
flatten_output: true
height: 178
is_parallel: false
iterator_input_type: array[number]
iterator_selector:
- code_node
- result
output_selector:
- code_inner_node
- result
output_type: array[array[number]]
parallel_nums: 10
selected: false
start_node_id: iteration_nodestart
title: Iteration with Flatten Enabled
type: iteration
width: 388
height: 178
id: iteration_node
position:
x: 684
y: 282
positionAbsolute:
x: 684
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 388
zIndex: 1
- data:
desc: ''
isInIteration: true
selected: false
title: ''
type: iteration-start
draggable: false
height: 48
id: iteration_nodestart
parentId: iteration_node
position:
x: 24
y: 68
positionAbsolute:
x: 708
y: 350
selectable: false
sourcePosition: right
targetPosition: left
type: custom-iteration-start
width: 44
zIndex: 1002
- data:
code: "\ndef main(arg1: int) -> dict:\n return {\n \"result\": [arg1,\
\ arg1 * 2],\n }\n"
code_language: python3
desc: ''
isInIteration: true
isInLoop: false
iteration_id: iteration_node
outputs:
result:
children: null
type: array[number]
selected: false
title: Generate Pair
type: code
variables:
- value_selector:
- iteration_node
- item
value_type: number
variable: arg1
height: 54
id: code_inner_node
parentId: iteration_node
position:
x: 128
y: 68
positionAbsolute:
x: 812
y: 350
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
- data:
desc: ''
outputs:
- value_selector:
- iteration_node
- output
value_type: array[number]
variable: output
selected: false
title: End
type: end
height: 90
id: end_node
position:
x: 1132
y: 282
positionAbsolute:
x: 1132
y: 282
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -476
y: 3
zoom: 1

View File

@@ -0,0 +1,271 @@
app:
description: ''
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: loop_contains_answer
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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: loop
id: 1755203854938-source-1755203872773-target
source: '1755203854938'
sourceHandle: source
target: '1755203872773'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: true
loop_id: '1755203872773'
sourceType: loop-start
targetType: assigner
id: 1755203872773start-source-1755203898151-target
source: 1755203872773start
sourceHandle: source
target: '1755203898151'
targetHandle: target
type: custom
zIndex: 1002
- data:
isInIteration: false
isInLoop: false
sourceType: loop
targetType: answer
id: 1755203872773-source-1755203915300-target
source: '1755203872773'
sourceHandle: source
target: '1755203915300'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: true
loop_id: '1755203872773'
sourceType: assigner
targetType: answer
id: 1755203898151-source-1755204039754-target
source: '1755203898151'
sourceHandle: source
target: '1755204039754'
targetHandle: target
type: custom
zIndex: 1002
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1755203854938'
position:
x: 30
y: 312.5
positionAbsolute:
x: 30
y: 312.5
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
break_conditions:
- comparison_operator:
id: cd78b3ba-ad1d-4b73-8c8b-08391bb5ed46
value: '2'
varType: number
variable_selector:
- '1755203872773'
- i
desc: ''
error_handle_mode: terminated
height: 225
logical_operator: and
loop_count: 10
loop_variables:
- id: e163b557-327f-494f-be70-87bd15791168
label: i
value: '0'
value_type: constant
var_type: number
selected: false
start_node_id: 1755203872773start
title: Loop
type: loop
width: 884
height: 225
id: '1755203872773'
position:
x: 334
y: 312.5
positionAbsolute:
x: 334
y: 312.5
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 884
zIndex: 1
- data:
desc: ''
isInLoop: true
selected: false
title: ''
type: loop-start
draggable: false
height: 48
id: 1755203872773start
parentId: '1755203872773'
position:
x: 60
y: 88.5
positionAbsolute:
x: 394
y: 401
selectable: false
sourcePosition: right
targetPosition: left
type: custom-loop-start
width: 44
zIndex: 1002
- data:
desc: ''
isInIteration: false
isInLoop: true
items:
- input_type: constant
operation: +=
value: 1
variable_selector:
- '1755203872773'
- i
write_mode: over-write
loop_id: '1755203872773'
selected: false
title: Variable Assigner
type: assigner
version: '2'
height: 86
id: '1755203898151'
parentId: '1755203872773'
position:
x: 229.43200275622496
y: 80.62650120584834
positionAbsolute:
x: 563.432002756225
y: 393.12650120584834
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
- data:
answer: '{{#sys.query#}} + {{#1755203872773.i#}}'
desc: ''
selected: false
title: Answer 2
type: answer
variables: []
height: 123
id: '1755203915300'
position:
x: 1278
y: 312.5
positionAbsolute:
x: 1278
y: 312.5
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#1755203872773.i#}}
'
desc: ''
isInIteration: false
isInLoop: true
loop_id: '1755203872773'
selected: false
title: Answer 2
type: answer
variables: []
height: 105
id: '1755204039754'
parentId: '1755203872773'
position:
x: 574.7590072350902
y: 71.35800068905621
positionAbsolute:
x: 908.7590072350902
y: 383.8580006890562
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
viewport:
x: -165.28002407881013
y: 113.20590785323213
zoom: 0.6291285886277216

View File

@@ -0,0 +1,249 @@
app:
description: 'This chatflow contains 2 LLM, LLM 1 always speak English, LLM 2 always
speak Chinese.
2 LLMs run parallel, but LLM 2 will output before LLM 1, so we can see all LLM
2 chunks, then LLM 1 chunks.
All chunks should be send before Answer Node started.'
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: test_parallel_streaming
use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: langgenius/openai:0.0.30@1f5ecdef108418a467e54da2dcf5de2cf22b47632abc8633194ac9fb96317ede
kind: app
version: 0.3.1
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_size_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: 1754336720803-source-1754339718571-target
source: '1754336720803'
sourceHandle: source
target: '1754339718571'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: start
targetType: llm
id: 1754336720803-source-1754339725656-target
source: '1754336720803'
sourceHandle: source
target: '1754339725656'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: llm
targetType: answer
id: 1754339718571-source-answer-target
source: '1754339718571'
sourceHandle: source
target: answer
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: llm
targetType: answer
id: 1754339725656-source-answer-target
source: '1754339725656'
sourceHandle: source
target: answer
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1754336720803'
position:
x: 30
y: 252.5
positionAbsolute:
x: 30
y: 252.5
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#1754339725656.text#}}{{#1754339718571.text#}}'
desc: ''
selected: true
title: Answer
type: answer
variables: []
height: 105
id: answer
position:
x: 638
y: 252.5
positionAbsolute:
x: 638
y: 252.5
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
memory:
query_prompt_template: '{{#sys.query#}}
{{#sys.files#}}'
role_prefix:
assistant: ''
user: ''
window:
enabled: false
size: 50
model:
completion_params:
temperature: 0.7
mode: chat
name: gpt-4o
provider: langgenius/openai/openai
prompt_template:
- id: e8ef0664-d560-4017-85f2-9a40187d8a53
role: system
text: Always speak English.
selected: false
title: LLM 1
type: llm
variables: []
vision:
enabled: false
height: 90
id: '1754339718571'
position:
x: 334
y: 252.5
positionAbsolute:
x: 334
y: 252.5
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
memory:
query_prompt_template: '{{#sys.query#}}
{{#sys.files#}}'
role_prefix:
assistant: ''
user: ''
window:
enabled: false
size: 50
model:
completion_params:
temperature: 0.7
mode: chat
name: gpt-4o
provider: langgenius/openai/openai
prompt_template:
- id: 326169b2-0817-4bc2-83d6-baf5c9efd175
role: system
text: Always speak Chinese.
selected: false
title: LLM 2
type: llm
variables: []
vision:
enabled: false
height: 90
id: '1754339725656'
position:
x: 334
y: 382.5
positionAbsolute:
x: 334
y: 382.5
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: -108.49999999999994
y: 229.5
zoom: 0.7

View File

@@ -0,0 +1,760 @@
app:
description: ''
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: search_dify_from_2023_to_2025
use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: langgenius/perplexity:1.0.1@32531e4a1ec68754e139f29f04eaa7f51130318a908d11382a27dc05ec8d91e3
kind: app
version: 0.3.1
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_size_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: loop
id: 1754979518055-source-1754979524910-target
selected: false
source: '1754979518055'
sourceHandle: source
target: '1754979524910'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: true
loop_id: '1754979524910'
sourceType: loop-start
targetType: tool
id: 1754979524910start-source-1754979561786-target
source: 1754979524910start
sourceHandle: source
target: '1754979561786'
targetHandle: target
type: custom
zIndex: 1002
- data:
isInIteration: false
isInLoop: true
loop_id: '1754979524910'
sourceType: tool
targetType: assigner
id: 1754979561786-source-1754979613854-target
source: '1754979561786'
sourceHandle: source
target: '1754979613854'
targetHandle: target
type: custom
zIndex: 1002
- data:
isInIteration: false
isInLoop: false
sourceType: loop
targetType: answer
id: 1754979524910-source-1754979638585-target
source: '1754979524910'
sourceHandle: source
target: '1754979638585'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1754979518055'
position:
x: 80
y: 282
positionAbsolute:
x: 80
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
break_conditions:
- comparison_operator: '='
id: 0dcbf179-29cf-4eed-bab5-94fec50c3990
value: '2025'
varType: number
variable_selector:
- '1754979524910'
- year
desc: ''
error_handle_mode: terminated
height: 464
logical_operator: and
loop_count: 10
loop_variables:
- id: ca43e695-1c11-4106-ad66-2d7a7ce28836
label: year
value: '2023'
value_type: constant
var_type: number
- id: 3a67e4ad-9fa1-49cb-8aaa-a40fdc1ac180
label: res
value: '[]'
value_type: constant
var_type: array[string]
selected: false
start_node_id: 1754979524910start
title: Loop
type: loop
width: 779
height: 464
id: '1754979524910'
position:
x: 384
y: 282
positionAbsolute:
x: 384
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 779
zIndex: 1
- data:
desc: ''
isInLoop: true
selected: false
title: ''
type: loop-start
draggable: false
height: 48
id: 1754979524910start
parentId: '1754979524910'
position:
x: 24
y: 68
positionAbsolute:
x: 408
y: 350
selectable: false
sourcePosition: right
targetPosition: left
type: custom-loop-start
width: 44
zIndex: 1002
- data:
desc: ''
isInIteration: false
isInLoop: true
is_team_authorization: true
loop_id: '1754979524910'
output_schema: null
paramSchemas:
- auto_generate: null
default: null
form: llm
human_description:
en_US: The text query to be processed by the AI model.
ja_JP: The text query to be processed by the AI model.
pt_BR: The text query to be processed by the AI model.
zh_Hans: 要由 AI 模型处理的文本查询。
label:
en_US: Query
ja_JP: Query
pt_BR: Query
zh_Hans: 查询
llm_description: ''
max: null
min: null
name: query
options: []
placeholder: null
precision: null
required: true
scope: null
template: null
type: string
- auto_generate: null
default: sonar
form: form
human_description:
en_US: The Perplexity AI model to use for generating the response.
ja_JP: The Perplexity AI model to use for generating the response.
pt_BR: The Perplexity AI model to use for generating the response.
zh_Hans: 用于生成响应的 Perplexity AI 模型。
label:
en_US: Model Name
ja_JP: Model Name
pt_BR: Model Name
zh_Hans: 模型名称
llm_description: ''
max: null
min: null
name: model
options:
- icon: ''
label:
en_US: sonar
ja_JP: sonar
pt_BR: sonar
zh_Hans: sonar
value: sonar
- icon: ''
label:
en_US: sonar-pro
ja_JP: sonar-pro
pt_BR: sonar-pro
zh_Hans: sonar-pro
value: sonar-pro
- icon: ''
label:
en_US: sonar-reasoning
ja_JP: sonar-reasoning
pt_BR: sonar-reasoning
zh_Hans: sonar-reasoning
value: sonar-reasoning
- icon: ''
label:
en_US: sonar-reasoning-pro
ja_JP: sonar-reasoning-pro
pt_BR: sonar-reasoning-pro
zh_Hans: sonar-reasoning-pro
value: sonar-reasoning-pro
- icon: ''
label:
en_US: sonar-deep-research
ja_JP: sonar-deep-research
pt_BR: sonar-deep-research
zh_Hans: sonar-deep-research
value: sonar-deep-research
placeholder: null
precision: null
required: false
scope: null
template: null
type: select
- auto_generate: null
default: 4096
form: form
human_description:
en_US: The maximum number of tokens to generate in the response.
ja_JP: The maximum number of tokens to generate in the response.
pt_BR: O número máximo de tokens a serem gerados na resposta.
zh_Hans: 在响应中生成的最大令牌数。
label:
en_US: Max Tokens
ja_JP: Max Tokens
pt_BR: Máximo de Tokens
zh_Hans: 最大令牌数
llm_description: ''
max: 4096
min: 1
name: max_tokens
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: number
- auto_generate: null
default: 0.7
form: form
human_description:
en_US: Controls randomness in the output. Lower values make the output
more focused and deterministic.
ja_JP: Controls randomness in the output. Lower values make the output
more focused and deterministic.
pt_BR: Controls randomness in the output. Lower values make the output
more focused and deterministic.
zh_Hans: 控制输出的随机性。较低的值使输出更加集中和确定。
label:
en_US: Temperature
ja_JP: Temperature
pt_BR: Temperatura
zh_Hans: 温度
llm_description: ''
max: 1
min: 0
name: temperature
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: number
- auto_generate: null
default: 5
form: form
human_description:
en_US: The number of top results to consider for response generation.
ja_JP: The number of top results to consider for response generation.
pt_BR: The number of top results to consider for response generation.
zh_Hans: 用于生成响应的顶部结果数量。
label:
en_US: Top K
ja_JP: Top K
pt_BR: Top K
zh_Hans: 取样数量
llm_description: ''
max: 100
min: 1
name: top_k
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: number
- auto_generate: null
default: 1
form: form
human_description:
en_US: Controls diversity via nucleus sampling.
ja_JP: Controls diversity via nucleus sampling.
pt_BR: Controls diversity via nucleus sampling.
zh_Hans: 通过核心采样控制多样性。
label:
en_US: Top P
ja_JP: Top P
pt_BR: Top P
zh_Hans: Top P
llm_description: ''
max: 1
min: 0.1
name: top_p
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: number
- auto_generate: null
default: 0
form: form
human_description:
en_US: Positive values penalize new tokens based on whether they appear
in the text so far.
ja_JP: Positive values penalize new tokens based on whether they appear
in the text so far.
pt_BR: Positive values penalize new tokens based on whether they appear
in the text so far.
zh_Hans: 正值会根据新词元是否已经出现在文本中来对其进行惩罚。
label:
en_US: Presence Penalty
ja_JP: Presence Penalty
pt_BR: Presence Penalty
zh_Hans: 存在惩罚
llm_description: ''
max: 1
min: -1
name: presence_penalty
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: number
- auto_generate: null
default: 1
form: form
human_description:
en_US: Positive values penalize new tokens based on their existing frequency
in the text so far.
ja_JP: Positive values penalize new tokens based on their existing frequency
in the text so far.
pt_BR: Positive values penalize new tokens based on their existing frequency
in the text so far.
zh_Hans: 正值会根据新词元在文本中已经出现的频率来对其进行惩罚。
label:
en_US: Frequency Penalty
ja_JP: Frequency Penalty
pt_BR: Frequency Penalty
zh_Hans: 频率惩罚
llm_description: ''
max: 1
min: 0.1
name: frequency_penalty
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: number
- auto_generate: null
default: 0
form: form
human_description:
en_US: Whether to return images in the response.
ja_JP: Whether to return images in the response.
pt_BR: Whether to return images in the response.
zh_Hans: 是否在响应中返回图像。
label:
en_US: Return Images
ja_JP: Return Images
pt_BR: Return Images
zh_Hans: 返回图像
llm_description: ''
max: null
min: null
name: return_images
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: boolean
- auto_generate: null
default: 0
form: form
human_description:
en_US: Whether to return related questions in the response.
ja_JP: Whether to return related questions in the response.
pt_BR: Whether to return related questions in the response.
zh_Hans: 是否在响应中返回相关问题。
label:
en_US: Return Related Questions
ja_JP: Return Related Questions
pt_BR: Return Related Questions
zh_Hans: 返回相关问题
llm_description: ''
max: null
min: null
name: return_related_questions
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: boolean
- auto_generate: null
default: ''
form: form
human_description:
en_US: Domain to filter the search results. Use comma to separate multiple
domains. Up to 3 domains are supported.
ja_JP: Domain to filter the search results. Use comma to separate multiple
domains. Up to 3 domains are supported.
pt_BR: Domain to filter the search results. Use comma to separate multiple
domains. Up to 3 domains are supported.
zh_Hans: 用于过滤搜索结果的域名。使用逗号分隔多个域名。最多支持3个域名。
label:
en_US: Search Domain Filter
ja_JP: Search Domain Filter
pt_BR: Search Domain Filter
zh_Hans: 搜索域过滤器
llm_description: ''
max: null
min: null
name: search_domain_filter
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: string
- auto_generate: null
default: month
form: form
human_description:
en_US: Filter for search results based on recency.
ja_JP: Filter for search results based on recency.
pt_BR: Filter for search results based on recency.
zh_Hans: 基于时间筛选搜索结果。
label:
en_US: Search Recency Filter
ja_JP: Search Recency Filter
pt_BR: Search Recency Filter
zh_Hans: 搜索时间过滤器
llm_description: ''
max: null
min: null
name: search_recency_filter
options:
- icon: ''
label:
en_US: Day
ja_JP: Day
pt_BR: Day
zh_Hans:
value: day
- icon: ''
label:
en_US: Week
ja_JP: Week
pt_BR: Week
zh_Hans:
value: week
- icon: ''
label:
en_US: Month
ja_JP: Month
pt_BR: Month
zh_Hans:
value: month
- icon: ''
label:
en_US: Year
ja_JP: Year
pt_BR: Year
zh_Hans:
value: year
placeholder: null
precision: null
required: false
scope: null
template: null
type: select
- auto_generate: null
default: low
form: form
human_description:
en_US: Determines how much search context is retrieved for the model.
ja_JP: Determines how much search context is retrieved for the model.
pt_BR: Determines how much search context is retrieved for the model.
zh_Hans: 确定模型检索的搜索上下文量。
label:
en_US: Search Context Size
ja_JP: Search Context Size
pt_BR: Search Context Size
zh_Hans: 搜索上下文大小
llm_description: ''
max: null
min: null
name: search_context_size
options:
- icon: ''
label:
en_US: Low
ja_JP: Low
pt_BR: Low
zh_Hans:
value: low
- icon: ''
label:
en_US: Medium
ja_JP: Medium
pt_BR: Medium
zh_Hans: 中等
value: medium
- icon: ''
label:
en_US: High
ja_JP: High
pt_BR: High
zh_Hans:
value: high
placeholder: null
precision: null
required: false
scope: null
template: null
type: select
params:
frequency_penalty: ''
max_tokens: ''
model: ''
presence_penalty: ''
query: ''
return_images: ''
return_related_questions: ''
search_context_size: ''
search_domain_filter: ''
search_recency_filter: ''
temperature: ''
top_k: ''
top_p: ''
provider_id: langgenius/perplexity/perplexity
provider_name: langgenius/perplexity/perplexity
provider_type: builtin
selected: true
title: Perplexity Search
tool_configurations:
frequency_penalty:
type: constant
value: 1
max_tokens:
type: constant
value: 4096
model:
type: constant
value: sonar
presence_penalty:
type: constant
value: 0
return_images:
type: constant
value: false
return_related_questions:
type: constant
value: false
search_context_size:
type: constant
value: low
search_domain_filter:
type: mixed
value: ''
search_recency_filter:
type: constant
value: month
temperature:
type: constant
value: 0.7
top_k:
type: constant
value: 5
top_p:
type: constant
value: 1
tool_description: Search information using Perplexity AI's language models.
tool_label: Perplexity Search
tool_name: perplexity
tool_node_version: '2'
tool_parameters:
query:
type: mixed
value: Dify.AI {{#1754979524910.year#}}
type: tool
height: 376
id: '1754979561786'
parentId: '1754979524910'
position:
x: 215
y: 68
positionAbsolute:
x: 599
y: 350
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
- data:
desc: ''
isInIteration: false
isInLoop: true
items:
- input_type: constant
operation: +=
value: 1
variable_selector:
- '1754979524910'
- year
write_mode: over-write
- input_type: variable
operation: append
value:
- '1754979561786'
- text
variable_selector:
- '1754979524910'
- res
write_mode: over-write
loop_id: '1754979524910'
selected: false
title: Variable Assigner
type: assigner
version: '2'
height: 112
id: '1754979613854'
parentId: '1754979524910'
position:
x: 510
y: 103
positionAbsolute:
x: 894
y: 385
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
zIndex: 1002
- data:
answer: '{{#1754979524910.res#}}'
desc: ''
selected: false
title: Answer
type: answer
variables: []
height: 105
id: '1754979638585'
position:
x: 1223
y: 282
positionAbsolute:
x: 1223
y: 282
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 30.39180609762718
y: -45.20947076791785
zoom: 0.784584097896752

View File

@@ -0,0 +1,124 @@
app:
description: 'This workflow receive a "query" and output the same content.'
icon: 🤖
icon_background: '#FFEAD5'
mode: workflow
name: echo
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
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_size_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: end
id: 1754154032319-source-1754154034161-target
source: '1754154032319'
sourceHandle: source
target: '1754154034161'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables:
- label: query
max_length: null
options: []
required: true
type: text-input
variable: query
height: 90
id: '1754154032319'
position:
x: 30
y: 227
positionAbsolute:
x: 30
y: 227
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
outputs:
- value_selector:
- '1754154032319'
- query
value_type: string
variable: query
selected: true
title: End
type: end
height: 90
id: '1754154034161'
position:
x: 334
y: 227
positionAbsolute:
x: 334
y: 227
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 0
y: 0
zoom: 0.7

View File

@@ -0,0 +1,222 @@
app:
description: 'this is a chatflow with 2 answer nodes.
it''s outouts should like:
```
--- answer 1 ---
foo
--- answer 2 ---
<llm''s outputs>
```'
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: test-answer-order
use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: langgenius/openai:0.2.6@e2665624a156f52160927bceac9e169bd7e5ae6b936ae82575e14c90af390e6e
version: null
kind: app
version: 0.4.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_size_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: answer
targetType: answer
id: 1759052466526-source-1759052469368-target
source: '1759052466526'
sourceHandle: source
target: '1759052469368'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: start
targetType: llm
id: 1759052439553-source-1759052580454-target
source: '1759052439553'
sourceHandle: source
target: '1759052580454'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: answer
id: 1759052580454-source-1759052466526-target
source: '1759052580454'
sourceHandle: source
target: '1759052466526'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
selected: false
title: Start
type: start
variables: []
height: 52
id: '1759052439553'
position:
x: 30
y: 242
positionAbsolute:
x: 30
y: 242
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
answer: '--- answer 1 ---
foo
'
selected: false
title: Answer
type: answer
variables: []
height: 100
id: '1759052466526'
position:
x: 632
y: 242
positionAbsolute:
x: 632
y: 242
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
answer: '--- answer 2 ---
{{#1759052580454.text#}}
'
selected: false
title: Answer 2
type: answer
variables: []
height: 103
id: '1759052469368'
position:
x: 934
y: 242
positionAbsolute:
x: 934
y: 242
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
context:
enabled: false
variable_selector: []
model:
completion_params:
temperature: 0.7
mode: chat
name: gpt-4o
provider: langgenius/openai/openai
prompt_template:
- id: 5c1d873b-06b2-4dce-939e-672882bbd7c0
role: system
text: ''
- role: user
text: '{{#sys.query#}}'
selected: false
title: LLM
type: llm
vision:
enabled: false
height: 88
id: '1759052580454'
position:
x: 332
y: 242
positionAbsolute:
x: 332
y: 242
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
viewport:
x: 126.2797574512839
y: 289.55932160537446
zoom: 1.0743222672006216
rag_pipeline_variables: []

View File

@@ -0,0 +1,259 @@
app:
description: "if sys.query == 'hello':\n print(\"contains 'hello'\" + \"{{#llm.text#}}\"\
)\nelse:\n print(\"{{#llm.text#}}\")"
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: test_complex_branch
use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: langgenius/openai:0.0.30@1f5ecdef108418a467e54da2dcf5de2cf22b47632abc8633194ac9fb96317ede
kind: app
version: 0.3.1
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_size_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: 1754336720803-source-1755502773326-target
source: '1754336720803'
sourceHandle: source
target: '1755502773326'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: start
targetType: llm
id: 1754336720803-source-1755502777322-target
source: '1754336720803'
sourceHandle: source
target: '1755502777322'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: answer
id: 1755502773326-true-1755502793218-target
source: '1755502773326'
sourceHandle: 'true'
target: '1755502793218'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: if-else
targetType: answer
id: 1755502773326-false-1755502801806-target
source: '1755502773326'
sourceHandle: 'false'
target: '1755502801806'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: llm
targetType: answer
id: 1755502777322-source-1755502801806-target
source: '1755502777322'
sourceHandle: source
target: '1755502801806'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1754336720803'
position:
x: 30
y: 252.5
positionAbsolute:
x: 30
y: 252.5
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
cases:
- case_id: 'true'
conditions:
- comparison_operator: contains
id: b3737f91-20e7-491e-92a7-54823d5edd92
value: hello
varType: string
variable_selector:
- sys
- query
id: 'true'
logical_operator: and
desc: ''
selected: false
title: IF/ELSE
type: if-else
height: 126
id: '1755502773326'
position:
x: 334
y: 252.5
positionAbsolute:
x: 334
y: 252.5
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
memory:
query_prompt_template: '{{#sys.query#}}
{{#sys.files#}}'
role_prefix:
assistant: ''
user: ''
window:
enabled: false
size: 50
model:
completion_params:
temperature: 0.7
mode: chat
name: chatgpt-4o-latest
provider: langgenius/openai/openai
prompt_template:
- role: system
text: ''
selected: false
title: LLM
type: llm
variables: []
vision:
enabled: false
height: 90
id: '1755502777322'
position:
x: 334
y: 483.6689693406501
positionAbsolute:
x: 334
y: 483.6689693406501
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: contains 'hello'
desc: ''
selected: false
title: Answer
type: answer
variables: []
height: 102
id: '1755502793218'
position:
x: 694.1985482199078
y: 161.30990288845152
positionAbsolute:
x: 694.1985482199078
y: 161.30990288845152
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#1755502777322.text#}}'
desc: ''
selected: false
title: Answer 2
type: answer
variables: []
height: 105
id: '1755502801806'
position:
x: 694.1985482199078
y: 410.4655994626136
positionAbsolute:
x: 694.1985482199078
y: 410.4655994626136
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 101.25550613189648
y: -63.115847717334475
zoom: 0.9430848603527678

View File

@@ -0,0 +1,163 @@
app:
description: This chatflow assign sys.query to a conversation variable "str", then
answer "str".
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: test_streaming_conversation_variables
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.3.1
workflow:
conversation_variables:
- description: ''
id: e208ec58-4503-48a9-baf8-17aae67e5fa0
name: str
selector:
- conversation
- str
value: default
value_type: string
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_size_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: assigner
id: 1755316734941-source-1755316749068-target
source: '1755316734941'
sourceHandle: source
target: '1755316749068'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: assigner
targetType: answer
id: 1755316749068-source-answer-target
source: '1755316749068'
sourceHandle: source
target: answer
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: Start
type: start
variables: []
height: 54
id: '1755316734941'
position:
x: 30
y: 253
positionAbsolute:
x: 30
y: 253
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#conversation.str#}}'
desc: ''
selected: false
title: Answer
type: answer
variables: []
height: 106
id: answer
position:
x: 638
y: 253
positionAbsolute:
x: 638
y: 253
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
items:
- input_type: variable
operation: over-write
value:
- sys
- query
variable_selector:
- conversation
- str
write_mode: over-write
selected: false
title: Variable Assigner
type: assigner
version: '2'
height: 86
id: '1755316749068'
position:
x: 334
y: 253
positionAbsolute:
x: 334
y: 253
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 0
y: 0
zoom: 0.7

View File

@@ -0,0 +1,316 @@
app:
description: 'This chatflow receives a sys.query, writes it into the `answer` variable,
and then outputs the `answer` variable.
`answer` is a conversation variable with a blank default value; it will be updated
in an iteration node.
if this chatflow works correctly, it will output the `sys.query` as the same.'
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: update-conversation-variable-in-iteration
use_icon_as_answer_icon: false
dependencies: []
kind: app
version: 0.4.0
workflow:
conversation_variables:
- description: ''
id: c30af82d-b2ec-417d-a861-4dd78584faa4
name: answer
selector:
- conversation
- answer
value: ''
value_type: string
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_size_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: code
id: 1759032354471-source-1759032363865-target
source: '1759032354471'
sourceHandle: source
target: '1759032363865'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: code
targetType: iteration
id: 1759032363865-source-1759032379989-target
source: '1759032363865'
sourceHandle: source
target: '1759032379989'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: true
isInLoop: false
iteration_id: '1759032379989'
sourceType: iteration-start
targetType: assigner
id: 1759032379989start-source-1759032394460-target
source: 1759032379989start
sourceHandle: source
target: '1759032394460'
targetHandle: target
type: custom
zIndex: 1002
- data:
isInIteration: false
isInLoop: false
sourceType: iteration
targetType: answer
id: 1759032379989-source-1759032410331-target
source: '1759032379989'
sourceHandle: source
target: '1759032410331'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: true
isInLoop: false
iteration_id: '1759032379989'
sourceType: assigner
targetType: code
id: 1759032394460-source-1759032476318-target
source: '1759032394460'
sourceHandle: source
target: '1759032476318'
targetHandle: target
type: custom
zIndex: 1002
nodes:
- data:
selected: false
title: Start
type: start
variables: []
height: 52
id: '1759032354471'
position:
x: 30
y: 302
positionAbsolute:
x: 30
y: 302
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
code: "\ndef main():\n return {\n \"result\": [1],\n }\n"
code_language: python3
outputs:
result:
children: null
type: array[number]
selected: false
title: Code
type: code
variables: []
height: 52
id: '1759032363865'
position:
x: 332
y: 302
positionAbsolute:
x: 332
y: 302
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
error_handle_mode: terminated
height: 204
is_parallel: false
iterator_input_type: array[number]
iterator_selector:
- '1759032363865'
- result
output_selector:
- '1759032476318'
- result
output_type: array[string]
parallel_nums: 10
selected: false
start_node_id: 1759032379989start
title: Iteration
type: iteration
width: 808
height: 204
id: '1759032379989'
position:
x: 634
y: 302
positionAbsolute:
x: 634
y: 302
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 808
zIndex: 1
- data:
desc: ''
isInIteration: true
selected: false
title: ''
type: iteration-start
draggable: false
height: 48
id: 1759032379989start
parentId: '1759032379989'
position:
x: 60
y: 78
positionAbsolute:
x: 694
y: 380
selectable: false
sourcePosition: right
targetPosition: left
type: custom-iteration-start
width: 44
zIndex: 1002
- data:
isInIteration: true
isInLoop: false
items:
- input_type: variable
operation: over-write
value:
- sys
- query
variable_selector:
- conversation
- answer
write_mode: over-write
iteration_id: '1759032379989'
selected: false
title: Variable Assigner
type: assigner
version: '2'
height: 84
id: '1759032394460'
parentId: '1759032379989'
position:
x: 204
y: 60
positionAbsolute:
x: 838
y: 362
sourcePosition: right
targetPosition: left
type: custom
width: 242
zIndex: 1002
- data:
answer: '{{#conversation.answer#}}'
selected: false
title: Answer
type: answer
variables: []
height: 104
id: '1759032410331'
position:
x: 1502
y: 302
positionAbsolute:
x: 1502
y: 302
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 242
- data:
code: "\ndef main():\n return {\n \"result\": '',\n }\n"
code_language: python3
isInIteration: true
isInLoop: false
iteration_id: '1759032379989'
outputs:
result:
children: null
type: string
selected: false
title: Code 2
type: code
variables: []
height: 52
id: '1759032476318'
parentId: '1759032379989'
position:
x: 506
y: 76
positionAbsolute:
x: 1140
y: 378
sourcePosition: right
targetPosition: left
type: custom
width: 242
zIndex: 1002
viewport:
x: 120.39999999999998
y: 85.20000000000005
zoom: 0.7
rag_pipeline_variables: []