workflow.ts 18 KB

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