balibabu commited on
Commit
f43283a
·
1 Parent(s): 061aa4e

feat: modify the style of the operator #918 (#1335)

Browse files

### What problem does this PR solve?

feat: modify the style of the operator #918
### Type of change


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

web/src/components/operate-dropdown/index.less CHANGED
@@ -1,3 +1,4 @@
1
  .delete {
2
- height: 24px;
 
3
  }
 
1
  .delete {
2
+ // height: 24px;
3
+ display: inline-block;
4
  }
web/src/components/operate-dropdown/index.tsx CHANGED
@@ -10,6 +10,7 @@ interface IProps {
10
  deleteItem: () => Promise<any> | void;
11
  iconFontSize?: number;
12
  items?: MenuProps['items'];
 
13
  }
14
 
15
  const OperateDropdown = ({
@@ -17,6 +18,7 @@ const OperateDropdown = ({
17
  children,
18
  iconFontSize = 30,
19
  items: otherItems = [],
 
20
  }: React.PropsWithChildren<IProps>) => {
21
  const { t } = useTranslation();
22
  const showDeleteConfirm = useShowDeleteConfirm();
@@ -59,7 +61,12 @@ const OperateDropdown = ({
59
  <span className={styles.delete}>
60
  <MoreOutlined
61
  rotate={90}
62
- style={{ fontSize: iconFontSize, color: 'gray', cursor: 'pointer' }}
 
 
 
 
 
63
  />
64
  </span>
65
  )}
 
10
  deleteItem: () => Promise<any> | void;
11
  iconFontSize?: number;
12
  items?: MenuProps['items'];
13
+ height?: number;
14
  }
15
 
16
  const OperateDropdown = ({
 
18
  children,
19
  iconFontSize = 30,
20
  items: otherItems = [],
21
+ height = 24,
22
  }: React.PropsWithChildren<IProps>) => {
23
  const { t } = useTranslation();
24
  const showDeleteConfirm = useShowDeleteConfirm();
 
61
  <span className={styles.delete}>
62
  <MoreOutlined
63
  rotate={90}
64
+ style={{
65
+ fontSize: iconFontSize,
66
+ color: 'gray',
67
+ cursor: 'pointer',
68
+ height,
69
+ }}
70
  />
71
  </span>
72
  )}
web/src/pages/flow/canvas/node/begin-node.tsx CHANGED
@@ -1,10 +1,8 @@
1
- import { Flex, Space } from 'antd';
2
  import classNames from 'classnames';
3
  import { Handle, NodeProps, Position } from 'reactflow';
4
- import { Operator } from '../../constant';
5
  import { NodeData } from '../../interface';
6
- import OperatorIcon from '../../operator-icon';
7
- import NodeDropdown from './dropdown';
8
 
9
  import styles from './index.less';
10
 
@@ -15,6 +13,12 @@ export function BeginNode({ id, data, selected }: NodeProps<NodeData>) {
15
  className={classNames(styles.ragNode, {
16
  [styles.selectedNode]: selected,
17
  })}
 
 
 
 
 
 
18
  >
19
  <Handle
20
  type="source"
@@ -22,14 +26,8 @@ export function BeginNode({ id, data, selected }: NodeProps<NodeData>) {
22
  isConnectable
23
  className={styles.handle}
24
  ></Handle>
25
- <Flex vertical align="center" justify="center">
26
- <Space size={6}>
27
- <OperatorIcon
28
- name={data.label as Operator}
29
- fontSize={16}
30
- ></OperatorIcon>
31
- <NodeDropdown id={id}></NodeDropdown>
32
- </Space>
33
  </Flex>
34
  <section className={styles.bottomBox}>
35
  <div className={styles.nodeName}>{data.name}</div>
 
1
+ import { Flex } from 'antd';
2
  import classNames from 'classnames';
3
  import { Handle, NodeProps, Position } from 'reactflow';
4
+ import { Operator, operatorMap } from '../../constant';
5
  import { NodeData } from '../../interface';
 
 
6
 
7
  import styles from './index.less';
8
 
 
13
  className={classNames(styles.ragNode, {
14
  [styles.selectedNode]: selected,
15
  })}
16
+ style={{
17
+ backgroundColor: operatorMap[data.label as Operator].backgroundColor,
18
+ color: 'white',
19
+ width: 50,
20
+ height: 50,
21
+ }}
22
  >
23
  <Handle
24
  type="source"
 
26
  isConnectable
27
  className={styles.handle}
28
  ></Handle>
29
+ <Flex vertical align="center" justify="center" gap={6}>
30
+ <span className={styles.type}>{data.label}</span>
 
 
 
 
 
 
31
  </Flex>
32
  <section className={styles.bottomBox}>
33
  <div className={styles.nodeName}>{data.name}</div>
web/src/pages/flow/canvas/node/categorize-node.tsx CHANGED
@@ -1,8 +1,12 @@
1
- import { Flex, Space } from 'antd';
2
  import classNames from 'classnames';
3
  import get from 'lodash/get';
4
  import { Handle, NodeProps, Position } from 'reactflow';
5
- import { CategorizeAnchorPointPositions, Operator } from '../../constant';
 
 
 
 
6
  import { NodeData } from '../../interface';
7
  import OperatorIcon from '../../operator-icon';
8
  import CategorizeHandle from './categorize-handle';
@@ -12,12 +16,17 @@ import styles from './index.less';
12
 
13
  export function CategorizeNode({ id, data, selected }: NodeProps<NodeData>) {
14
  const categoryData = get(data, 'form.category_description') ?? {};
 
15
 
16
  return (
17
  <section
18
  className={classNames(styles.ragNode, {
19
  [styles.selectedNode]: selected,
20
  })}
 
 
 
 
21
  >
22
  <Handle
23
  type="target"
@@ -49,14 +58,13 @@ export function CategorizeNode({ id, data, selected }: NodeProps<NodeData>) {
49
  idx={idx}
50
  ></CategorizeHandle>
51
  ))}
52
- <Flex vertical align="center" justify="center">
53
- <Space size={6}>
54
- <OperatorIcon
55
- name={data.label as Operator}
56
- fontSize={16}
57
- ></OperatorIcon>
58
- <NodeDropdown id={id}></NodeDropdown>
59
- </Space>
60
  </Flex>
61
  <section className={styles.bottomBox}>
62
  <div className={styles.nodeName}>{data.name}</div>
 
1
+ import { Flex } from 'antd';
2
  import classNames from 'classnames';
3
  import get from 'lodash/get';
4
  import { Handle, NodeProps, Position } from 'reactflow';
5
+ import {
6
+ CategorizeAnchorPointPositions,
7
+ Operator,
8
+ operatorMap,
9
+ } from '../../constant';
10
  import { NodeData } from '../../interface';
11
  import OperatorIcon from '../../operator-icon';
12
  import CategorizeHandle from './categorize-handle';
 
16
 
17
  export function CategorizeNode({ id, data, selected }: NodeProps<NodeData>) {
18
  const categoryData = get(data, 'form.category_description') ?? {};
19
+ const style = operatorMap[data.label as Operator];
20
 
21
  return (
22
  <section
23
  className={classNames(styles.ragNode, {
24
  [styles.selectedNode]: selected,
25
  })}
26
+ style={{
27
+ backgroundColor: style.backgroundColor,
28
+ color: style.color,
29
+ }}
30
  >
31
  <Handle
32
  type="target"
 
58
  idx={idx}
59
  ></CategorizeHandle>
60
  ))}
61
+ <Flex vertical align="center" justify="center" gap={6}>
62
+ <OperatorIcon
63
+ name={data.label as Operator}
64
+ fontSize={24}
65
+ ></OperatorIcon>
66
+ <span className={styles.type}>{data.label}</span>
67
+ <NodeDropdown id={id}></NodeDropdown>
 
68
  </Flex>
69
  <section className={styles.bottomBox}>
70
  <div className={styles.nodeName}>{data.name}</div>
web/src/pages/flow/canvas/node/dropdown.tsx CHANGED
@@ -38,6 +38,7 @@ const NodeDropdown = ({ id }: IProps) => {
38
  return (
39
  <OperateDropdown
40
  iconFontSize={14}
 
41
  deleteItem={deleteNode}
42
  items={items}
43
  ></OperateDropdown>
 
38
  return (
39
  <OperateDropdown
40
  iconFontSize={14}
41
+ height={14}
42
  deleteItem={deleteNode}
43
  items={items}
44
  ></OperateDropdown>
web/src/pages/flow/canvas/node/index.less CHANGED
@@ -23,6 +23,9 @@
23
  color: #777;
24
  font-size: 12px;
25
  }
 
 
 
26
  .description {
27
  font-size: 10px;
28
  }
 
23
  color: #777;
24
  font-size: 12px;
25
  }
26
+ .type {
27
+ // font-size: 12px;
28
+ }
29
  .description {
30
  font-size: 10px;
31
  }
web/src/pages/flow/canvas/node/index.tsx CHANGED
@@ -1,9 +1,13 @@
 
1
  import classNames from 'classnames';
2
- import { Handle, NodeProps, Position } from 'reactflow';
3
-
4
- import { Flex, Space } from 'antd';
5
  import get from 'lodash/get';
6
- import { CategorizeAnchorPointPositions, Operator } from '../../constant';
 
 
 
 
 
 
7
  import { NodeData } from '../../interface';
8
  import OperatorIcon from '../../operator-icon';
9
  import CategorizeHandle from './categorize-handle';
@@ -18,12 +22,14 @@ export function RagNode({
18
  }: NodeProps<NodeData>) {
19
  const isCategorize = data.label === Operator.Categorize;
20
  const categoryData = get(data, 'form.category_description') ?? {};
 
21
 
22
  return (
23
  <section
24
  className={classNames(styles.ragNode, {
25
  [styles.selectedNode]: selected,
26
  })}
 
27
  >
28
  <Handle
29
  id="c"
@@ -51,14 +57,18 @@ export function RagNode({
51
  idx={idx}
52
  ></CategorizeHandle>
53
  ))}
54
- <Flex vertical align="center" justify="center">
55
- <Space size={6}>
56
- <OperatorIcon
57
- name={data.label as Operator}
58
- fontSize={16}
59
- ></OperatorIcon>
60
- <NodeDropdown id={id}></NodeDropdown>
61
- </Space>
 
 
 
 
62
  </Flex>
63
 
64
  <section className={styles.bottomBox}>
 
1
+ import { Flex } from 'antd';
2
  import classNames from 'classnames';
 
 
 
3
  import get from 'lodash/get';
4
+ import pick from 'lodash/pick';
5
+ import { Handle, NodeProps, Position } from 'reactflow';
6
+ import {
7
+ CategorizeAnchorPointPositions,
8
+ Operator,
9
+ operatorMap,
10
+ } from '../../constant';
11
  import { NodeData } from '../../interface';
12
  import OperatorIcon from '../../operator-icon';
13
  import CategorizeHandle from './categorize-handle';
 
22
  }: NodeProps<NodeData>) {
23
  const isCategorize = data.label === Operator.Categorize;
24
  const categoryData = get(data, 'form.category_description') ?? {};
25
+ const style = operatorMap[data.label as Operator];
26
 
27
  return (
28
  <section
29
  className={classNames(styles.ragNode, {
30
  [styles.selectedNode]: selected,
31
  })}
32
+ style={pick(style, ['backgroundColor', 'width', 'height', 'color'])}
33
  >
34
  <Handle
35
  id="c"
 
57
  idx={idx}
58
  ></CategorizeHandle>
59
  ))}
60
+ <Flex vertical align="center" justify={'center'} gap={6}>
61
+ <OperatorIcon
62
+ name={data.label as Operator}
63
+ fontSize={style['iconFontSize'] ?? 24}
64
+ ></OperatorIcon>
65
+ <span
66
+ className={styles.type}
67
+ style={{ fontSize: style.fontSize ?? 14 }}
68
+ >
69
+ {data.label}
70
+ </span>
71
+ <NodeDropdown id={id}></NodeDropdown>
72
  </Flex>
73
 
74
  <section className={styles.bottomBox}>
web/src/pages/flow/constant.tsx CHANGED
@@ -34,14 +34,45 @@ export const operatorIconMap = {
34
  export const operatorMap = {
35
  [Operator.Retrieval]: {
36
  description: 'Retrieval description drjlftglrthjftl',
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
  },
38
- [Operator.Generate]: { description: 'Generate description' },
39
- [Operator.Answer]: { description: 'Answer description' },
40
- [Operator.Begin]: { description: 'Begin description' },
41
- [Operator.Categorize]: { description: 'Categorize description' },
42
- [Operator.Message]: { description: 'Message description' },
43
- [Operator.Relevant]: { description: 'BranchesOutlined description' },
44
- [Operator.RewriteQuestion]: { description: 'RewriteQuestion description' },
45
  };
46
 
47
  export const componentMenuList = [
 
34
  export const operatorMap = {
35
  [Operator.Retrieval]: {
36
  description: 'Retrieval description drjlftglrthjftl',
37
+ backgroundColor: '#cad6e0',
38
+ color: '#385974',
39
+ },
40
+ [Operator.Generate]: {
41
+ description: 'Generate description',
42
+ backgroundColor: '#ebd6d6',
43
+ width: 150,
44
+ height: 150,
45
+ fontSize: 20,
46
+ iconFontSize: 30,
47
+ color: '#996464',
48
+ },
49
+ [Operator.Answer]: {
50
+ description: 'Answer description',
51
+ backgroundColor: '#f4816d',
52
+ color: 'white',
53
+ },
54
+ [Operator.Begin]: {
55
+ description: 'Begin description',
56
+ backgroundColor: '#4f51d6',
57
+ },
58
+ [Operator.Categorize]: {
59
+ description: 'Categorize description',
60
+ backgroundColor: '#ffebcd',
61
+ color: '#cc8a26',
62
+ },
63
+ [Operator.Message]: {
64
+ description: 'Message description',
65
+ backgroundColor: '#c5ddc7',
66
+ color: 'green',
67
+ },
68
+ [Operator.Relevant]: {
69
+ description: 'BranchesOutlined description',
70
+ backgroundColor: 'white',
71
+ },
72
+ [Operator.RewriteQuestion]: {
73
+ description: 'RewriteQuestion description',
74
+ backgroundColor: 'white',
75
  },
 
 
 
 
 
 
 
76
  };
77
 
78
  export const componentMenuList = [
web/src/pages/flow/headhunter_zh.json CHANGED
@@ -1,7 +1,7 @@
1
  {
2
  "edges": [
3
  {
4
- "id": "1542fe3d-d13d-4e14-a253-c06cdf72e357",
5
  "label": "",
6
  "source": "begin",
7
  "target": "answer:0",
@@ -10,7 +10,7 @@
10
  }
11
  },
12
  {
13
- "id": "e0c46945-b60a-4da9-9a35-5dd654469e47",
14
  "label": "",
15
  "source": "message:reject",
16
  "target": "answer:0",
@@ -19,7 +19,7 @@
19
  }
20
  },
21
  {
22
- "id": "5806636c-2bba-4c14-922e-3ef905c37f52",
23
  "label": "",
24
  "source": "answer:0",
25
  "target": "categorize:0",
@@ -28,7 +28,7 @@
28
  }
29
  },
30
  {
31
- "id": "ebce1598-cd0c-4863-a8b1-2f8a1de28040",
32
  "label": "",
33
  "source": "categorize:0",
34
  "target": "message:introduction",
@@ -38,7 +38,7 @@
38
  "sourceHandle": "interested"
39
  },
40
  {
41
- "id": "1e560fed-76f9-494b-a028-cd871acdee07",
42
  "label": "",
43
  "source": "categorize:0",
44
  "target": "generate:casual",
@@ -48,7 +48,7 @@
48
  "sourceHandle": "casual"
49
  },
50
  {
51
- "id": "5aa430cc-19c4-4f82-9fed-5649651fff11",
52
  "label": "",
53
  "source": "categorize:0",
54
  "target": "message:reject",
@@ -58,7 +58,7 @@
58
  "sourceHandle": "answer"
59
  },
60
  {
61
- "id": "c40b1dab-5f42-425f-9207-27e261d6b70f",
62
  "label": "",
63
  "source": "categorize:0",
64
  "target": "retrieval:0",
@@ -68,7 +68,7 @@
68
  "sourceHandle": "about_job"
69
  },
70
  {
71
- "id": "7216138f-cdc0-4992-851e-30916033d520",
72
  "label": "",
73
  "source": "message:introduction",
74
  "target": "answer:1",
@@ -77,7 +77,7 @@
77
  }
78
  },
79
  {
80
- "id": "3bb8ada2-b1ac-49cc-81bf-78ffb2c07d94",
81
  "label": "",
82
  "source": "generate:aboutJob",
83
  "target": "answer:1",
@@ -86,7 +86,7 @@
86
  }
87
  },
88
  {
89
- "id": "d60c4c33-ddd2-40ff-af62-aabb11e6a91c",
90
  "label": "",
91
  "source": "generate:casual",
92
  "target": "answer:1",
@@ -95,7 +95,7 @@
95
  }
96
  },
97
  {
98
- "id": "f425b2ec-fe5b-44d9-b5f3-c2953e12b600",
99
  "label": "",
100
  "source": "generate:get_wechat",
101
  "target": "answer:1",
@@ -104,7 +104,7 @@
104
  }
105
  },
106
  {
107
- "id": "ebf55d7f-36bf-43ba-9166-34d8a4a68474",
108
  "label": "",
109
  "source": "generate:nowechat",
110
  "target": "answer:1",
@@ -113,7 +113,7 @@
113
  }
114
  },
115
  {
116
- "id": "8897e8ed-12b7-4ca4-a63b-7a5a702a1517",
117
  "label": "",
118
  "source": "answer:1",
119
  "target": "categorize:1",
@@ -122,7 +122,7 @@
122
  }
123
  },
124
  {
125
- "id": "a0d646e9-6ef9-490d-9308-830c51b8a663",
126
  "label": "",
127
  "source": "categorize:1",
128
  "target": "retrieval:0",
@@ -132,7 +132,7 @@
132
  "sourceHandle": "about_job"
133
  },
134
  {
135
- "id": "6a0714f7-806f-49f4-bc36-210025e48f49",
136
  "label": "",
137
  "source": "categorize:1",
138
  "target": "generate:casual",
@@ -142,7 +142,7 @@
142
  "sourceHandle": "casual"
143
  },
144
  {
145
- "id": "9267def3-9b81-4f50-87da-0eef85b4fe90",
146
  "label": "",
147
  "source": "categorize:1",
148
  "target": "generate:get_wechat",
@@ -152,7 +152,7 @@
152
  "sourceHandle": "wechat"
153
  },
154
  {
155
- "id": "d8bfe795-36e7-4172-9dfe-649ad37be4d8",
156
  "label": "",
157
  "source": "categorize:1",
158
  "target": "generate:nowechat",
@@ -162,7 +162,7 @@
162
  "sourceHandle": "giveup"
163
  },
164
  {
165
- "id": "94c5e5c5-3b35-412d-a6cb-4ed5f883fef2",
166
  "label": "",
167
  "source": "retrieval:0",
168
  "target": "generate:aboutJob",
@@ -171,7 +171,7 @@
171
  }
172
  },
173
  {
174
- "id": "17da25cc-09c5-4a5e-ad27-2c6593f8fff5",
175
  "label": "",
176
  "source": "relevant:0",
177
  "target": "generate:aboutJob",
@@ -190,7 +190,7 @@
190
  },
191
  "data": {
192
  "label": "Begin",
193
- "name": "OliveGuestsPlay",
194
  "form": {
195
  "prologue": "您好!我是AGI方向的猎头,了解到您是这方面的大佬,然后冒昧的就联系到您。这边有个机会想和您分享,RAGFlow正在招聘您这个岗位的资深的工程师不知道您那边是不是感兴趣?"
196
  }
@@ -207,7 +207,7 @@
207
  },
208
  "data": {
209
  "label": "Answer",
210
- "name": "SolidRatsBurn",
211
  "form": {}
212
  },
213
  "sourcePosition": "left",
@@ -222,7 +222,7 @@
222
  },
223
  "data": {
224
  "label": "Categorize",
225
- "name": "ShyHousesAccept",
226
  "form": {
227
  "llm_id": "deepseek-chat",
228
  "category_description": {
@@ -261,7 +261,7 @@
261
  },
262
  "data": {
263
  "label": "Message",
264
- "name": "ThreeRegionsGrow",
265
  "form": {
266
  "messages": [
267
  "我简单介绍以下:\nRAGFlow 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。https://github.com/infiniflow/ragflow\n您那边还有什么要了解的?"
@@ -280,7 +280,7 @@
280
  },
281
  "data": {
282
  "label": "Answer",
283
- "name": "FancyChickenCut",
284
  "form": {}
285
  },
286
  "sourcePosition": "left",
@@ -295,7 +295,7 @@
295
  },
296
  "data": {
297
  "label": "Categorize",
298
- "name": "DeepAreasGrow",
299
  "form": {
300
  "llm_id": "deepseek-chat",
301
  "category_description": {
@@ -335,7 +335,7 @@
335
  },
336
  "data": {
337
  "label": "Generate",
338
- "name": "TinyOlivesMelt",
339
  "form": {
340
  "llm_id": "deepseek-chat",
341
  "prompt": "你是AGI方向的猎头,现在候选人的聊了和职位无关的话题,请耐心的回应候选人,并将话题往该AGI的职位上带,最好能要到候选人微信号以便后面保持联系。",
@@ -356,7 +356,7 @@
356
  },
357
  "data": {
358
  "label": "Retrieval",
359
- "name": "SlimyDonkeysHug",
360
  "form": {
361
  "similarity_threshold": 0.2,
362
  "keywords_similarity_weight": 0.3,
@@ -378,7 +378,7 @@
378
  },
379
  "data": {
380
  "label": "Generate",
381
- "name": "PetiteHoundsMove",
382
  "form": {
383
  "llm_id": "deepseek-chat",
384
  "prompt": "你是AGI方向的猎头,候选人问了有关职位或公司的问题,你根据以下职位信息回答。如果职位信息中不包含候选人的问题就回答不清楚、不知道、有待确认等。回答完后引导候选人加微信号,如:\n - 方便加一下微信吗,我把JD发您看看?\n - 微信号多少,我把详细职位JD发您?\n 职位信息如下:\n {input}\n 职位信息如上。",
@@ -397,7 +397,7 @@
397
  },
398
  "data": {
399
  "label": "Generate",
400
- "name": "EagerSteaksWin",
401
  "form": {
402
  "llm_id": "deepseek-chat",
403
  "prompt": "你是AGI方向的猎头,候选人表示不反感加微信,如果对方已经报了微信号,表示感谢和信任并表示马上会加上;如果没有,则问对方微信号多少。你的微信号是weixin_kevin,E-mail是[email protected]。说话不要重复。不要总是您好。",
@@ -418,7 +418,7 @@
418
  },
419
  "data": {
420
  "label": "Generate",
421
- "name": "IcyAntsBet",
422
  "form": {
423
  "llm_id": "deepseek-chat",
424
  "prompt": "你是AGI方向的猎头,当你提出加微信时对方表示拒绝。你需要耐心礼貌的回应候选人,表示对于保护隐私信息给予理解,也可以询问他对该职位的看法和顾虑。并在恰当的时机再次询问微信联系方式。也可以鼓励候选人主动与你取得联系。你的微信号是weixin_kevin,E-mail是[email protected]。说话不要重复。不要总是您好。",
@@ -439,7 +439,7 @@
439
  },
440
  "data": {
441
  "label": "Message",
442
- "name": "SmallCarsRoll",
443
  "form": {
444
  "messages": [
445
  "好的,祝您生活愉快,工作顺利。",
 
1
  {
2
  "edges": [
3
  {
4
+ "id": "01dc9019-5c4c-4410-9759-f09ad8075a23",
5
  "label": "",
6
  "source": "begin",
7
  "target": "answer:0",
 
10
  }
11
  },
12
  {
13
+ "id": "f0216178-c3ab-48c1-8020-c5c7d8aa3853",
14
  "label": "",
15
  "source": "message:reject",
16
  "target": "answer:0",
 
19
  }
20
  },
21
  {
22
+ "id": "fd98adb0-9461-45ba-9f6e-5633b8ea57ac",
23
  "label": "",
24
  "source": "answer:0",
25
  "target": "categorize:0",
 
28
  }
29
  },
30
  {
31
+ "id": "c4ea0be6-d98c-464c-89c4-84b4199e6128",
32
  "label": "",
33
  "source": "categorize:0",
34
  "target": "message:introduction",
 
38
  "sourceHandle": "interested"
39
  },
40
  {
41
+ "id": "145f4531-c5e4-4e01-9378-128b84db6029",
42
  "label": "",
43
  "source": "categorize:0",
44
  "target": "generate:casual",
 
48
  "sourceHandle": "casual"
49
  },
50
  {
51
+ "id": "1b8f7b90-4ee8-471a-aea0-4ae1fba7092b",
52
  "label": "",
53
  "source": "categorize:0",
54
  "target": "message:reject",
 
58
  "sourceHandle": "answer"
59
  },
60
  {
61
+ "id": "1e9c2335-a293-492f-a3c9-6f9bd02b7f91",
62
  "label": "",
63
  "source": "categorize:0",
64
  "target": "retrieval:0",
 
68
  "sourceHandle": "about_job"
69
  },
70
  {
71
+ "id": "c2b63dca-974f-4d48-8685-269230ff41ad",
72
  "label": "",
73
  "source": "message:introduction",
74
  "target": "answer:1",
 
77
  }
78
  },
79
  {
80
+ "id": "1e7a0f1f-3377-4762-a15d-975d8ac3b67a",
81
  "label": "",
82
  "source": "generate:aboutJob",
83
  "target": "answer:1",
 
86
  }
87
  },
88
  {
89
+ "id": "0d860594-9339-4283-9cc0-228f6f3e15a1",
90
  "label": "",
91
  "source": "generate:casual",
92
  "target": "answer:1",
 
95
  }
96
  },
97
  {
98
+ "id": "0707e61d-95ed-4c30-95ce-83ae930f3079",
99
  "label": "",
100
  "source": "generate:get_wechat",
101
  "target": "answer:1",
 
104
  }
105
  },
106
  {
107
+ "id": "a0e1cb13-8667-47ba-8b8a-11974f68b628",
108
  "label": "",
109
  "source": "generate:nowechat",
110
  "target": "answer:1",
 
113
  }
114
  },
115
  {
116
+ "id": "071f6b90-154a-421d-a3a1-24d68120517b",
117
  "label": "",
118
  "source": "answer:1",
119
  "target": "categorize:1",
 
122
  }
123
  },
124
  {
125
+ "id": "d0daf286-afe3-4257-ad23-62280de6a3c9",
126
  "label": "",
127
  "source": "categorize:1",
128
  "target": "retrieval:0",
 
132
  "sourceHandle": "about_job"
133
  },
134
  {
135
+ "id": "eed037f7-7a2c-4863-8daa-95299c0d7ed0",
136
  "label": "",
137
  "source": "categorize:1",
138
  "target": "generate:casual",
 
142
  "sourceHandle": "casual"
143
  },
144
  {
145
+ "id": "e2ce8e2c-5383-4328-8c7f-6a1ea5fbe392",
146
  "label": "",
147
  "source": "categorize:1",
148
  "target": "generate:get_wechat",
 
152
  "sourceHandle": "wechat"
153
  },
154
  {
155
+ "id": "b4e00364-bf13-4a5c-ba15-c10080a01faa",
156
  "label": "",
157
  "source": "categorize:1",
158
  "target": "generate:nowechat",
 
162
  "sourceHandle": "giveup"
163
  },
164
  {
165
+ "id": "d562f6f1-e9e3-4bf4-bcf1-171e3bdd8bca",
166
  "label": "",
167
  "source": "retrieval:0",
168
  "target": "generate:aboutJob",
 
171
  }
172
  },
173
  {
174
+ "id": "063838ab-7813-4981-b633-34f6d485305b",
175
  "label": "",
176
  "source": "relevant:0",
177
  "target": "generate:aboutJob",
 
190
  },
191
  "data": {
192
  "label": "Begin",
193
+ "name": "CleanDeerRoll",
194
  "form": {
195
  "prologue": "您好!我是AGI方向的猎头,了解到您是这方面的大佬,然后冒昧的就联系到您。这边有个机会想和您分享,RAGFlow正在招聘您这个岗位的资深的工程师不知道您那边是不是感兴趣?"
196
  }
 
207
  },
208
  "data": {
209
  "label": "Answer",
210
+ "name": "TwentyTimesDrive",
211
  "form": {}
212
  },
213
  "sourcePosition": "left",
 
222
  },
223
  "data": {
224
  "label": "Categorize",
225
+ "name": "StupidFoxesNail",
226
  "form": {
227
  "llm_id": "deepseek-chat",
228
  "category_description": {
 
261
  },
262
  "data": {
263
  "label": "Message",
264
+ "name": "FluffyLightsCry",
265
  "form": {
266
  "messages": [
267
  "我简单介绍以下:\nRAGFlow 是一款基于深度文档理解构建的开源 RAG(Retrieval-Augmented Generation)引擎。RAGFlow 可以为各种规模的企业及个人提供一套精简的 RAG 工作流程,结合大语言模型(LLM)针对用户各类不同的复杂格式数据提供可靠的问答以及有理有据的引用。https://github.com/infiniflow/ragflow\n您那边还有什么要了解的?"
 
280
  },
281
  "data": {
282
  "label": "Answer",
283
+ "name": "BreezyJarsNotice",
284
  "form": {}
285
  },
286
  "sourcePosition": "left",
 
295
  },
296
  "data": {
297
  "label": "Categorize",
298
+ "name": "ItchyJobsLike",
299
  "form": {
300
  "llm_id": "deepseek-chat",
301
  "category_description": {
 
335
  },
336
  "data": {
337
  "label": "Generate",
338
+ "name": "SocialLlamasDraw",
339
  "form": {
340
  "llm_id": "deepseek-chat",
341
  "prompt": "你是AGI方向的猎头,现在候选人的聊了和职位无关的话题,请耐心的回应候选人,并将话题往该AGI的职位上带,最好能要到候选人微信号以便后面保持联系。",
 
356
  },
357
  "data": {
358
  "label": "Retrieval",
359
+ "name": "ThinCamerasPunch",
360
  "form": {
361
  "similarity_threshold": 0.2,
362
  "keywords_similarity_weight": 0.3,
 
378
  },
379
  "data": {
380
  "label": "Generate",
381
+ "name": "FiveAnimalsWorry",
382
  "form": {
383
  "llm_id": "deepseek-chat",
384
  "prompt": "你是AGI方向的猎头,候选人问了有关职位或公司的问题,你根据以下职位信息回答。如果职位信息中不包含候选人的问题就回答不清楚、不知道、有待确认等。回答完后引导候选人加微信号,如:\n - 方便加一下微信吗,我把JD发您看看?\n - 微信号多少,我把详细职位JD发您?\n 职位信息如下:\n {input}\n 职位信息如上。",
 
397
  },
398
  "data": {
399
  "label": "Generate",
400
+ "name": "TastyTermsCarry",
401
  "form": {
402
  "llm_id": "deepseek-chat",
403
  "prompt": "你是AGI方向的猎头,候选人表示不反感加微信,如果对方已经报了微信号,表示感谢和信任并表示马上会加上;如果没有,则问对方微信号多少。你的微信号是weixin_kevin,E-mail是[email protected]。说话不要重复。不要总是您好。",
 
418
  },
419
  "data": {
420
  "label": "Generate",
421
+ "name": "SharpYaksShout",
422
  "form": {
423
  "llm_id": "deepseek-chat",
424
  "prompt": "你是AGI方向的猎头,当你提出加微信时对方表示拒绝。你需要耐心礼貌的回应候选人,表示对于保护隐私信息给予理解,也可以询问他对该职位的看法和顾虑。并在恰当的时机再次询问微信联系方式。也可以鼓励候选人主动与你取得联系。你的微信号是weixin_kevin,E-mail是[email protected]。说话不要重复。不要总是您好。",
 
439
  },
440
  "data": {
441
  "label": "Message",
442
+ "name": "ShaggyKeysStare",
443
  "form": {
444
  "messages": [
445
  "好的,祝您生活愉快,工作顺利。",
web/src/pages/flow/hooks.ts CHANGED
@@ -96,6 +96,7 @@ export const useHandleDrop = () => {
96
  },
97
  data: {
98
  label: `${type}`,
 
99
  },
100
  sourcePosition: Position.Right,
101
  targetPosition: Position.Left,
 
96
  },
97
  data: {
98
  label: `${type}`,
99
+ name: humanId(),
100
  },
101
  sourcePosition: Position.Right,
102
  targetPosition: Position.Left,