├── DSLs
├── DeepGemini.yml
├── deep-research.yml
├── simple-kimi.yml
├── 不同类型的异常处理.yml
├── 意图识别.yml
└── 长文本写作 (long-form writing).yml
├── README.md
└── imgs
├── DeepGemini.png
├── deep-research.png
├── error-handling.png
├── intent-recognition.png
├── long-form-writing.png
└── simple-kimi.png
/DSLs/DeepGemini.yml:
--------------------------------------------------------------------------------
1 | app:
2 | description: ''
3 | icon: 🤖
4 | icon_background: '#FFEAD5'
5 | mode: advanced-chat
6 | name: DeepGemini
7 | use_icon_as_answer_icon: false
8 | dependencies:
9 | - current_identifier: null
10 | type: marketplace
11 | value:
12 | marketplace_plugin_unique_identifier: langgenius/gemini:0.0.5@a0f932ba5903a8e18c129462280aa596f8832d3e02ac9f338c188386ee623d18
13 | - current_identifier: null
14 | type: marketplace
15 | value:
16 | marketplace_plugin_unique_identifier: langgenius/deepseek:0.0.5@fd6efd37c2a931911de8ab9ca3ba2da303bef146d45ee87ad896b04b36d09403
17 | kind: app
18 | version: 0.1.5
19 | workflow:
20 | conversation_variables: []
21 | environment_variables: []
22 | features:
23 | file_upload:
24 | allowed_file_extensions:
25 | - .JPG
26 | - .JPEG
27 | - .PNG
28 | - .GIF
29 | - .WEBP
30 | - .SVG
31 | allowed_file_types:
32 | - image
33 | allowed_file_upload_methods:
34 | - local_file
35 | - remote_url
36 | enabled: false
37 | fileUploadConfig:
38 | audio_file_size_limit: 50
39 | batch_count_limit: 5
40 | file_size_limit: 15
41 | image_file_size_limit: 5
42 | video_file_size_limit: 100
43 | workflow_file_upload_limit: 10
44 | image:
45 | enabled: false
46 | number_limits: 3
47 | transfer_methods:
48 | - local_file
49 | - remote_url
50 | number_limits: 3
51 | opening_statement: ''
52 | retriever_resource:
53 | enabled: true
54 | sensitive_word_avoidance:
55 | enabled: false
56 | speech_to_text:
57 | enabled: false
58 | suggested_questions: []
59 | suggested_questions_after_answer:
60 | enabled: false
61 | text_to_speech:
62 | enabled: false
63 | language: ''
64 | voice: ''
65 | graph:
66 | edges:
67 | - data:
68 | sourceType: start
69 | targetType: llm
70 | id: 1741233155087-llm
71 | source: '1741233155087'
72 | sourceHandle: source
73 | target: llm
74 | targetHandle: target
75 | type: custom
76 | - data:
77 | isInIteration: false
78 | sourceType: llm
79 | targetType: code
80 | id: llm-source-1741233349987-target
81 | source: llm
82 | sourceHandle: source
83 | target: '1741233349987'
84 | targetHandle: target
85 | type: custom
86 | zIndex: 0
87 | - data:
88 | isInIteration: false
89 | sourceType: code
90 | targetType: llm
91 | id: 1741233349987-source-1741233736675-target
92 | source: '1741233349987'
93 | sourceHandle: source
94 | target: '1741233736675'
95 | targetHandle: target
96 | type: custom
97 | zIndex: 0
98 | - data:
99 | isInIteration: false
100 | sourceType: llm
101 | targetType: answer
102 | id: 1741233736675-source-1741233928818-target
103 | source: '1741233736675'
104 | sourceHandle: source
105 | target: '1741233928818'
106 | targetHandle: target
107 | type: custom
108 | zIndex: 0
109 | nodes:
110 | - data:
111 | desc: ''
112 | selected: false
113 | title: 开始
114 | type: start
115 | variables: []
116 | height: 54
117 | id: '1741233155087'
118 | position:
119 | x: 80
120 | y: 282
121 | positionAbsolute:
122 | x: 80
123 | y: 282
124 | sourcePosition: right
125 | targetPosition: left
126 | type: custom
127 | width: 244
128 | - data:
129 | context:
130 | enabled: false
131 | variable_selector: []
132 | desc: ''
133 | memory:
134 | query_prompt_template: '{{#sys.query#}}'
135 | role_prefix:
136 | assistant: ''
137 | user: ''
138 | window:
139 | enabled: false
140 | size: 10
141 | model:
142 | completion_params:
143 | temperature: 0.7
144 | mode: chat
145 | name: deepseek-reasoner
146 | provider: langgenius/deepseek/deepseek
147 | prompt_template:
148 | - id: 7854968f-44cb-48a7-a560-815ceaaad05a
149 | role: system
150 | text: ''
151 | selected: true
152 | title: LLM
153 | type: llm
154 | variables: []
155 | vision:
156 | enabled: false
157 | height: 90
158 | id: llm
159 | position:
160 | x: 370.9057006009376
161 | y: 282
162 | positionAbsolute:
163 | x: 370.9057006009376
164 | y: 282
165 | selected: true
166 | sourcePosition: right
167 | targetPosition: left
168 | type: custom
169 | width: 244
170 | - data:
171 | code: "import re\ndef main(input_str: str) -> dict:\n match = re.search(r'.*?(.*?)',\
172 | \ input_str, re.DOTALL)\n if match:\n return {'result': match.group(1).strip()}\n\
173 | \ return {'result': None}"
174 | code_language: python3
175 | desc: ''
176 | outputs:
177 | result:
178 | children: null
179 | type: string
180 | selected: false
181 | title: 代码执行
182 | type: code
183 | variables:
184 | - value_selector:
185 | - llm
186 | - text
187 | variable: input_str
188 | height: 54
189 | id: '1741233349987'
190 | position:
191 | x: 680
192 | y: 282
193 | positionAbsolute:
194 | x: 680
195 | y: 282
196 | selected: false
197 | sourcePosition: right
198 | targetPosition: left
199 | type: custom
200 | width: 244
201 | - data:
202 | context:
203 | enabled: false
204 | variable_selector: []
205 | desc: ''
206 | model:
207 | completion_params:
208 | temperature: 0.7
209 | mode: chat
210 | name: gemini-2.0-flash-001
211 | provider: langgenius/gemini/google
212 | prompt_template:
213 | - id: 53bac9a1-b8ac-4a33-9f29-c65591d7d81c
214 | role: system
215 | text: 'You are a helpful assistant.
216 |
217 | Understand the thinking part before answer my question: "{{#1741233349987.result#}}"'
218 | - id: 81a90f7b-b948-4a27-a9e3-0b207f0464ef
219 | role: user
220 | text: '{{#sys.query#}}'
221 | selected: false
222 | title: LLM 2
223 | type: llm
224 | variables: []
225 | vision:
226 | enabled: false
227 | height: 90
228 | id: '1741233736675'
229 | position:
230 | x: 973
231 | y: 282
232 | positionAbsolute:
233 | x: 973
234 | y: 282
235 | selected: false
236 | sourcePosition: right
237 | targetPosition: left
238 | type: custom
239 | width: 244
240 | - data:
241 | answer: '{{#1741233736675.text#}}'
242 | desc: ''
243 | selected: false
244 | title: 直接回复
245 | type: answer
246 | variables: []
247 | height: 103
248 | id: '1741233928818'
249 | position:
250 | x: 1277
251 | y: 282
252 | positionAbsolute:
253 | x: 1277
254 | y: 282
255 | sourcePosition: right
256 | targetPosition: left
257 | type: custom
258 | width: 244
259 | viewport:
260 | x: 167.23768851540444
261 | y: 13.128811606553313
262 | zoom: 0.7578582832551999
263 |
--------------------------------------------------------------------------------
/DSLs/deep-research.yml:
--------------------------------------------------------------------------------
1 | app:
2 | description: ''
3 | icon: face_with_monocle
4 | icon_background: '#FFE4E8'
5 | mode: workflow
6 | name: 'GPT-Researcher '
7 | use_icon_as_answer_icon: false
8 | dependencies:
9 | - current_identifier: null
10 | type: marketplace
11 | value:
12 | marketplace_plugin_unique_identifier: langgenius/tavily:0.0.2@694a00b7ed6087fb212512931042dc236fb7d2833fa32ff5f708317d61551777
13 | - current_identifier: null
14 | type: marketplace
15 | value:
16 | marketplace_plugin_unique_identifier: langgenius/anthropic:0.0.4@fb3e45f50d845d68735692ece0878a6566995d755f72f3af46e01ab3dcc0d8b8
17 | - current_identifier: null
18 | type: marketplace
19 | value:
20 | marketplace_plugin_unique_identifier: langgenius/openai:0.0.7@11ec0b1909200f62b6ebf2cec1da981a9071d11c1ee0e2ef332ce89bcffa2544
21 | kind: app
22 | version: 0.1.5
23 | workflow:
24 | conversation_variables: []
25 | environment_variables: []
26 | features:
27 | file_upload:
28 | allowed_file_extensions:
29 | - .JPG
30 | - .JPEG
31 | - .PNG
32 | - .GIF
33 | - .WEBP
34 | - .SVG
35 | allowed_file_types:
36 | - image
37 | allowed_file_upload_methods:
38 | - local_file
39 | - remote_url
40 | enabled: false
41 | fileUploadConfig:
42 | audio_file_size_limit: 50
43 | batch_count_limit: 5
44 | file_size_limit: 15
45 | image_file_size_limit: 5
46 | video_file_size_limit: 100
47 | workflow_file_upload_limit: 10
48 | image:
49 | enabled: false
50 | number_limits: 3
51 | transfer_methods:
52 | - local_file
53 | - remote_url
54 | number_limits: 3
55 | opening_statement: ''
56 | retriever_resource:
57 | enabled: true
58 | sensitive_word_avoidance:
59 | enabled: false
60 | speech_to_text:
61 | enabled: false
62 | suggested_questions: []
63 | suggested_questions_after_answer:
64 | enabled: false
65 | text_to_speech:
66 | enabled: false
67 | language: ''
68 | voice: ''
69 | graph:
70 | edges:
71 | - data:
72 | isInIteration: false
73 | sourceType: start
74 | targetType: llm
75 | id: 1730257085761-source-1730257098742-target
76 | selected: false
77 | source: '1730257085761'
78 | sourceHandle: source
79 | target: '1730257098742'
80 | targetHandle: target
81 | type: custom
82 | zIndex: 0
83 | - data:
84 | isInIteration: false
85 | sourceType: llm
86 | targetType: code
87 | id: 1730257098742-source-1730257648212-target
88 | selected: false
89 | source: '1730257098742'
90 | sourceHandle: source
91 | target: '1730257648212'
92 | targetHandle: target
93 | type: custom
94 | zIndex: 0
95 | - data:
96 | isInIteration: false
97 | sourceType: code
98 | targetType: iteration
99 | id: 1730257648212-source-1730257830072-target
100 | selected: false
101 | source: '1730257648212'
102 | sourceHandle: source
103 | target: '1730257830072'
104 | targetHandle: target
105 | type: custom
106 | zIndex: 0
107 | - data:
108 | isInIteration: true
109 | iteration_id: '1730257830072'
110 | sourceType: iteration-start
111 | targetType: tool
112 | id: 1730257830072start-source-1730257879652-target
113 | selected: false
114 | source: 1730257830072start
115 | sourceHandle: source
116 | target: '1730257879652'
117 | targetHandle: target
118 | type: custom
119 | zIndex: 1002
120 | - data:
121 | isInIteration: true
122 | iteration_id: '1730257830072'
123 | sourceType: tool
124 | targetType: llm
125 | id: 1730257879652-source-1730259235391-target
126 | selected: false
127 | source: '1730257879652'
128 | sourceHandle: source
129 | target: '1730259235391'
130 | targetHandle: target
131 | type: custom
132 | zIndex: 1002
133 | - data:
134 | isInIteration: false
135 | sourceType: code
136 | targetType: llm
137 | id: 1730257648212-source-1730259707121-target
138 | selected: false
139 | source: '1730257648212'
140 | sourceHandle: source
141 | target: '1730259707121'
142 | targetHandle: target
143 | type: custom
144 | zIndex: 0
145 | - data:
146 | isInIteration: false
147 | sourceType: llm
148 | targetType: parameter-extractor
149 | id: 1730259707121-source-1730260137415-target
150 | selected: false
151 | source: '1730259707121'
152 | sourceHandle: source
153 | target: '1730260137415'
154 | targetHandle: target
155 | type: custom
156 | zIndex: 0
157 | - data:
158 | isInIteration: false
159 | sourceType: llm
160 | targetType: template-transform
161 | id: 1730260569281-source-1730259990083-target
162 | selected: false
163 | source: '1730260569281'
164 | sourceHandle: source
165 | target: '1730259990083'
166 | targetHandle: target
167 | type: custom
168 | zIndex: 0
169 | - data:
170 | isInIteration: false
171 | sourceType: parameter-extractor
172 | targetType: llm
173 | id: 1730260137415-source-1730260569281-target
174 | selected: false
175 | source: '1730260137415'
176 | sourceHandle: source
177 | target: '1730260569281'
178 | targetHandle: target
179 | type: custom
180 | zIndex: 0
181 | - data:
182 | isInIteration: false
183 | sourceType: parameter-extractor
184 | targetType: llm
185 | id: 1730260137415-source-1730260824960-target
186 | selected: false
187 | source: '1730260137415'
188 | sourceHandle: source
189 | target: '1730260824960'
190 | targetHandle: target
191 | type: custom
192 | zIndex: 0
193 | - data:
194 | isInIteration: false
195 | sourceType: iteration
196 | targetType: parameter-extractor
197 | id: 1730257830072-source-1730260137415-target
198 | selected: false
199 | source: '1730257830072'
200 | sourceHandle: source
201 | target: '1730260137415'
202 | targetHandle: target
203 | type: custom
204 | zIndex: 0
205 | - data:
206 | isInIteration: false
207 | sourceType: parameter-extractor
208 | targetType: llm
209 | id: 1730260137415-source-17302609631470-target
210 | selected: false
211 | source: '1730260137415'
212 | sourceHandle: source
213 | target: '17302609631470'
214 | targetHandle: target
215 | type: custom
216 | zIndex: 0
217 | - data:
218 | isInIteration: false
219 | sourceType: parameter-extractor
220 | targetType: llm
221 | id: 1730260137415-source-17302610163900-target
222 | selected: false
223 | source: '1730260137415'
224 | sourceHandle: source
225 | target: '17302610163900'
226 | targetHandle: target
227 | type: custom
228 | zIndex: 0
229 | - data:
230 | isInIteration: false
231 | sourceType: llm
232 | targetType: template-transform
233 | id: 1730260824960-source-1730259990083-target
234 | selected: false
235 | source: '1730260824960'
236 | sourceHandle: source
237 | target: '1730259990083'
238 | targetHandle: target
239 | type: custom
240 | zIndex: 0
241 | - data:
242 | isInIteration: false
243 | sourceType: llm
244 | targetType: template-transform
245 | id: 17302609631470-source-1730259990083-target
246 | selected: false
247 | source: '17302609631470'
248 | sourceHandle: source
249 | target: '1730259990083'
250 | targetHandle: target
251 | type: custom
252 | zIndex: 0
253 | - data:
254 | isInIteration: false
255 | sourceType: llm
256 | targetType: template-transform
257 | id: 17302610163900-source-1730259990083-target
258 | selected: false
259 | source: '17302610163900'
260 | sourceHandle: source
261 | target: '1730259990083'
262 | targetHandle: target
263 | type: custom
264 | zIndex: 0
265 | - data:
266 | isInIteration: false
267 | sourceType: template-transform
268 | targetType: end
269 | id: 1730259990083-source-1730261407654-target
270 | selected: false
271 | source: '1730259990083'
272 | sourceHandle: source
273 | target: '1730261407654'
274 | targetHandle: target
275 | type: custom
276 | zIndex: 0
277 | nodes:
278 | - data:
279 | desc: ''
280 | selected: false
281 | title: start
282 | type: start
283 | variables:
284 | - label: title
285 | max_length: 100
286 | options: []
287 | required: true
288 | type: text-input
289 | variable: title
290 | - label: language
291 | max_length: 48
292 | options:
293 | - 中文
294 | - English
295 | - 日本語
296 | required: true
297 | type: select
298 | variable: language
299 | height: 116
300 | id: '1730257085761'
301 | position:
302 | x: 28.05097515220939
303 | y: 248.5
304 | positionAbsolute:
305 | x: 28.05097515220939
306 | y: 248.5
307 | selected: false
308 | sourcePosition: right
309 | targetPosition: left
310 | type: custom
311 | width: 244
312 | - data:
313 | context:
314 | enabled: false
315 | variable_selector: []
316 | desc: ''
317 | model:
318 | completion_params:
319 | temperature: 1
320 | mode: chat
321 | name: claude-3-5-sonnet-20241022
322 | provider: langgenius/anthropic/anthropic
323 | prompt_template:
324 | - id: e18aef50-3449-4259-9559-c4d17101d533
325 | role: system
326 | text: "\n\nGenerate a series of appropriate\
327 | \ search engine queries to break down questions based on user inquiries\n\
328 | \n\n\n\nInput: User asks how to\
329 | \ learn programming\nOutput: 'programming learning methods, 'programming\
330 | \ tutorials for beginners'\n\n\n\nInput: User wants\
331 | \ to understand latest technology trends \nOutput: 'tech trends 2021',\
332 | \ 'latest technology news'\n\n\n\nInput: User seeks\
333 | \ healthy eating advice\nOutput: 'healthy eating guide', 'balanced nutrition\
334 | \ diet'\n\n\n\n\n1. Take user's question\
335 | \ as input.\n2. Identify relevant keywords or phrases based on the topic\
336 | \ of user's question.\n3. Use these keywords or phrases to make search\
337 | \ engine queries.\n4. Generate a series of appropriate search engine queries\
338 | \ to help break down user's question.\n5. Ensure output content does not\
339 | \ contain any xml tags.\n6.The output must be pure and conform to the\
340 | \ style without other explanations.\n7.Break down into at least\
341 | \ 4-6 subproblems.\n8.Output is separated only by commas.\n"
342 | - id: b0e446f2-b714-41e9-8eb6-292187a97796
343 | role: user
344 | text: 'title:{{#1730257085761.title#}}
345 |
346 | language:{{#1730257085761.language#}}
347 |
348 | The output must be pure and conform to the style without other
349 | explanations.
350 |
351 | Output is separated only by commas.
352 |
353 | Break down into at least 4-6 subproblems.'
354 | selected: false
355 | title: LLM
356 | type: llm
357 | variables: []
358 | vision:
359 | enabled: false
360 | height: 96
361 | id: '1730257098742'
362 | position:
363 | x: 321.6365008011338
364 | y: 248.5
365 | positionAbsolute:
366 | x: 321.6365008011338
367 | y: 248.5
368 | selected: false
369 | sourcePosition: right
370 | targetPosition: left
371 | type: custom
372 | width: 244
373 | - data:
374 | code: "def main(input_str: str) -> dict:\n if not input_str:\n return\
375 | \ {'result': []}\n \n input_str = input_str.strip().strip('\"')\n\
376 | \ items = [item.strip() for item in input_str.split(',')]\n \n \
377 | \ return {'result': items}"
378 | code_language: python3
379 | desc: ''
380 | outputs:
381 | result:
382 | children: null
383 | type: array[string]
384 | selected: false
385 | title: code
386 | type: code
387 | variables:
388 | - value_selector:
389 | - '1730257098742'
390 | - text
391 | variable: input_str
392 | height: 54
393 | id: '1730257648212'
394 | position:
395 | x: 635.9314896948702
396 | y: 248.5
397 | positionAbsolute:
398 | x: 635.9314896948702
399 | y: 248.5
400 | selected: false
401 | sourcePosition: right
402 | targetPosition: left
403 | type: custom
404 | width: 244
405 | - data:
406 | desc: ''
407 | error_handle_mode: continue-on-error
408 | height: 333
409 | is_parallel: true
410 | iterator_selector:
411 | - '1730257648212'
412 | - result
413 | output_selector:
414 | - '1730259235391'
415 | - text
416 | output_type: array[string]
417 | parallel_nums: 10
418 | selected: false
419 | start_node_id: 1730257830072start
420 | title: 迭代
421 | type: iteration
422 | width: 913
423 | height: 333
424 | id: '1730257830072'
425 | position:
426 | x: 937.5528258071076
427 | y: 385.5
428 | positionAbsolute:
429 | x: 937.5528258071076
430 | y: 385.5
431 | selected: false
432 | sourcePosition: right
433 | targetPosition: left
434 | type: custom
435 | width: 913
436 | zIndex: 1
437 | - data:
438 | desc: ''
439 | isInIteration: true
440 | selected: false
441 | title: ''
442 | type: iteration-start
443 | draggable: false
444 | height: 48
445 | id: 1730257830072start
446 | parentId: '1730257830072'
447 | position:
448 | x: 24
449 | y: 68
450 | positionAbsolute:
451 | x: 961.5528258071076
452 | y: 453.5
453 | selectable: false
454 | sourcePosition: right
455 | targetPosition: left
456 | type: custom-iteration-start
457 | width: 44
458 | zIndex: 1002
459 | - data:
460 | desc: ''
461 | isInIteration: true
462 | iteration_id: '1730257830072'
463 | provider_id: tavily
464 | provider_name: tavily
465 | provider_type: builtin
466 | selected: false
467 | title: TavilySearch
468 | tool_configurations:
469 | exclude_domains: null
470 | include_answer: null
471 | include_domains: null
472 | include_images: null
473 | include_raw_content: null
474 | max_results: 5
475 | search_depth: basic
476 | tool_label: TavilySearch
477 | tool_name: tavily_search
478 | tool_parameters:
479 | query:
480 | type: mixed
481 | value: '{{#1730257830072.item#}}'
482 | type: tool
483 | height: 246
484 | id: '1730257879652'
485 | parentId: '1730257830072'
486 | position:
487 | x: 128
488 | y: 67
489 | positionAbsolute:
490 | x: 1065.5528258071076
491 | y: 452.5
492 | selected: false
493 | sourcePosition: right
494 | targetPosition: left
495 | type: custom
496 | width: 244
497 | zIndex: 1002
498 | - data:
499 | context:
500 | enabled: false
501 | variable_selector: []
502 | desc: ''
503 | isInIteration: true
504 | iteration_id: '1730257830072'
505 | model:
506 | completion_params:
507 | temperature: 0.7
508 | mode: chat
509 | name: claude-3-haiku-20240307
510 | provider: langgenius/anthropic/anthropic
511 | prompt_template:
512 | - edition_type: basic
513 | id: d8e18834-ba12-4acb-b376-15340d30a3e3
514 | jinja2_text: '"{research_summary}" Using the above information, answer the
515 | following question or topic: "{question}" in a detailed report — The report
516 | should focus on the answer to the question, should be well structured,
517 | informative, in depth, with facts and numbers if available, a minimum
518 | of 1,200 words and with markdown syntax and apa format. Write all source
519 | urls at the end of the report in apa format. You should write your report
520 | only based on the given information and nothing else.'
521 | role: system
522 | text: "Your goal is to provide answers based on information from the internet.\
523 | \ \nYou must use the provided Tavily search API function to find relevant\
524 | \ online information. \nYou should never use your own knowledge to answer\
525 | \ questions.\nPlease include relevant url sources in the end of your answers"
526 | - id: b23ba544-1b25-4d0a-abdf-34a6c22a2c76
527 | role: user
528 | text: "language:{{#1730257085761.language#}}\n \"{{#1730257879652.text#}}\"\
529 | \ Using the above information, answer the following question or topic:\
530 | \ \"{{#1730257830072.item#}} \"\nin a detailed report — The report should\
531 | \ focus on the answer to the question, should be well structured, informative,\
532 | \ in depth, with facts and numbers if available, a minimum of 1,200 words\
533 | \ and with markdown syntax and apa format. Write all source urls at the\
534 | \ end of the report in apa format. You should write your report only based\
535 | \ on the given information and nothing else."
536 | selected: false
537 | title: LLM 3
538 | type: llm
539 | variables: []
540 | vision:
541 | enabled: false
542 | height: 96
543 | id: '1730259235391'
544 | parentId: '1730257830072'
545 | position:
546 | x: 421.40978070048254
547 | y: 65
548 | positionAbsolute:
549 | x: 1358.9626065075902
550 | y: 450.5
551 | selected: false
552 | sourcePosition: right
553 | targetPosition: left
554 | type: custom
555 | width: 244
556 | zIndex: 1002
557 | - data:
558 | context:
559 | enabled: false
560 | variable_selector: []
561 | desc: ''
562 | model:
563 | completion_params:
564 | temperature: 0.7
565 | mode: chat
566 | name: gpt-4o
567 | provider: langgenius/openai/openai
568 | prompt_template:
569 | - id: 3b248cc7-ce1c-4d24-b20c-aa988aaad672
570 | role: system
571 | text: 'according{{#1730257648212.result#}},{{#1730257085761.title#}}Generate
572 | 3 to 5 sub-titles.
573 |
574 |
575 |
576 | Please generate 4 subheadings for the main title following these steps:
577 |
578 | Carefully read the provided main title and related content
579 |
580 | Analyze the core theme and key information points of the main title
581 |
582 | Ensure the generated subheadings maintain consistency and relevance with
583 | the main title
584 |
585 | Each subheading should:
586 |
587 | Be concise and appropriate in length
588 |
589 | Highlight a unique angle or key point
590 |
591 | Capture readers'' interest
592 |
593 | Match the overall style and tone of the article
594 |
595 | Between subheadings:
596 |
597 | Content should not overlap
598 |
599 | Logical order should be maintained
600 |
601 | Should collectively support the main title
602 |
603 | Use numerical sequence (1, 2, 3...) to mark each subheading
604 |
605 | Outputformatrequirements:
606 |
607 | Each subheading on a separate line
608 |
609 | No XML tags included
610 |
611 | Output subheadings content only
612 |
613 | '
614 | - id: 5a7b9e7a-e8f8-4564-a9bf-85861c4fe312
615 | role: user
616 | text: 'language:{{#1730257085761.language#}}
617 |
618 | Generate a series of appropriate sub-title to help break down {{#1730257085761.title#}}.
619 |
620 | Breaks down complex topics into manageable subtopics'
621 | selected: false
622 | title: LLM 3
623 | type: llm
624 | variables: []
625 | vision:
626 | enabled: false
627 | height: 90
628 | id: '1730259707121'
629 | position:
630 | x: 1279.1060058303985
631 | y: 248.5
632 | positionAbsolute:
633 | x: 1279.1060058303985
634 | y: 248.5
635 | selected: false
636 | sourcePosition: right
637 | targetPosition: left
638 | type: custom
639 | width: 244
640 | - data:
641 | desc: ''
642 | selected: false
643 | template: '{{ arg0 }}
644 |
645 |
646 | {{ arg1 }}
647 |
648 | {{ arg5 }}
649 |
650 |
651 | {{ arg2 }}
652 |
653 | {{ arg6 }}
654 |
655 |
656 | {{ arg3 }}
657 |
658 | {{ arg7 }}
659 |
660 |
661 | {{ arg4 }}
662 |
663 | {{ arg8 }}
'
664 | title: Template conversion
665 | type: template-transform
666 | variables:
667 | - value_selector:
668 | - '1730257085761'
669 | - title
670 | variable: arg0
671 | - value_selector:
672 | - '1730260137415'
673 | - sub_title1
674 | variable: arg1
675 | - value_selector:
676 | - '1730260137415'
677 | - sub_title2
678 | variable: arg2
679 | - value_selector:
680 | - '1730260137415'
681 | - sub_title3
682 | variable: arg3
683 | - value_selector:
684 | - '1730260137415'
685 | - sub_title4
686 | variable: arg4
687 | - value_selector:
688 | - '1730260569281'
689 | - text
690 | variable: arg5
691 | - value_selector:
692 | - '1730260824960'
693 | - text
694 | variable: arg6
695 | - value_selector:
696 | - '17302609631470'
697 | - text
698 | variable: arg7
699 | - value_selector:
700 | - '17302610163900'
701 | - text
702 | variable: arg8
703 | height: 54
704 | id: '1730259990083'
705 | position:
706 | x: 2520.0598019148374
707 | y: 385.5
708 | positionAbsolute:
709 | x: 2520.0598019148374
710 | y: 385.5
711 | selected: false
712 | sourcePosition: right
713 | targetPosition: left
714 | type: custom
715 | width: 244
716 | - data:
717 | desc: ''
718 | instruction: '{{#1730259707121.text#}}Extract the return value in the output
719 | value as four independent parameters.Avoids redundancy by tracking previously
720 | written content'
721 | model:
722 | completion_params:
723 | temperature: 0.7
724 | mode: chat
725 | name: claude-3-5-sonnet-20241022
726 | provider: langgenius/anthropic/anthropic
727 | parameters:
728 | - description: NO.1 sub title
729 | name: sub_title1
730 | required: false
731 | type: string
732 | - description: NO.2 sub_title
733 | name: sub_title2
734 | required: false
735 | type: string
736 | - description: NO.3 sub_title
737 | name: sub_title3
738 | required: false
739 | type: string
740 | - description: NO.4 sub_title
741 | name: sub_title4
742 | required: false
743 | type: string
744 | query:
745 | - '1730259707121'
746 | - text
747 | reasoning_mode: prompt
748 | selected: false
749 | title: Parameter extractor
750 | type: parameter-extractor
751 | variables: []
752 | vision:
753 | enabled: false
754 | height: 96
755 | id: '1730260137415'
756 | position:
757 | x: 1912.2237746075607
758 | y: 248.5
759 | positionAbsolute:
760 | x: 1912.2237746075607
761 | y: 248.5
762 | selected: false
763 | sourcePosition: right
764 | targetPosition: left
765 | type: custom
766 | width: 244
767 | - data:
768 | context:
769 | enabled: false
770 | variable_selector: []
771 | desc: ''
772 | model:
773 | completion_params:
774 | temperature: 1
775 | mode: chat
776 | name: claude-3-haiku-20240307
777 | provider: langgenius/anthropic/anthropic
778 | prompt_template:
779 | - id: 3ef1efde-48b7-4f8d-830b-44e92815950f
780 | role: system
781 | text: in a detailed report — The report should focus on the answer to {{#1730260137415.sub_title1#}}and
782 | nothing else.
783 | - id: 04881f0e-1a81-4c5c-813a-5123d62689e8
784 | role: user
785 | text: "language:{{#1730257085761.language#}}\ncontext:{{#1730257830072.output#}}\n\
786 | Provide the research report in the specified language, avoiding small\
787 | \ talk.\nThe main content is provided in markdown format\nWrite all source\
788 | \ urls at the end of the report in apa format. \n\n"
789 | selected: false
790 | title: LLM 5
791 | type: llm
792 | variables: []
793 | vision:
794 | enabled: false
795 | height: 96
796 | id: '1730260569281'
797 | position:
798 | x: 2219
799 | y: 248.5
800 | positionAbsolute:
801 | x: 2219
802 | y: 248.5
803 | selected: false
804 | sourcePosition: right
805 | targetPosition: left
806 | type: custom
807 | width: 244
808 | - data:
809 | context:
810 | enabled: false
811 | variable_selector: []
812 | desc: ''
813 | model:
814 | completion_params:
815 | temperature: 1
816 | mode: chat
817 | name: claude-3-haiku-20240307
818 | provider: langgenius/anthropic/anthropic
819 | prompt_template:
820 | - id: c059b7a1-a7cb-4d2d-a258-cc4bd122ff7f
821 | role: system
822 | text: in a detailed report — The report should focus on the answer to {{#1730260137415.sub_title2#}}and
823 | nothing else.
824 | - id: e494e57c-eff3-434d-bba7-4981a6dfd212
825 | role: user
826 | text: "language:{{#1730257085761.language#}}\ncontext:{{#1730257830072.output#}}\n\
827 | Provide the research report in the specified language, avoiding small\
828 | \ talk.\nThe main content is provided in markdown format\nWrite all source\
829 | \ urls at the end of the report in apa format. \n"
830 | selected: false
831 | title: LLM 6
832 | type: llm
833 | variables: []
834 | vision:
835 | enabled: false
836 | height: 96
837 | id: '1730260824960'
838 | position:
839 | x: 2219
840 | y: 385.5
841 | positionAbsolute:
842 | x: 2219
843 | y: 385.5
844 | selected: false
845 | sourcePosition: right
846 | targetPosition: left
847 | type: custom
848 | width: 244
849 | - data:
850 | context:
851 | enabled: false
852 | variable_selector: []
853 | desc: ''
854 | model:
855 | completion_params:
856 | temperature: 1
857 | mode: chat
858 | name: claude-3-haiku-20240307
859 | provider: langgenius/anthropic/anthropic
860 | prompt_template:
861 | - id: c059b7a1-a7cb-4d2d-a258-cc4bd122ff7f
862 | role: system
863 | text: in a detailed report — The report should focus on the answer to {{#1730260137415.sub_title3#}}and
864 | nothing else.
865 | - id: 53cd6741-f1ef-4480-9778-9e8c1ea2e298
866 | role: user
867 | text: 'language:{{#1730257085761.language#}}
868 |
869 | context:{{#1730257830072.output#}}
870 |
871 | Provide the research report in the specified language, avoiding small
872 | talk.
873 |
874 | The main content is provided in markdown format
875 |
876 | Write all source urls at the end of the report in apa format. '
877 | selected: false
878 | title: LLM 7
879 | type: llm
880 | variables: []
881 | vision:
882 | enabled: false
883 | height: 96
884 | id: '17302609631470'
885 | position:
886 | x: 2219
887 | y: 534.1112425967152
888 | positionAbsolute:
889 | x: 2219
890 | y: 534.1112425967152
891 | selected: false
892 | sourcePosition: right
893 | targetPosition: left
894 | type: custom
895 | width: 244
896 | - data:
897 | context:
898 | enabled: false
899 | variable_selector: []
900 | desc: ''
901 | model:
902 | completion_params:
903 | temperature: 1
904 | mode: chat
905 | name: claude-3-haiku-20240307
906 | provider: langgenius/anthropic/anthropic
907 | prompt_template:
908 | - id: c059b7a1-a7cb-4d2d-a258-cc4bd122ff7f
909 | role: system
910 | text: in a detailed report — The report should focus on the answer to {{#1730260137415.sub_title4#}}and
911 | nothing else.
912 | - id: 2773ef9d-37b8-49f8-9455-c2399538407f
913 | role: user
914 | text: "language:{{#1730257085761.language#}}\ncontext:{{#1730257830072.output#}}\n\
915 | Provide the research report in the specified language, avoiding small\
916 | \ talk.\nThe main content is provided in markdown format\nWrite all source\
917 | \ urls at the end of the report in apa format. \n\n"
918 | selected: false
919 | title: LLM 8
920 | type: llm
921 | variables: []
922 | vision:
923 | enabled: false
924 | height: 96
925 | id: '17302610163900'
926 | position:
927 | x: 2219
928 | y: 663.0900315719681
929 | positionAbsolute:
930 | x: 2219
931 | y: 663.0900315719681
932 | selected: false
933 | sourcePosition: right
934 | targetPosition: left
935 | type: custom
936 | width: 244
937 | - data:
938 | desc: ''
939 | outputs:
940 | - value_selector:
941 | - '1730259990083'
942 | - output
943 | variable: output
944 | selected: true
945 | title: End
946 | type: end
947 | height: 90
948 | id: '1730261407654'
949 | position:
950 | x: 2827
951 | y: 385.5
952 | positionAbsolute:
953 | x: 2827
954 | y: 385.5
955 | selected: true
956 | sourcePosition: right
957 | targetPosition: left
958 | type: custom
959 | width: 244
960 | - data:
961 | author: Dify
962 | desc: ''
963 | height: 168
964 | selected: false
965 | showAuthor: true
966 | text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"GPT-Researcher
967 | 接收两个变量输入:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"font-size:
968 | 12px;","text":"标题:要研究的命题","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"listitem","version":1,"value":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"font-size:
969 | 12px;","text":"语言:研究报告的语言偏好","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"listitem","version":1,"value":2}],"direction":"ltr","format":"","indent":0,"type":"list","version":1,"listType":"number","start":1,"tag":"ol"}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
970 | theme: blue
971 | title: ''
972 | type: ''
973 | width: 240
974 | height: 168
975 | id: '1730387967784'
976 | position:
977 | x: 28.05097515220939
978 | y: 7.975706889733289
979 | positionAbsolute:
980 | x: 28.05097515220939
981 | y: 7.975706889733289
982 | selected: false
983 | sourcePosition: right
984 | targetPosition: left
985 | type: custom-note
986 | width: 240
987 | - data:
988 | author: Dify
989 | desc: ''
990 | height: 173
991 | selected: false
992 | showAuthor: true
993 | text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"步骤1:
994 | 首先,让大语言模型(LLM)提供一系列与命题相关的搜索引擎查询。可以通过不同角度的查询进行全面研究。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
995 | theme: blue
996 | title: ''
997 | type: ''
998 | width: 242
999 | height: 173
1000 | id: '1730388614165'
1001 | position:
1002 | x: 321.6365008011338
1003 | y: 7.975706889733289
1004 | positionAbsolute:
1005 | x: 321.6365008011338
1006 | y: 7.975706889733289
1007 | selected: false
1008 | sourcePosition: right
1009 | targetPosition: left
1010 | type: custom-note
1011 | width: 242
1012 | - data:
1013 | author: Dify
1014 | desc: ''
1015 | height: 188
1016 | selected: false
1017 | showAuthor: true
1018 | text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"步骤2:
1019 | 由于迭代的输入要求是一个数组,我们使用一个代码节点从LLM的字符串输出中提取子查询。在这里,可以使用新的\"代码生成器\"功能快速生成所需的代码。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
1020 | theme: blue
1021 | title: ''
1022 | type: ''
1023 | width: 240
1024 | height: 188
1025 | id: '1730388689290'
1026 | position:
1027 | x: 635.9314896948702
1028 | y: 7.975706889733289
1029 | positionAbsolute:
1030 | x: 635.9314896948702
1031 | y: 7.975706889733289
1032 | selected: false
1033 | sourcePosition: right
1034 | targetPosition: left
1035 | type: custom-note
1036 | width: 240
1037 | - data:
1038 | author: Dify
1039 | desc: ''
1040 | height: 224
1041 | selected: false
1042 | showAuthor: true
1043 | text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"步骤3:
1044 | 我们构建了两个并行分支。一个是使用LLM根据搜索引擎查询总结出适合命题研究的次级标题。另一个分支使用迭代,同时使用Tavily查询每个子查询,然后使用LLM进行归纳研究。在这里,我们使用迭代和并行模式的高级功能来加速搜索。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
1045 | theme: blue
1046 | title: ' (1)'
1047 | type: ''
1048 | width: 281
1049 | height: 224
1050 | id: '17303887996700'
1051 | position:
1052 | x: 968.506506560585
1053 | y: 7.975706889733289
1054 | positionAbsolute:
1055 | x: 968.506506560585
1056 | y: 7.975706889733289
1057 | selected: false
1058 | sourcePosition: right
1059 | targetPosition: left
1060 | type: custom-note
1061 | width: 281
1062 | - data:
1063 | author: Dify
1064 | desc: ''
1065 | height: 198
1066 | selected: false
1067 | showAuthor: true
1068 | text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"第4步:
1069 | 我们使用参数提取器从前一个LLM输出的次级研究命题中提取共4个子标题。然后,我们使用四个并行分支以迭代输出作为上下文(现在提示可以支持注入一个数组[字符串])来回答这四个问题。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
1070 | theme: blue
1071 | title: ' (2)'
1072 | type: ''
1073 | width: 289
1074 | height: 198
1075 | id: '17303896484860'
1076 | position:
1077 | x: 1279.1060058303985
1078 | y: 7.975706889733289
1079 | positionAbsolute:
1080 | x: 1279.1060058303985
1081 | y: 7.975706889733289
1082 | selected: false
1083 | sourcePosition: right
1084 | targetPosition: left
1085 | type: custom-note
1086 | width: 289
1087 | - data:
1088 | author: Dify
1089 | desc: ''
1090 | height: 156
1091 | selected: false
1092 | showAuthor: true
1093 | text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"最后,我们使用模板节点有序地拼接前面的一级标题、二级标题和研究结论,以获得一份完整的研究报告。
1094 | 😃","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
1095 | theme: blue
1096 | title: ' (3)'
1097 | type: ''
1098 | width: 283
1099 | height: 156
1100 | id: '17303898217580'
1101 | position:
1102 | x: 1676.1759535081464
1103 | y: 7.975706889733289
1104 | positionAbsolute:
1105 | x: 1676.1759535081464
1106 | y: 7.975706889733289
1107 | selected: false
1108 | sourcePosition: right
1109 | targetPosition: left
1110 | type: custom-note
1111 | width: 283
1112 | - data:
1113 | author: Dify
1114 | desc: ''
1115 | height: 175
1116 | selected: false
1117 | showAuthor: true
1118 | text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"1.
1119 | 佛罗伦萨艺术历史研究","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"2.
1120 | Minecraft 完整历史","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"3.
1121 | OpenAI 编年史","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"type":"linebreak","version":1}],"direction":null,"format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
1122 | theme: blue
1123 | title: ''
1124 | type: ''
1125 | width: 240
1126 | height: 175
1127 | id: '1730452566694'
1128 | position:
1129 | x: -241.22286003072242
1130 | y: 7.975706889733289
1131 | positionAbsolute:
1132 | x: -241.22286003072242
1133 | y: 7.975706889733289
1134 | selected: false
1135 | sourcePosition: right
1136 | targetPosition: left
1137 | type: custom-note
1138 | width: 240
1139 | viewport:
1140 | x: -770.712235479627
1141 | y: -25.883561625789298
1142 | zoom: 0.5467659899053819
1143 |
--------------------------------------------------------------------------------
/DSLs/simple-kimi.yml:
--------------------------------------------------------------------------------
1 | app:
2 | description: simple-kimi
3 | icon: 🤖
4 | icon_background: '#FFEAD5'
5 | mode: advanced-chat
6 | name: simple-kimi
7 | use_icon_as_answer_icon: false
8 | dependencies:
9 | - current_identifier: null
10 | type: marketplace
11 | value:
12 | marketplace_plugin_unique_identifier: langgenius/google:0.0.8@3efcf55ffeef9d0f77715e0afb23534952ae0cb385c051d0637e86d71199d1a6
13 | kind: app
14 | version: 0.1.5
15 | workflow:
16 | conversation_variables: []
17 | environment_variables: []
18 | features:
19 | file_upload:
20 | allowed_file_extensions:
21 | - .JPG
22 | - .JPEG
23 | - .PNG
24 | - .GIF
25 | - .WEBP
26 | - .SVG
27 | allowed_file_types:
28 | - image
29 | - document
30 | allowed_file_upload_methods:
31 | - local_file
32 | - remote_url
33 | enabled: true
34 | fileUploadConfig:
35 | audio_file_size_limit: 50
36 | batch_count_limit: 5
37 | file_size_limit: 15
38 | image_file_size_limit: 5
39 | video_file_size_limit: 100
40 | workflow_file_upload_limit: 10
41 | image:
42 | enabled: false
43 | number_limits: 3
44 | transfer_methods:
45 | - local_file
46 | - remote_url
47 | number_limits: 1
48 | opening_statement: ''
49 | retriever_resource:
50 | enabled: false
51 | sensitive_word_avoidance:
52 | enabled: false
53 | speech_to_text:
54 | enabled: false
55 | suggested_questions: []
56 | suggested_questions_after_answer:
57 | enabled: false
58 | text_to_speech:
59 | enabled: false
60 | language: ''
61 | voice: ''
62 | graph:
63 | edges:
64 | - data:
65 | isInIteration: false
66 | sourceType: llm
67 | targetType: answer
68 | id: llm-source-answer-target
69 | selected: false
70 | source: llm
71 | sourceHandle: source
72 | target: answer
73 | targetHandle: target
74 | type: custom
75 | zIndex: 0
76 | - data:
77 | isInIteration: false
78 | sourceType: code
79 | targetType: tool
80 | id: 1727437551868-source-1727437724068-target
81 | source: '1727437551868'
82 | sourceHandle: source
83 | target: '1727437724068'
84 | targetHandle: target
85 | type: custom
86 | zIndex: 0
87 | - data:
88 | isInIteration: false
89 | sourceType: tool
90 | targetType: code
91 | id: 1727437724068-source-1727437739002-target
92 | source: '1727437724068'
93 | sourceHandle: source
94 | target: '1727437739002'
95 | targetHandle: target
96 | type: custom
97 | zIndex: 0
98 | - data:
99 | isInIteration: false
100 | sourceType: code
101 | targetType: template-transform
102 | id: 1727437739002-source-1727438089651-target
103 | source: '1727437739002'
104 | sourceHandle: source
105 | target: '1727438089651'
106 | targetHandle: target
107 | type: custom
108 | zIndex: 0
109 | - data:
110 | isInIteration: false
111 | sourceType: code
112 | targetType: tool
113 | id: 1727438265117-source-1727438331868-target
114 | source: '1727438265117'
115 | sourceHandle: source
116 | target: '1727438331868'
117 | targetHandle: target
118 | type: custom
119 | zIndex: 0
120 | - data:
121 | isInIteration: false
122 | sourceType: tool
123 | targetType: code
124 | id: 1727438331868-source-1727438349664-target
125 | source: '1727438331868'
126 | sourceHandle: source
127 | target: '1727438349664'
128 | targetHandle: target
129 | type: custom
130 | zIndex: 0
131 | - data:
132 | isInIteration: false
133 | sourceType: code
134 | targetType: template-transform
135 | id: 1727438349664-source-1727438463965-target
136 | source: '1727438349664'
137 | sourceHandle: source
138 | target: '1727438463965'
139 | targetHandle: target
140 | type: custom
141 | zIndex: 0
142 | - data:
143 | isInIteration: false
144 | sourceType: llm
145 | targetType: answer
146 | id: 1727438962981-source-1727439130548-target
147 | source: '1727438962981'
148 | sourceHandle: source
149 | target: '1727439130548'
150 | targetHandle: target
151 | type: custom
152 | zIndex: 0
153 | - data:
154 | isInIteration: false
155 | sourceType: code
156 | targetType: tool
157 | id: 17274404793180-source-17274405419030-target
158 | source: '17274404793180'
159 | sourceHandle: source
160 | target: '17274405419030'
161 | targetHandle: target
162 | type: custom
163 | zIndex: 0
164 | - data:
165 | isInIteration: false
166 | sourceType: tool
167 | targetType: code
168 | id: 17274405419030-source-17274405777680-target
169 | source: '17274405419030'
170 | sourceHandle: source
171 | target: '17274405777680'
172 | targetHandle: target
173 | type: custom
174 | zIndex: 0
175 | - data:
176 | isInIteration: false
177 | sourceType: code
178 | targetType: template-transform
179 | id: 17274405777680-source-17274406200850-target
180 | source: '17274405777680'
181 | sourceHandle: source
182 | target: '17274406200850'
183 | targetHandle: target
184 | type: custom
185 | zIndex: 0
186 | - data:
187 | isInIteration: false
188 | sourceType: code
189 | targetType: tool
190 | id: 17274407417220-source-17274407666060-target
191 | source: '17274407417220'
192 | sourceHandle: source
193 | target: '17274407666060'
194 | targetHandle: target
195 | type: custom
196 | zIndex: 0
197 | - data:
198 | isInIteration: false
199 | sourceType: tool
200 | targetType: code
201 | id: 17274407666060-source-17274408191900-target
202 | source: '17274407666060'
203 | sourceHandle: source
204 | target: '17274408191900'
205 | targetHandle: target
206 | type: custom
207 | zIndex: 0
208 | - data:
209 | isInIteration: false
210 | sourceType: code
211 | targetType: template-transform
212 | id: 17274408191900-source-17274408457890-target
213 | source: '17274408191900'
214 | sourceHandle: source
215 | target: '17274408457890'
216 | targetHandle: target
217 | type: custom
218 | zIndex: 0
219 | - data:
220 | isInIteration: false
221 | sourceType: document-extractor
222 | targetType: template-transform
223 | id: 1729777092216-source-1729777162616-target
224 | source: '1729777092216'
225 | sourceHandle: source
226 | target: '1729777162616'
227 | targetHandle: target
228 | type: custom
229 | zIndex: 0
230 | - data:
231 | isInIteration: false
232 | sourceType: template-transform
233 | targetType: llm
234 | id: 1729777162616-source-llm-target
235 | selected: false
236 | source: '1729777162616'
237 | sourceHandle: source
238 | target: llm
239 | targetHandle: target
240 | type: custom
241 | zIndex: 0
242 | - data:
243 | isInIteration: false
244 | sourceType: list-operator
245 | targetType: document-extractor
246 | id: 1729777763543-source-1729777092216-target
247 | source: '1729777763543'
248 | sourceHandle: source
249 | target: '1729777092216'
250 | targetHandle: target
251 | type: custom
252 | zIndex: 0
253 | - data:
254 | isInIteration: false
255 | sourceType: if-else
256 | targetType: answer
257 | id: 1727357893396-true-1729777900959-target
258 | source: '1727357893396'
259 | sourceHandle: 'true'
260 | target: '1729777900959'
261 | targetHandle: target
262 | type: custom
263 | zIndex: 0
264 | - data:
265 | isInIteration: false
266 | sourceType: llm
267 | targetType: answer
268 | id: 1729778442989-source-1729778610477-target
269 | source: '1729778442989'
270 | sourceHandle: source
271 | target: '1729778610477'
272 | targetHandle: target
273 | type: custom
274 | zIndex: 0
275 | - data:
276 | isInIteration: false
277 | sourceType: list-operator
278 | targetType: llm
279 | id: 1729778350970-source-1729778654959-target
280 | source: '1729778350970'
281 | sourceHandle: source
282 | target: '1729778654959'
283 | targetHandle: target
284 | type: custom
285 | zIndex: 0
286 | - data:
287 | isInIteration: false
288 | sourceType: llm
289 | targetType: answer
290 | id: 1729778654959-source-1729778683728-target
291 | source: '1729778654959'
292 | sourceHandle: source
293 | target: '1729778683728'
294 | targetHandle: target
295 | type: custom
296 | zIndex: 0
297 | - data:
298 | isInIteration: false
299 | sourceType: if-else
300 | targetType: if-else
301 | id: 1727357893396-a924b44a-824a-4912-924e-268e87240447-1729781189640-target
302 | source: '1727357893396'
303 | sourceHandle: a924b44a-824a-4912-924e-268e87240447
304 | target: '1729781189640'
305 | targetHandle: target
306 | type: custom
307 | zIndex: 0
308 | - data:
309 | isInIteration: false
310 | sourceType: if-else
311 | targetType: list-operator
312 | id: 1729781189640-true-1729778350970-target
313 | source: '1729781189640'
314 | sourceHandle: 'true'
315 | target: '1729778350970'
316 | targetHandle: target
317 | type: custom
318 | zIndex: 0
319 | - data:
320 | isInIteration: false
321 | sourceType: if-else
322 | targetType: list-operator
323 | id: 1729781189640-ddf6ba30-c72f-4f06-b783-af77419acf30-1729777695485-target
324 | source: '1729781189640'
325 | sourceHandle: ddf6ba30-c72f-4f06-b783-af77419acf30
326 | target: '1729777695485'
327 | targetHandle: target
328 | type: custom
329 | zIndex: 0
330 | - data:
331 | isInIteration: false
332 | sourceType: if-else
333 | targetType: list-operator
334 | id: 1729781189640-5ff411e5-2162-41de-80de-b51902a2380f-1729777763543-target
335 | source: '1729781189640'
336 | sourceHandle: 5ff411e5-2162-41de-80de-b51902a2380f
337 | target: '1729777763543'
338 | targetHandle: target
339 | type: custom
340 | zIndex: 0
341 | - data:
342 | isInIteration: false
343 | sourceType: list-operator
344 | targetType: llm
345 | id: 1729777695485-source-1729778442989-target
346 | source: '1729777695485'
347 | sourceHandle: source
348 | target: '1729778442989'
349 | targetHandle: target
350 | type: custom
351 | zIndex: 0
352 | - data:
353 | isInIteration: false
354 | sourceType: if-else
355 | targetType: llm
356 | id: 1727357893396-false-1730860337573-target
357 | source: '1727357893396'
358 | sourceHandle: 'false'
359 | target: '1730860337573'
360 | targetHandle: target
361 | type: custom
362 | zIndex: 0
363 | - data:
364 | isInIteration: false
365 | sourceType: start
366 | targetType: if-else
367 | id: 1726108148263-source-1727357893396-target
368 | source: '1726108148263'
369 | sourceHandle: source
370 | target: '1727357893396'
371 | targetHandle: target
372 | type: custom
373 | zIndex: 0
374 | - data:
375 | isInIteration: false
376 | sourceType: llm
377 | targetType: if-else
378 | id: 1730860337573-source-1730860548544-target
379 | source: '1730860337573'
380 | sourceHandle: source
381 | target: '1730860548544'
382 | targetHandle: target
383 | type: custom
384 | zIndex: 0
385 | - data:
386 | isInIteration: false
387 | sourceType: if-else
388 | targetType: answer
389 | id: 1730860548544-true-1729777900959-target
390 | source: '1730860548544'
391 | sourceHandle: 'true'
392 | target: '1729777900959'
393 | targetHandle: target
394 | type: custom
395 | zIndex: 0
396 | - data:
397 | isInIteration: false
398 | sourceType: if-else
399 | targetType: if-else
400 | id: 1730860548544-false-1729781189640-target
401 | source: '1730860548544'
402 | sourceHandle: 'false'
403 | target: '1729781189640'
404 | targetHandle: target
405 | type: custom
406 | zIndex: 0
407 | - data:
408 | isInIteration: false
409 | sourceType: answer
410 | targetType: tool
411 | id: 1729777900959-source-1731030018613-target
412 | source: '1729777900959'
413 | sourceHandle: source
414 | target: '1731030018613'
415 | targetHandle: target
416 | type: custom
417 | zIndex: 0
418 | - data:
419 | isInIteration: false
420 | sourceType: tool
421 | targetType: code
422 | id: 1731030018613-source-1727437551868-target
423 | source: '1731030018613'
424 | sourceHandle: source
425 | target: '1727437551868'
426 | targetHandle: target
427 | type: custom
428 | zIndex: 0
429 | - data:
430 | isInIteration: false
431 | sourceType: tool
432 | targetType: code
433 | id: 1731030018613-source-1727438265117-target
434 | source: '1731030018613'
435 | sourceHandle: source
436 | target: '1727438265117'
437 | targetHandle: target
438 | type: custom
439 | zIndex: 0
440 | - data:
441 | isInIteration: false
442 | sourceType: tool
443 | targetType: code
444 | id: 1731030018613-source-17274404793180-target
445 | source: '1731030018613'
446 | sourceHandle: source
447 | target: '17274404793180'
448 | targetHandle: target
449 | type: custom
450 | zIndex: 0
451 | - data:
452 | isInIteration: false
453 | sourceType: tool
454 | targetType: code
455 | id: 1731030018613-source-17274407417220-target
456 | source: '1731030018613'
457 | sourceHandle: source
458 | target: '17274407417220'
459 | targetHandle: target
460 | type: custom
461 | zIndex: 0
462 | - data:
463 | isInIteration: false
464 | sourceType: template-transform
465 | targetType: llm
466 | id: 1727438089651-source-1727438962981-target
467 | source: '1727438089651'
468 | sourceHandle: source
469 | target: '1727438962981'
470 | targetHandle: target
471 | type: custom
472 | zIndex: 0
473 | - data:
474 | isInIteration: false
475 | sourceType: template-transform
476 | targetType: llm
477 | id: 1727438463965-source-1727438962981-target
478 | source: '1727438463965'
479 | sourceHandle: source
480 | target: '1727438962981'
481 | targetHandle: target
482 | type: custom
483 | zIndex: 0
484 | - data:
485 | isInIteration: false
486 | sourceType: template-transform
487 | targetType: llm
488 | id: 17274406200850-source-1727438962981-target
489 | source: '17274406200850'
490 | sourceHandle: source
491 | target: '1727438962981'
492 | targetHandle: target
493 | type: custom
494 | zIndex: 0
495 | - data:
496 | isInIteration: false
497 | sourceType: template-transform
498 | targetType: llm
499 | id: 17274408457890-source-1727438962981-target
500 | source: '17274408457890'
501 | sourceHandle: source
502 | target: '1727438962981'
503 | targetHandle: target
504 | type: custom
505 | zIndex: 0
506 | nodes:
507 | - data:
508 | desc: ''
509 | selected: false
510 | title: 开始
511 | type: start
512 | variables:
513 | - label: web搜索
514 | max_length: 48
515 | options:
516 | - 开启
517 | - 关闭
518 | required: false
519 | type: select
520 | variable: web_search
521 | - label: 角色定义
522 | max_length: 1024
523 | options: []
524 | required: false
525 | type: paragraph
526 | variable: role_def
527 | height: 116
528 | id: '1726108148263'
529 | position:
530 | x: 28.613266497463286
531 | y: 286.5
532 | positionAbsolute:
533 | x: 28.613266497463286
534 | y: 286.5
535 | selected: false
536 | sourcePosition: right
537 | targetPosition: left
538 | type: custom
539 | width: 244
540 | - data:
541 | context:
542 | enabled: false
543 | variable_selector: []
544 | desc: ''
545 | memory:
546 | query_prompt_template: '{{#1729777092216.text#}}
547 |
548 |
549 | {{#sys.query#}}
550 |
551 | '
552 | role_prefix:
553 | assistant: ''
554 | user: ''
555 | window:
556 | enabled: true
557 | size: 10
558 | model:
559 | completion_params:
560 | temperature: 0.7
561 | mode: chat
562 | name: anthropic.claude-3-5-sonnet-20240620-v1:0
563 | provider: langgenius/bedrock/bedrock
564 | prompt_template:
565 | - id: 44bec0ca-86b2-434d-bf4e-64f3ecbf27a3
566 | role: system
567 | text: '{{#1726108148263.role_def#}}, 结合上面文档内容回答问题'
568 | selected: false
569 | title: LLM 10
570 | type: llm
571 | variables: []
572 | vision:
573 | configs:
574 | detail: high
575 | variable_selector:
576 | - '1729777695485'
577 | - result
578 | enabled: false
579 | height: 96
580 | id: llm
581 | position:
582 | x: 2462
583 | y: 1153.5
584 | positionAbsolute:
585 | x: 2462
586 | y: 1153.5
587 | selected: false
588 | sourcePosition: right
589 | targetPosition: left
590 | type: custom
591 | width: 244
592 | - data:
593 | answer: '{{#llm.text#}}'
594 | desc: ''
595 | selected: false
596 | title: 直接回复
597 | type: answer
598 | variables: []
599 | height: 103
600 | id: answer
601 | position:
602 | x: 2766
603 | y: 1151.5
604 | positionAbsolute:
605 | x: 2766
606 | y: 1151.5
607 | selected: false
608 | sourcePosition: right
609 | targetPosition: left
610 | type: custom
611 | width: 244
612 | - data:
613 | cases:
614 | - case_id: 'true'
615 | conditions:
616 | - comparison_operator: contains
617 | id: 4ba6856a-715c-4cdb-a815-6a06950322e5
618 | value: 开启
619 | varType: string
620 | variable_selector:
621 | - '1726108148263'
622 | - web_search
623 | id: 'true'
624 | logical_operator: and
625 | - case_id: a924b44a-824a-4912-924e-268e87240447
626 | conditions:
627 | - comparison_operator: contains
628 | id: 0199f62e-073d-4bc0-a905-398775ffde75
629 | value: 关闭
630 | varType: string
631 | variable_selector:
632 | - '1726108148263'
633 | - web_search
634 | id: a924b44a-824a-4912-924e-268e87240447
635 | logical_operator: and
636 | desc: ''
637 | selected: false
638 | title: 条件分支
639 | type: if-else
640 | height: 174
641 | id: '1727357893396'
642 | position:
643 | x: 334
644 | y: 286.5
645 | positionAbsolute:
646 | x: 334
647 | y: 286.5
648 | selected: false
649 | sourcePosition: right
650 | targetPosition: left
651 | type: custom
652 | width: 244
653 | - data:
654 | code: "\ndef main(search_results) -> dict:\n return {\n \"title\"\
655 | \ : search_results[0]['organic_results'][0].get('title'),\n \"url\"\
656 | : search_results[0]['organic_results'][0].get('link'),\n \"snippet\"\
657 | \ : search_results[0]['organic_results'][0].get('snippet')\n }"
658 | code_language: python3
659 | desc: ''
660 | outputs:
661 | snippet:
662 | children: null
663 | type: string
664 | title:
665 | children: null
666 | type: string
667 | url:
668 | children: null
669 | type: string
670 | selected: false
671 | title: search_1
672 | type: code
673 | variables:
674 | - value_selector:
675 | - '1731030018613'
676 | - json
677 | variable: search_results
678 | height: 54
679 | id: '1727437551868'
680 | position:
681 | x: 1854
682 | y: 286.5
683 | positionAbsolute:
684 | x: 1854
685 | y: 286.5
686 | selected: false
687 | sourcePosition: right
688 | targetPosition: left
689 | type: custom
690 | width: 244
691 | - data:
692 | desc: ''
693 | provider_id: webscraper
694 | provider_name: webscraper
695 | provider_type: builtin
696 | selected: false
697 | title: 网页爬虫
698 | tool_configurations:
699 | generate_summary: null
700 | user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
701 | (KHTML, like Gecko) Chrome/100.0.1000.0 Safari/537.36
702 | tool_label: 网页爬虫
703 | tool_name: webscraper
704 | tool_parameters:
705 | url:
706 | type: mixed
707 | value: '{{#1727437551868.url#}}'
708 | type: tool
709 | height: 116
710 | id: '1727437724068'
711 | position:
712 | x: 2158
713 | y: 286.5
714 | positionAbsolute:
715 | x: 2158
716 | y: 286.5
717 | selected: false
718 | sourcePosition: right
719 | targetPosition: left
720 | type: custom
721 | width: 244
722 | - data:
723 | code: "\ndef main(crawl_result) -> str:\n idx = crawl_result.find(\"TEXT:\\\
724 | n\\n\")\n start_idx = idx + len(\"TEXT:\\n\\n\")\n return {\n \
725 | \ \"result\" : crawl_result[start_idx:8192]\n }\n"
726 | code_language: python3
727 | desc: ''
728 | outputs:
729 | result:
730 | children: null
731 | type: string
732 | selected: false
733 | title: post_1
734 | type: code
735 | variables:
736 | - value_selector:
737 | - '1727437724068'
738 | - text
739 | variable: crawl_result
740 | height: 54
741 | id: '1727437739002'
742 | position:
743 | x: 2462
744 | y: 286.5
745 | positionAbsolute:
746 | x: 2462
747 | y: 286.5
748 | selected: false
749 | sourcePosition: right
750 | targetPosition: left
751 | type: custom
752 | width: 244
753 | - data:
754 | desc: ''
755 | selected: false
756 | template: "{\n \"Title\" : {{ title }},\n \"URL\" : {{ url }},\n \
757 | \ \"snippet\" : {{ snippet }},\n \"content\" : {{ content }}\n}"
758 | title: 模板转换 1
759 | type: template-transform
760 | variables:
761 | - value_selector:
762 | - '1727437739002'
763 | - result
764 | variable: content
765 | - value_selector:
766 | - '1727437551868'
767 | - url
768 | variable: url
769 | - value_selector:
770 | - '1727437551868'
771 | - snippet
772 | variable: title
773 | - value_selector:
774 | - '1727437551868'
775 | - snippet
776 | variable: snippet
777 | height: 54
778 | id: '1727438089651'
779 | position:
780 | x: 2766
781 | y: 286.5
782 | positionAbsolute:
783 | x: 2766
784 | y: 286.5
785 | selected: true
786 | sourcePosition: right
787 | targetPosition: left
788 | type: custom
789 | width: 244
790 | - data:
791 | code: "\ndef main(search_results) -> dict:\n return {\n \"title\"\
792 | \ : search_results[0]['organic_results'][1].get('title'),\n \"url\"\
793 | : search_results[0]['organic_results'][1].get('link'),\n \"snippet\"\
794 | \ : search_results[0]['organic_results'][1].get('snippet'),\n }"
795 | code_language: python3
796 | desc: ''
797 | outputs:
798 | snippet:
799 | children: null
800 | type: string
801 | title:
802 | children: null
803 | type: string
804 | url:
805 | children: null
806 | type: string
807 | selected: false
808 | title: search_2
809 | type: code
810 | variables:
811 | - value_selector:
812 | - '1731030018613'
813 | - json
814 | variable: search_results
815 | height: 54
816 | id: '1727438265117'
817 | position:
818 | x: 1854
819 | y: 441.5
820 | positionAbsolute:
821 | x: 1854
822 | y: 441.5
823 | selected: false
824 | sourcePosition: right
825 | targetPosition: left
826 | type: custom
827 | width: 244
828 | - data:
829 | desc: ''
830 | provider_id: webscraper
831 | provider_name: webscraper
832 | provider_type: builtin
833 | selected: false
834 | title: 网页爬虫
835 | tool_configurations:
836 | generate_summary: null
837 | user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
838 | (KHTML, like Gecko) Chrome/100.0.1000.0 Safari/537.36
839 | tool_label: 网页爬虫
840 | tool_name: webscraper
841 | tool_parameters:
842 | url:
843 | type: mixed
844 | value: '{{#1727438265117.url#}}'
845 | type: tool
846 | height: 116
847 | id: '1727438331868'
848 | position:
849 | x: 2158
850 | y: 441.5
851 | positionAbsolute:
852 | x: 2158
853 | y: 441.5
854 | selected: false
855 | sourcePosition: right
856 | targetPosition: left
857 | type: custom
858 | width: 244
859 | - data:
860 | code: "\ndef main(crawl_result) -> str:\n idx = crawl_result.find(\"TEXT:\\\
861 | n\\n\")\n start_idx = idx + len(\"TEXT:\\n\\n\")\n return {\n \
862 | \ \"result\" : crawl_result[start_idx:8192]\n }\n"
863 | code_language: python3
864 | desc: ''
865 | outputs:
866 | result:
867 | children: null
868 | type: string
869 | selected: false
870 | title: POST 2
871 | type: code
872 | variables:
873 | - value_selector:
874 | - '1727438331868'
875 | - text
876 | variable: crawl_result
877 | height: 54
878 | id: '1727438349664'
879 | position:
880 | x: 2462
881 | y: 441.5
882 | positionAbsolute:
883 | x: 2462
884 | y: 441.5
885 | selected: false
886 | sourcePosition: right
887 | targetPosition: left
888 | type: custom
889 | width: 244
890 | - data:
891 | desc: ''
892 | selected: false
893 | template: "{\n \"Title\" : {{ title }},\n \"URL\" : {{ url }},\n \
894 | \ \"snippet\" : {{ snippet }},\n \"content\" : {{ content }}\n}"
895 | title: 模板转换 2
896 | type: template-transform
897 | variables:
898 | - value_selector:
899 | - '1727438265117'
900 | - snippet
901 | variable: title
902 | - value_selector:
903 | - '1727438265117'
904 | - url
905 | variable: url
906 | - value_selector:
907 | - '1727438349664'
908 | - result
909 | variable: content
910 | - value_selector:
911 | - '1727438265117'
912 | - snippet
913 | variable: snippet
914 | height: 54
915 | id: '1727438463965'
916 | position:
917 | x: 2766
918 | y: 441.5
919 | positionAbsolute:
920 | x: 2766
921 | y: 441.5
922 | selected: false
923 | sourcePosition: right
924 | targetPosition: left
925 | type: custom
926 | width: 244
927 | - data:
928 | context:
929 | enabled: false
930 | variable_selector: []
931 | desc: ''
932 | model:
933 | completion_params:
934 | temperature: 0.7
935 | mode: chat
936 | name: anthropic.claude-3-5-sonnet-20240620-v1:0
937 | provider: langgenius/bedrock/bedrock
938 | prompt_template:
939 | - id: 21458af2-ffc5-4488-9470-3a4ad579b1ce
940 | role: system
941 | text: '{{#1726108148263.role_def#}},请参考提供搜索的内容回答问题'
942 | - id: 35e1bbae-cfe5-478c-8b66-757348116763
943 | role: user
944 | text: '
945 |
946 | [
947 |
948 | {{#1727438089651.output#}},
949 |
950 | {{#1727438463965.output#}},
951 |
952 | {{#17274406200850.output#}},
953 |
954 | {{#17274408457890.output#}}
955 |
956 | ]
957 |
958 |
959 |
960 |
961 | ## Answer Format Example
962 |
963 | $PLACEHOLDER_ANSWER$
964 |
965 |
966 | 参考链接:
967 |
968 | 1. [Title](URL)
969 |
970 | 2. [Title](URL)
971 |
972 | ...
973 |
974 |
975 | ## Requirement:
976 |
977 | 1. 有些候选答案可能由于网页403无法获取的原因,无法直接回答, 忽略这些即可。
978 |
979 | 2. 直接给出回答,不用透露你综合了多个答案。
980 |
981 | 3. 如果采用了某搜索结果的内容,在Refernce部分按照序号,按照序号输出这个URL,以markdown的格式,如[title](url)。
982 |
983 | 4. 如果搜索结果中的Title过于冗长,直接输出URL也可以
984 |
985 |
986 | {{#sys.query#}}'
987 | selected: false
988 | title: LLM_Final
989 | type: llm
990 | variables: []
991 | vision:
992 | configs:
993 | detail: high
994 | enabled: false
995 | height: 96
996 | id: '1727438962981'
997 | position:
998 | x: 3232.5714285714284
999 | y: 510.07142857142856
1000 | positionAbsolute:
1001 | x: 3232.5714285714284
1002 | y: 510.07142857142856
1003 | selected: false
1004 | sourcePosition: right
1005 | targetPosition: left
1006 | type: custom
1007 | width: 244
1008 | - data:
1009 | answer: '{{#1727438962981.text#}}'
1010 | desc: ''
1011 | selected: false
1012 | title: 直接回复 2
1013 | type: answer
1014 | variables: []
1015 | height: 103
1016 | id: '1727439130548'
1017 | position:
1018 | x: 3570.8571428571427
1019 | y: 510.07142857142856
1020 | positionAbsolute:
1021 | x: 3570.8571428571427
1022 | y: 510.07142857142856
1023 | selected: false
1024 | sourcePosition: right
1025 | targetPosition: left
1026 | type: custom
1027 | width: 244
1028 | - data:
1029 | code: "\ndef main(search_results) -> dict:\n return {\n \"title\"\
1030 | \ : search_results[0]['organic_results'][2].get('title'),\n \"url\"\
1031 | : search_results[0]['organic_results'][2].get('link'),\n \"snippet\"\
1032 | \ : search_results[0]['organic_results'][2].get('snippet')\n }"
1033 | code_language: python3
1034 | desc: ''
1035 | outputs:
1036 | snippet:
1037 | children: null
1038 | type: string
1039 | title:
1040 | children: null
1041 | type: string
1042 | url:
1043 | children: null
1044 | type: string
1045 | selected: false
1046 | title: search_3
1047 | type: code
1048 | variables:
1049 | - value_selector:
1050 | - '1731030018613'
1051 | - json
1052 | variable: search_results
1053 | height: 54
1054 | id: '17274404793180'
1055 | position:
1056 | x: 1854
1057 | y: 596.5
1058 | positionAbsolute:
1059 | x: 1854
1060 | y: 596.5
1061 | selected: false
1062 | sourcePosition: right
1063 | targetPosition: left
1064 | type: custom
1065 | width: 244
1066 | - data:
1067 | desc: ''
1068 | provider_id: webscraper
1069 | provider_name: webscraper
1070 | provider_type: builtin
1071 | selected: false
1072 | title: 网页爬虫
1073 | tool_configurations:
1074 | generate_summary: null
1075 | user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
1076 | (KHTML, like Gecko) Chrome/100.0.1000.0 Safari/537.36
1077 | tool_label: 网页爬虫
1078 | tool_name: webscraper
1079 | tool_parameters:
1080 | url:
1081 | type: mixed
1082 | value: '{{#17274404793180.url#}}'
1083 | type: tool
1084 | height: 116
1085 | id: '17274405419030'
1086 | position:
1087 | x: 2158
1088 | y: 596.5
1089 | positionAbsolute:
1090 | x: 2158
1091 | y: 596.5
1092 | selected: false
1093 | sourcePosition: right
1094 | targetPosition: left
1095 | type: custom
1096 | width: 244
1097 | - data:
1098 | code: "\ndef main(crawl_result) -> str:\n idx = crawl_result.find(\"TEXT:\\\
1099 | n\\n\")\n start_idx = idx + len(\"TEXT:\\n\\n\")\n return {\n \
1100 | \ \"result\" : crawl_result[start_idx:8192]\n }\n"
1101 | code_language: python3
1102 | desc: ''
1103 | outputs:
1104 | result:
1105 | children: null
1106 | type: string
1107 | selected: false
1108 | title: POST_3
1109 | type: code
1110 | variables:
1111 | - value_selector:
1112 | - '17274405419030'
1113 | - text
1114 | variable: crawl_result
1115 | height: 54
1116 | id: '17274405777680'
1117 | position:
1118 | x: 2462
1119 | y: 596.5
1120 | positionAbsolute:
1121 | x: 2462
1122 | y: 596.5
1123 | selected: false
1124 | sourcePosition: right
1125 | targetPosition: left
1126 | type: custom
1127 | width: 244
1128 | - data:
1129 | desc: ''
1130 | selected: false
1131 | template: "{\n \"Title\" : {{ title }},\n \"URL\" : {{ url }},\n \
1132 | \ \"snippet\" : {{ snippet }},\n \"content\" : {{ content }}\n}"
1133 | title: 模板转换 3
1134 | type: template-transform
1135 | variables:
1136 | - value_selector:
1137 | - '17274404793180'
1138 | - snippet
1139 | variable: title
1140 | - value_selector:
1141 | - '17274404793180'
1142 | - url
1143 | variable: url
1144 | - value_selector:
1145 | - '17274405777680'
1146 | - result
1147 | variable: content
1148 | - value_selector:
1149 | - '17274404793180'
1150 | - snippet
1151 | variable: snippet
1152 | height: 54
1153 | id: '17274406200850'
1154 | position:
1155 | x: 2766
1156 | y: 596.5
1157 | positionAbsolute:
1158 | x: 2766
1159 | y: 596.5
1160 | selected: false
1161 | sourcePosition: right
1162 | targetPosition: left
1163 | type: custom
1164 | width: 244
1165 | - data:
1166 | code: "\ndef main(search_results) -> dict:\n return {\n \"title\"\
1167 | \ : search_results[0]['organic_results'][3].get('title'),\n \"url\"\
1168 | : search_results[0]['organic_results'][3].get('link'),\n \"snippet\"\
1169 | \ : search_results[0]['organic_results'][3].get('snippet')\n }"
1170 | code_language: python3
1171 | desc: ''
1172 | outputs:
1173 | snippet:
1174 | children: null
1175 | type: string
1176 | title:
1177 | children: null
1178 | type: string
1179 | url:
1180 | children: null
1181 | type: string
1182 | selected: false
1183 | title: search_4
1184 | type: code
1185 | variables:
1186 | - value_selector:
1187 | - '1731030018613'
1188 | - json
1189 | variable: search_results
1190 | height: 54
1191 | id: '17274407417220'
1192 | position:
1193 | x: 1854
1194 | y: 751.5
1195 | positionAbsolute:
1196 | x: 1854
1197 | y: 751.5
1198 | selected: false
1199 | sourcePosition: right
1200 | targetPosition: left
1201 | type: custom
1202 | width: 244
1203 | - data:
1204 | desc: ''
1205 | provider_id: webscraper
1206 | provider_name: webscraper
1207 | provider_type: builtin
1208 | selected: false
1209 | title: 网页爬虫
1210 | tool_configurations:
1211 | generate_summary: null
1212 | user_agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36
1213 | (KHTML, like Gecko) Chrome/100.0.1000.0 Safari/537.36
1214 | tool_label: 网页爬虫
1215 | tool_name: webscraper
1216 | tool_parameters:
1217 | url:
1218 | type: mixed
1219 | value: '{{#17274407417220.url#}}'
1220 | type: tool
1221 | height: 116
1222 | id: '17274407666060'
1223 | position:
1224 | x: 2158
1225 | y: 751.5
1226 | positionAbsolute:
1227 | x: 2158
1228 | y: 751.5
1229 | selected: false
1230 | sourcePosition: right
1231 | targetPosition: left
1232 | type: custom
1233 | width: 244
1234 | - data:
1235 | code: "\ndef main(crawl_result) -> str:\n idx = crawl_result.find(\"TEXT:\\\
1236 | n\\n\")\n start_idx = idx + len(\"TEXT:\\n\\n\")\n return {\n \
1237 | \ \"result\" : crawl_result[start_idx:8192]\n }\n"
1238 | code_language: python3
1239 | desc: ''
1240 | outputs:
1241 | result:
1242 | children: null
1243 | type: string
1244 | selected: false
1245 | title: POST_4
1246 | type: code
1247 | variables:
1248 | - value_selector:
1249 | - '17274407666060'
1250 | - text
1251 | variable: crawl_result
1252 | height: 54
1253 | id: '17274408191900'
1254 | position:
1255 | x: 2462
1256 | y: 751.5
1257 | positionAbsolute:
1258 | x: 2462
1259 | y: 751.5
1260 | selected: false
1261 | sourcePosition: right
1262 | targetPosition: left
1263 | type: custom
1264 | width: 244
1265 | - data:
1266 | desc: ''
1267 | selected: false
1268 | template: "{\n \"Title\" : {{ title }},\n \"URL\" : {{ url }},\n \
1269 | \ \"snippet\" : {{ snippet }},\n \"content\" : {{ content }}\n}"
1270 | title: 模板转换 4
1271 | type: template-transform
1272 | variables:
1273 | - value_selector:
1274 | - '17274407417220'
1275 | - snippet
1276 | variable: title
1277 | - value_selector:
1278 | - '17274407417220'
1279 | - url
1280 | variable: url
1281 | - value_selector:
1282 | - '17274408191900'
1283 | - result
1284 | variable: content
1285 | - value_selector:
1286 | - '17274407417220'
1287 | - snippet
1288 | variable: snippet
1289 | height: 54
1290 | id: '17274408457890'
1291 | position:
1292 | x: 2766
1293 | y: 751.5
1294 | positionAbsolute:
1295 | x: 2766
1296 | y: 751.5
1297 | selected: false
1298 | sourcePosition: right
1299 | targetPosition: left
1300 | type: custom
1301 | width: 244
1302 | - data:
1303 | desc: ''
1304 | is_array_file: false
1305 | selected: false
1306 | title: 文档提取器
1307 | type: document-extractor
1308 | variable_selector:
1309 | - '1729777763543'
1310 | - first_record
1311 | height: 92
1312 | id: '1729777092216'
1313 | position:
1314 | x: 1854
1315 | y: 1155.5
1316 | positionAbsolute:
1317 | x: 1854
1318 | y: 1155.5
1319 | selected: false
1320 | sourcePosition: right
1321 | targetPosition: left
1322 | type: custom
1323 | width: 244
1324 | - data:
1325 | desc: ''
1326 | selected: false
1327 | template: '{% for item in my_list %}
1328 |
1329 |
1330 |
1331 |
1332 |
1333 | {{ item }}
1334 |
1335 |
1336 |
1337 |
1338 |
1339 | {% endfor %}'
1340 | title: template
1341 | type: template-transform
1342 | variables:
1343 | - value_selector:
1344 | - '1729777092216'
1345 | - text
1346 | variable: my_list
1347 | height: 54
1348 | id: '1729777162616'
1349 | position:
1350 | x: 2158
1351 | y: 1206.5
1352 | positionAbsolute:
1353 | x: 2158
1354 | y: 1206.5
1355 | selected: false
1356 | sourcePosition: right
1357 | targetPosition: left
1358 | type: custom
1359 | width: 244
1360 | - data:
1361 | desc: ''
1362 | filter_by:
1363 | conditions:
1364 | - comparison_operator: in
1365 | key: type
1366 | value:
1367 | - image
1368 | enabled: true
1369 | item_var_type: file
1370 | limit:
1371 | enabled: false
1372 | size: 10
1373 | order_by:
1374 | enabled: false
1375 | key: ''
1376 | value: asc
1377 | selected: false
1378 | title: Image
1379 | type: list-operator
1380 | var_type: array[file]
1381 | variable:
1382 | - sys
1383 | - files
1384 | height: 92
1385 | id: '1729777695485'
1386 | position:
1387 | x: 1550
1388 | y: 1051.5
1389 | positionAbsolute:
1390 | x: 1550
1391 | y: 1051.5
1392 | selected: false
1393 | sourcePosition: right
1394 | targetPosition: left
1395 | type: custom
1396 | width: 244
1397 | - data:
1398 | desc: ''
1399 | filter_by:
1400 | conditions:
1401 | - comparison_operator: in
1402 | key: type
1403 | value:
1404 | - document
1405 | enabled: true
1406 | item_var_type: file
1407 | limit:
1408 | enabled: true
1409 | size: 2
1410 | order_by:
1411 | enabled: false
1412 | key: ''
1413 | value: asc
1414 | selected: false
1415 | title: Doc
1416 | type: list-operator
1417 | var_type: array[file]
1418 | variable:
1419 | - sys
1420 | - files
1421 | height: 92
1422 | id: '1729777763543'
1423 | position:
1424 | x: 1550
1425 | y: 1186.5
1426 | positionAbsolute:
1427 | x: 1550
1428 | y: 1186.5
1429 | selected: false
1430 | sourcePosition: right
1431 | targetPosition: left
1432 | type: custom
1433 | width: 244
1434 | - data:
1435 | answer: '开始搜索...
1436 |
1437 |
1438 | '
1439 | desc: ''
1440 | selected: false
1441 | title: intermediate_reply
1442 | type: answer
1443 | variables: []
1444 | height: 100
1445 | id: '1729777900959'
1446 | position:
1447 | x: 1246
1448 | y: 286.5
1449 | positionAbsolute:
1450 | x: 1246
1451 | y: 286.5
1452 | selected: false
1453 | sourcePosition: right
1454 | targetPosition: left
1455 | type: custom
1456 | width: 244
1457 | - data:
1458 | desc: ''
1459 | filter_by:
1460 | conditions:
1461 | - comparison_operator: <
1462 | key: size
1463 | value: '1'
1464 | enabled: true
1465 | item_var_type: file
1466 | limit:
1467 | enabled: false
1468 | size: 10
1469 | order_by:
1470 | enabled: false
1471 | key: ''
1472 | value: asc
1473 | selected: false
1474 | title: No-File
1475 | type: list-operator
1476 | var_type: array[file]
1477 | variable:
1478 | - sys
1479 | - files
1480 | height: 92
1481 | id: '1729778350970'
1482 | position:
1483 | x: 1550
1484 | y: 910.5
1485 | positionAbsolute:
1486 | x: 1550
1487 | y: 910.5
1488 | selected: false
1489 | sourcePosition: right
1490 | targetPosition: left
1491 | type: custom
1492 | width: 244
1493 | - data:
1494 | context:
1495 | enabled: false
1496 | variable_selector: []
1497 | desc: ''
1498 | memory:
1499 | query_prompt_template: ''
1500 | role_prefix:
1501 | assistant: ''
1502 | user: ''
1503 | window:
1504 | enabled: true
1505 | size: 10
1506 | model:
1507 | completion_params:
1508 | temperature: 0.7
1509 | mode: chat
1510 | name: anthropic.claude-3-5-sonnet-20241022-v2:0
1511 | provider: langgenius/bedrock/bedrock
1512 | prompt_template:
1513 | - id: 716255c3-9cca-4fd7-943d-bcb8946c3aca
1514 | role: system
1515 | text: '{{#1726108148263.role_def#}}'
1516 | selected: false
1517 | title: LLM 9
1518 | type: llm
1519 | variables: []
1520 | vision:
1521 | configs:
1522 | detail: high
1523 | variable_selector:
1524 | - '1729777695485'
1525 | - result
1526 | enabled: true
1527 | height: 96
1528 | id: '1729778442989'
1529 | position:
1530 | x: 1854
1531 | y: 1018.5
1532 | positionAbsolute:
1533 | x: 1854
1534 | y: 1018.5
1535 | selected: false
1536 | sourcePosition: right
1537 | targetPosition: left
1538 | type: custom
1539 | width: 244
1540 | - data:
1541 | answer: '{{#1729778442989.text#}}'
1542 | desc: ''
1543 | selected: false
1544 | title: 直接回复 4
1545 | type: answer
1546 | variables: []
1547 | height: 103
1548 | id: '1729778610477'
1549 | position:
1550 | x: 2158
1551 | y: 1047.5
1552 | positionAbsolute:
1553 | x: 2158
1554 | y: 1047.5
1555 | selected: false
1556 | sourcePosition: right
1557 | targetPosition: left
1558 | type: custom
1559 | width: 244
1560 | - data:
1561 | context:
1562 | enabled: false
1563 | variable_selector: []
1564 | desc: ''
1565 | model:
1566 | completion_params:
1567 | temperature: 0.7
1568 | mode: chat
1569 | name: anthropic.claude-3-5-sonnet-20241022-v2:0
1570 | provider: langgenius/bedrock/bedrock
1571 | prompt_template:
1572 | - id: deeb4fd7-f7da-48bd-a1f7-e0efc6a59888
1573 | role: system
1574 | text: '{{#1726108148263.role_def#}}'
1575 | - id: 8fe07dab-ee0b-417e-8dec-843748f94c5a
1576 | role: user
1577 | text: '{{#sys.query#}}'
1578 | selected: false
1579 | title: LLM 8
1580 | type: llm
1581 | variables: []
1582 | vision:
1583 | enabled: false
1584 | height: 96
1585 | id: '1729778654959'
1586 | position:
1587 | x: 1854
1588 | y: 877.5
1589 | positionAbsolute:
1590 | x: 1854
1591 | y: 877.5
1592 | selected: false
1593 | sourcePosition: right
1594 | targetPosition: left
1595 | type: custom
1596 | width: 244
1597 | - data:
1598 | answer: '{{#1729778654959.text#}}'
1599 | desc: ''
1600 | selected: false
1601 | title: 直接回复 5
1602 | type: answer
1603 | variables: []
1604 | height: 103
1605 | id: '1729778683728'
1606 | position:
1607 | x: 2158
1608 | y: 906.5
1609 | positionAbsolute:
1610 | x: 2158
1611 | y: 906.5
1612 | selected: false
1613 | sourcePosition: right
1614 | targetPosition: left
1615 | type: custom
1616 | width: 244
1617 | - data:
1618 | cases:
1619 | - case_id: 'true'
1620 | conditions:
1621 | - comparison_operator: empty
1622 | id: 738a2218-18af-480a-8201-1f51d5a4bfdb
1623 | value: ''
1624 | varType: array[file]
1625 | variable_selector:
1626 | - sys
1627 | - files
1628 | id: 'true'
1629 | logical_operator: and
1630 | - case_id: ddf6ba30-c72f-4f06-b783-af77419acf30
1631 | conditions:
1632 | - comparison_operator: contains
1633 | id: ca5005a5-ed74-4867-9a1d-722b2ba71375
1634 | sub_variable_condition:
1635 | case_id: e1030080-d7c9-40d0-941e-0cd30bf90649
1636 | conditions:
1637 | - comparison_operator: in
1638 | id: f4fe6e5b-c2bf-42d3-8d75-5f83939486e0
1639 | key: type
1640 | value:
1641 | - image
1642 | varType: string
1643 | logical_operator: and
1644 | value: ''
1645 | varType: array[file]
1646 | variable_selector:
1647 | - sys
1648 | - files
1649 | id: ddf6ba30-c72f-4f06-b783-af77419acf30
1650 | logical_operator: and
1651 | - case_id: 5ff411e5-2162-41de-80de-b51902a2380f
1652 | conditions:
1653 | - comparison_operator: contains
1654 | id: 0beb1d49-3f80-488f-a3b5-5b5e10a29e0b
1655 | sub_variable_condition:
1656 | case_id: d556ca9a-6562-4a88-aa37-fb646669d02d
1657 | conditions:
1658 | - comparison_operator: in
1659 | id: 6d195fa2-b71e-4bf8-8bc2-ef51fecf21d4
1660 | key: type
1661 | value:
1662 | - document
1663 | varType: string
1664 | logical_operator: and
1665 | value: ''
1666 | varType: array[file]
1667 | variable_selector:
1668 | - sys
1669 | - files
1670 | id: 5ff411e5-2162-41de-80de-b51902a2380f
1671 | logical_operator: and
1672 | desc: ''
1673 | selected: false
1674 | title: 条件分支 3
1675 | type: if-else
1676 | height: 270
1677 | id: '1729781189640'
1678 | position:
1679 | x: 1246
1680 | y: 814.5
1681 | positionAbsolute:
1682 | x: 1246
1683 | y: 814.5
1684 | selected: false
1685 | sourcePosition: right
1686 | targetPosition: left
1687 | type: custom
1688 | width: 244
1689 | - data:
1690 | context:
1691 | enabled: false
1692 | variable_selector: []
1693 | desc: ''
1694 | model:
1695 | completion_params:
1696 | stop:
1697 | -
1698 | temperature: 0.7
1699 | mode: chat
1700 | name: us.anthropic.claude-3-5-sonnet-20240620-v1:0
1701 | provider: langgenius/bedrock/bedrock
1702 | prompt_template:
1703 | - id: 2f0f0390-0372-451c-ad0c-ad859b76b0af
1704 | role: system
1705 | text: '这是一个判断问题是否需要搜索实时信息的任务。请按照以下步骤进行:
1706 |
1707 |
1708 | 1. 仔细分析问题,看看它是否可能随时间变化而需要搜索最新信息。
1709 |
1710 | 2. 如果问题确实需要搜索实时信息来获取最新答案,请回答"Yes"。
1711 |
1712 | 3. 如果问题不需要搜索实时信息,因为答案是永久不变的,请回答"No"。
1713 |
1714 | 4. 把你的答案输出到和之间'
1715 | - id: faf064e8-f465-4400-a3b7-562e1f5edaac
1716 | role: user
1717 | text: {{#sys.query#}}
1718 | - id: 2e71437d-78cb-4e07-ab18-3bd2bcdeb4df
1719 | role: assistant
1720 | text:
1721 | selected: false
1722 | title: LLM 9
1723 | type: llm
1724 | variables: []
1725 | vision:
1726 | enabled: false
1727 | height: 96
1728 | id: '1730860337573'
1729 | position:
1730 | x: 638
1731 | y: 992
1732 | positionAbsolute:
1733 | x: 638
1734 | y: 992
1735 | selected: false
1736 | sourcePosition: right
1737 | targetPosition: left
1738 | type: custom
1739 | width: 244
1740 | - data:
1741 | cases:
1742 | - case_id: 'true'
1743 | conditions:
1744 | - comparison_operator: is
1745 | id: 1d4748fe-7be3-4281-af82-349b2d8bda55
1746 | value: 'Yes'
1747 | varType: string
1748 | variable_selector:
1749 | - '1730860337573'
1750 | - text
1751 | id: 'true'
1752 | logical_operator: and
1753 | desc: ''
1754 | selected: false
1755 | title: 条件分支 3
1756 | type: if-else
1757 | height: 126
1758 | id: '1730860548544'
1759 | position:
1760 | x: 942
1761 | y: 992
1762 | positionAbsolute:
1763 | x: 942
1764 | y: 992
1765 | selected: false
1766 | sourcePosition: right
1767 | targetPosition: left
1768 | type: custom
1769 | width: 244
1770 | - data:
1771 | desc: ''
1772 | provider_id: google
1773 | provider_name: google
1774 | provider_type: builtin
1775 | selected: false
1776 | title: 谷歌搜索
1777 | tool_configurations: {}
1778 | tool_label: 谷歌搜索
1779 | tool_name: google_search
1780 | tool_parameters:
1781 | query:
1782 | type: mixed
1783 | value: '{{#sys.query#}}'
1784 | type: tool
1785 | height: 54
1786 | id: '1731030018613'
1787 | position:
1788 | x: 1555.7142857142858
1789 | y: 286.5
1790 | positionAbsolute:
1791 | x: 1555.7142857142858
1792 | y: 286.5
1793 | selected: false
1794 | sourcePosition: right
1795 | targetPosition: left
1796 | type: custom
1797 | width: 244
1798 | viewport:
1799 | x: 83.744018590309
1800 | y: 106.4424476299724
1801 | zoom: 0.32293481193258344
1802 |
--------------------------------------------------------------------------------
/DSLs/不同类型的异常处理.yml:
--------------------------------------------------------------------------------
1 | app:
2 | description: ''
3 | icon: ladybug
4 | icon_background: '#E0F2FE'
5 | mode: advanced-chat
6 | name: 不同类型的异常处理
7 | use_icon_as_answer_icon: false
8 | kind: app
9 | version: 0.1.3
10 | workflow:
11 | conversation_variables: []
12 | environment_variables: []
13 | features:
14 | file_upload:
15 | allowed_file_extensions:
16 | - .JPG
17 | - .JPEG
18 | - .PNG
19 | - .GIF
20 | - .WEBP
21 | - .SVG
22 | allowed_file_types:
23 | - image
24 | allowed_file_upload_methods:
25 | - local_file
26 | - remote_url
27 | enabled: false
28 | fileUploadConfig:
29 | audio_file_size_limit: 50
30 | batch_count_limit: 5
31 | file_size_limit: 15
32 | image_file_size_limit: 10
33 | video_file_size_limit: 100
34 | workflow_file_upload_limit: 10
35 | image:
36 | enabled: false
37 | number_limits: 3
38 | transfer_methods:
39 | - local_file
40 | - remote_url
41 | number_limits: 3
42 | opening_statement: Here are the simulation status tests for different situations.
43 | retriever_resource:
44 | enabled: true
45 | sensitive_word_avoidance:
46 | enabled: false
47 | speech_to_text:
48 | enabled: false
49 | suggested_questions:
50 | - https://httpstat.us/404
51 | - https://httpstat.us/429
52 | - https://httpstat.us/500
53 | - https://httpstat.us/403
54 | - https://httpstat.us/200
55 | suggested_questions_after_answer:
56 | enabled: false
57 | text_to_speech:
58 | enabled: false
59 | language: ''
60 | voice: ''
61 | graph:
62 | edges:
63 | - data:
64 | isInIteration: false
65 | sourceType: start
66 | targetType: http-request
67 | id: 1733909511549-source-1733909519940-target
68 | source: '1733909511549'
69 | sourceHandle: source
70 | target: '1733909519940'
71 | targetHandle: target
72 | type: custom
73 | zIndex: 0
74 | - data:
75 | isInIteration: false
76 | sourceType: http-request
77 | targetType: if-else
78 | id: 1733909519940-fail-branch-1733910151008-target
79 | source: '1733909519940'
80 | sourceHandle: fail-branch
81 | target: '1733910151008'
82 | targetHandle: target
83 | type: custom
84 | zIndex: 0
85 | - data:
86 | isInIteration: false
87 | sourceType: if-else
88 | targetType: answer
89 | id: 1733910151008-true-answer-target
90 | source: '1733910151008'
91 | sourceHandle: 'true'
92 | target: answer
93 | targetHandle: target
94 | type: custom
95 | zIndex: 0
96 | - data:
97 | isInIteration: false
98 | sourceType: http-request
99 | targetType: answer
100 | id: 1733909519940-source-1733910320961-target
101 | source: '1733909519940'
102 | sourceHandle: source
103 | target: '1733910320961'
104 | targetHandle: target
105 | type: custom
106 | zIndex: 0
107 | - data:
108 | isInIteration: false
109 | sourceType: if-else
110 | targetType: answer
111 | id: 1733910151008-dbb260c8-3f59-46e9-b4ed-b0b5a1a9f49d-17339104053230-target
112 | source: '1733910151008'
113 | sourceHandle: dbb260c8-3f59-46e9-b4ed-b0b5a1a9f49d
114 | target: '17339104053230'
115 | targetHandle: target
116 | type: custom
117 | zIndex: 0
118 | - data:
119 | isInIteration: false
120 | sourceType: if-else
121 | targetType: answer
122 | id: 1733910151008-41c21d2a-3910-4a67-98ba-4a610fa4824d-17339104116060-target
123 | source: '1733910151008'
124 | sourceHandle: 41c21d2a-3910-4a67-98ba-4a610fa4824d
125 | target: '17339104116060'
126 | targetHandle: target
127 | type: custom
128 | zIndex: 0
129 | - data:
130 | isInIteration: false
131 | sourceType: if-else
132 | targetType: answer
133 | id: 1733910151008-1625a33e-7176-4cc8-a87f-8a436d156536-17339104173770-target
134 | source: '1733910151008'
135 | sourceHandle: 1625a33e-7176-4cc8-a87f-8a436d156536
136 | target: '17339104173770'
137 | targetHandle: target
138 | type: custom
139 | zIndex: 0
140 | nodes:
141 | - data:
142 | desc: ''
143 | selected: false
144 | title: Start
145 | type: start
146 | variables: []
147 | height: 54
148 | id: '1733909511549'
149 | position:
150 | x: 80
151 | y: 282
152 | positionAbsolute:
153 | x: 80
154 | y: 282
155 | selected: false
156 | sourcePosition: right
157 | targetPosition: left
158 | type: custom
159 | width: 244
160 | - data:
161 | answer: 'My error type is 404.
162 |
163 | {{#1733909519940.error_message#}}
164 |
165 | {{#1733909519940.error_type#}}'
166 | desc: ''
167 | selected: false
168 | title: Answer
169 | type: answer
170 | variables: []
171 | height: 138
172 | id: answer
173 | position:
174 | x: 1019
175 | y: 277
176 | positionAbsolute:
177 | x: 1019
178 | y: 277
179 | selected: false
180 | sourcePosition: right
181 | targetPosition: left
182 | type: custom
183 | width: 244
184 | - data:
185 | authorization:
186 | config: null
187 | type: no-auth
188 | body:
189 | data: []
190 | type: none
191 | desc: ''
192 | error_strategy: fail-branch
193 | headers: ''
194 | method: get
195 | params: ''
196 | selected: false
197 | timeout:
198 | max_connect_timeout: 0
199 | max_read_timeout: 0
200 | max_write_timeout: 0
201 | title: HTTP Request
202 | type: http-request
203 | url: '{{#sys.query#}}'
204 | variables: []
205 | height: 97
206 | id: '1733909519940'
207 | position:
208 | x: 384
209 | y: 282
210 | positionAbsolute:
211 | x: 384
212 | y: 282
213 | selected: false
214 | sourcePosition: right
215 | targetPosition: left
216 | type: custom
217 | width: 244
218 | - data:
219 | cases:
220 | - case_id: 'true'
221 | conditions:
222 | - comparison_operator: contains
223 | id: e3567322-83c8-4448-aeab-7f901f496732
224 | value: '404'
225 | varType: string
226 | variable_selector:
227 | - '1733909519940'
228 | - error_message
229 | id: 'true'
230 | logical_operator: and
231 | - case_id: dbb260c8-3f59-46e9-b4ed-b0b5a1a9f49d
232 | conditions:
233 | - comparison_operator: contains
234 | id: 99eacefb-3786-4303-bb0f-5162989a4a55
235 | value: '429'
236 | varType: string
237 | variable_selector:
238 | - '1733909519940'
239 | - error_message
240 | logical_operator: and
241 | - case_id: 41c21d2a-3910-4a67-98ba-4a610fa4824d
242 | conditions:
243 | - comparison_operator: contains
244 | id: c9bb6189-ec48-4d34-a6bf-e55917e8fb17
245 | value: '500'
246 | varType: string
247 | variable_selector:
248 | - '1733909519940'
249 | - error_message
250 | logical_operator: and
251 | - case_id: 1625a33e-7176-4cc8-a87f-8a436d156536
252 | conditions:
253 | - comparison_operator: contains
254 | id: af919efd-1aae-4288-978b-572937fa15f2
255 | value: '403'
256 | varType: string
257 | variable_selector:
258 | - '1733909519940'
259 | - error_message
260 | logical_operator: and
261 | desc: ''
262 | selected: false
263 | title: IF/ELSE
264 | type: if-else
265 | height: 270
266 | id: '1733910151008'
267 | position:
268 | x: 719
269 | y: 277
270 | positionAbsolute:
271 | x: 719
272 | y: 277
273 | selected: false
274 | sourcePosition: right
275 | targetPosition: left
276 | type: custom
277 | width: 244
278 | - data:
279 | answer: success
280 | desc: ''
281 | selected: false
282 | title: Answer 2
283 | type: answer
284 | variables: []
285 | height: 100
286 | id: '1733910320961'
287 | position:
288 | x: 704.2144302513008
289 | y: 132.5758610398908
290 | positionAbsolute:
291 | x: 704.2144302513008
292 | y: 132.5758610398908
293 | selected: false
294 | sourcePosition: right
295 | targetPosition: left
296 | type: custom
297 | width: 244
298 | - data:
299 | answer: 'My error type is 429.
300 |
301 | {{#1733909519940.error_message#}}
302 |
303 | {{#1733909519940.error_type#}}'
304 | desc: ''
305 | selected: false
306 | title: Answer (1)
307 | type: answer
308 | variables: []
309 | height: 138
310 | id: '17339104053230'
311 | position:
312 | x: 1076.7091466204163
313 | y: 446.1434031715808
314 | positionAbsolute:
315 | x: 1076.7091466204163
316 | y: 446.1434031715808
317 | selected: false
318 | sourcePosition: right
319 | targetPosition: left
320 | type: custom
321 | width: 244
322 | - data:
323 | answer: 'My error type is 500.
324 |
325 | {{#1733909519940.error_message#}}
326 |
327 | {{#1733909519940.error_type#}}'
328 | desc: ''
329 | selected: false
330 | title: Answer (2)
331 | type: answer
332 | variables: []
333 | height: 138
334 | id: '17339104116060'
335 | position:
336 | x: 1061.9235768717172
337 | y: 585.1277588093535
338 | positionAbsolute:
339 | x: 1061.9235768717172
340 | y: 585.1277588093535
341 | selected: false
342 | sourcePosition: right
343 | targetPosition: left
344 | type: custom
345 | width: 244
346 | - data:
347 | answer: 'My error type is 403.
348 |
349 | {{#1733909519940.error_message#}}
350 |
351 | {{#1733909519940.error_type#}}'
352 | desc: ''
353 | selected: false
354 | title: Answer (3)
355 | type: answer
356 | variables: []
357 | height: 138
358 | id: '17339104173770'
359 | position:
360 | x: 1029.066755207941
361 | y: 767.811687259948
362 | positionAbsolute:
363 | x: 1029.066755207941
364 | y: 767.811687259948
365 | selected: false
366 | sourcePosition: right
367 | targetPosition: left
368 | type: custom
369 | width: 244
370 | - data:
371 | author: Yevanchen
372 | desc: ''
373 | height: 182
374 | selected: false
375 | showAuthor: true
376 | text: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"这个用例模拟了不同情况的下的异常处理,对于运行时异常可能有不同的可预见的错误类型,failbranch
377 | 允许开发者提前配置对应的错误处理工作流来捕获运行时的异常这里使用","type":"text","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"403
378 | Forbidden: https://httpstat.us/403 ","type":"text","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"404
379 | Not Found: https://httpstat.us/404 ","type":"text","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"429
380 | Too Many Requests: https://httpstat.us/429 ","type":"text","version":1},{"type":"linebreak","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"500
381 | Server Error: https://httpstat.us/500","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'
382 | theme: blue
383 | title: ''
384 | type: ''
385 | width: 280
386 | height: 182
387 | id: '1733910597234'
388 | position:
389 | x: 80
390 | y: 366.08174366124496
391 | positionAbsolute:
392 | x: 80
393 | y: 366.08174366124496
394 | selected: true
395 | sourcePosition: right
396 | targetPosition: left
397 | type: custom-note
398 | width: 280
399 | viewport:
400 | x: -51.891477828372956
401 | y: -51.15384739295632
402 | zoom: 0.9994613680079595
403 |
--------------------------------------------------------------------------------
/DSLs/意图识别.yml:
--------------------------------------------------------------------------------
1 | app:
2 | description: 根据用户意图选择性回复
3 | icon: 🤖
4 | icon_background: '#FFEAD5'
5 | mode: workflow
6 | name: 意图识别
7 | use_icon_as_answer_icon: false
8 | kind: app
9 | version: 0.1.2
10 | workflow:
11 | conversation_variables: []
12 | environment_variables: []
13 | features:
14 | file_upload:
15 | image:
16 | enabled: false
17 | number_limits: 3
18 | transfer_methods:
19 | - local_file
20 | - remote_url
21 | opening_statement: ''
22 | retriever_resource:
23 | enabled: false
24 | sensitive_word_avoidance:
25 | enabled: false
26 | speech_to_text:
27 | enabled: false
28 | suggested_questions: []
29 | suggested_questions_after_answer:
30 | enabled: false
31 | text_to_speech:
32 | enabled: false
33 | language: ''
34 | voice: ''
35 | graph:
36 | edges:
37 | - data:
38 | sourceType: llm
39 | targetType: question-classifier
40 | id: 1718246807593-1718246909580
41 | selected: false
42 | source: '1718246807593'
43 | sourceHandle: source
44 | target: '1718246909580'
45 | targetHandle: target
46 | type: custom
47 | - data:
48 | sourceType: question-classifier
49 | targetType: llm
50 | id: 1718246909580-1718246916748
51 | selected: false
52 | source: '1718246909580'
53 | sourceHandle: '1715846546749'
54 | target: '1718246916748'
55 | targetHandle: target
56 | type: custom
57 | - data:
58 | isInIteration: false
59 | sourceType: llm
60 | targetType: variable-aggregator
61 | id: 1718246916748-source-1718852940536-target
62 | source: '1718246916748'
63 | sourceHandle: source
64 | target: '1718852940536'
65 | targetHandle: target
66 | type: custom
67 | zIndex: 0
68 | - data:
69 | isInIteration: false
70 | sourceType: llm
71 | targetType: variable-aggregator
72 | id: 1718246959048-source-1718852940536-target
73 | source: '1718246959048'
74 | sourceHandle: source
75 | target: '1718852940536'
76 | targetHandle: target
77 | type: custom
78 | zIndex: 0
79 | - data:
80 | isInIteration: false
81 | sourceType: variable-aggregator
82 | targetType: llm
83 | id: 1718852940536-source-1718853322658-target
84 | source: '1718852940536'
85 | sourceHandle: source
86 | target: '1718853322658'
87 | targetHandle: target
88 | type: custom
89 | zIndex: 0
90 | - data:
91 | isInIteration: false
92 | sourceType: start
93 | targetType: llm
94 | id: 1714456604511-source-1718246807593-target
95 | source: '1714456604511'
96 | sourceHandle: source
97 | target: '1718246807593'
98 | targetHandle: target
99 | type: custom
100 | zIndex: 0
101 | - data:
102 | isInIteration: false
103 | sourceType: llm
104 | targetType: end
105 | id: 1718853322658-source-1719901804452-target
106 | source: '1718853322658'
107 | sourceHandle: source
108 | target: '1719901804452'
109 | targetHandle: target
110 | type: custom
111 | zIndex: 0
112 | - data:
113 | isInIteration: false
114 | sourceType: question-classifier
115 | targetType: knowledge-retrieval
116 | id: 1718246909580-1715846565625-1721623802451-target
117 | source: '1718246909580'
118 | sourceHandle: '1715846565625'
119 | target: '1721623802451'
120 | targetHandle: target
121 | type: custom
122 | zIndex: 0
123 | - data:
124 | isInIteration: false
125 | sourceType: knowledge-retrieval
126 | targetType: llm
127 | id: 1721623802451-source-1718246959048-target
128 | source: '1721623802451'
129 | sourceHandle: source
130 | target: '1718246959048'
131 | targetHandle: target
132 | type: custom
133 | zIndex: 0
134 | nodes:
135 | - data:
136 | desc: ''
137 | selected: false
138 | title: 开始
139 | type: start
140 | variables:
141 | - label: query
142 | max_length: 60000
143 | options: []
144 | required: true
145 | type: paragraph
146 | variable: query
147 | height: 90
148 | id: '1714456604511'
149 | position:
150 | x: 30
151 | y: 292
152 | positionAbsolute:
153 | x: 30
154 | y: 292
155 | selected: false
156 | sourcePosition: right
157 | targetPosition: left
158 | type: custom
159 | width: 244
160 | - data:
161 | context:
162 | enabled: false
163 | variable_selector: []
164 | desc: ''
165 | memory:
166 | role_prefix:
167 | assistant: ''
168 | user: ''
169 | window:
170 | enabled: true
171 | size: 3
172 | model:
173 | completion_params:
174 | temperature: 0.7
175 | top_p: 0.2
176 | mode: chat
177 | name: glm-4-flash
178 | provider: zhipuai
179 | prompt_template:
180 | - id: cf4669d8-da9b-43e6-a726-989dd4dacdc9
181 | role: system
182 | text: '现在我要做一个聊天信息整理的工作,请参照以下Prompt制作。
183 |
184 | '
185 | - id: 4cd9313f-e470-4abd-96ba-0f396be97a9d
186 | role: user
187 | text: '## 角色
188 |
189 | 你是一个App的客服,App已经上架了应用商店,它还有一个配套的运动腕带,可以实时监测心率,你负责提供客服服务。
190 |
191 |
192 | ## 输入:
193 |
194 | - 输入内容为用户的聊天记录
195 |
196 | - 可能含有多段文本和多张图片
197 |
198 | - 这些内容与App、运动、饮食、答题或日常生活相关。
199 |
200 |
201 | ## 策略:
202 |
203 | 分四步进行信息整理,并打印每步的结果,不要遗漏:
204 |
205 | 1. 如果有图片,识别图片的内容,进行分类,例如:饮食、APP截图、运动腕带等
206 |
207 | 2. 结合文本的内容,对图片进行详细的描述。
208 |
209 | 3. 根据对文本的理解和图片的描述,尝试对聊天内容进行补全,指出用户的意图。例如:打卡分享、健康咨询、在线交友、咨询饮食建议、运动腕带问题咨询等。
210 |
211 | 4. 根据用户的意图,给出回复策略。例如:夸奖用户、健康指导、App或腕带使用帮助
212 |
213 | - 单纯的图片分享,大概率是需要夸奖
214 |
215 | - 有健康相关问题,大概率是需要专业的健康指导和建议
216 |
217 | - App和腕带问题,大概率需要检索知识库,提供使用帮助
218 |
219 | - 文本信息中的 image_type 仅供参考,不要参与分析
220 |
221 | ## 格式
222 |
223 | 返回格式如下,"{xxx}"表示占位符:
224 |
225 | ### 图片分类
226 |
227 | {图片分类}
228 |
229 | ***
230 |
231 | ### 图片描述
232 |
233 | {图片描述}
234 |
235 | ***
236 |
237 | ### 用户意图
238 |
239 | {用户意图}
240 |
241 | ***
242 |
243 | ### 回复策略
244 |
245 | {回复策略}'
246 | - id: 04e30b4d-8f79-4837-b470-bd46ae52a1bb
247 | role: assistant
248 | text: 好的,我将按照你的要求,进行数据整理
249 | - id: 7a805718-5f13-4bd4-9995-b466b56f4735
250 | role: user
251 | text: '{{#1714456604511.query#}}'
252 | selected: false
253 | title: 意图向量机
254 | type: llm
255 | variables: []
256 | vision:
257 | enabled: false
258 | height: 98
259 | id: '1718246807593'
260 | position:
261 | x: 334.80422382079394
262 | y: 292
263 | positionAbsolute:
264 | x: 334.80422382079394
265 | y: 292
266 | selected: false
267 | sourcePosition: right
268 | targetPosition: left
269 | type: custom
270 | width: 244
271 | - data:
272 | classes:
273 | - id: '1715846546749'
274 | name: 健康咨询
275 | - id: '1715846565625'
276 | name: 使用帮助
277 | desc: ''
278 | instruction: '分类依据
279 |
280 | - 与App,运动腕带相关,都属于 **使用帮助** 这个类别
281 |
282 | - 疾病、饮食、睡眠等其他分类,都属于 **健康咨询** 这个类别'
283 | instructions: ''
284 | model:
285 | completion_params:
286 | temperature: 0.1
287 | top_p: 1
288 | mode: chat
289 | name: deepseek-chat
290 | provider: deepseek
291 | query_variable_selector:
292 | - '1718246807593'
293 | - text
294 | selected: false
295 | title: 问题分类器
296 | topics: []
297 | type: question-classifier
298 | height: 184
299 | id: '1718246909580'
300 | position:
301 | x: 638
302 | y: 292
303 | positionAbsolute:
304 | x: 638
305 | y: 292
306 | selected: false
307 | sourcePosition: right
308 | targetPosition: left
309 | type: custom
310 | width: 244
311 | - data:
312 | context:
313 | enabled: true
314 | variable_selector:
315 | - '1718246807593'
316 | - text
317 | desc: ''
318 | model:
319 | completion_params:
320 | temperature: 0.2
321 | mode: chat
322 | name: deepseek-chat
323 | provider: deepseek
324 | prompt_template:
325 | - id: 8dfbe783-52f1-4210-9899-e952da5ed717
326 | role: system
327 | text: '### 角色定位
328 |
329 |
330 | 作为一位经验丰富的社群健康管家,您负责在微信群内提供专业的健康反馈和建议。你可以根据用户的意图,和回复策略,进行回复。
331 |
332 | ### 专业技能
333 |
334 |
335 | * 慢病管理与营养学:您熟悉《中国高血压健康管理规范》、《中国老年糖尿病诊疗指南》和《中国膳食营养指南》,拥有丰富的实践经验。
336 |
337 | * 药物知识:您拥有20年的药师经验,对药品说明书和使用细节有着深刻的理解。
338 |
339 | * 健康咨询:您能够根据用户的具体问题,提供全面的健康建议、生活方式指导和心理支持。
340 |
341 |
342 | ### 操作准则
343 |
344 | * 信息参考性:在提供医疗相关信息时,要明确告知用户所有建议仅供参考,具体医疗决策和用药问题应遵循医生的指导。
345 |
346 | * 服务范围:如果用户的问题超出健康管理范畴,您应说明作为健康管理师,您无法提供超出健康咨询范围的建议。
347 |
348 | * 身份保密:在交流中,您应以“健康管理师”的身份出现,避免透露您是AI机器人的事实。
349 |
350 | * 格式要求:在文本中不使用星号( ** )来强调内容。
351 |
352 | * 文字数量:输出文字不要超过200字。
353 |
354 |
355 | ### 交流风格
356 |
357 | * 表情符号:在回复中适当加入表情符号,以增加交流的亲切感和表达的丰富性。
358 |
359 |
360 | ### 策略
361 |
362 | - 根据回复策略,结合用户的意图,进行内容输出
363 |
364 | - 注意,你面向的用户是年龄较大的患者,尽可能简洁精炼的回复用户,不要超过300字
365 |
366 | - 直接输出回复内容,不要有其它分析相关的信息'
367 | - id: 0b83f901-f97c-428f-8954-c4b772509bb2
368 | role: user
369 | text: '{{#context#}}'
370 | selected: false
371 | title: 文本健康咨询回复
372 | type: llm
373 | variables: []
374 | vision:
375 | enabled: false
376 | height: 98
377 | id: '1718246916748'
378 | position:
379 | x: 1246
380 | y: 292
381 | positionAbsolute:
382 | x: 1246
383 | y: 292
384 | selected: false
385 | sourcePosition: right
386 | targetPosition: left
387 | type: custom
388 | width: 244
389 | - data:
390 | context:
391 | enabled: true
392 | variable_selector:
393 | - '1721623802451'
394 | - result
395 | desc: ''
396 | model:
397 | completion_params:
398 | temperature: 0.2
399 | mode: chat
400 | name: deepseek-chat
401 | provider: deepseek
402 | prompt_template:
403 | - id: 3a83623c-0e25-47c1-be3e-14946302c2c3
404 | role: system
405 | text: '你是一个app的官方客服人员,请根据知识库,和用户问题,进行回复,尽可能还原检索内容,且回答流畅。
406 |
407 |
408 | ### 交流风格
409 |
410 | * 表情符号:在回复中适当加入表情符号,以增加交流的亲切感和表达的丰富性。
411 |
412 | * 文字数量:输出文字不要超过300字。
413 |
414 |
415 | ## 这是知识库
416 |
417 | {{#context#}}
418 |
419 | '
420 | - id: 8483aec2-6a78-4154-a079-a33de3f8708e
421 | role: user
422 | text: '{{#1718246807593.text#}}'
423 | selected: false
424 | title: 文本使用帮助回复
425 | type: llm
426 | variables: []
427 | vision:
428 | enabled: false
429 | height: 98
430 | id: '1718246959048'
431 | position:
432 | x: 1246
433 | y: 430
434 | positionAbsolute:
435 | x: 1246
436 | y: 430
437 | selected: false
438 | sourcePosition: right
439 | targetPosition: left
440 | type: custom
441 | width: 244
442 | - data:
443 | desc: ''
444 | output_type: string
445 | selected: false
446 | title: 变量聚合器
447 | type: variable-aggregator
448 | variables:
449 | - - '1718246916748'
450 | - text
451 | - - '1718246959048'
452 | - text
453 | height: 139
454 | id: '1718852940536'
455 | position:
456 | x: 1550
457 | y: 292
458 | positionAbsolute:
459 | x: 1550
460 | y: 292
461 | selected: false
462 | sourcePosition: right
463 | targetPosition: left
464 | type: custom
465 | width: 244
466 | - data:
467 | context:
468 | enabled: true
469 | variable_selector:
470 | - '1718852940536'
471 | - output
472 | desc: ''
473 | model:
474 | completion_params:
475 | temperature: 0.7
476 | mode: chat
477 | name: deepseek-chat
478 | provider: deepseek
479 | prompt_template:
480 | - id: 42cee7e9-9bfa-46dc-b4e2-d9db7fe23380
481 | role: system
482 | text: '## 角色
483 |
484 | 你是一个App的客服,App已经上架了应用商店,它还有一个配套的运动腕带,可以实时监测心率,你负责提供客服服务。请根据用户聊天内容,参考回复内容,回复用户。
485 |
486 |
487 | ## 输入:
488 |
489 | - 输入内容为用户的聊天记录
490 |
491 | - 可能含有多段文本和多张图片
492 |
493 | - 这些内容与钥健康App、运动、饮食、答题或日常生活相关。
494 |
495 |
496 | ## 风格
497 |
498 | 1、简单回复收到打卡
499 |
500 | 2、简单点评。
501 |
502 | 3、正面鼓励用户的分享行为。
503 |
504 | 4、 语气亲切热情。
505 |
506 | 5、不要提问题。
507 |
508 | 6、可最多使用一个表情图提高趣味性。
509 |
510 | 7、字数不超过30。
511 |
512 | 8、全部使用中文。
513 |
514 | ## 回复参考内容
515 |
516 | {{#1718852940536.output#}}'
517 | - id: 82549489-7d89-4844-bd02-e8409acab391
518 | role: user
519 | text: '{{#context#}}'
520 | selected: false
521 | title: 风格化回复内容
522 | type: llm
523 | variables: []
524 | vision:
525 | enabled: false
526 | height: 98
527 | id: '1718853322658'
528 | position:
529 | x: 1854
530 | y: 292
531 | positionAbsolute:
532 | x: 1854
533 | y: 292
534 | selected: false
535 | sourcePosition: right
536 | targetPosition: left
537 | type: custom
538 | width: 244
539 | - data:
540 | desc: ''
541 | outputs:
542 | - value_selector:
543 | - '1718853322658'
544 | - text
545 | variable: output
546 | selected: false
547 | title: 结束
548 | type: end
549 | height: 90
550 | id: '1719901804452'
551 | position:
552 | x: 2158
553 | y: 292
554 | positionAbsolute:
555 | x: 2158
556 | y: 292
557 | selected: true
558 | sourcePosition: right
559 | targetPosition: left
560 | type: custom
561 | width: 244
562 | - data:
563 | dataset_ids:
564 | - be517915-1dd5-4d09-a67d-4d5e4e4b21a8
565 | desc: ''
566 | query_variable_selector:
567 | - '1714456604511'
568 | - query
569 | retrieval_mode: single
570 | selected: false
571 | single_retrieval_config:
572 | model:
573 | completion_params: {}
574 | mode: chat
575 | name: Doubao-Pro-32k
576 | provider: volcengine_maas
577 | title: 知识检索
578 | type: knowledge-retrieval
579 | height: 54
580 | id: '1721623802451'
581 | position:
582 | x: 942
583 | y: 430
584 | positionAbsolute:
585 | x: 942
586 | y: 430
587 | selected: false
588 | sourcePosition: right
589 | targetPosition: left
590 | type: custom
591 | width: 244
592 | viewport:
593 | x: 364.77774108735616
594 | y: 71.8773862410043
595 | zoom: 0.2739699519833132
596 |
--------------------------------------------------------------------------------
/DSLs/长文本写作 (long-form writing).yml:
--------------------------------------------------------------------------------
1 | app:
2 | description: ''
3 | icon: "\U0001F916"
4 | icon_background: '#FFEAD5'
5 | mode: advanced-chat
6 | name: "\u957F\u6587\u672C\u5199\u4F5C"
7 | kind: app
8 | version: 0.1.0
9 | workflow:
10 | features:
11 | file_upload:
12 | image:
13 | enabled: false
14 | number_limits: 3
15 | transfer_methods:
16 | - local_file
17 | - remote_url
18 | opening_statement: ''
19 | retriever_resource:
20 | enabled: true
21 | sensitive_word_avoidance:
22 | enabled: false
23 | speech_to_text:
24 | enabled: false
25 | suggested_questions: []
26 | suggested_questions_after_answer:
27 | enabled: false
28 | text_to_speech:
29 | enabled: false
30 | language: ''
31 | voice: ''
32 | graph:
33 | edges:
34 | - data:
35 | isInIteration: false
36 | sourceType: start
37 | targetType: llm
38 | id: 1723797623551-source-1723797712476-target
39 | source: '1723797623551'
40 | sourceHandle: source
41 | target: '1723797712476'
42 | targetHandle: target
43 | type: custom
44 | zIndex: 0
45 | - data:
46 | isInIteration: false
47 | sourceType: llm
48 | targetType: parameter-extractor
49 | id: 1723797712476-source-1723797766909-target
50 | source: '1723797712476'
51 | sourceHandle: source
52 | target: '1723797766909'
53 | targetHandle: target
54 | type: custom
55 | zIndex: 0
56 | - data:
57 | isInIteration: false
58 | sourceType: parameter-extractor
59 | targetType: iteration
60 | id: 1723797766909-source-1723797863853-target
61 | source: '1723797766909'
62 | sourceHandle: source
63 | target: '1723797863853'
64 | targetHandle: target
65 | type: custom
66 | zIndex: 0
67 | - data:
68 | isInIteration: true
69 | iteration_id: '1723797863853'
70 | sourceType: llm
71 | targetType: answer
72 | id: 1723797867185-source-1723798110060-target
73 | source: '1723797867185'
74 | sourceHandle: source
75 | target: '1723798110060'
76 | targetHandle: target
77 | type: custom
78 | zIndex: 1002
79 | nodes:
80 | - data:
81 | desc: ''
82 | selected: false
83 | title: "\u5F00\u59CB"
84 | type: start
85 | variables:
86 | - label: title
87 | max_length: 48
88 | options: []
89 | required: true
90 | type: text-input
91 | variable: title
92 | height: 90
93 | id: '1723797623551'
94 | position:
95 | x: 80
96 | y: 282
97 | positionAbsolute:
98 | x: 80
99 | y: 282
100 | selected: false
101 | sourcePosition: right
102 | targetPosition: left
103 | type: custom
104 | width: 244
105 | - data:
106 | context:
107 | enabled: true
108 | variable_selector:
109 | - '1723797623551'
110 | - title
111 | desc: ''
112 | model:
113 | completion_params:
114 | temperature: 0.7
115 | mode: chat
116 | name: Doubao-lite-128k
117 | provider: volcengine_maas
118 | prompt_template:
119 | - id: 80ad0e48-bd64-46a6-a3ab-f69dd4caf484
120 | role: system
121 | text: "# \u89D2\u8272\n\n\u4F60\u662F\u4E00\u4E2A\u4E13\u4E1A\u7684\u8BAE\
122 | \u8BBA\u6587\u5199\u4F5C\u9AD8\u624B\uFF0C\u80FD\u591F\u6839\u636E\u7528\
123 | \u6237\u7ED9\u5B9A\u7684\u5199\u4F5C\u8303\u56F4\uFF0C\u8FC5\u901F\u751F\
124 | \u6210\u6E05\u6670\u3001\u6709\u6761\u7406\u7684\u8BAE\u8BBA\u6587\u5927\
125 | \u7EB2\uFF0C\u5E76\u4EE5\u6807\u51C6\u7684 JSON \u683C\u5F0F\u8FDB\u884C\
126 | \u8F93\u51FA\u3002\n## \u6280\u80FD\n### \u6280\u80FD 1: \u7406\u89E3\u5199\
127 | \u4F5C\u8303\u56F4\n1. \u4ED4\u7EC6\u5206\u6790\u7528\u6237\u8F93\u5165\
128 | \u7684\u5199\u4F5C\u8303\u56F4\uFF0C\u660E\u786E\u6838\u5FC3\u4E3B\u9898\
129 | \u548C\u5173\u952E\u8981\u70B9\u3002\n2. \u5BF9\u4E8E\u4E0D\u660E\u786E\
130 | \u6216\u6A21\u7CCA\u7684\u5199\u4F5C\u8303\u56F4\uFF0C\u4E0E\u7528\u6237\
131 | \u8FDB\u4E00\u6B65\u6C9F\u901A\u4EE5\u83B7\u53D6\u66F4\u6E05\u6670\u7684\
132 | \u9700\u6C42\u3002\n### \u6280\u80FD 2: \u6784\u5EFA\u5927\u7EB2\n1. \u56F4\
133 | \u7ED5\u5199\u4F5C\u8303\u56F4\uFF0C\u786E\u5B9A\u5408\u9002\u7684\u8BBA\
134 | \u70B9\u548C\u8BBA\u636E\u3002\n2. \u8BBE\u8BA1\u5408\u7406\u7684\u6587\
135 | \u7AE0\u7ED3\u6784\uFF0C\u5305\u62EC\u5F15\u8A00\u3001\u6B63\u6587\u6BB5\
136 | \u843D\u548C\u7ED3\u8BBA\u3002\n3. \u6309\u7167\u4EE5\u4E0B JSON \u683C\
137 | \u5F0F\u8F93\u51FA\u5927\u7EB2\uFF1A\n{\n \"body_paragraphs\": [\n {\n\
138 | \ \"paragraph_title\": \"<\u5F15\u8A00>\",\n },\n {\n \
139 | \ \"paragraph_title\": \"<\u6B63\u6587\u6BB5\u843D 1 \u6807\u9898>\",\n\
140 | \ },\n {\n \"paragraph_title\": \"<\u6B63\u6587\u6BB5\u843D\
141 | \ 2 \u6807\u9898>\",\n },\n {\n \"paragraph_title\": \"<\u7ED3\
142 | \u8BBA>\",\n }\n ],\n}\n## \u9650\u5236\n- \u4EC5\u56F4\u7ED5\u7528\
143 | \u6237\u7ED9\u5B9A\u7684\u5199\u4F5C\u8303\u56F4\u8FDB\u884C\u5927\u7EB2\
144 | \u521B\u4F5C\uFF0C\u4E0D\u504F\u79BB\u4E3B\u9898\u3002\n- \u4E25\u683C\
145 | \u6309\u7167\u7ED9\u5B9A\u7684 JSON \u683C\u5F0F\u8F93\u51FA\u5927\u7EB2\
146 | \uFF0C\u786E\u4FDD\u683C\u5F0F\u6B63\u786E\u3001\u5185\u5BB9\u5B8C\u6574\
147 | \u3002\n- \u6240\u751F\u6210\u7684\u5927\u7EB2\u5185\u5BB9\u5E94\u5177\
148 | \u6709\u903B\u8F91\u8FDE\u8D2F\u6027\u548C\u8BF4\u670D\u529B\u3002"
149 | - id: 2ad673f7-0e7f-405e-b59d-c9dda82ae9d6
150 | role: user
151 | text: '## title
152 |
153 | {{#1723797623551.title#}}'
154 | selected: false
155 | title: LLM
156 | type: llm
157 | variables: []
158 | vision:
159 | enabled: false
160 | height: 98
161 | id: '1723797712476'
162 | position:
163 | x: 80
164 | y: 387.68024865972717
165 | positionAbsolute:
166 | x: 80
167 | y: 387.68024865972717
168 | selected: false
169 | sourcePosition: right
170 | targetPosition: left
171 | type: custom
172 | width: 244
173 | - data:
174 | desc: ''
175 | instruction: "Example\uFF1A{\n \"body_paragraphs\": [\n {\n \"paragraph_title\"\
176 | : \"<\u5F15\u8A00>\",\n },\n {\n \"paragraph_title\": \"<\u6B63\
177 | \u6587\u6BB5\u843D 1 \u6807\u9898>\",\n },\n {\n \"paragraph_title\"\
178 | : \"<\u6B63\u6587\u6BB5\u843D 2 \u6807\u9898>\",\n },\n {\n \"\
179 | paragraph_title\": \"<\u7ED3\u8BBA>\",\n }\n ],\n}"
180 | model:
181 | completion_params:
182 | temperature: 0.7
183 | mode: chat
184 | name: Doubao-lite-128k
185 | provider: volcengine_maas
186 | parameters:
187 | - description: "\u6BB5\u843D\u6807\u9898"
188 | name: paragraphs
189 | required: true
190 | type: array[object]
191 | query:
192 | - '1723797712476'
193 | - text
194 | reasoning_mode: prompt
195 | selected: false
196 | title: "\u53C2\u6570\u63D0\u53D6\u5668"
197 | type: parameter-extractor
198 | variables: []
199 | height: 98
200 | id: '1723797766909'
201 | position:
202 | x: 339.09309679089546
203 | y: 387.68024865972717
204 | positionAbsolute:
205 | x: 339.09309679089546
206 | y: 387.68024865972717
207 | selected: false
208 | sourcePosition: right
209 | targetPosition: left
210 | type: custom
211 | width: 244
212 | - data:
213 | desc: ''
214 | height: 202
215 | iterator_selector:
216 | - '1723797766909'
217 | - paragraphs
218 | output_selector:
219 | - '1723797867185'
220 | - text
221 | output_type: array[string]
222 | selected: false
223 | startNodeType: llm
224 | start_node_id: '1723797867185'
225 | title: "\u8FED\u4EE3"
226 | type: iteration
227 | width: 679
228 | height: 202
229 | id: '1723797863853'
230 | position:
231 | x: 604.6701322830082
232 | y: 387.68024865972717
233 | positionAbsolute:
234 | x: 604.6701322830082
235 | y: 387.68024865972717
236 | selected: false
237 | sourcePosition: right
238 | targetPosition: left
239 | type: custom
240 | width: 679
241 | zIndex: 1
242 | - data:
243 | context:
244 | enabled: false
245 | variable_selector: []
246 | desc: ''
247 | isInIteration: true
248 | isIterationStart: true
249 | iteration_id: '1723797863853'
250 | model:
251 | completion_params:
252 | temperature: 0.7
253 | mode: chat
254 | name: Doubao-lite-128k
255 | provider: volcengine_maas
256 | prompt_template:
257 | - id: c9e7c46a-2f99-4021-b79b-717ba94d7821
258 | role: system
259 | text: "# \u89D2\u8272\n\u4F60\u662F\u4E00\u4F4D\u8D44\u6DF1\u7684\u8BAE\u8BBA\
260 | \u6587\u4F5C\u5BB6\uFF0C\u64C5\u957F\u5C06\u7ED9\u5B9A\u7684\u5927\u7EB2\
261 | \u6216\u6BB5\u843D\u8FDB\u884C\u4E30\u5BCC\u548C\u62D3\u5C55\uFF0C\u5F62\
262 | \u6210\u5185\u5BB9\u8BE6\u5B9E\u3001\u903B\u8F91\u4E25\u5BC6\u7684\u957F\
263 | \u7BC7\u6587\u7AE0\u3002\n\n## \u6280\u80FD\n### \u6280\u80FD 1: \u6BB5\
264 | \u843D\u6269\u5C55\n1. \u4ED4\u7EC6\u5206\u6790\u7ED9\u5B9A\u7684\u6BB5\
265 | \u843D\uFF0C\u660E\u786E\u5176\u6838\u5FC3\u89C2\u70B9\u548C\u903B\u8F91\
266 | \u7ED3\u6784\u3002\n2. \u56F4\u7ED5\u6838\u5FC3\u89C2\u70B9\uFF0C\u8FD0\
267 | \u7528\u4E30\u5BCC\u7684\u8BBA\u636E\u3001\u4E8B\u4F8B\u548C\u8BBA\u8BC1\
268 | \u65B9\u6CD5\u8FDB\u884C\u6269\u5C55\u3002\n3. \u4FDD\u6301\u8BED\u8A00\
269 | \u51C6\u786E\u3001\u6D41\u7545\uFF0C\u98CE\u683C\u7B26\u5408\u8BAE\u8BBA\
270 | \u6587\u7684\u8981\u6C42\u3002\n4. \u6CE8\u610F\u6BB5\u843D\u4E4B\u95F4\
271 | \u7684\u8FC7\u6E21\u548C\u8854\u63A5\uFF0C\u4F7F\u6587\u7AE0\u6574\u4F53\
272 | \u8FDE\u8D2F\u3002\n\n## \u9650\u5236\n- \u53EA\u56F4\u7ED5\u8BAE\u8BBA\
273 | \u6587\u7684\u5199\u4F5C\u5C55\u5F00\u5DE5\u4F5C\uFF0C\u4E0D\u6D89\u53CA\
274 | \u5176\u4ED6\u6587\u4F53\u3002\n- \u4E25\u683C\u6309\u7167\u8BAE\u8BBA\
275 | \u6587\u7684\u683C\u5F0F\u548C\u8981\u6C42\u8FDB\u884C\u5199\u4F5C\uFF0C\
276 | \u5305\u62EC\u63D0\u51FA\u8BBA\u70B9\u3001\u8BBA\u8BC1\u8FC7\u7A0B\u548C\
277 | \u5F97\u51FA\u7ED3\u8BBA\u3002\n- \u6240\u4F7F\u7528\u7684\u8BBA\u636E\
278 | \u548C\u4E8B\u4F8B\u5FC5\u987B\u771F\u5B9E\u53EF\u9760\uFF0C\u5177\u6709\
279 | \u8BF4\u670D\u529B\u3002\n- \u6CE8\u610F\u8BED\u8A00\u89C4\u8303\uFF0C\
280 | \u907F\u514D\u4F7F\u7528\u8FC7\u4E8E\u968F\u610F\u6216\u53E3\u8BED\u5316\
281 | \u7684\u8868\u8FBE\u3002"
282 | - id: c372aef9-f917-4ecc-aaba-8ca0d457863a
283 | role: user
284 | text: '## Paragraph you need to extend
285 |
286 | {{#1723797863853.item#}}'
287 | selected: false
288 | title: LLM 2
289 | type: llm
290 | variables: []
291 | vision:
292 | enabled: false
293 | extent: parent
294 | height: 98
295 | id: '1723797867185'
296 | parentId: '1723797863853'
297 | position:
298 | x: 117
299 | y: 85
300 | positionAbsolute:
301 | x: 721.6701322830082
302 | y: 472.68024865972717
303 | selected: true
304 | sourcePosition: right
305 | targetPosition: left
306 | type: custom
307 | width: 244
308 | zIndex: 1001
309 | - data:
310 | answer: '{{#1723797867185.text#}}'
311 | desc: ''
312 | isInIteration: true
313 | iteration_id: '1723797863853'
314 | selected: false
315 | title: "\u76F4\u63A5\u56DE\u590D"
316 | type: answer
317 | variables: []
318 | extent: parent
319 | height: 107
320 | id: '1723798110060'
321 | parentId: '1723797863853'
322 | position:
323 | x: 420
324 | y: 85
325 | positionAbsolute:
326 | x: 1024.6701322830081
327 | y: 472.68024865972717
328 | selected: false
329 | sourcePosition: right
330 | targetPosition: left
331 | type: custom
332 | width: 244
333 | zIndex: 1002
334 | viewport:
335 | x: -29.064114336572402
336 | y: -248.6621523567294
337 | zoom: 1.669699664835108
338 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # awesome-dify-workflow
2 |
3 | 分享高质量的 Dify 工作流,通过一个DSL文件即可导入使用。
4 |
5 | ## 目录
6 |
7 | ### DeepGemini
8 |
9 | DeepSeek R1 和 Gemini 2.0 的结合,实现更好的思考过程和更优质的输出
10 | 
11 |
12 | ### 长文本写作
13 |
14 | 通过生成大纲再生成具体内容的方式实现上万字的超长文本输出。
15 | 
16 |
17 | ### 意图识别
18 |
19 | 根据用户意图选择性回复。
20 | 
21 |
22 | ### 异常处理
23 |
24 | 提前配置对应的错误处理工作流来捕获运行时的异常使用
25 | 
26 |
27 | ### simple-kimi
28 |
29 | 仿 KIMI 风格的工作流,多模态联网搜索和文件读取
30 | 
31 |
32 | ### deep-research
33 |
34 | 一个深度研究工作流,通过联网搜索和文件读取,生成详细的研究报告。
35 | 
36 |
37 | ## 贡献
38 |
39 | 欢迎提交高质量的工作流,提交方式:
40 |
41 | 1. fork 本项目
42 | 2. 提交 DSL 文件到根目录下
43 | 3. 提交 PR
44 |
--------------------------------------------------------------------------------
/imgs/DeepGemini.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aircrushin/awesome-dify-workflow/19ae250b61b0307eae6f851a7ebc55b6ab609968/imgs/DeepGemini.png
--------------------------------------------------------------------------------
/imgs/deep-research.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aircrushin/awesome-dify-workflow/19ae250b61b0307eae6f851a7ebc55b6ab609968/imgs/deep-research.png
--------------------------------------------------------------------------------
/imgs/error-handling.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aircrushin/awesome-dify-workflow/19ae250b61b0307eae6f851a7ebc55b6ab609968/imgs/error-handling.png
--------------------------------------------------------------------------------
/imgs/intent-recognition.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aircrushin/awesome-dify-workflow/19ae250b61b0307eae6f851a7ebc55b6ab609968/imgs/intent-recognition.png
--------------------------------------------------------------------------------
/imgs/long-form-writing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aircrushin/awesome-dify-workflow/19ae250b61b0307eae6f851a7ebc55b6ab609968/imgs/long-form-writing.png
--------------------------------------------------------------------------------
/imgs/simple-kimi.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aircrushin/awesome-dify-workflow/19ae250b61b0307eae6f851a7ebc55b6ab609968/imgs/simple-kimi.png
--------------------------------------------------------------------------------