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
| export const enum ParameterType {
| String = 'string',
| Number = 'number',
| Boolean = 'boolean',
| }
|
| export const parameterTypeMap = {
| [ParameterType.String]: 'string',
| [ParameterType.Number]: 'number',
| [ParameterType.Boolean]: 'boolean',
| };
|
| export const enum NodeType {
| LLM = 'LLM',
| Start = 'start',
| End = 'end',
| Condition = 'condition',
| Knowledge = 'knowledge',
| Output = 'output_msg',
| Agent='agent'
| }
|
| export const nodeTypeMap = {
| [NodeType.LLM]: '大模型',
| [NodeType.Start]: '开始',
| [NodeType.End]: '结束',
| [NodeType.Condition]: '条件判断',
| [NodeType.Knowledge]: '知识库',
| [NodeType.Output]: '输出',
| [NodeType.Agent]: '代理',
|
| };
|
| export const enum CompareOperation {
| /** @description 包含 */
| include = 'include',
| /** @description 不包含 */
| notInclude = 'notInclude',
| /** @description 为空 */
| empty = 'empty',
| /** @description 不为空 */
| notEmpty = 'notEmpty',
| /** @description 开始为 */
| startWith = 'startWith',
| /** @description 结束为 */
| endWith = 'endWith',
|
| /** @description 等于 */
| eq = 'eq',
| /** @description 不等于 */
| neq = 'neq',
| /** @description 大于 */
| gt = 'gt',
| /** @description 小于 */
| lt = 'lt',
| /** @description 大于或等于 */
| gte = 'gte',
| /** @description 小于或等于 */
| lte = 'lte',
| }
| export const compareOperationMap = {
| [CompareOperation.gt]: '大于',
| [CompareOperation.lt]: '小于',
| [CompareOperation.gte]: '大于或等于',
| [CompareOperation.lte]: '小于或等于',
| [CompareOperation.eq]: '等于',
| [CompareOperation.neq]: '不等于',
| [CompareOperation.include]: '包含',
| [CompareOperation.notInclude]: '不包含',
| // [CompareOperation.empty]: '为空',
| // [CompareOperation.notEmpty]: '不为空',
| [CompareOperation.startWith]: '开始为',
| [CompareOperation.endWith]: '结束为',
| };
|
| export const enum VarType {
| Input = 'input',
| Reference = 'reference',
| }
|
| export const varTypeMap = {
| [VarType.Input]: '输入',
| [VarType.Reference]: '引用',
| };
|
| export const enum ConditionOperator {
| And = 'and',
| Or = 'or',
| }
|
| export const conditionOperatorMap = {
| [ConditionOperator.And]: '且',
| [ConditionOperator.Or]: '或',
| };
|
| // 交互类型
| export const enum InteractionType {
| // 无交互
| None = 'none',
| // 选择型交互
| Select = 'select',
| // 输入型交互
| Input = 'input',
| }
|
| export const interactionTypeMap = {
| [InteractionType.None]: '无交互',
| [InteractionType.Select]: '选择型交互',
| [InteractionType.Input]: '输入型交互',
| };
|
|