workflow.ts 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447
  1. const translation = {
  2. common: {
  3. editing: 'Editing',
  4. autoSaved: 'Auto-Saved',
  5. unpublished: 'Unpublished',
  6. published: 'Published',
  7. publish: 'Publish',
  8. update: 'Update',
  9. run: 'Run',
  10. running: 'Running',
  11. inRunMode: 'In Run Mode',
  12. inPreview: 'In Preview',
  13. inPreviewMode: 'In Preview Mode',
  14. preview: 'Preview',
  15. viewRunHistory: 'View run history',
  16. runHistory: 'Run History',
  17. goBackToEdit: 'Go back to editor',
  18. conversationLog: 'Conversation Log',
  19. features: 'Features',
  20. debugAndPreview: 'Debug and Preview',
  21. restart: 'Restart',
  22. currentDraft: 'Current Draft',
  23. currentDraftUnpublished: 'Current Draft Unpublished',
  24. latestPublished: 'Latest Published',
  25. publishedAt: 'Published',
  26. restore: 'Restore',
  27. runApp: 'Run App',
  28. batchRunApp: 'Batch Run App',
  29. accessAPIReference: 'Access API Reference',
  30. embedIntoSite: 'Embed Into Site',
  31. addTitle: 'Add title...',
  32. addDescription: 'Add description...',
  33. noVar: 'No variable',
  34. searchVar: 'Search variable',
  35. variableNamePlaceholder: 'Variable name',
  36. setVarValuePlaceholder: 'Set variable',
  37. needConnecttip: 'This step is not connected to anything',
  38. maxTreeDepth: 'Maximum limit of {{depth}} nodes per branch',
  39. needEndNode: 'The End block must be added',
  40. needAnswerNode: 'The Answer block must be added',
  41. workflowProcess: 'Workflow Process',
  42. notRunning: 'Not running yet',
  43. previewPlaceholder: 'Enter content in the box below to start debugging the Chatbot',
  44. effectVarConfirm: {
  45. title: 'Remove Variable',
  46. content: 'The variable is used in other nodes. Do you still want to remove it?',
  47. },
  48. insertVarTip: 'Press the \'/\' key to insert quickly',
  49. processData: 'Process Data',
  50. input: 'Input',
  51. output: 'Output',
  52. jinjaEditorPlaceholder: 'Type \'/\' or \'{\' to insert variable',
  53. viewOnly: 'View Only',
  54. showRunHistory: 'Show Run History',
  55. enableJinja: 'Enable Jinja template support',
  56. learnMore: 'Learn More',
  57. copy: 'Copy',
  58. duplicate: 'Duplicate',
  59. addBlock: 'Add Block',
  60. pasteHere: 'Paste Here',
  61. pointerMode: 'Pointer Mode',
  62. handMode: 'Hand Mode',
  63. model: 'Model',
  64. workflowAsTool: 'Workflow as Tool',
  65. configureRequired: 'Configure Required',
  66. configure: 'Configure',
  67. manageInTools: 'Manage in Tools',
  68. workflowAsToolTip: 'Tool reconfiguration is required after the workflow update.',
  69. viewDetailInTracingPanel: 'View details',
  70. syncingData: 'Syncing data, just a few seconds.',
  71. importDSL: 'Import DSL',
  72. importDSLTip: 'Current draft will be overwritten. Export workflow as backup before importing.',
  73. backupCurrentDraft: 'Backup Current Draft',
  74. chooseDSL: 'Choose DSL(yml) file',
  75. overwriteAndImport: 'Overwrite and Import',
  76. importFailure: 'Import failure',
  77. importSuccess: 'Import success',
  78. },
  79. errorMsg: {
  80. fieldRequired: '{{field}} is required',
  81. authRequired: 'Authorization is required',
  82. invalidJson: '{{field}} is invalid JSON',
  83. fields: {
  84. variable: 'Variable Name',
  85. variableValue: 'Variable Value',
  86. code: 'Code',
  87. model: 'Model',
  88. rerankModel: 'Rerank Model',
  89. },
  90. invalidVariable: 'Invalid variable',
  91. },
  92. singleRun: {
  93. testRun: 'Test Run ',
  94. startRun: 'Start Run',
  95. running: 'Running',
  96. testRunIteration: 'Test Run Iteration',
  97. back: 'Back',
  98. iteration: 'Iteration',
  99. },
  100. tabs: {
  101. 'searchBlock': 'Search block',
  102. 'blocks': 'Blocks',
  103. 'tools': 'Tools',
  104. 'allTool': 'All',
  105. 'builtInTool': 'Built-in',
  106. 'customTool': 'Custom',
  107. 'workflowTool': 'Workflow',
  108. 'question-understand': 'Question Understand',
  109. 'logic': 'Logic',
  110. 'transform': 'Transform',
  111. 'utilities': 'Utilities',
  112. 'noResult': 'No match found',
  113. },
  114. blocks: {
  115. 'start': 'Start',
  116. 'end': 'End',
  117. 'answer': 'Answer',
  118. 'llm': 'LLM',
  119. 'knowledge-retrieval': 'Knowledge Retrieval',
  120. 'question-classifier': 'Question Classifier',
  121. 'if-else': 'IF/ELSE',
  122. 'code': 'Code',
  123. 'template-transform': 'Template',
  124. 'http-request': 'HTTP Request',
  125. 'variable-assigner': 'Variable Aggregator',
  126. 'variable-aggregator': 'Variable Aggregator',
  127. 'iteration-start': 'Iteration Start',
  128. 'iteration': 'Iteration',
  129. 'parameter-extractor': 'Parameter Extractor',
  130. },
  131. blocksAbout: {
  132. 'start': 'Define the initial parameters for launching a workflow',
  133. 'end': 'Define the end and result type of a workflow',
  134. 'answer': 'Define the reply content of a chat conversation',
  135. 'llm': 'Invoking large language models to answer questions or process natural language',
  136. 'knowledge-retrieval': 'Allows you to query text content related to user questions from the Knowledge',
  137. 'question-classifier': 'Define the classification conditions of user questions, LLM can define how the conversation progresses based on the classification description',
  138. 'if-else': 'Allows you to split the workflow into two branches based on if/else conditions',
  139. 'code': 'Execute a piece of Python or NodeJS code to implement custom logic',
  140. 'template-transform': 'Convert data to string using Jinja template syntax',
  141. 'http-request': 'Allow server requests to be sent over the HTTP protocol',
  142. 'variable-assigner': 'Aggregate multi-branch variables into a single variable for unified configuration of downstream nodes.',
  143. 'variable-aggregator': 'Aggregate multi-branch variables into a single variable for unified configuration of downstream nodes.',
  144. 'iteration': 'Perform multiple steps on a list object until all results are outputted.',
  145. 'parameter-extractor': 'Use LLM to extract structured parameters from natural language for tool invocations or HTTP requests.',
  146. },
  147. operator: {
  148. zoomIn: 'Zoom In',
  149. zoomOut: 'Zoom Out',
  150. zoomTo50: 'Zoom to 50%',
  151. zoomTo100: 'Zoom to 100%',
  152. zoomToFit: 'Zoom to Fit',
  153. },
  154. panel: {
  155. userInputField: 'User Input Field',
  156. changeBlock: 'Change Block',
  157. helpLink: 'Help Link',
  158. about: 'About',
  159. createdBy: 'Created By ',
  160. nextStep: 'Next Step',
  161. addNextStep: 'Add the next block in this workflow',
  162. selectNextStep: 'Select Next Block',
  163. runThisStep: 'Run this step',
  164. checklist: 'Checklist',
  165. checklistTip: 'Make sure all issues are resolved before publishing',
  166. checklistResolved: 'All issues are resolved',
  167. organizeBlocks: 'Organize blocks',
  168. change: 'Change',
  169. },
  170. nodes: {
  171. common: {
  172. outputVars: 'Output Variables',
  173. insertVarTip: 'Insert Variable',
  174. memory: {
  175. memory: 'Memory',
  176. memoryTip: 'Chat memory settings',
  177. windowSize: 'Window Size',
  178. conversationRoleName: 'Conversation Role Name',
  179. user: 'User prefix',
  180. assistant: 'Assistant prefix',
  181. },
  182. memories: {
  183. title: 'Memories',
  184. tip: 'Chat memory',
  185. builtIn: 'Built-in',
  186. },
  187. },
  188. start: {
  189. required: 'required',
  190. inputField: 'Input Field',
  191. builtInVar: 'Built-in Variables',
  192. outputVars: {
  193. query: 'User input',
  194. memories: {
  195. des: 'Conversation history',
  196. type: 'message type',
  197. content: 'message content',
  198. },
  199. files: 'File list',
  200. },
  201. noVarTip: 'Set inputs that can be used in the Workflow',
  202. },
  203. end: {
  204. outputs: 'Outputs',
  205. output: {
  206. type: 'output type',
  207. variable: 'output variable',
  208. },
  209. type: {
  210. 'none': 'None',
  211. 'plain-text': 'Plain Text',
  212. 'structured': 'Structured',
  213. },
  214. },
  215. answer: {
  216. answer: 'Answer',
  217. outputVars: 'Output Variables',
  218. },
  219. llm: {
  220. model: 'model',
  221. variables: 'variables',
  222. context: 'context',
  223. contextTooltip: 'You can import Knowledge as context',
  224. notSetContextInPromptTip: 'To enable the context feature, please fill in the context variable in PROMPT.',
  225. prompt: 'prompt',
  226. roleDescription: {
  227. system: 'Give high level instructions for the conversation',
  228. user: 'Provide instructions, queries, or any text-based input to the model',
  229. assistant: 'The model’s responses based on the user messages',
  230. },
  231. addMessage: 'Add Message',
  232. vision: 'vision',
  233. files: 'Files',
  234. resolution: {
  235. name: 'Resolution',
  236. high: 'High',
  237. low: 'Low',
  238. },
  239. outputVars: {
  240. output: 'Generate content',
  241. usage: 'Model Usage Information',
  242. },
  243. singleRun: {
  244. variable: 'Variable',
  245. },
  246. sysQueryInUser: 'sys.query in user message is required',
  247. },
  248. knowledgeRetrieval: {
  249. queryVariable: 'Query Variable',
  250. knowledge: 'Knowledge',
  251. outputVars: {
  252. output: 'Retrieval segmented data',
  253. content: 'Segmented content',
  254. title: 'Segmented title',
  255. icon: 'Segmented icon',
  256. url: 'Segmented URL',
  257. metadata: 'Other metadata',
  258. },
  259. },
  260. http: {
  261. inputVars: 'Input Variables',
  262. api: 'API',
  263. apiPlaceholder: 'Enter URL, type ‘/’ insert variable',
  264. notStartWithHttp: 'API should start with http:// or https://',
  265. key: 'Key',
  266. value: 'Value',
  267. bulkEdit: 'Bulk Edit',
  268. keyValueEdit: 'Key-Value Edit',
  269. headers: 'Headers',
  270. params: 'Params',
  271. body: 'Body',
  272. outputVars: {
  273. body: 'Response Content',
  274. statusCode: 'Response Status Code',
  275. headers: 'Response Header List JSON',
  276. files: 'Files List',
  277. },
  278. authorization: {
  279. 'authorization': 'Authorization',
  280. 'authorizationType': 'Authorization Type',
  281. 'no-auth': 'None',
  282. 'api-key': 'API-Key',
  283. 'auth-type': 'Auth Type',
  284. 'basic': 'Basic',
  285. 'bearer': 'Bearer',
  286. 'custom': 'Custom',
  287. 'api-key-title': 'API Key',
  288. 'header': 'Header',
  289. },
  290. insertVarPlaceholder: 'type \'/\' to insert variable',
  291. timeout: {
  292. title: 'Timeout',
  293. connectLabel: 'Connection Timeout',
  294. connectPlaceholder: 'Enter connection timeout in seconds',
  295. readLabel: 'Read Timeout',
  296. readPlaceholder: 'Enter read timeout in seconds',
  297. writeLabel: 'Write Timeout',
  298. writePlaceholder: 'Enter write timeout in seconds',
  299. },
  300. },
  301. code: {
  302. inputVars: 'Input Variables',
  303. outputVars: 'Output Variables',
  304. advancedDependencies: 'Advanced Dependencies',
  305. advancedDependenciesTip: 'Add some preloaded dependencies that take more time to consume or are not default built-in here',
  306. searchDependencies: 'Search Dependencies',
  307. },
  308. templateTransform: {
  309. inputVars: 'Input Variables',
  310. code: 'Code',
  311. codeSupportTip: 'Only supports Jinja2',
  312. outputVars: {
  313. output: 'Transformed content',
  314. },
  315. },
  316. ifElse: {
  317. if: 'If',
  318. else: 'Else',
  319. elseDescription: 'Used to define the logic that should be executed when the if condition is not met.',
  320. and: 'and',
  321. or: 'or',
  322. operator: 'Operator',
  323. notSetVariable: 'Please set variable first',
  324. comparisonOperator: {
  325. 'contains': 'contains',
  326. 'not contains': 'not contains',
  327. 'start with': 'start with',
  328. 'end with': 'end with',
  329. 'is': 'is',
  330. 'is not': 'is not',
  331. 'empty': 'is empty',
  332. 'not empty': 'is not empty',
  333. 'null': 'is null',
  334. 'not null': 'is not null',
  335. },
  336. enterValue: 'Enter value',
  337. addCondition: 'Add Condition',
  338. conditionNotSetup: 'Condition NOT setup',
  339. },
  340. variableAssigner: {
  341. title: 'Assign variables',
  342. outputType: 'Output Type',
  343. varNotSet: 'Variable not set',
  344. noVarTip: 'Add the variables to be assigned',
  345. type: {
  346. string: 'String',
  347. number: 'Number',
  348. object: 'Object',
  349. array: 'Array',
  350. },
  351. aggregationGroup: 'Aggregation Group',
  352. aggregationGroupTip: 'Enabling this feature allows the variable aggregator to aggregate multiple sets of variables.',
  353. addGroup: 'Add Group',
  354. outputVars: {
  355. varDescribe: '{{groupName}} output',
  356. },
  357. setAssignVariable: 'Set assign variable',
  358. },
  359. tool: {
  360. toAuthorize: 'To authorize',
  361. inputVars: 'Input Variables',
  362. outputVars: {
  363. text: 'tool generated content',
  364. files: {
  365. title: 'tool generated files',
  366. type: 'Support type. Now only support image',
  367. transfer_method: 'Transfer method.Value is remote_url or local_file',
  368. url: 'Image url',
  369. upload_file_id: 'Upload file id',
  370. },
  371. },
  372. },
  373. questionClassifiers: {
  374. model: 'model',
  375. inputVars: 'Input Variables',
  376. outputVars: {
  377. className: 'Class Name',
  378. },
  379. class: 'Class',
  380. classNamePlaceholder: 'Write your class name',
  381. advancedSetting: 'Advanced Setting',
  382. topicName: 'Topic Name',
  383. topicPlaceholder: 'Write your topic name',
  384. addClass: 'Add Class',
  385. instruction: 'Instruction',
  386. instructionTip: 'Input additional instructions to help the question classifier better understand how to categorize questions.',
  387. instructionPlaceholder: 'Write your instruction',
  388. },
  389. parameterExtractor: {
  390. inputVar: 'Input Variable',
  391. extractParameters: 'Extract Parameters',
  392. importFromTool: 'Import from tools',
  393. addExtractParameter: 'Add Extract Parameter',
  394. addExtractParameterContent: {
  395. name: 'Name',
  396. namePlaceholder: 'Extract Parameter Name',
  397. type: 'Type',
  398. typePlaceholder: 'Extract Parameter Type',
  399. description: 'Description',
  400. descriptionPlaceholder: 'Extract Parameter Description',
  401. required: 'Required',
  402. requiredContent: 'Required is only used as a reference for model inference, and not for mandatory validation of parameter output.',
  403. },
  404. extractParametersNotSet: 'Extract Parameters not setup',
  405. instruction: 'Instruction',
  406. instructionTip: 'Input additional instructions to help the parameter extractor understand how to extract parameters.',
  407. advancedSetting: 'Advanced Setting',
  408. reasoningMode: 'Reasoning Mode',
  409. reasoningModeTip: 'You can choose the appropriate reasoning mode based on the model\'s ability to respond to instructions for function calling or prompts.',
  410. isSuccess: 'Is Success.On success the value is 1, on failure the value is 0.',
  411. errorReason: 'Error Reason',
  412. },
  413. iteration: {
  414. deleteTitle: 'Delete Iteration Node?',
  415. deleteDesc: 'Deleting the iteration node will delete all child nodes',
  416. input: 'Input',
  417. output: 'Output Variables',
  418. iteration_one: '{{count}} Iteration',
  419. iteration_other: '{{count}} Iterations',
  420. currentIteration: 'Current Iteration',
  421. },
  422. note: {
  423. addNote: 'Add Note',
  424. editor: {
  425. placeholder: 'Write your note...',
  426. small: 'Small',
  427. medium: 'Medium',
  428. large: 'Large',
  429. bold: 'Bold',
  430. italic: 'Italic',
  431. strikethrough: 'Strikethrough',
  432. link: 'Link',
  433. openLink: 'Open',
  434. unlink: 'Unlink',
  435. enterUrl: 'Enter URL...',
  436. invalidUrl: 'Invalid URL',
  437. bulletList: 'Bullet List',
  438. showAuthor: 'Show Author',
  439. },
  440. },
  441. },
  442. tracing: {
  443. stopBy: 'Stop by {{user}}',
  444. },
  445. }
  446. export default translation