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