workflow.ts 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341
  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. },
  53. errorMsg: {
  54. fieldRequired: '{{field}} 不能為空',
  55. authRequired: '請先授權',
  56. invalidJson: '{{field}} 是非法的 JSON',
  57. fields: {
  58. variable: '變數名',
  59. variableValue: '變數值',
  60. code: '程式碼',
  61. model: '模型',
  62. rerankModel: 'Rerank 模型',
  63. },
  64. invalidVariable: '無效的變數',
  65. },
  66. singleRun: {
  67. testRun: '測試執行 ',
  68. startRun: '開始執行',
  69. running: '執行中',
  70. },
  71. tabs: {
  72. 'searchBlock': '搜尋節點',
  73. 'blocks': '節點',
  74. 'builtInTool': '內建工具',
  75. 'customTool': '自定義工具',
  76. 'question-understand': '問題理解',
  77. 'logic': '邏輯',
  78. 'transform': '轉換',
  79. 'utilities': '工具',
  80. 'noResult': '未找到匹配項',
  81. },
  82. blocks: {
  83. 'start': '開始',
  84. 'end': '結束',
  85. 'answer': '直接回復',
  86. 'llm': 'LLM',
  87. 'knowledge-retrieval': '知識檢索',
  88. 'question-classifier': '問題分類器',
  89. 'if-else': '條件分支',
  90. 'code': '程式碼執行',
  91. 'template-transform': '模板轉換',
  92. 'http-request': 'HTTP 請求',
  93. 'variable-assigner': '變數賦值',
  94. },
  95. blocksAbout: {
  96. 'start': '定義一個 workflow 流程啟動的初始引數',
  97. 'end': '定義一個 workflow 流程的結束和結果型別',
  98. 'answer': '定義一個聊天對話的回覆內容',
  99. 'llm': '呼叫大語言模型回答問題或者對自然語言進行處理',
  100. 'knowledge-retrieval': '允許你從知識庫中查詢與使用者問題相關的文字內容',
  101. 'question-classifier': '定義使用者問題的分類條件,LLM 能夠根據分類描述定義對話的進展方式',
  102. 'if-else': '允許你根據 if/else 條件將 workflow 拆分成兩個分支',
  103. 'code': '執行一段 Python 或 NodeJS 程式碼實現自定義邏輯',
  104. 'template-transform': '使用 Jinja 模板語法將資料轉換為字串',
  105. 'http-request': '允許透過 HTTP 協議傳送伺服器請求',
  106. 'variable-assigner': '將不同分支中的變數指派給同一個變數,以實現後置節點統一配置',
  107. },
  108. operator: {
  109. zoomIn: '放大',
  110. zoomOut: '縮小',
  111. zoomTo50: '縮放到 50%',
  112. zoomTo100: '放大到 100%',
  113. zoomToFit: '自適應檢視',
  114. },
  115. panel: {
  116. userInputField: '使用者輸入欄位',
  117. changeBlock: '更改節點',
  118. helpLink: '幫助連結',
  119. about: '關於',
  120. createdBy: '作者',
  121. nextStep: '下一步',
  122. addNextStep: '新增此工作流程中的下一個節點',
  123. selectNextStep: '選擇下一個節點',
  124. runThisStep: '執行此步驟',
  125. checklist: '檢查清單',
  126. checklistTip: '釋出前確保所有問題均已解決',
  127. checklistResolved: '所有問題均已解決',
  128. organizeBlocks: '整理節點',
  129. change: '更改',
  130. },
  131. nodes: {
  132. common: {
  133. outputVars: '輸出變數',
  134. insertVarTip: '插入變數',
  135. memory: {
  136. memory: '記憶',
  137. memoryTip: '聊天記憶設定',
  138. windowSize: '記憶視窗',
  139. conversationRoleName: '對話角色名',
  140. user: '使用者字首',
  141. assistant: '助手字首',
  142. },
  143. memories: {
  144. title: '記憶',
  145. tip: '聊天記憶',
  146. builtIn: '內建',
  147. },
  148. },
  149. start: {
  150. required: '必填',
  151. inputField: '輸入欄位',
  152. builtInVar: '內建變數',
  153. outputVars: {
  154. query: '使用者輸入',
  155. memories: {
  156. des: '會話歷史',
  157. type: '訊息型別',
  158. content: '訊息內容',
  159. },
  160. files: '檔案列表',
  161. },
  162. noVarTip: '設定的輸入可在工作流程中使用',
  163. },
  164. end: {
  165. outputs: '輸出',
  166. output: {
  167. type: '輸出型別',
  168. variable: '輸出變數',
  169. },
  170. type: {
  171. 'none': '無',
  172. 'plain-text': '純文字',
  173. 'structured': '結構化',
  174. },
  175. },
  176. answer: {
  177. answer: '回覆',
  178. outputVars: '輸出變數',
  179. },
  180. llm: {
  181. model: '模型',
  182. variables: '變數',
  183. context: '上下文',
  184. contextTooltip: '您可以匯入知識庫作為上下文',
  185. notSetContextInPromptTip: '要啟用上下文功能,請在提示中填寫上下文變數。',
  186. prompt: '提示詞',
  187. addMessage: '新增訊息',
  188. roleDescription: {
  189. system: '為對話提供高層指導',
  190. user: '向模型提供指令、查詢或任何基於文字的輸入',
  191. assistant: '基於使用者訊息的模型回覆',
  192. },
  193. vision: '視覺',
  194. files: '檔案',
  195. resolution: {
  196. name: '解析度',
  197. high: '高',
  198. low: '低',
  199. },
  200. outputVars: {
  201. output: '生成內容',
  202. usage: '模型用量資訊',
  203. },
  204. singleRun: {
  205. variable: '變數',
  206. },
  207. sysQueryInUser: 'user message 中必須包含 sys.query',
  208. },
  209. knowledgeRetrieval: {
  210. queryVariable: '查詢變數',
  211. knowledge: '知識庫',
  212. outputVars: {
  213. output: '召回的分段',
  214. content: '分段內容',
  215. title: '分段標題',
  216. icon: '分段圖示',
  217. url: '分段連結',
  218. metadata: '其他元資料',
  219. },
  220. },
  221. http: {
  222. inputVars: '輸入變數',
  223. api: 'API',
  224. apiPlaceholder: '輸入 URL,輸入變數時請鍵入‘/’',
  225. notStartWithHttp: 'API 應該以 http:// 或 https:// 開頭',
  226. key: '鍵',
  227. value: '值',
  228. bulkEdit: '批次編輯',
  229. keyValueEdit: '鍵值編輯',
  230. headers: 'Headers',
  231. params: 'Params',
  232. body: 'Body',
  233. outputVars: {
  234. body: '響應內容',
  235. statusCode: '響應狀態碼',
  236. headers: '響應頭列表 JSON',
  237. files: '檔案列表',
  238. },
  239. authorization: {
  240. 'authorization': '鑑權',
  241. 'authorizationType': '鑑權型別',
  242. 'no-auth': '無',
  243. 'api-key': 'API-Key',
  244. 'auth-type': 'API 鑑權型別',
  245. 'basic': '基礎',
  246. 'bearer': 'Bearer',
  247. 'custom': '自定義',
  248. 'api-key-title': 'API Key',
  249. 'header': 'Header',
  250. },
  251. insertVarPlaceholder: '鍵入 \'/\' 鍵快速插入變數',
  252. },
  253. code: {
  254. inputVars: '輸入變數',
  255. outputVars: '輸出變數',
  256. },
  257. templateTransform: {
  258. inputVars: '輸入變數',
  259. code: '程式碼',
  260. codeSupportTip: '只支援 Jinja2',
  261. outputVars: {
  262. output: '轉換後內容',
  263. },
  264. },
  265. ifElse: {
  266. if: 'If',
  267. else: 'Else',
  268. elseDescription: '用於定義當 if 條件不滿足時應執行的邏輯。',
  269. and: 'and',
  270. or: 'or',
  271. operator: '運算子',
  272. notSetVariable: '請先設定變數',
  273. comparisonOperator: {
  274. 'contains': '包含',
  275. 'not contains': '不包含',
  276. 'start with': '開始是',
  277. 'end with': '結束是',
  278. 'is': '是',
  279. 'is not': '不是',
  280. 'empty': '為空',
  281. 'not empty': '不為空',
  282. 'null': '空',
  283. 'not null': '不為空',
  284. },
  285. enterValue: '輸入值',
  286. addCondition: '新增條件',
  287. conditionNotSetup: '條件未設定',
  288. },
  289. variableAssigner: {
  290. title: '變數賦值',
  291. outputType: '輸出型別',
  292. outputVarType: '輸出變數型別',
  293. varNotSet: '未設定變數',
  294. noVarTip: '新增需要賦值的變數',
  295. type: {
  296. string: 'String',
  297. number: 'Number',
  298. object: 'Object',
  299. array: 'Array',
  300. },
  301. outputVars: {
  302. output: '指派的變數值',
  303. },
  304. },
  305. tool: {
  306. toAuthorize: '授權',
  307. inputVars: '輸入變數',
  308. outputVars: {
  309. text: '工具生成的內容',
  310. files: {
  311. title: '工具生成的檔案',
  312. type: '支援型別。現在只支援圖片',
  313. transfer_method: '傳輸方式。值為 remote_url 或 local_file',
  314. url: '圖片連結',
  315. upload_file_id: '上傳檔案ID',
  316. },
  317. },
  318. },
  319. questionClassifiers: {
  320. model: '模型',
  321. inputVars: '輸入變數',
  322. outputVars: {
  323. className: '分類名稱',
  324. },
  325. class: '分類',
  326. classNamePlaceholder: '輸入你的分類名稱',
  327. advancedSetting: '高階設定',
  328. topicName: '主題內容',
  329. topicPlaceholder: '在這裡輸入你的主題內容',
  330. addClass: '新增分類',
  331. instruction: '指令',
  332. instructionPlaceholder: '在這裡輸入你的指令',
  333. },
  334. },
  335. tracing: {
  336. stopBy: '由{{user}}終止',
  337. },
  338. }
  339. export default translation