workflow.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. const translation = {
  2. common: {
  3. editing: '編輯中',
  4. autoSaved: '自動儲存',
  5. unpublished: '未釋出',
  6. published: '已釋出',
  7. publish: '釋出',
  8. update: '更新',
  9. run: '執行',
  10. running: '執行中',
  11. inRunMode: '在執行模式中',
  12. inPreview: '預覽中',
  13. inPreviewMode: '預覽中',
  14. preview: '預覽',
  15. viewRunHistory: '檢視執行歷史',
  16. runHistory: '執行歷史',
  17. goBackToEdit: '返回編輯模式',
  18. conversationLog: '對話記錄',
  19. features: '功能',
  20. debugAndPreview: '除錯和預覽',
  21. restart: '重新開始',
  22. currentDraft: '當前草稿',
  23. currentDraftUnpublished: '當前草稿未釋出',
  24. latestPublished: '最新發布',
  25. publishedAt: '釋出於',
  26. restore: '恢復',
  27. runApp: '執行',
  28. batchRunApp: '批次執行',
  29. accessAPIReference: '訪問 API',
  30. embedIntoSite: '嵌入網站',
  31. addTitle: '新增標題...',
  32. addDescription: '新增描述...',
  33. noVar: '沒有變數',
  34. variableNamePlaceholder: '變數名',
  35. searchVar: '搜尋變數',
  36. setVarValuePlaceholder: '設定變數值',
  37. needConnecttip: '此節點尚未連線到其他節點',
  38. maxTreeDepth: '每個分支最大限制 {{depth}} 個節點',
  39. needEndNode: '必須新增結束節點',
  40. needAnswerNode: '必須新增直接回復節點',
  41. workflowProcess: '工作流',
  42. notRunning: '尚未執行',
  43. previewPlaceholder: '在下面的框中輸入內容開始除錯聊天機器人',
  44. effectVarConfirm: {
  45. title: '移除變數',
  46. content: '該變數在其他節點中使用。您是否仍要刪除它?',
  47. },
  48. insertVarTip: '按 \'/\' 鍵快速插入',
  49. processData: '資料處理',
  50. input: '輸入',
  51. output: '輸出',
  52. jinjaEditorPlaceholder: '输入 “/” 或 “{” 插入变量',
  53. viewOnly: '只读',
  54. showRunHistory: '显示运行历史',
  55. enableJinja: '开启支持 Jinja 模板',
  56. learnMore: '了解更多',
  57. copy: '拷贝',
  58. duplicate: '复制',
  59. addBlock: '添加节点',
  60. pasteHere: '粘贴到这里',
  61. pointerMode: '指针模式',
  62. handMode: '手模式',
  63. },
  64. errorMsg: {
  65. fieldRequired: '{{field}} 不能為空',
  66. authRequired: '請先授權',
  67. invalidJson: '{{field}} 是非法的 JSON',
  68. fields: {
  69. variable: '變數名',
  70. variableValue: '變數值',
  71. code: '程式碼',
  72. model: '模型',
  73. rerankModel: 'Rerank 模型',
  74. },
  75. invalidVariable: '無效的變數',
  76. },
  77. singleRun: {
  78. testRun: '測試執行 ',
  79. startRun: '開始執行',
  80. running: '執行中',
  81. },
  82. tabs: {
  83. 'searchBlock': '搜尋節點',
  84. 'blocks': '節點',
  85. 'builtInTool': '內建工具',
  86. 'customTool': '自定義工具',
  87. 'question-understand': '問題理解',
  88. 'logic': '邏輯',
  89. 'transform': '轉換',
  90. 'utilities': '工具',
  91. 'noResult': '未找到匹配項',
  92. },
  93. blocks: {
  94. 'start': '開始',
  95. 'end': '結束',
  96. 'answer': '直接回復',
  97. 'llm': 'LLM',
  98. 'knowledge-retrieval': '知識檢索',
  99. 'question-classifier': '問題分類器',
  100. 'if-else': '條件分支',
  101. 'code': '程式碼執行',
  102. 'template-transform': '模板轉換',
  103. 'http-request': 'HTTP 請求',
  104. 'variable-assigner': '變數賦值',
  105. },
  106. blocksAbout: {
  107. 'start': '定義一個 workflow 流程啟動的初始引數',
  108. 'end': '定義一個 workflow 流程的結束和結果型別',
  109. 'answer': '定義一個聊天對話的回覆內容',
  110. 'llm': '呼叫大語言模型回答問題或者對自然語言進行處理',
  111. 'knowledge-retrieval': '允許你從知識庫中查詢與使用者問題相關的文字內容',
  112. 'question-classifier': '定義使用者問題的分類條件,LLM 能夠根據分類描述定義對話的進展方式',
  113. 'if-else': '允許你根據 if/else 條件將 workflow 拆分成兩個分支',
  114. 'code': '執行一段 Python 或 NodeJS 程式碼實現自定義邏輯',
  115. 'template-transform': '使用 Jinja 模板語法將資料轉換為字串',
  116. 'http-request': '允許透過 HTTP 協議傳送伺服器請求',
  117. 'variable-assigner': '將不同分支中的變數指派給同一個變數,以實現後置節點統一配置',
  118. },
  119. operator: {
  120. zoomIn: '放大',
  121. zoomOut: '縮小',
  122. zoomTo50: '縮放到 50%',
  123. zoomTo100: '放大到 100%',
  124. zoomToFit: '自適應檢視',
  125. },
  126. panel: {
  127. userInputField: '使用者輸入欄位',
  128. changeBlock: '更改節點',
  129. helpLink: '幫助連結',
  130. about: '關於',
  131. createdBy: '作者',
  132. nextStep: '下一步',
  133. addNextStep: '新增此工作流程中的下一個節點',
  134. selectNextStep: '選擇下一個節點',
  135. runThisStep: '執行此步驟',
  136. checklist: '檢查清單',
  137. checklistTip: '釋出前確保所有問題均已解決',
  138. checklistResolved: '所有問題均已解決',
  139. organizeBlocks: '整理節點',
  140. change: '更改',
  141. },
  142. nodes: {
  143. common: {
  144. outputVars: '輸出變數',
  145. insertVarTip: '插入變數',
  146. memory: {
  147. memory: '記憶',
  148. memoryTip: '聊天記憶設定',
  149. windowSize: '記憶視窗',
  150. conversationRoleName: '對話角色名',
  151. user: '使用者字首',
  152. assistant: '助手字首',
  153. },
  154. memories: {
  155. title: '記憶',
  156. tip: '聊天記憶',
  157. builtIn: '內建',
  158. },
  159. },
  160. start: {
  161. required: '必填',
  162. inputField: '輸入欄位',
  163. builtInVar: '內建變數',
  164. outputVars: {
  165. query: '使用者輸入',
  166. memories: {
  167. des: '會話歷史',
  168. type: '訊息型別',
  169. content: '訊息內容',
  170. },
  171. files: '檔案列表',
  172. },
  173. noVarTip: '設定的輸入可在工作流程中使用',
  174. },
  175. end: {
  176. outputs: '輸出',
  177. output: {
  178. type: '輸出型別',
  179. variable: '輸出變數',
  180. },
  181. type: {
  182. 'none': '無',
  183. 'plain-text': '純文字',
  184. 'structured': '結構化',
  185. },
  186. },
  187. answer: {
  188. answer: '回覆',
  189. outputVars: '輸出變數',
  190. },
  191. llm: {
  192. model: '模型',
  193. variables: '變數',
  194. context: '上下文',
  195. contextTooltip: '您可以匯入知識庫作為上下文',
  196. notSetContextInPromptTip: '要啟用上下文功能,請在提示中填寫上下文變數。',
  197. prompt: '提示詞',
  198. addMessage: '新增訊息',
  199. roleDescription: {
  200. system: '為對話提供高層指導',
  201. user: '向模型提供指令、查詢或任何基於文字的輸入',
  202. assistant: '基於使用者訊息的模型回覆',
  203. },
  204. vision: '視覺',
  205. files: '檔案',
  206. resolution: {
  207. name: '解析度',
  208. high: '高',
  209. low: '低',
  210. },
  211. outputVars: {
  212. output: '生成內容',
  213. usage: '模型用量資訊',
  214. },
  215. singleRun: {
  216. variable: '變數',
  217. },
  218. sysQueryInUser: 'user message 中必須包含 sys.query',
  219. },
  220. knowledgeRetrieval: {
  221. queryVariable: '查詢變數',
  222. knowledge: '知識庫',
  223. outputVars: {
  224. output: '召回的分段',
  225. content: '分段內容',
  226. title: '分段標題',
  227. icon: '分段圖示',
  228. url: '分段連結',
  229. metadata: '其他元資料',
  230. },
  231. },
  232. http: {
  233. inputVars: '輸入變數',
  234. api: 'API',
  235. apiPlaceholder: '輸入 URL,輸入變數時請鍵入‘/’',
  236. notStartWithHttp: 'API 應該以 http:// 或 https:// 開頭',
  237. key: '鍵',
  238. value: '值',
  239. bulkEdit: '批次編輯',
  240. keyValueEdit: '鍵值編輯',
  241. headers: 'Headers',
  242. params: 'Params',
  243. body: 'Body',
  244. outputVars: {
  245. body: '響應內容',
  246. statusCode: '響應狀態碼',
  247. headers: '響應頭列表 JSON',
  248. files: '檔案列表',
  249. },
  250. authorization: {
  251. 'authorization': '鑑權',
  252. 'authorizationType': '鑑權型別',
  253. 'no-auth': '無',
  254. 'api-key': 'API-Key',
  255. 'auth-type': 'API 鑑權型別',
  256. 'basic': '基礎',
  257. 'bearer': 'Bearer',
  258. 'custom': '自定義',
  259. 'api-key-title': 'API Key',
  260. 'header': 'Header',
  261. },
  262. insertVarPlaceholder: '鍵入 \'/\' 鍵快速插入變數',
  263. timeout: {
  264. title: '超时设置',
  265. connectLabel: '连接超时',
  266. connectPlaceholder: '输入连接超时(以秒为单位)',
  267. readLabel: '读取超时',
  268. readPlaceholder: '输入读取超时(以秒为单位)',
  269. writeLabel: '写入超时',
  270. writePlaceholder: '输入写入超时(以秒为单位)',
  271. },
  272. },
  273. code: {
  274. inputVars: '輸入變數',
  275. outputVars: '輸出變數',
  276. advancedDependencies: '高级依赖',
  277. advancedDependenciesTip: '在这里添加一些预加载需要消耗较多时间或非默认内置的依赖包',
  278. searchDependencies: '搜索依赖',
  279. },
  280. templateTransform: {
  281. inputVars: '輸入變數',
  282. code: '程式碼',
  283. codeSupportTip: '只支援 Jinja2',
  284. outputVars: {
  285. output: '轉換後內容',
  286. },
  287. },
  288. ifElse: {
  289. if: 'If',
  290. else: 'Else',
  291. elseDescription: '用於定義當 if 條件不滿足時應執行的邏輯。',
  292. and: 'and',
  293. or: 'or',
  294. operator: '運算子',
  295. notSetVariable: '請先設定變數',
  296. comparisonOperator: {
  297. 'contains': '包含',
  298. 'not contains': '不包含',
  299. 'start with': '開始是',
  300. 'end with': '結束是',
  301. 'is': '是',
  302. 'is not': '不是',
  303. 'empty': '為空',
  304. 'not empty': '不為空',
  305. 'null': '空',
  306. 'not null': '不為空',
  307. },
  308. enterValue: '輸入值',
  309. addCondition: '新增條件',
  310. conditionNotSetup: '條件未設定',
  311. },
  312. variableAssigner: {
  313. title: '變數賦值',
  314. outputType: '輸出型別',
  315. outputVarType: '輸出變數型別',
  316. varNotSet: '未設定變數',
  317. noVarTip: '新增需要賦值的變數',
  318. type: {
  319. string: 'String',
  320. number: 'Number',
  321. object: 'Object',
  322. array: 'Array',
  323. },
  324. outputVars: {
  325. output: '指派的變數值',
  326. },
  327. },
  328. tool: {
  329. toAuthorize: '授權',
  330. inputVars: '輸入變數',
  331. outputVars: {
  332. text: '工具生成的內容',
  333. files: {
  334. title: '工具生成的檔案',
  335. type: '支援型別。現在只支援圖片',
  336. transfer_method: '傳輸方式。值為 remote_url 或 local_file',
  337. url: '圖片連結',
  338. upload_file_id: '上傳檔案ID',
  339. },
  340. },
  341. },
  342. questionClassifiers: {
  343. model: '模型',
  344. inputVars: '輸入變數',
  345. outputVars: {
  346. className: '分類名稱',
  347. },
  348. class: '分類',
  349. classNamePlaceholder: '輸入你的分類名稱',
  350. advancedSetting: '高階設定',
  351. topicName: '主題內容',
  352. topicPlaceholder: '在這裡輸入你的主題內容',
  353. addClass: '新增分類',
  354. instruction: '指令',
  355. instructionPlaceholder: '在這裡輸入你的指令',
  356. },
  357. },
  358. tracing: {
  359. stopBy: '由{{user}}終止',
  360. },
  361. }
  362. export default translation