perf: http body;perf: create by json;perf: create by curl (#3570)

* perf: http body

* feat: create app by json (#3557)

* feat: create app by json

* fix build

* perf: create by json;perf: create by curl

* fix: ts

---------

Co-authored-by: heheer <heheer@sealos.io>
This commit is contained in:
Archer
2025-01-12 22:49:03 +08:00
committed by GitHub
parent f1f0ae2839
commit d0d1a2cae8
34 changed files with 1280 additions and 520 deletions

View File

@@ -5,6 +5,6 @@ export const getErrText = (err: any, def = ''): any => {
typeof err === 'string'
? err
: err?.response?.data?.message || err?.response?.message || err?.message || def;
msg && console.log('error =>', msg);
// msg && console.log('error =>', msg);
return replaceSensitiveText(msg);
};

View File

@@ -0,0 +1,38 @@
import parse from '@bany/curl-to-json';
type RequestMethod = 'get' | 'post' | 'put' | 'delete' | 'patch';
const methodMap: { [K in RequestMethod]: string } = {
get: 'GET',
post: 'POST',
put: 'PUT',
delete: 'DELETE',
patch: 'PATCH'
};
export const parseCurl = (curlContent: string) => {
const parsed = parse(curlContent);
if (!parsed.url) {
throw new Error('url not found');
}
const newParams = Object.keys(parsed.params || {}).map((key) => ({
key,
value: parsed.params?.[key],
type: 'string'
}));
const newHeaders = Object.keys(parsed.header || {}).map((key) => ({
key,
value: parsed.header?.[key],
type: 'string'
}));
const newBody = JSON.stringify(parsed.data, null, 2);
return {
url: parsed.url,
method: methodMap[parsed.method?.toLowerCase() as RequestMethod] || 'GET',
params: newParams,
headers: newHeaders,
body: newBody
};
};

View File

@@ -5,6 +5,8 @@ import type { FlowNodeInputItemType } from '../workflow/type/io.d';
import { getAppChatConfig } from '../workflow/utils';
import { StoreNodeItemType } from '../workflow/type/node';
import { DatasetSearchModeEnum } from '../dataset/constants';
import { WorkflowTemplateBasicType } from '../workflow/type';
import { AppTypeEnum } from './constants';
export const getDefaultAppForm = (): AppSimpleEditFormType => {
return {
@@ -127,3 +129,20 @@ export const appWorkflow2Form = ({
return defaultAppForm;
};
export const getAppType = (config?: WorkflowTemplateBasicType | AppSimpleEditFormType) => {
if (!config) return '';
if ('aiSettings' in config) {
return AppTypeEnum.simple;
}
if (!('nodes' in config)) return '';
if (config.nodes.some((node) => node.flowNodeType === 'workflowStart')) {
return AppTypeEnum.workflow;
}
if (config.nodes.some((node) => node.flowNodeType === 'pluginInput')) {
return AppTypeEnum.plugin;
}
return '';
};

View File

@@ -14,7 +14,8 @@
"openai": "4.61.0",
"openapi-types": "^12.1.3",
"json5": "^2.2.3",
"timezones-list": "^3.0.2"
"timezones-list": "^3.0.2",
"@bany/curl-to-json": "^1.2.8"
},
"devDependencies": {
"@types/js-yaml": "^4.0.9",

View File

@@ -487,16 +487,16 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
if (input.key === dynamicInput?.key) return;
// Skip some special key
if (input.key === NodeInputKeyEnum.childrenNodeIdList) {
if (
[NodeInputKeyEnum.childrenNodeIdList, NodeInputKeyEnum.httpJsonBody].includes(
input.key as any
)
) {
params[input.key] = input.value;
return;
}
// replace {{xx}} variables
// let value = replaceVariable(input.value, variables);
// replace {{$xx.xx$}} variables
// replace {{$xx.xx$}} and {{xx}} variables
let value = replaceEditorVariable({
text: input.value,
nodes: runtimeNodes,
@@ -606,6 +606,11 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
};
}
// Error
if (dispatchRes?.responseData?.error) {
addLog.warn('workflow error', dispatchRes.responseData.error);
}
return {
node,
runStatus: 'run',

View File

@@ -2,6 +2,7 @@ import type { ModuleDispatchProps } from '@fastgpt/global/core/workflow/runtime/
import {
NodeInputKeyEnum,
NodeOutputKeyEnum,
VARIABLE_NODE_ID,
WorkflowIOValueTypeEnum
} from '@fastgpt/global/core/workflow/constants';
import {
@@ -16,7 +17,9 @@ import { DispatchNodeResultType } from '@fastgpt/global/core/workflow/runtime/ty
import { getErrText } from '@fastgpt/global/common/error/utils';
import {
textAdaptGptResponse,
replaceEditorVariable
replaceEditorVariable,
formatVariableValByType,
getReferenceVariableValue
} from '@fastgpt/global/core/workflow/runtime/utils';
import { ContentTypes } from '@fastgpt/global/core/workflow/constants';
import { uploadFileFromBase64Img } from '../../../../common/file/gridfs/controller';
@@ -104,15 +107,73 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
[NodeInputKeyEnum.addInputParam]: concatVariables,
...concatVariables
};
// General data for variable substitutionExclude: json body)
const replaceStringVariables = (text: string) => {
return replaceVariable(
replaceEditorVariable({
text,
nodes: runtimeNodes,
variables: allVariables
}),
allVariables
);
return replaceEditorVariable({
text,
nodes: runtimeNodes,
variables: allVariables
});
};
/* 特殊处理 JSON 的字符串,减少解码错误
1. 找不到的值,替换成 null
2. 有换行字符串
*/
const replaceJsonBodyString = (text: string) => {
const valToStr = (val: any) => {
if (val === undefined) return 'null';
if (val === null) return 'null';
if (typeof val === 'object') return JSON.stringify(val);
if (typeof val === 'string') {
const str = JSON.stringify(val);
return str.startsWith('"') && str.endsWith('"') ? str.slice(1, -1) : str;
}
return String(val);
};
// 1. Replace {{key}} variables
const regex1 = /{{([^}]+)}}/g;
const matches1 = text.match(regex1) || [];
const uniqueKeys1 = [...new Set(matches1.map((match) => match.slice(2, -2)))];
for (const key of uniqueKeys1) {
text = text.replace(new RegExp(`{{(${key})}}`, 'g'), () => valToStr(variables[key]));
}
// 2. Replace {{key.key}} variables
const regex2 = /\{\{\$([^.]+)\.([^$]+)\$\}\}/g;
const matches2 = [...text.matchAll(regex2)];
if (matches2.length === 0) return text;
matches2.forEach((match) => {
const nodeId = match[1];
const id = match[2];
const variableVal = (() => {
if (nodeId === VARIABLE_NODE_ID) {
return variables[id];
}
// Find upstream node input/output
const node = runtimeNodes.find((node) => node.nodeId === nodeId);
if (!node) return;
const output = node.outputs.find((output) => output.id === id);
if (output) return formatVariableValByType(output.value, output.valueType);
const input = node.inputs.find((input) => input.key === id);
if (input)
return getReferenceVariableValue({ value: input.value, nodes: runtimeNodes, variables });
})();
const formatVal = valToStr(variableVal);
const regex = new RegExp(`\\{\\{\\$(${nodeId}\\.${id})\\$\\}\\}`, 'g');
text = text.replace(regex, () => formatVal);
});
return text.replace(/(".*?")\s*:\s*undefined\b/g, '$1: null');
};
httpReqUrl = replaceStringVariables(httpReqUrl);
@@ -176,15 +237,10 @@ export const dispatchHttp468Request = async (props: HttpRequestProps): Promise<H
}
if (!httpJsonBody) return {};
if (httpContentType === ContentTypes.json) {
httpJsonBody = replaceStringVariables(httpJsonBody);
const replaceJsonBody = httpJsonBody.replace(/(".*?")\s*:\s*undefined\b/g, '$1: null');
// Json body, parse and return
const jsonParse = json5.parse(replaceJsonBody);
const removeSignJson = removeUndefinedSign(jsonParse);
return removeSignJson;
return json5.parse(replaceJsonBodyString(httpJsonBody));
}
// Raw text, xml
httpJsonBody = replaceStringVariables(httpJsonBody);
return httpJsonBody.replaceAll(UNDEFINED_SIGN, 'null');
} catch (error) {
@@ -335,40 +391,40 @@ async function fetchData({
};
}
function replaceVariable(text: string, obj: Record<string, any>) {
for (const [key, value] of Object.entries(obj)) {
if (value === undefined) {
text = text.replace(new RegExp(`{{(${key})}}`, 'g'), UNDEFINED_SIGN);
} else {
const replacement = JSON.stringify(value);
const unquotedReplacement =
replacement.startsWith('"') && replacement.endsWith('"')
? replacement.slice(1, -1)
: replacement;
text = text.replace(new RegExp(`{{(${key})}}`, 'g'), () => unquotedReplacement);
}
}
return text || '';
}
function removeUndefinedSign(obj: Record<string, any>) {
for (const key in obj) {
if (obj[key] === UNDEFINED_SIGN) {
obj[key] = undefined;
} else if (Array.isArray(obj[key])) {
obj[key] = obj[key].map((item: any) => {
if (item === UNDEFINED_SIGN) {
return undefined;
} else if (typeof item === 'object') {
removeUndefinedSign(item);
}
return item;
});
} else if (typeof obj[key] === 'object') {
removeUndefinedSign(obj[key]);
}
}
return obj;
}
// function replaceVariable(text: string, obj: Record<string, any>) {
// for (const [key, value] of Object.entries(obj)) {
// if (value === undefined) {
// text = text.replace(new RegExp(`{{(${key})}}`, 'g'), UNDEFINED_SIGN);
// } else {
// const replacement = JSON.stringify(value);
// const unquotedReplacement =
// replacement.startsWith('"') && replacement.endsWith('"')
// ? replacement.slice(1, -1)
// : replacement;
// text = text.replace(new RegExp(`{{(${key})}}`, 'g'), () => unquotedReplacement);
// }
// }
// return text || '';
// }
// function removeUndefinedSign(obj: Record<string, any>) {
// for (const key in obj) {
// if (obj[key] === UNDEFINED_SIGN) {
// obj[key] = undefined;
// } else if (Array.isArray(obj[key])) {
// obj[key] = obj[key].map((item: any) => {
// if (item === UNDEFINED_SIGN) {
// return undefined;
// } else if (typeof item === 'object') {
// removeUndefinedSign(item);
// }
// return item;
// });
// } else if (typeof obj[key] === 'object') {
// removeUndefinedSign(obj[key]);
// }
// }
// return obj;
// }
// Replace some special response from system plugin
async function replaceSystemPluginResponse({

View File

@@ -142,6 +142,7 @@ export const iconPaths = {
'core/app/ttsFill': () => import('./icons/core/app/ttsFill.svg'),
'core/app/type/httpPlugin': () => import('./icons/core/app/type/httpPlugin.svg'),
'core/app/type/httpPluginFill': () => import('./icons/core/app/type/httpPluginFill.svg'),
'core/app/type/jsonImport': () => import('./icons/core/app/type/jsonImport.svg'),
'core/app/type/plugin': () => import('./icons/core/app/type/plugin.svg'),
'core/app/type/pluginFill': () => import('./icons/core/app/type/pluginFill.svg'),
'core/app/type/pluginLight': () => import('./icons/core/app/type/pluginLight.svg'),

View File

@@ -0,0 +1,19 @@
<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32" fill="none">
<g clip-path="url(#clip0_16784_2993)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M21.5271 4.37083L25.4043 8.01175C26.3626 8.91164 26.8417 9.36158 27.1828 9.89648C27.4727 10.3511 27.6882 10.849 27.8211 11.3715C27.9775 11.9863 27.9775 12.6436 27.9775 13.9582V19.4935C27.0071 19.026 25.919 18.764 24.7697 18.764C20.6828 18.764 17.3698 22.077 17.3698 26.1639C17.3698 27.502 17.7249 28.7571 18.3461 29.8401H12.1799C9.29446 29.8401 7.85176 29.8401 6.75362 29.2697C5.82822 28.789 5.07369 28.0344 4.59299 27.1091C4.02255 26.0109 4.02255 24.5682 4.02255 21.6828V10.3173C4.02255 7.43186 4.02255 5.98915 4.59299 4.89101C5.07369 3.96561 5.82822 3.21108 6.75362 2.73038C7.85176 2.15994 9.29447 2.15994 12.1799 2.15994H15.943C17.1489 2.15994 17.7519 2.15994 18.3216 2.29333C18.806 2.40673 19.2711 2.59087 19.7019 2.83981C20.2085 3.1326 20.6481 3.54535 21.5271 4.37083ZM19.1105 6.20351C18.3195 5.4451 17.924 5.0659 17.5846 5.05216C17.315 5.04124 17.0548 5.15224 16.8761 5.3544C16.6511 5.60893 16.6511 6.15685 16.6511 7.25268V8.50383C16.6511 10.1068 16.6511 10.9083 16.963 11.5205C17.2374 12.0591 17.6753 12.4969 18.2138 12.7713C18.8261 13.0833 19.6276 13.0833 21.2305 13.0833H22.6697C23.8233 13.0833 24.4001 13.0833 24.6566 12.8505C24.8602 12.6658 24.9678 12.3979 24.9487 12.1238C24.9247 11.7782 24.5084 11.379 23.6757 10.5806L19.1105 6.20351Z" fill="url(#paint0_linear_16784_2993)"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M23.5057 21.6108C23.8901 20.1169 26.0117 20.1169 26.3961 21.6108C26.6044 22.4202 27.4368 22.9007 28.2419 22.6764C29.7278 22.2624 30.7886 24.0997 29.6871 25.1796C29.0903 25.7646 29.0903 26.7258 29.6871 27.3108C30.7886 28.3907 29.7278 30.228 28.2419 29.814C27.4368 29.5897 26.6044 30.0703 26.3961 30.8796C26.0117 32.3735 23.8901 32.3735 23.5057 30.8796C23.2974 30.0703 22.4651 29.5897 21.66 29.814C20.174 30.228 19.1133 28.3907 20.2148 27.3108C20.8116 26.7258 20.8116 25.7646 20.2148 25.1796C19.1133 24.0997 20.174 22.2624 21.66 22.6764C22.4651 22.9007 23.2974 22.4202 23.5057 21.6108ZM26.8127 26.2452C26.8127 27.2734 25.9791 28.107 24.9509 28.107C23.9227 28.107 23.0891 27.2734 23.0891 26.2452C23.0891 25.217 23.9227 24.3834 24.9509 24.3834C25.9791 24.3834 26.8127 25.217 26.8127 26.2452Z" fill="url(#paint1_linear_16784_2993)"/>
</g>
<defs>
<linearGradient id="paint0_linear_16784_2993" x1="17.0824" y1="2.15994" x2="17.0824" y2="32" gradientUnits="userSpaceOnUse">
<stop stop-color="#BAC6D8"/>
<stop offset="1" stop-color="#9FA9C2"/>
</linearGradient>
<linearGradient id="paint1_linear_16784_2993" x1="17.0824" y1="2.15994" x2="17.0824" y2="32" gradientUnits="userSpaceOnUse">
<stop stop-color="#BAC6D8"/>
<stop offset="1" stop-color="#9FA9C2"/>
</linearGradient>
<clipPath id="clip0_16784_2993">
<rect width="32" height="32" fill="white"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@@ -75,6 +75,7 @@ const MyModal = ({
py={'10px'}
fontSize={'md'}
fontWeight={'bold'}
minH={['46px', '53px']}
>
{iconSrc && (
<>

View File

@@ -31,6 +31,8 @@
"copy_one_app": "Create Duplicate",
"core.app.QG.Switch": "Enable guess what you want to ask",
"core.dataset.import.Custom prompt": "Custom Prompt",
"create_by_curl": "By CURL",
"create_by_template": "By template",
"create_copy_success": "Duplicate Created Successfully",
"create_empty_app": "Create Default App",
"create_empty_plugin": "Create Default Plugin",
@@ -69,6 +71,7 @@
"interval.6_hours": "Every 6 Hours",
"interval.per_hour": "Every Hour",
"intro": "A comprehensive model application orchestration system that offers out-of-the-box data processing and model invocation capabilities. It allows for rapid Dataset construction and workflow orchestration through Flow visualization, enabling complex Dataset scenarios!",
"invalid_json_format": "JSON format error",
"llm_not_support_vision": "This model does not support image recognition",
"llm_use_vision": "Vision",
"llm_use_vision_tip": "After clicking on the model selection, you can see whether the model supports image recognition and the ability to control whether to start image recognition. \nAfter starting image recognition, the model will read the image content in the file link, and if the user question is less than 500 words, it will automatically parse the image in the user question.",
@@ -90,10 +93,11 @@
"move_app": "Move Application",
"node_not_intro": "This node is not introduced",
"not_json_file": "Please select a JSON file",
"oaste_curl_string": "Enter CURL code",
"open_auto_execute": "Enable automatic execution",
"open_vision_function_tip": "Models with icon switches have image recognition capabilities. \nAfter being turned on, the model will parse the pictures in the file link and automatically parse the pictures in the user's question (user question ≤ 500 words).",
"or_drag_JSON": "or drag in JSON file",
"paste_config": "Paste Configuration",
"paste_config_or_drag": "Paste config or drag JSON file here",
"permission.des.manage": "Based on write permissions, you can configure publishing channels, view conversation logs, and assign permissions to the application.",
"permission.des.read": "Use the app to have conversations",
"permission.des.write": "Can view and edit apps",
@@ -150,9 +154,12 @@
"type.Create workflow bot": "Create Workflow",
"type.Create workflow tip": "Build complex multi-turn dialogue AI applications through low-code methods, recommended for advanced users.",
"type.Http plugin": "HTTP Plugin",
"type.Import from json": "Import JSON",
"type.Import from json tip": "Create applications directly through JSON configuration files",
"type.Plugin": "Plugin",
"type.Simple bot": "Simple App",
"type.Workflow bot": "Workflow",
"type_not_recognized": "App type not recognized",
"upload_file_max_amount": "Maximum File Quantity",
"upload_file_max_amount_tip": "Maximum number of files uploaded in a single round of conversation",
"variable.select type_desc": "You can define a global variable that does not need to be filled in by the user.\n\nThe value of this variable can come from the API interface, the Query of the shared link, or assigned through the [Variable Update] module.",

View File

@@ -305,7 +305,6 @@
"core.app.Random": "Divergent",
"core.app.Search team tags": "Search Tags",
"core.app.Select TTS": "Select Voice Playback Mode",
"core.app.Select app from template": "Template",
"core.app.Select quote template": "Select Quote Prompt Template",
"core.app.Set a name for your app": "Set a Name for Your App",
"core.app.Setting ai property": "Click to Configure AI Model Properties",

View File

@@ -31,6 +31,8 @@
"copy_one_app": "创建副本",
"core.app.QG.Switch": "启用猜你想问",
"core.dataset.import.Custom prompt": "自定义提示词",
"create_by_curl": "从 CURL 创建",
"create_by_template": "从模板创建",
"create_copy_success": "创建副本成功",
"create_empty_app": "创建空白应用",
"create_empty_plugin": "创建空白插件",
@@ -69,6 +71,7 @@
"interval.6_hours": "每6小时",
"interval.per_hour": "每小时",
"intro": "是一个大模型应用编排系统,提供开箱即用的数据处理、模型调用等能力,可以快速的构建知识库并通过 Flow 可视化进行工作流编排,实现复杂的知识库场景!",
"invalid_json_format": "JSON 格式错误",
"llm_not_support_vision": "该模型不支持图片识别",
"llm_use_vision": "图片识别",
"llm_use_vision_tip": "点击模型选择后,可以看到模型是否支持图片识别以及控制是否启动图片识别的能力。启动图片识别后,模型会读取文件链接里图片内容,并且如果用户问题少于 500 字,会自动解析用户问题中的图片。",
@@ -90,10 +93,11 @@
"move_app": "移动应用",
"node_not_intro": "这个节点没有介绍",
"not_json_file": "请选择JSON文件",
"oaste_curl_string": "输入 CURL 代码",
"open_auto_execute": "启用自动执行",
"open_vision_function_tip": "有图示开关的模型即拥有图片识别能力。若开启模型会解析文件链接里的图片并自动解析用户问题中的图片用户问题≤500字时生效。",
"or_drag_JSON": "或拖入JSON文件",
"paste_config": "粘贴配置",
"paste_config_or_drag": "粘贴配置或拖入 JSON 文件",
"permission.des.manage": "写权限基础上,可配置发布渠道、查看对话日志、分配该应用权限",
"permission.des.read": "可使用该应用进行对话",
"permission.des.write": "可查看和编辑应用",
@@ -150,9 +154,12 @@
"type.Create workflow bot": "创建工作流",
"type.Create workflow tip": "通过低代码的方式,构建逻辑复杂的多轮对话 AI 应用,推荐高级玩家使用",
"type.Http plugin": "HTTP 插件",
"type.Import from json": "导入 JSON 配置",
"type.Import from json tip": "通过 JSON 配置文件,直接创建应用",
"type.Plugin": "插件",
"type.Simple bot": "简易应用",
"type.Workflow bot": "工作流",
"type_not_recognized": "未识别到应用类型",
"upload_file_max_amount": "最大文件数量",
"upload_file_max_amount_tip": "单轮对话中最大上传文件数量",
"variable.select type_desc": "可以为工作流定义全局变量,常用临时缓存。赋值的方式包括:\n1. 从对话页面的 query 参数获取。\n2. 通过 API 的 variables 对象传递。\n3. 通过【变量更新】节点进行赋值。",

View File

@@ -308,7 +308,6 @@
"core.app.Random": "发散",
"core.app.Search team tags": "搜索标签",
"core.app.Select TTS": "选择语音播放模式",
"core.app.Select app from template": "从模板中选择",
"core.app.Select quote template": "选择引用提示模板",
"core.app.Set a name for your app": "给应用设置一个名称",
"core.app.Setting ai property": "点击配置 AI 模型相关属性",

View File

@@ -31,6 +31,8 @@
"copy_one_app": "建立副本",
"core.app.QG.Switch": "啟用猜你想問",
"core.dataset.import.Custom prompt": "自訂提示詞",
"create_by_curl": "從 CURL 創建",
"create_by_template": "從模板創建",
"create_copy_success": "建立副本成功",
"create_empty_app": "建立空白應用程式",
"create_empty_plugin": "建立空白外掛",
@@ -69,6 +71,7 @@
"interval.6_hours": "每 6 小時",
"interval.per_hour": "每小時",
"intro": "FastGPT 是一個基於大型語言模型的知識庫平臺,提供開箱即用的資料處理、向量檢索和視覺化 AI 工作流程編排等功能,讓您可以輕鬆開發和部署複雜的問答系統,而無需繁瑣的設定或配置。",
"invalid_json_format": "JSON 格式錯誤",
"llm_not_support_vision": "這個模型不支援圖片辨識",
"llm_use_vision": "圖片辨識",
"llm_use_vision_tip": "點選模型選擇後,可以看到模型是否支援圖片辨識以及控制是否啟用圖片辨識的功能。啟用圖片辨識後,模型會讀取檔案連結中的圖片內容,並且如果使用者問題少於 500 字,會自動解析使用者問題中的圖片。",
@@ -90,10 +93,11 @@
"move_app": "移動應用程式",
"node_not_intro": "這個節點沒有介紹",
"not_json_file": "請選擇 JSON 檔案",
"oaste_curl_string": "輸入 CURL 代碼",
"open_auto_execute": "啟用自動執行",
"open_vision_function_tip": "有圖示開關的模型即擁有圖片辨識功能。若開啟,模型會解析檔案連結中的圖片,並自動解析使用者問題中的圖片(使用者問題 ≤ 500 字時生效)。",
"or_drag_JSON": "或拖曳 JSON 檔案",
"paste_config": "貼上設定",
"paste_config_or_drag": "貼上配置或拖入 JSON 文件",
"permission.des.manage": "在寫入權限基礎上,可以設定發布通道、檢視對話紀錄、分配這個應用程式的權限",
"permission.des.read": "可以使用這個應用程式進行對話",
"permission.des.write": "可以檢視和編輯應用程式",
@@ -150,9 +154,12 @@
"type.Create workflow bot": "建立工作流程",
"type.Create workflow tip": "透過低程式碼的方式,建立邏輯複雜的多輪對話 AI 應用程式,建議進階使用者使用",
"type.Http plugin": "HTTP 外掛",
"type.Import from json": "導入 JSON 配置",
"type.Import from json tip": "透過 JSON 設定文件,直接建立應用",
"type.Plugin": "外掛",
"type.Simple bot": "簡易應用程式",
"type.Workflow bot": "工作流程",
"type_not_recognized": "未識別到應用程式類型",
"upload_file_max_amount": "最大檔案數量",
"upload_file_max_amount_tip": "單輪對話中最大上傳檔案數量",
"variable.select type_desc": "可以為工作流程定義全域變數,常用於暫存。賦值的方式包括:\n1. 從對話頁面的 query 參數取得。\n2. 透過 API 的 variables 物件傳遞。\n3. 透過【變數更新】節點進行賦值。",

View File

@@ -305,7 +305,6 @@
"core.app.Random": "發散",
"core.app.Search team tags": "搜尋標籤",
"core.app.Select TTS": "選擇語音播放模式",
"core.app.Select app from template": "從範本中選擇",
"core.app.Select quote template": "選擇引用提示範本",
"core.app.Set a name for your app": "為您的應用程式命名",
"core.app.Setting ai property": "點選設定 AI 模型相關屬性",