-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathmemory_test.yml
More file actions
519 lines (510 loc) · 13.8 KB
/
memory_test.yml
File metadata and controls
519 lines (510 loc) · 13.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
app:
description: ''
icon: 🤖
icon_background: '#FFEAD5'
mode: advanced-chat
name: 测试历史对话
use_icon_as_answer_icon: false
dependencies:
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: hjlarry/database:0.0.6@534bc26cf5bc4ff6b5557457452287ccc71f00eef9378784c4f43ca49954ca2f
- current_identifier: null
type: marketplace
value:
marketplace_plugin_unique_identifier: langgenius/ollama:0.0.7@8fc496b3892344da47db6125c76fc0dbfd8020753f198032751d83f561d9443e
kind: app
version: 0.4.0
workflow:
conversation_variables:
- description: ''
id: e7eeb5cd-bcef-452f-a097-1950f6fd8f33
name: chat_history
selector:
- conversation
- chat_history
value: []
value_type: array[string]
environment_variables: []
features:
file_upload:
allowed_file_extensions:
- .JPG
- .JPEG
- .PNG
- .GIF
- .WEBP
- .SVG
allowed_file_types:
- image
allowed_file_upload_methods:
- local_file
- remote_url
enabled: false
fileUploadConfig:
audio_file_size_limit: 500
batch_count_limit: 100
file_size_limit: 100
image_file_size_limit: 100
video_file_size_limit: 500
workflow_file_upload_limit: 10
image:
enabled: false
number_limits: 3
transfer_methods:
- local_file
- remote_url
number_limits: 3
opening_statement: ''
retriever_resource:
enabled: true
sensitive_word_avoidance:
enabled: false
speech_to_text:
enabled: false
suggested_questions: []
suggested_questions_after_answer:
enabled: false
text_to_speech:
enabled: false
language: ''
voice: ''
graph:
edges:
- data:
isInIteration: false
isInLoop: false
sourceType: assigner
targetType: answer
id: 1758507602026-source-answer-target
source: '1758507602026'
sourceHandle: source
target: answer
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: start
targetType: llm
id: 1758166315103-source-llm-target
source: '1758166315103'
sourceHandle: source
target: llm
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: llm
targetType: code
id: llm-source-1758509088263-target
source: llm
sourceHandle: source
target: '1758509088263'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: code
targetType: assigner
id: 1758509088263-source-1758507602026-target
source: '1758509088263'
sourceHandle: source
target: '1758507602026'
targetHandle: target
type: custom
zIndex: 0
- data:
isInLoop: false
sourceType: start
targetType: tool
id: 1758166315103-source-1758697383508-target
source: '1758166315103'
sourceHandle: source
target: '1758697383508'
targetHandle: target
type: custom
zIndex: 0
- data:
isInIteration: false
isInLoop: false
sourceType: tool
targetType: answer
id: 1758697383508-source-1758697390058-target
source: '1758697383508'
sourceHandle: source
target: '1758697390058'
targetHandle: target
type: custom
zIndex: 0
nodes:
- data:
desc: ''
selected: false
title: 开始
type: start
variables: []
height: 54
id: '1758166315103'
position:
x: 149.46898316334824
y: 120.80006638456905
positionAbsolute:
x: 149.46898316334824
y: 120.80006638456905
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
context:
enabled: false
variable_selector: []
desc: ''
model:
completion_params:
temperature: 0.7
think: false
mode: chat
name: qwen3:32b
provider: langgenius/ollama/ollama
prompt_template:
- id: a1dddd20-4906-4b37-bf62-c4488163ecbf
role: system
text: '这是我的历史对话
{{#conversation.chat_history#}}'
- id: d33db341-1744-4b1a-8019-1ff7fa877a79
role: user
text: '{{#sys.query#}}'
reasoning_format: separated
selected: false
title: LLM
type: llm
variables: []
vision:
enabled: false
height: 90
id: llm
position:
x: 155.3479213003726
y: 332.4532931881887
positionAbsolute:
x: 155.3479213003726
y: 332.4532931881887
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#llm.text#}}'
desc: ''
selected: false
title: 直接回复
type: answer
variables: []
height: 105
id: answer
position:
x: 597.0092072149762
y: 516.8664489969822
positionAbsolute:
x: 597.0092072149762
y: 516.8664489969822
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
items:
- input_type: variable
operation: append
value:
- '1758509088263'
- result
variable_selector:
- conversation
- chat_history
write_mode: over-write
selected: false
title: 变量赋值
type: assigner
version: '2'
height: 86
id: '1758507602026'
position:
x: 597.0092072149762
y: 402.7654125159194
positionAbsolute:
x: 597.0092072149762
y: 402.7654125159194
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
code: "def main(arg1: str, arg2: str) -> dict:\n # 构造历史提问记忆\n return\
\ {\"result\": f\"{{'user': '{arg1}', 'assistant': '{arg2}'}}\"}"
code_language: python3
desc: ''
outputs:
result:
children: null
type: string
selected: false
title: 代码执行
type: code
variables:
- value_selector:
- sys
- query
value_type: string
variable: arg1
- value_selector:
- llm
- text
value_type: string
variable: arg2
height: 54
id: '1758509088263'
position:
x: 155.3479213003726
y: 547.7272333871057
positionAbsolute:
x: 155.3479213003726
y: 547.7272333871057
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
desc: ''
is_team_authorization: true
output_schema: null
paramSchemas:
- auto_generate: null
default: null
form: llm
human_description:
en_US: The SQL query string.
ja_JP: The SQL query string.
pt_BR: The SQL query string.
zh_Hans: SQL 查询语句。
label:
en_US: SQL Query
ja_JP: SQL Query
pt_BR: SQL Query
zh_Hans: SQL 查询语句
llm_description: The SQL query string.
max: null
min: null
name: query
options: []
placeholder: null
precision: null
required: true
scope: null
template: null
type: string
- auto_generate: null
default: null
form: llm
human_description:
en_US: Optional, Filling in this field will overwrite the database connection
entered during authorization.
ja_JP: Optional, Filling in this field will overwrite the database connection
entered during authorization.
pt_BR: Optional, Filling in this field will overwrite the database connection
entered during authorization.
zh_Hans: 选填,填写后将覆盖授权时填写的数据库连接。
label:
en_US: DB URI
ja_JP: DB URI
pt_BR: DB URI
zh_Hans: DB URI
llm_description: ''
max: null
min: null
name: db_uri
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: string
- auto_generate: null
default: json
form: form
human_description:
en_US: Choose the output format.
ja_JP: Choose the output format.
pt_BR: Choose the output format.
zh_Hans: 选择输出格式。
label:
en_US: Output format
ja_JP: Output format
pt_BR: Output format
zh_Hans: 输出格式
llm_description: ''
max: null
min: null
name: format
options:
- icon: ''
label:
en_US: JSON
ja_JP: JSON
pt_BR: JSON
zh_Hans: JSON
value: json
- icon: ''
label:
en_US: CSV
ja_JP: CSV
pt_BR: CSV
zh_Hans: CSV
value: csv
- icon: ''
label:
en_US: YAML
ja_JP: YAML
pt_BR: YAML
zh_Hans: YAML
value: yaml
- icon: ''
label:
en_US: Markdown
ja_JP: Markdown
pt_BR: Markdown
zh_Hans: Markdown
value: md
- icon: ''
label:
en_US: Excel
ja_JP: Excel
pt_BR: Excel
zh_Hans: Excel
value: xlsx
- icon: ''
label:
en_US: HTML
ja_JP: HTML
pt_BR: HTML
zh_Hans: HTML
value: html
placeholder: null
precision: null
required: false
scope: null
template: null
type: select
- auto_generate: null
default: null
form: form
human_description:
en_US: 'Optional. For example {"connect_args": {"ssl": {"ca": "/path/to/ca.pem"}}}
More connection options can be found at https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine
'
ja_JP: 'Optional. For example {"connect_args": {"ssl": {"ca": "/path/to/ca.pem"}}}
More connection options can be found at https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine
'
pt_BR: 'Optional. For example {"connect_args": {"ssl": {"ca": "/path/to/ca.pem"}}}
More connection options can be found at https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine
'
zh_Hans: '选填项。例如 {"connect_args": {"ssl": {"ca": "/path/to/ca.pem"}}}
更多连接选项可参考 https://docs.sqlalchemy.org/en/20/core/engines.html#sqlalchemy.create_engine
'
label:
en_US: DB Config Options
ja_JP: DB Config Options
pt_BR: DB Config Options
zh_Hans: 数据库连接配置选项
llm_description: ''
max: null
min: null
name: config_options
options: []
placeholder: null
precision: null
required: false
scope: null
template: null
type: string
params:
config_options: ''
db_uri: ''
format: ''
query: ''
provider_id: hjlarry/database/database
provider_name: hjlarry/database/database
provider_type: builtin
selected: true
title: SQL Execute
tool_configurations:
config_options:
type: mixed
value: null
format:
type: constant
value: md
tool_description: 此工具用于在已存在的数据库中执行 SQL 查询。
tool_label: SQL Execute
tool_name: sql_execute
tool_node_version: '2'
tool_parameters:
db_uri:
type: mixed
value: postgresql+psycopg2://postgres:difyai123456@localhost:5432/dify
query:
type: mixed
value: SELECT conversation_id, query, answer, created_at, parent_message_id
FROM public.messages where conversation_id = '{{#sys.conversation_id#}}'
type: tool
height: 116
id: '1758697383508'
position:
x: 597.0092072149762
y: 241.31829819356813
positionAbsolute:
x: 597.0092072149762
y: 241.31829819356813
selected: true
sourcePosition: right
targetPosition: left
type: custom
width: 244
- data:
answer: '{{#1758697383508.text#}}'
desc: ''
selected: false
title: 直接回复 2
type: answer
variables: []
height: 105
id: '1758697390058'
position:
x: 597.0092072149762
y: 120.80006638456905
positionAbsolute:
x: 597.0092072149762
y: 120.80006638456905
selected: false
sourcePosition: right
targetPosition: left
type: custom
width: 244
viewport:
x: 143.12994185806951
y: 87.2863209309674
zoom: 0.6803949806528532