Feat: conversation variable & variable assigner node (#7222)

Signed-off-by: -LAN- <laipz8200@outlook.com>
Co-authored-by: Joel <iamjoel007@gmail.com>
Co-authored-by: -LAN- <laipz8200@outlook.com>
This commit is contained in:
KVOJJJin
2024-08-13 14:44:10 +08:00
committed by GitHub
parent 8b55bd5828
commit 935e72d449
128 changed files with 3354 additions and 683 deletions

View File

@@ -99,6 +99,33 @@ const translation = {
export: 'Export DSL with secret values ',
},
},
chatVariable: {
panelTitle: 'Conversation Variables',
panelDescription: 'Conversation Variables are used to store interactive information that LLM needs to remember, including conversation history, uploaded files, user preferences. They are read-write. ',
docLink: 'Visit our docs to learn more.',
button: 'Add Variable',
modal: {
title: 'Add Conversation Variable',
editTitle: 'Edit Conversation Variable',
name: 'Name',
namePlaceholder: 'Variable name',
type: 'Type',
value: 'Default Value',
valuePlaceholder: 'Default value, leave blank to not set',
description: 'Description',
descriptionPlaceholder: 'Describe the variable',
editInJSON: 'Edit in JSON',
oneByOne: 'Add one by one',
editInForm: 'Edit in Form',
arrayValue: 'Value',
addArrayValue: 'Add Value',
objectKey: 'Key',
objectType: 'Type',
objectValue: 'Default Value',
},
storedContent: 'Stored content',
updatedAt: 'Updated at ',
},
changeHistory: {
title: 'Change History',
placeholder: 'You haven\'t changed anything yet',
@@ -174,6 +201,7 @@ const translation = {
'http-request': 'HTTP Request',
'variable-assigner': 'Variable Aggregator',
'variable-aggregator': 'Variable Aggregator',
'assigner': 'Variable Assigner',
'iteration-start': 'Iteration Start',
'iteration': 'Iteration',
'parameter-extractor': 'Parameter Extractor',
@@ -190,6 +218,7 @@ const translation = {
'template-transform': 'Convert data to string using Jinja template syntax',
'http-request': 'Allow server requests to be sent over the HTTP protocol',
'variable-assigner': 'Aggregate multi-branch variables into a single variable for unified configuration of downstream nodes.',
'assigner': 'The variable assignment node is used for assigning values to writable variables(like conversation variables).',
'variable-aggregator': 'Aggregate multi-branch variables into a single variable for unified configuration of downstream nodes.',
'iteration': 'Perform multiple steps on a list object until all results are outputted.',
'parameter-extractor': 'Use LLM to extract structured parameters from natural language for tool invocations or HTTP requests.',
@@ -216,6 +245,7 @@ const translation = {
checklistResolved: 'All issues are resolved',
organizeBlocks: 'Organize blocks',
change: 'Change',
optional: '(optional)',
},
nodes: {
common: {
@@ -407,6 +437,17 @@ const translation = {
},
setAssignVariable: 'Set assign variable',
},
assigner: {
'assignedVariable': 'Assigned Variable',
'writeMode': 'Write Mode',
'writeModeTip': 'When ASSIGNED VARIABLE is an array, append mode adds to the end.',
'over-write': 'Overwrite',
'append': 'Append',
'plus': 'Plus',
'clear': 'Clear',
'setVariable': 'Set Variable',
'variable': 'Variable',
},
tool: {
toAuthorize: 'To authorize',
inputVars: 'Input Variables',

View File

@@ -99,6 +99,33 @@ const translation = {
export: '导出包含 Secret 值的 DSL',
},
},
chatVariable: {
panelTitle: '会话变量',
panelDescription: '会话变量用于存储 LLM 需要的上下文信息,如用户偏好、对话历史等。它是可读写的。',
docLink: '查看文档了解更多。',
button: '添加变量',
modal: {
title: '添加会话变量',
editTitle: '编辑会话变量',
name: '名称',
namePlaceholder: '变量名',
type: '类型',
value: '默认值',
valuePlaceholder: '默认值,可以为空',
description: '描述',
descriptionPlaceholder: '变量的描述',
editInJSON: '在 JSON 中编辑',
oneByOne: '逐个添加',
editInForm: '在表单中编辑',
arrayValue: '值',
addArrayValue: '添加值',
objectKey: '属性',
objectType: '类型',
objectValue: '默认值',
},
storedContent: '存储内容',
updatedAt: '更新时间 ',
},
changeHistory: {
title: '变更历史',
placeholder: '尚未更改任何内容',
@@ -174,6 +201,7 @@ const translation = {
'http-request': 'HTTP 请求',
'variable-assigner': '变量聚合器',
'variable-aggregator': '变量聚合器',
'assigner': '变量赋值',
'iteration-start': '迭代开始',
'iteration': '迭代',
'parameter-extractor': '参数提取器',
@@ -190,6 +218,7 @@ const translation = {
'template-transform': '使用 Jinja 模板语法将数据转换为字符串',
'http-request': '允许通过 HTTP 协议发送服务器请求',
'variable-assigner': '将多路分支的变量聚合为一个变量,以实现下游节点统一配置。',
'assigner': '变量赋值节点用于向可写入变量(例如会话变量)进行变量赋值。',
'variable-aggregator': '将多路分支的变量聚合为一个变量,以实现下游节点统一配置。',
'iteration': '对列表对象执行多次步骤直至输出所有结果。',
'parameter-extractor': '利用 LLM 从自然语言内推理提取出结构化参数,用于后置的工具调用或 HTTP 请求。',
@@ -216,6 +245,7 @@ const translation = {
checklistResolved: '所有问题均已解决',
organizeBlocks: '整理节点',
change: '更改',
optional: '(选填)',
},
nodes: {
common: {
@@ -407,6 +437,17 @@ const translation = {
},
setAssignVariable: '设置赋值变量',
},
assigner: {
'assignedVariable': '赋值的变量',
'writeMode': '写入模式',
'writeModeTip': '赋值的变量为数组时,可添加变量至数组末尾。',
'over-write': '覆盖',
'append': '追加',
'plus': '加',
'clear': '清空',
'setVariable': '设置变量',
'variable': '变量',
},
tool: {
toAuthorize: '授权',
inputVars: '输入变量',