balibabu commited on
Commit
acf53dd
·
1 Parent(s): 02bd2c6

feat: create flow from dsl template #918 (#1351)

Browse files

### What problem does this PR solve?

feat: create flow from dsl template #918

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

graph/test/dsl_examples/customer_service.json CHANGED
@@ -1,157 +1,169 @@
1
  {
2
  "components": {
3
- "begin": {
4
- "obj":{
5
- "component_name": "Begin",
6
- "params": {
7
- "prologue": "Hi! How can I help you?"
8
- }
9
- },
10
- "downstream": ["answer:0"],
11
- "upstream": []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  },
13
- "answer:0": {
14
- "obj": {
15
- "component_name": "Answer",
16
- "params": {}
17
- },
18
- "downstream": ["categorize:0"],
19
- "upstream": ["begin", "generate:0", "generate:casual", "generate:answer", "generate:complain", "generate:ask_contact", "message:get_contact"]
20
  },
21
- "categorize:0": {
22
- "obj": {
23
- "component_name": "Categorize",
24
- "params": {
25
- "llm_id": "deepseek-chat",
26
- "category_description": {
27
- "product_related": {
28
- "description": "The question is about the product usage, appearance and how it works.",
29
- "examples": "Why it always beaming?\nHow to install it onto the wall?\nIt leaks, what to do?\nException: Can't connect to ES cluster\nHow to build the RAGFlow image from scratch",
30
- "to": "retrieval:0"
31
- },
32
- "casual": {
33
- "description": "The question is not about the product usage, appearance and how it works. Just casual chat.",
34
- "examples": "How are you doing?\nWhat is your name?\nAre you a robot?\nWhat's the weather?\nWill it rain?",
35
- "to": "generate:casual"
36
- },
37
- "complain": {
38
- "description": "Complain even curse about the product or service you provide. But the comment is not specific enough.",
39
- "examples": "How bad is it.\nIt's really sucks.\nDamn, for God's sake, can it be more steady?\nShit, I just can't use this shit.\nI can't stand it anymore.",
40
- "to": "generate:complain"
41
- },
42
- "answer": {
43
- "description": "This answer provide a specific contact information, like e-mail, phone number, wechat number, line number, twitter, discord, etc,.",
44
- "examples": "My phone number is 203921\nkevinhu.hk@gmail.com\nThis is my discord number: johndowson_29384",
45
- "to": "message:get_contact"
46
- }
47
- },
48
- "message_history_window_size": 8
49
- }
50
- },
51
- "downstream": ["retrieval:0", "generate:casual", "generate:complain", "message:get_contact"],
52
- "upstream": ["answer:0"]
53
  },
54
- "generate:casual": {
55
- "obj": {
56
- "component_name": "Generate",
57
- "params": {
58
- "llm_id": "deepseek-chat",
59
- "prompt": "You are a customer support. But the customer wants to have a casual chat with you instead of consulting about the product. Be nice, funny, enthusiasm and concern.",
60
- "temperature": 0.9,
61
- "message_history_window_size": 12,
62
- "cite": false
63
- }
64
- },
65
- "downstream": ["answer:0"],
66
- "upstream": ["categorize:0"]
67
- },
68
- "generate:complain": {
69
- "obj": {
70
- "component_name": "Generate",
71
- "params": {
72
- "llm_id": "deepseek-chat",
73
- "prompt": "You are a customer support. the Customers complain even curse about the products but not specific enough. You need to ask him/her what's the specific problem with the product. Be nice, patient and concern to soothe your customers’ emotions at first place.",
74
- "temperature": 0.9,
75
- "message_history_window_size": 12,
76
- "cite": false
77
- }
78
- },
79
- "downstream": ["answer:0"],
80
- "upstream": ["categorize:0"]
81
- },
82
- "retrieval:0": {
83
- "obj": {
84
- "component_name": "Retrieval",
85
- "params": {
86
- "similarity_threshold": 0.2,
87
- "keywords_similarity_weight": 0.3,
88
- "top_n": 6,
89
- "top_k": 1024,
90
- "rerank_id": "BAAI/bge-reranker-v2-m3",
91
- "kb_ids": ["869a236818b811ef91dffa163e197198"]
92
- }
93
- },
94
- "downstream": ["relevant:0"],
95
- "upstream": ["categorize:0"]
96
- },
97
- "relevant:0": {
98
- "obj": {
99
- "component_name": "Relevant",
100
- "params": {
101
- "llm_id": "deepseek-chat",
102
- "temperature": 0.02,
103
- "yes": "generate:answer",
104
- "no": "generate:ask_contact"
105
- }
106
- },
107
- "downstream": ["generate:answer", "generate:ask_contact"],
108
- "upstream": ["retrieval:0"]
109
- },
110
- "generate:answer": {
111
- "obj": {
112
- "component_name": "Generate",
113
- "params": {
114
- "llm_id": "deepseek-chat",
115
- "prompt": "You are an intelligent assistant. Please answer the question based on content of knowledge base. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\". Answers need to consider chat history.\n Knowledge base content is as following:\n {input}\n The above is the content of knowledge base.",
116
- "temperature": 0.02
117
- }
118
- },
119
- "downstream": ["answer:0"],
120
- "upstream": ["relevant:0"]
121
- },
122
- "generate:ask_contact": {
123
- "obj": {
124
- "component_name": "Generate",
125
- "params": {
126
- "llm_id": "deepseek-chat",
127
- "prompt": "You are a customer support. But you can't answer to customers' question. You need to request their contact like E-mail, phone number, Wechat number, LINE number, twitter, discord, etc,. Product experts will contact them later. Please do not ask the same question twice.",
128
- "temperature": 0.9,
129
- "message_history_window_size": 12,
130
- "cite": false
131
- }
132
- },
133
- "downstream": ["answer:0"],
134
- "upstream": ["categorize:0"]
135
- },
136
- "message:get_contact": {
137
- "obj":{
138
- "component_name": "Message",
139
- "params": {
140
- "messages": [
141
- "Okay, I've already write this down. What else I can do for you?",
142
- "Get it. What else I can do for you?",
143
- "Thanks for your trust! Our expert will contact ASAP. So, anything else I can do for you?",
144
- "Thanks! So, anything else I can do for you?"
145
- ]
146
- }
147
- },
148
- "downstream": ["answer:0"],
149
- "upstream": ["categorize:0"]
150
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
  },
152
  "history": [],
153
  "messages": [],
154
  "path": [],
155
  "reference": {},
156
  "answer": []
157
- }
 
1
  {
2
  "components": {
3
+ "begin": {
4
+ "obj": {
5
+ "component_name": "Begin",
6
+ "params": {
7
+ "prologue": "Hi! How can I help you?"
8
+ }
9
+ },
10
+ "downstream": ["answer:0"],
11
+ "upstream": []
12
+ },
13
+ "answer:0": {
14
+ "obj": {
15
+ "component_name": "Answer",
16
+ "params": {}
17
+ },
18
+ "downstream": ["categorize:0"],
19
+ "upstream": [
20
+ "begin",
21
+ "generate:casual",
22
+ "generate:answer",
23
+ "generate:complain",
24
+ "generate:ask_contact",
25
+ "message:get_contact"
26
+ ]
27
+ },
28
+ "categorize:0": {
29
+ "obj": {
30
+ "component_name": "Categorize",
31
+ "params": {
32
+ "llm_id": "deepseek-chat",
33
+ "category_description": {
34
+ "product_related": {
35
+ "description": "The question is about the product usage, appearance and how it works.",
36
+ "examples": "Why it always beaming?\nHow to install it onto the wall?\nIt leaks, what to do?\nException: Can't connect to ES cluster\nHow to build the RAGFlow image from scratch",
37
+ "to": "retrieval:0"
38
  },
39
+ "casual": {
40
+ "description": "The question is not about the product usage, appearance and how it works. Just casual chat.",
41
+ "examples": "How are you doing?\nWhat is your name?\nAre you a robot?\nWhat's the weather?\nWill it rain?",
42
+ "to": "generate:casual"
 
 
 
43
  },
44
+ "complain": {
45
+ "description": "Complain even curse about the product or service you provide. But the comment is not specific enough.",
46
+ "examples": "How bad is it.\nIt's really sucks.\nDamn, for God's sake, can it be more steady?\nShit, I just can't use this shit.\nI can't stand it anymore.",
47
+ "to": "generate:complain"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  },
49
+ "answer": {
50
+ "description": "This answer provide a specific contact information, like e-mail, phone number, wechat number, line number, twitter, discord, etc,.",
51
+ "examples": "My phone number is 203921\nkevinhu.hk@gmail.com\nThis is my discord number: johndowson_29384",
52
+ "to": "message:get_contact"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  }
54
+ },
55
+ "message_history_window_size": 8
56
+ }
57
+ },
58
+ "downstream": [
59
+ "retrieval:0",
60
+ "generate:casual",
61
+ "generate:complain",
62
+ "message:get_contact"
63
+ ],
64
+ "upstream": ["answer:0"]
65
+ },
66
+ "generate:casual": {
67
+ "obj": {
68
+ "component_name": "Generate",
69
+ "params": {
70
+ "llm_id": "deepseek-chat",
71
+ "prompt": "You are a customer support. But the customer wants to have a casual chat with you instead of consulting about the product. Be nice, funny, enthusiasm and concern.",
72
+ "temperature": 0.9,
73
+ "message_history_window_size": 12,
74
+ "cite": false
75
+ }
76
+ },
77
+ "downstream": ["answer:0"],
78
+ "upstream": ["categorize:0"]
79
+ },
80
+ "generate:complain": {
81
+ "obj": {
82
+ "component_name": "Generate",
83
+ "params": {
84
+ "llm_id": "deepseek-chat",
85
+ "prompt": "You are a customer support. the Customers complain even curse about the products but not specific enough. You need to ask him/her what's the specific problem with the product. Be nice, patient and concern to soothe your customers’ emotions at first place.",
86
+ "temperature": 0.9,
87
+ "message_history_window_size": 12,
88
+ "cite": false
89
+ }
90
+ },
91
+ "downstream": ["answer:0"],
92
+ "upstream": ["categorize:0"]
93
+ },
94
+ "retrieval:0": {
95
+ "obj": {
96
+ "component_name": "Retrieval",
97
+ "params": {
98
+ "similarity_threshold": 0.2,
99
+ "keywords_similarity_weight": 0.3,
100
+ "top_n": 6,
101
+ "top_k": 1024,
102
+ "rerank_id": "BAAI/bge-reranker-v2-m3",
103
+ "kb_ids": ["869a236818b811ef91dffa163e197198"]
104
+ }
105
+ },
106
+ "downstream": ["relevant:0"],
107
+ "upstream": ["categorize:0"]
108
+ },
109
+ "relevant:0": {
110
+ "obj": {
111
+ "component_name": "Relevant",
112
+ "params": {
113
+ "llm_id": "deepseek-chat",
114
+ "temperature": 0.02,
115
+ "yes": "generate:answer",
116
+ "no": "generate:ask_contact"
117
+ }
118
+ },
119
+ "downstream": ["generate:answer", "generate:ask_contact"],
120
+ "upstream": ["retrieval:0"]
121
+ },
122
+ "generate:answer": {
123
+ "obj": {
124
+ "component_name": "Generate",
125
+ "params": {
126
+ "llm_id": "deepseek-chat",
127
+ "prompt": "You are an intelligent assistant. Please answer the question based on content of knowledge base. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\". Answers need to consider chat history.\n Knowledge base content is as following:\n {input}\n The above is the content of knowledge base.",
128
+ "temperature": 0.02
129
+ }
130
+ },
131
+ "downstream": ["answer:0"],
132
+ "upstream": ["relevant:0"]
133
+ },
134
+ "generate:ask_contact": {
135
+ "obj": {
136
+ "component_name": "Generate",
137
+ "params": {
138
+ "llm_id": "deepseek-chat",
139
+ "prompt": "You are a customer support. But you can't answer to customers' question. You need to request their contact like E-mail, phone number, Wechat number, LINE number, twitter, discord, etc,. Product experts will contact them later. Please do not ask the same question twice.",
140
+ "temperature": 0.9,
141
+ "message_history_window_size": 12,
142
+ "cite": false
143
+ }
144
+ },
145
+ "downstream": ["answer:0"],
146
+ "upstream": ["relevant:0"]
147
+ },
148
+ "message:get_contact": {
149
+ "obj": {
150
+ "component_name": "Message",
151
+ "params": {
152
+ "messages": [
153
+ "Okay, I've already write this down. What else I can do for you?",
154
+ "Get it. What else I can do for you?",
155
+ "Thanks for your trust! Our expert will contact ASAP. So, anything else I can do for you?",
156
+ "Thanks! So, anything else I can do for you?"
157
+ ]
158
+ }
159
+ },
160
+ "downstream": ["answer:0"],
161
+ "upstream": ["categorize:0"]
162
+ }
163
  },
164
  "history": [],
165
  "messages": [],
166
  "path": [],
167
  "reference": {},
168
  "answer": []
169
+ }
web/src/pages/flow/customer_service.json CHANGED
@@ -1,104 +1,92 @@
1
  {
2
  "edges": [
3
  {
4
- "id": "f7e99034-58d4-4f15-908c-196b4dded860",
5
  "label": "",
6
  "source": "begin",
7
  "target": "answer:0"
8
  },
9
  {
10
- "id": "4c419958-ee28-4c6a-95c2-d59a26b17b45",
11
- "label": "",
12
- "source": "generate:0",
13
- "target": "answer:0"
14
- },
15
- {
16
- "id": "d30cc82c-edbe-4068-bbb3-58447e7a6928",
17
  "label": "",
18
  "source": "generate:casual",
19
  "target": "answer:0"
20
  },
21
  {
22
- "id": "2290ea52-fddb-4247-8a33-79dc3ca638eb",
23
  "label": "",
24
  "source": "generate:answer",
25
  "target": "answer:0"
26
  },
27
  {
28
- "id": "49375377-026d-4736-95c9-0593eb1be995",
29
  "label": "",
30
  "source": "generate:complain",
31
  "target": "answer:0"
32
  },
33
  {
34
- "id": "413f4830-2fa8-489a-90b8-2e3c44b36abf",
35
  "label": "",
36
  "source": "generate:ask_contact",
37
  "target": "answer:0"
38
  },
39
  {
40
- "id": "5be4021b-4ffe-4b1e-b358-5bf41d7fe9f6",
41
  "label": "",
42
  "source": "message:get_contact",
43
  "target": "answer:0"
44
  },
45
  {
46
- "id": "5ba8fc08-0bfc-4ecd-ba6c-96ec9a9419e6",
47
  "label": "",
48
  "source": "answer:0",
49
  "target": "categorize:0"
50
  },
51
  {
52
- "id": "26b65ad4-c425-4883-835f-ba89f4013fe6",
53
  "label": "",
54
  "source": "categorize:0",
55
  "target": "retrieval:0",
56
  "sourceHandle": "product_related"
57
  },
58
  {
59
- "id": "9f649802-595a-470c-88b2-be758d1073c4",
60
  "label": "",
61
  "source": "categorize:0",
62
  "target": "generate:casual",
63
  "sourceHandle": "casual"
64
  },
65
  {
66
- "id": "0188dbfa-46aa-41e4-8ded-8bf7050a8353",
67
  "label": "",
68
  "source": "categorize:0",
69
  "target": "generate:complain",
70
  "sourceHandle": "complain"
71
  },
72
  {
73
- "id": "c64cf3a8-8399-469e-816b-57ef86aa799b",
74
  "label": "",
75
  "source": "categorize:0",
76
  "target": "message:get_contact",
77
  "sourceHandle": "answer"
78
  },
79
  {
80
- "id": "ef5d2e9f-56a4-44fe-b0d8-ea5cb86df7f9",
81
  "label": "",
82
  "source": "retrieval:0",
83
  "target": "relevant:0"
84
  },
85
  {
86
- "id": "a4c10df3-37a0-45fc-9d15-ae90ba20a5d4",
87
  "label": "",
88
  "source": "relevant:0",
89
  "target": "generate:answer"
90
  },
91
  {
92
- "id": "848efd87-55e7-4dee-9713-9fc5b1812986",
93
  "label": "",
94
  "source": "relevant:0",
95
  "target": "generate:ask_contact"
96
- },
97
- {
98
- "id": "4012edce-2b69-4ad3-a296-25d08c638223",
99
- "label": "",
100
- "source": "categorize:0",
101
- "target": "generate:ask_contact"
102
  }
103
  ],
104
  "nodes": [
@@ -111,7 +99,7 @@
111
  },
112
  "data": {
113
  "label": "Begin",
114
- "name": "BusySpidersWink",
115
  "form": {
116
  "prologue": "Hi! How can I help you?"
117
  }
@@ -128,7 +116,7 @@
128
  },
129
  "data": {
130
  "label": "Answer",
131
- "name": "CruelTigersWarn",
132
  "form": {}
133
  },
134
  "sourcePosition": "left",
@@ -143,7 +131,7 @@
143
  },
144
  "data": {
145
  "label": "Categorize",
146
- "name": "MightyIconsGuess",
147
  "form": {
148
  "llm_id": "deepseek-chat",
149
  "category_description": {
@@ -183,7 +171,7 @@
183
  },
184
  "data": {
185
  "label": "Generate",
186
- "name": "StrongEmusArgue",
187
  "form": {
188
  "llm_id": "deepseek-chat",
189
  "prompt": "You are a customer support. But the customer wants to have a casual chat with you instead of consulting about the product. Be nice, funny, enthusiasm and concern.",
@@ -204,7 +192,7 @@
204
  },
205
  "data": {
206
  "label": "Generate",
207
- "name": "NinePhonesInvent",
208
  "form": {
209
  "llm_id": "deepseek-chat",
210
  "prompt": "You are a customer support. the Customers complain even curse about the products but not specific enough. You need to ask him/her what's the specific problem with the product. Be nice, patient and concern to soothe your customers’ emotions at first place.",
@@ -225,7 +213,7 @@
225
  },
226
  "data": {
227
  "label": "Retrieval",
228
- "name": "OpenHandsInvite",
229
  "form": {
230
  "similarity_threshold": 0.2,
231
  "keywords_similarity_weight": 0.3,
@@ -247,7 +235,7 @@
247
  },
248
  "data": {
249
  "label": "Relevant",
250
- "name": "SevenLandsHear",
251
  "form": {
252
  "llm_id": "deepseek-chat",
253
  "temperature": 0.02,
@@ -267,7 +255,7 @@
267
  },
268
  "data": {
269
  "label": "Generate",
270
- "name": "DirtySwansJudge",
271
  "form": {
272
  "llm_id": "deepseek-chat",
273
  "prompt": "You are an intelligent assistant. Please answer the question based on content of knowledge base. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\". Answers need to consider chat history.\n Knowledge base content is as following:\n {input}\n The above is the content of knowledge base.",
@@ -286,7 +274,7 @@
286
  },
287
  "data": {
288
  "label": "Generate",
289
- "name": "OpenEndsShout",
290
  "form": {
291
  "llm_id": "deepseek-chat",
292
  "prompt": "You are a customer support. But you can't answer to customers' question. You need to request their contact like E-mail, phone number, Wechat number, LINE number, twitter, discord, etc,. Product experts will contact them later. Please do not ask the same question twice.",
@@ -307,7 +295,7 @@
307
  },
308
  "data": {
309
  "label": "Message",
310
- "name": "FairSquidsSmile",
311
  "form": {
312
  "messages": [
313
  "Okay, I've already write this down. What else I can do for you?",
 
1
  {
2
  "edges": [
3
  {
4
+ "id": "63a2f242-8e71-4098-a46a-459a76d538bd",
5
  "label": "",
6
  "source": "begin",
7
  "target": "answer:0"
8
  },
9
  {
10
+ "id": "cc6dd8bb-e9dc-46e8-9009-5b96f98ae6c0",
 
 
 
 
 
 
11
  "label": "",
12
  "source": "generate:casual",
13
  "target": "answer:0"
14
  },
15
  {
16
+ "id": "58dbf05a-07fc-4a0a-8c03-5f9117e48c35",
17
  "label": "",
18
  "source": "generate:answer",
19
  "target": "answer:0"
20
  },
21
  {
22
+ "id": "dd0ff4f2-4d75-4e7d-a505-3e9533402823",
23
  "label": "",
24
  "source": "generate:complain",
25
  "target": "answer:0"
26
  },
27
  {
28
+ "id": "3dc7a511-9cde-4080-a572-6b06a64e0458",
29
  "label": "",
30
  "source": "generate:ask_contact",
31
  "target": "answer:0"
32
  },
33
  {
34
+ "id": "20e31fee-c392-4257-860a-5844d264198e",
35
  "label": "",
36
  "source": "message:get_contact",
37
  "target": "answer:0"
38
  },
39
  {
40
+ "id": "104ac8bb-5d75-4eca-8065-1d8fc2805b8e",
41
  "label": "",
42
  "source": "answer:0",
43
  "target": "categorize:0"
44
  },
45
  {
46
+ "id": "755864b5-9eef-44ec-a560-9a23b5a3f9ee",
47
  "label": "",
48
  "source": "categorize:0",
49
  "target": "retrieval:0",
50
  "sourceHandle": "product_related"
51
  },
52
  {
53
+ "id": "7f68384d-3441-4bfa-bf13-69af67e857d2",
54
  "label": "",
55
  "source": "categorize:0",
56
  "target": "generate:casual",
57
  "sourceHandle": "casual"
58
  },
59
  {
60
+ "id": "c9bf8e81-9345-4885-b565-be2f5b16f6ef",
61
  "label": "",
62
  "source": "categorize:0",
63
  "target": "generate:complain",
64
  "sourceHandle": "complain"
65
  },
66
  {
67
+ "id": "2f326699-621b-4d28-ab98-70d99ad21add",
68
  "label": "",
69
  "source": "categorize:0",
70
  "target": "message:get_contact",
71
  "sourceHandle": "answer"
72
  },
73
  {
74
+ "id": "03e45174-55df-47d6-8e5f-fbe2ffc148d7",
75
  "label": "",
76
  "source": "retrieval:0",
77
  "target": "relevant:0"
78
  },
79
  {
80
+ "id": "a26027ac-e8a9-48e4-814c-3262b8d81913",
81
  "label": "",
82
  "source": "relevant:0",
83
  "target": "generate:answer"
84
  },
85
  {
86
+ "id": "04d99dc7-6120-4169-98c6-7bc2813aa85b",
87
  "label": "",
88
  "source": "relevant:0",
89
  "target": "generate:ask_contact"
 
 
 
 
 
 
90
  }
91
  ],
92
  "nodes": [
 
99
  },
100
  "data": {
101
  "label": "Begin",
102
+ "name": "LegalPoetsAttack",
103
  "form": {
104
  "prologue": "Hi! How can I help you?"
105
  }
 
116
  },
117
  "data": {
118
  "label": "Answer",
119
+ "name": "ThreeGeeseBehave",
120
  "form": {}
121
  },
122
  "sourcePosition": "left",
 
131
  },
132
  "data": {
133
  "label": "Categorize",
134
+ "name": "PublicComicsHammer",
135
  "form": {
136
  "llm_id": "deepseek-chat",
137
  "category_description": {
 
171
  },
172
  "data": {
173
  "label": "Generate",
174
+ "name": "SourKnivesPay",
175
  "form": {
176
  "llm_id": "deepseek-chat",
177
  "prompt": "You are a customer support. But the customer wants to have a casual chat with you instead of consulting about the product. Be nice, funny, enthusiasm and concern.",
 
192
  },
193
  "data": {
194
  "label": "Generate",
195
+ "name": "TameLlamasSniff",
196
  "form": {
197
  "llm_id": "deepseek-chat",
198
  "prompt": "You are a customer support. the Customers complain even curse about the products but not specific enough. You need to ask him/her what's the specific problem with the product. Be nice, patient and concern to soothe your customers’ emotions at first place.",
 
213
  },
214
  "data": {
215
  "label": "Retrieval",
216
+ "name": "ShinyPathsDraw",
217
  "form": {
218
  "similarity_threshold": 0.2,
219
  "keywords_similarity_weight": 0.3,
 
235
  },
236
  "data": {
237
  "label": "Relevant",
238
+ "name": "LegalPotsLick",
239
  "form": {
240
  "llm_id": "deepseek-chat",
241
  "temperature": 0.02,
 
255
  },
256
  "data": {
257
  "label": "Generate",
258
+ "name": "YellowGamesReport",
259
  "form": {
260
  "llm_id": "deepseek-chat",
261
  "prompt": "You are an intelligent assistant. Please answer the question based on content of knowledge base. When all knowledge base content is irrelevant to the question, your answer must include the sentence \"The answer you are looking for is not found in the knowledge base!\". Answers need to consider chat history.\n Knowledge base content is as following:\n {input}\n The above is the content of knowledge base.",
 
274
  },
275
  "data": {
276
  "label": "Generate",
277
+ "name": "FamousChefsRetire",
278
  "form": {
279
  "llm_id": "deepseek-chat",
280
  "prompt": "You are a customer support. But you can't answer to customers' question. You need to request their contact like E-mail, phone number, Wechat number, LINE number, twitter, discord, etc,. Product experts will contact them later. Please do not ask the same question twice.",
 
295
  },
296
  "data": {
297
  "label": "Message",
298
+ "name": "BlueBooksTan",
299
  "form": {
300
  "messages": [
301
  "Okay, I've already write this down. What else I can do for you?",
web/src/pages/flow/list/hooks.ts CHANGED
@@ -9,8 +9,8 @@ import { useNavigate } from 'umi';
9
  // import { dsl } from '../mock';
10
  // import headhunterZhComponents from '../../../../../graph/test/dsl_examples/headhunter_zh.json';
11
  // import dslJson from '../../../../../dls.json';
12
- import customerServiceBase from '../../../../../graph/test/dsl_examples/customer_service.json';
13
- import customerService from '../customer_service.json';
14
 
15
  export const useFetchDataOnMount = () => {
16
  const { data, loading } = useFetchFlowList();
@@ -39,8 +39,9 @@ export const useSaveFlow = () => {
39
  // }
40
  const ret = await setFlow({
41
  title,
 
42
  // dsl: dslJson,
43
- dsl: { ...customerServiceBase, ...customerService },
44
  });
45
 
46
  if (ret?.retcode === 0) {
 
9
  // import { dsl } from '../mock';
10
  // import headhunterZhComponents from '../../../../../graph/test/dsl_examples/headhunter_zh.json';
11
  // import dslJson from '../../../../../dls.json';
12
+ // import customerServiceBase from '../../../../../graph/test/dsl_examples/customer_service.json';
13
+ // import customerService from '../customer_service.json';
14
 
15
  export const useFetchDataOnMount = () => {
16
  const { data, loading } = useFetchFlowList();
 
39
  // }
40
  const ret = await setFlow({
41
  title,
42
+ dsl,
43
  // dsl: dslJson,
44
+ // dsl: { ...customerServiceBase, graph: customerService },
45
  });
46
 
47
  if (ret?.retcode === 0) {