workflow.ts 15 KB

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