workflow.ts 19 KB

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