workflow.ts 17 KB

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