| | |
| | | } |
| | | |
| | | export const parameterTypeMap = { |
| | | [ParameterType.String]: 'string', |
| | | [ParameterType.Number]: 'number', |
| | | [ParameterType.Boolean]: 'boolean', |
| | | [ParameterType.String]: '字符串', |
| | | [ParameterType.Number]: '数字', |
| | | [ParameterType.Boolean]: '布尔值', |
| | | }; |
| | | |
| | | export const enum NodeType { |
| | | LLM = 'LLM', |
| | | Start = 'start', |
| | | End = 'end', |
| | | Condition='condition' |
| | | Condition = 'condition', |
| | | Knowledge = 'knowledge', |
| | | Output = 'output_msg', |
| | | Agent='agent', |
| | | Func='func', |
| | | } |
| | | |
| | | export const nodeTypeMap = { |
| | |
| | | [NodeType.Start]: '开始', |
| | | [NodeType.End]: '结束', |
| | | [NodeType.Condition]: '条件判断', |
| | | [NodeType.Knowledge]: '知识库', |
| | | [NodeType.Output]: '对话', |
| | | [NodeType.Agent]: '代理', |
| | | [NodeType.Func]: '执行功能', |
| | | |
| | | }; |
| | | |
| | | export const enum CompareOperation { |
| | | /** @description 包含 */ |
| | | include = 'include', |
| | | /** @description 不包含 */ |
| | | notInclude = 'notInclude', |
| | | /** @description 为空 */ |
| | | empty = 'empty', |
| | | /** @description 不为空 */ |
| | | notEmpty = 'notEmpty', |
| | | /** @description 开始为 */ |
| | | startWith = 'startWith', |
| | | /** @description 结束为 */ |
| | | endWith = 'endWith', |
| | | |
| | | /** @description 非开始为 */ |
| | | notStartWith = 'notStartWith', |
| | | /** @description 非结束为 */ |
| | | notEndWith = 'notEndWith', |
| | | |
| | | /** @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]: '结束为', |
| | | [CompareOperation.notStartWith]: '非开始为', |
| | | [CompareOperation.notEndWith]: '非结束为', |
| | | }; |
| | | |
| | | 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]: '输入型交互', |
| | | }; |