workflow.ts 19 KB

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