workflow.ts 19 KB

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