workflow.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448
  1. const translation = {
  2. common: {
  3. undo: '復原',
  4. redo: '重做',
  5. editing: '編輯中',
  6. autoSaved: '自動保存',
  7. unpublished: '未發佈',
  8. published: '已發佈',
  9. publish: '發佈',
  10. update: '更新',
  11. run: '運行',
  12. running: '運行中',
  13. inRunMode: '在運行模式中',
  14. inPreview: '預覽中',
  15. inPreviewMode: '預覽中',
  16. preview: '預覽',
  17. viewRunHistory: '查看運行歷史',
  18. runHistory: '運行歷史',
  19. goBackToEdit: '返回編輯模式',
  20. conversationLog: '對話記錄',
  21. features: '功能',
  22. debugAndPreview: '調試和預覽',
  23. restart: '重新開始',
  24. currentDraft: '當前草稿',
  25. currentDraftUnpublished: '當前草稿未發佈',
  26. latestPublished: '最新發佈',
  27. publishedAt: '發佈於',
  28. restore: '恢復',
  29. runApp: '運行',
  30. batchRunApp: '批量運行',
  31. accessAPIReference: '訪問 API',
  32. embedIntoSite: '嵌入網站',
  33. addTitle: '添加標題...',
  34. addDescription: '添加描述...',
  35. noVar: '沒有變量',
  36. variableNamePlaceholder: '變量名',
  37. searchVar: '搜索變量',
  38. setVarValuePlaceholder: '設置變量值',
  39. needConnecttip: '此節點尚未連接到其他節點',
  40. maxTreeDepth: '每個分支最大限制 {{depth}} 個節點',
  41. needEndNode: '必須添加結束節點',
  42. needAnswerNode: '必須添加直接回覆節點',
  43. workflowProcess: '工作流',
  44. notRunning: '尚未運行',
  45. previewPlaceholder: '在下面的框中輸入內容開始調試聊天機器人',
  46. effectVarConfirm: {
  47. title: '移除變量',
  48. content: '該變量在其他節點中使用。您是否仍要刪除它?',
  49. },
  50. insertVarTip: '按 \'/\' 鍵快速插入',
  51. processData: '數據處理',
  52. input: '輸入',
  53. output: '輸出',
  54. jinjaEditorPlaceholder: '輸入 “/” 或 “{” 插入變量',
  55. viewOnly: '只讀',
  56. showRunHistory: '顯示運行歷史',
  57. enableJinja: '開啟支持 Jinja 模板',
  58. learnMore: '了解更多',
  59. copy: '拷貝',
  60. duplicate: '複製',
  61. addBlock: '添加節點',
  62. pasteHere: '粘貼到這裡',
  63. pointerMode: '指針模式',
  64. handMode: '手模式',
  65. model: '模型',
  66. workflowAsTool: '發佈為工具',
  67. configureRequired: '需要進行配置',
  68. configure: '配置',
  69. manageInTools: '訪問工具頁',
  70. workflowAsToolTip: '工作流更新後需要重新配置工具參數',
  71. viewDetailInTracingPanel: '查看詳細信息',
  72. },
  73. changeHistory: {
  74. title: '變更履歷',
  75. placeholder: '尚未更改任何內容',
  76. clearHistory: '清除歷史記錄',
  77. hint: '提示',
  78. hintText: '您的編輯操作將被跟踪並存儲在您的設備上,直到您離開編輯器。此歷史記錄將在您離開編輯器時被清除。',
  79. stepBackward_one: '{{count}} 步後退',
  80. stepBackward_other: '{{count}} 步後退',
  81. stepForward_one: '{{count}} 步前進',
  82. stepForward_other: '{{count}} 步前進',
  83. sessionStart: '會話開始',
  84. currentState: '當前狀態',
  85. nodeTitleChange: '區塊標題已更改',
  86. nodeDescriptionChange: '區塊描述已更改',
  87. nodeDragStop: '區塊已移動',
  88. nodeChange: '區塊已更改',
  89. nodeConnect: '區塊已連接',
  90. nodePaste: '區塊已粘貼',
  91. nodeDelete: '區塊已刪除',
  92. nodeAdd: '區塊已添加',
  93. nodeResize: '區塊已調整大小',
  94. noteAdd: '註釋已添加',
  95. noteChange: '註釋已更改',
  96. edgeDelete: '區塊已斷開連接',
  97. },
  98. errorMsg: {
  99. fieldRequired: '{{field}} 不能為空',
  100. authRequired: '請先授權',
  101. invalidJson: '{{field}} 是非法的 JSON',
  102. fields: {
  103. variable: '變量名',
  104. variableValue: '變量值',
  105. code: '代碼',
  106. model: '模型',
  107. rerankModel: 'Rerank 模型',
  108. },
  109. invalidVariable: '無效的變量',
  110. },
  111. singleRun: {
  112. testRun: '測試運行',
  113. startRun: '開始運行',
  114. running: '運行中',
  115. testRunIteration: '測試運行迭代',
  116. back: '返回',
  117. iteration: '迭代',
  118. },
  119. tabs: {
  120. 'searchBlock': '搜索節點',
  121. 'blocks': '節點',
  122. 'tools': '工具',
  123. 'allTool': '全部',
  124. 'builtInTool': '內置',
  125. 'customTool': '自定義',
  126. 'workflowTool': '工作流',
  127. 'question-understand': '問題理解',
  128. 'logic': '邏輯',
  129. 'transform': '轉換',
  130. 'utilities': '工具',
  131. 'noResult': '未找到匹配項',
  132. },
  133. blocks: {
  134. 'start': '開始',
  135. 'end': '結束',
  136. 'answer': '直接回覆',
  137. 'llm': 'LLM',
  138. 'knowledge-retrieval': '知識檢索',
  139. 'question-classifier': '問題分類器',
  140. 'if-else': '條件分支',
  141. 'code': '代碼執行',
  142. 'template-transform': '模板轉換',
  143. 'http-request': 'HTTP 請求',
  144. 'variable-assigner': '變量聚合器',
  145. 'variable-aggregator': '變量聚合器',
  146. 'iteration-start': '迭代開始',
  147. 'iteration': '迭代',
  148. 'parameter-extractor': '參數提取器',
  149. },
  150. blocksAbout: {
  151. 'start': '定義一個 workflow 流程啟動的初始參數',
  152. 'end': '定義一個 workflow 流程的結束和結果類型',
  153. 'answer': '定義一個聊天對話的回覆內容',
  154. 'llm': '調用大語言模型回答問題或者對自然語言進行處理',
  155. 'knowledge-retrieval': '允許你從知識庫中查詢與用戶問題相關的文本內容',
  156. 'question-classifier': '定義用戶問題的分類條件,LLM 能夠根據分類描述定義對話的進展方式',
  157. 'if-else': '允許你根據 if/else 條件將 workflow 拆分成兩個分支',
  158. 'code': '執行一段 Python 或 NodeJS 代碼實現自定義邏輯',
  159. 'template-transform': '使用 Jinja 模板語法將數據轉換為字符串',
  160. 'http-request': '允許通過 HTTP 協議發送服務器請求',
  161. 'variable-assigner': '將多路分支的變量聚合為一個變量,以實現下游節點統一配置。',
  162. 'variable-aggregator': '將多路分支的變量聚合為一個變量,以實現下游節點統一配置。',
  163. 'iteration': '對列表對象執行多次步驟直至輸出所有結果。',
  164. 'parameter-extractor': '利用 LLM 從自然語言內推理提取出結構化參數,用於後置的工具調用或 HTTP 請求。',
  165. },
  166. operator: {
  167. zoomIn: '放大',
  168. zoomOut: '縮小',
  169. zoomTo50: '縮放到 50%',
  170. zoomTo100: '放大到 100%',
  171. zoomToFit: '自適應視圖',
  172. },
  173. panel: {
  174. userInputField: '用戶輸入字段',
  175. changeBlock: '更改節點',
  176. helpLink: '幫助鏈接',
  177. about: '關於',
  178. createdBy: '作者',
  179. nextStep: '下一步',
  180. addNextStep: '添加此工作流程中的下一個節點',
  181. selectNextStep: '選擇下一個節點',
  182. runThisStep: '運行此步驟',
  183. checklist: '檢查清單',
  184. checklistTip: '發佈前確保所有問題均已解決',
  185. checklistResolved: '所有問題均已解決',
  186. organizeBlocks: '整理節點',
  187. change: '更改',
  188. },
  189. nodes: {
  190. common: {
  191. outputVars: '輸出變量',
  192. insertVarTip: '插入變量',
  193. memory: {
  194. memory: '記憶',
  195. memoryTip: '聊天記憶設置',
  196. windowSize: '記憶窗口',
  197. conversationRoleName: '對話角色名',
  198. user: '用戶前綴',
  199. assistant: '助手前綴',
  200. },
  201. memories: {
  202. title: '記憶',
  203. tip: '聊天記憶',
  204. builtIn: '內置',
  205. },
  206. },
  207. start: {
  208. required: '必填',
  209. inputField: '輸入字段',
  210. builtInVar: '內置變量',
  211. outputVars: {
  212. query: '用戶輸入',
  213. memories: {
  214. des: '會話歷史',
  215. type: '消息類型',
  216. content: '消息內容',
  217. },
  218. files: '文件列表',
  219. },
  220. noVarTip: '設置的輸入可在工作流程中使用',
  221. },
  222. end: {
  223. outputs: '輸出',
  224. output: {
  225. type: '輸出類型',
  226. variable: '輸出變量',
  227. },
  228. type: {
  229. 'none': '無',
  230. 'plain-text': '純文本',
  231. 'structured': '結構化',
  232. },
  233. },
  234. answer: {
  235. answer: '回覆',
  236. outputVars: '輸出變量',
  237. },
  238. llm: {
  239. model: '模型',
  240. variables: '變量',
  241. context: '上下文',
  242. contextTooltip: '您可以導入知識庫作為上下文',
  243. notSetContextInPromptTip: '要啟用上下文功能,請在提示中填寫上下文變量。',
  244. prompt: '提示詞',
  245. addMessage: '添加消息',
  246. roleDescription: {
  247. system: '為對話提供高層指導',
  248. user: '向模型提供指令、查詢或任何基於文本的輸入',
  249. assistant: '基於用戶消息的模型回覆',
  250. },
  251. vision: '視覺',
  252. files: '文件',
  253. resolution: {
  254. name: '分辨率',
  255. high: '高',
  256. low: '低',
  257. },
  258. outputVars: {
  259. output: '生成內容',
  260. usage: '模型用量信息',
  261. },
  262. singleRun: {
  263. variable: '變量',
  264. },
  265. sysQueryInUser: 'user message 中必須包含 sys.query',
  266. },
  267. knowledgeRetrieval: {
  268. queryVariable: '查詢變量',
  269. knowledge: '知識庫',
  270. outputVars: {
  271. output: '召回的分段',
  272. content: '分段內容',
  273. title: '分段標題',
  274. icon: '分段圖標',
  275. url: '分段鏈接',
  276. metadata: '其他元數據',
  277. },
  278. },
  279. http: {
  280. inputVars: '輸入變量',
  281. api: 'API',
  282. apiPlaceholder: '輸入 URL,輸入變量時請鍵入‘/’',
  283. notStartWithHttp: 'API 應該以 http:// 或 https:// 開頭',
  284. key: '鍵',
  285. value: '值',
  286. bulkEdit: '批量編輯',
  287. keyValueEdit: '鍵值編輯',
  288. headers: 'Headers',
  289. params: 'Params',
  290. body: 'Body',
  291. outputVars: {
  292. body: '響應內容',
  293. statusCode: '響應狀態碼',
  294. headers: '響應頭列表 JSON',
  295. files: '文件列表',
  296. },
  297. authorization: {
  298. 'authorization': '鑑權',
  299. 'authorizationType': '鑑權類型',
  300. 'no-auth': '無',
  301. 'api-key': 'API-Key',
  302. 'auth-type': 'API 鑑權類型',
  303. 'basic': '基礎',
  304. 'bearer': 'Bearer',
  305. 'custom': '自定義',
  306. 'api-key-title': 'API Key',
  307. 'header': 'Header',
  308. },
  309. insertVarPlaceholder: '鍵入 \'/\' 鍵快速插入變量',
  310. timeout: {
  311. title: '超時設置',
  312. connectLabel: '連接超時',
  313. connectPlaceholder: '輸入連接超時(以秒為單位)',
  314. readLabel: '讀取超時',
  315. readPlaceholder: '輸入讀取超時(以秒為單位)',
  316. writeLabel: '寫入超時',
  317. writePlaceholder: '輸入寫入超時(以秒為單位)',
  318. },
  319. },
  320. code: {
  321. inputVars: '輸入變量',
  322. outputVars: '輸出變量',
  323. advancedDependencies: '高級依賴',
  324. advancedDependenciesTip: '在這裡添加一些預加載需要消耗較多時間或非默認內置的依賴包',
  325. searchDependencies: '搜索依賴',
  326. },
  327. templateTransform: {
  328. inputVars: '輸入變量',
  329. code: '代碼',
  330. codeSupportTip: '只支持 Jinja2',
  331. outputVars: {
  332. output: '轉換後內容',
  333. },
  334. },
  335. ifElse: {
  336. if: 'If',
  337. else: 'Else',
  338. elseDescription: '用於定義當 if 條件不滿足時應執行的邏輯。',
  339. and: 'and',
  340. or: 'or',
  341. operator: '操作符',
  342. notSetVariable: '請先設置變量',
  343. comparisonOperator: {
  344. 'contains': '包含',
  345. 'not contains': '不包含',
  346. 'start with': '開始是',
  347. 'end with': '結束是',
  348. 'is': '是',
  349. 'is not': '不是',
  350. 'empty': '為空',
  351. 'not empty': '不為空',
  352. 'null': '空',
  353. 'not null': '不為空',
  354. },
  355. enterValue: '輸入值',
  356. addCondition: '添加條件',
  357. conditionNotSetup: '條件未設置',
  358. },
  359. variableAssigner: {
  360. title: '變量賦值',
  361. outputType: '輸出類型',
  362. varNotSet: '未設置變量',
  363. noVarTip: '添加需要賦值的變量',
  364. type: {
  365. string: 'String',
  366. number: 'Number',
  367. object: 'Object',
  368. array: 'Array',
  369. },
  370. aggregationGroup: '聚合分組',
  371. aggregationGroupTip: '開啟該功能後,變量聚合器內可以同時聚合多組變量',
  372. addGroup: '添加分組',
  373. outputVars: {
  374. varDescribe: '{{groupName}}的輸出變量',
  375. },
  376. setAssignVariable: '設置賦值變量',
  377. },
  378. tool: {
  379. toAuthorize: '授權',
  380. inputVars: '輸入變量',
  381. outputVars: {
  382. text: '工具生成的內容',
  383. files: {
  384. title: '工具生成的文件',
  385. type: '支持類型。現在只支持圖片',
  386. transfer_method: '傳輸方式。值為 remote_url 或 local_file',
  387. url: '圖片鏈接',
  388. upload_file_id: '上傳文件ID',
  389. },
  390. json: '工具生成的JSON',
  391. },
  392. },
  393. questionClassifiers: {
  394. model: '模型',
  395. inputVars: '輸入變量',
  396. outputVars: {
  397. className: '分類名稱',
  398. },
  399. class: '分類',
  400. classNamePlaceholder: '輸入你的分類名稱',
  401. advancedSetting: '高級設置',
  402. topicName: '主題內容',
  403. topicPlaceholder: '在這裡輸入你的主題內容',
  404. addClass: '添加分類',
  405. instruction: '指令',
  406. instructionTip: '你可以輸入額外的附加指令,幫助問題分類器更好的理解如何分類',
  407. instructionPlaceholder: '在這裡輸入你的指令',
  408. },
  409. parameterExtractor: {
  410. inputVar: '輸入變量',
  411. extractParameters: '提取參數',
  412. importFromTool: '從工具導入',
  413. addExtractParameter: '添加提取參數',
  414. addExtractParameterContent: {
  415. name: '名稱',
  416. namePlaceholder: '提取參數名稱',
  417. type: '類型',
  418. typePlaceholder: '提取參數類型',
  419. description: '描述',
  420. descriptionPlaceholder: '提取參數描述',
  421. required: '必填',
  422. requiredContent: '必填僅作為模型推理的參考,不用於參數輸出的強制驗證。',
  423. },
  424. extractParametersNotSet: '提取參數未設置',
  425. instruction: '指令',
  426. instructionTip: '你可以輸入額外的附加指令,幫助參數提取器理解如何提取參數',
  427. advancedSetting: '高級設置',
  428. reasoningMode: '推理模式',
  429. reasoningModeTip: '你可以根據模型對於 Function calling 或 Prompt 的指令響應能力選擇合適的推理模式',
  430. isSuccess: '是否成功。成功時值為 1,失敗時值為 0。',
  431. errorReason: '錯誤原因',
  432. },
  433. iteration: {
  434. deleteTitle: '刪除迭代節點?',
  435. deleteDesc: '刪除迭代節點將刪除所有子節點',
  436. input: '輸入',
  437. output: '輸出變量',
  438. iteration_one: '{{count}}個迭代',
  439. iteration_other: '{{count}}個迭代',
  440. currentIteration: '當前迭代',
  441. },
  442. },
  443. tracing: {
  444. stopBy: '由{{user}}終止',
  445. },
  446. }
  447. export default translation