workflow.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. const translation = {
  2. common: {
  3. editing: 'Editing',
  4. autoSaved: 'Auto-Saved',
  5. unpublished: 'Unpublished',
  6. published: 'Published',
  7. publish: 'Publish',
  8. update: 'Update',
  9. run: 'Run',
  10. running: 'Running',
  11. inRunMode: 'In Run Mode',
  12. inPreview: 'In Preview',
  13. inPreviewMode: 'In Preview Mode',
  14. preview: 'Preview',
  15. viewRunHistory: 'View run history',
  16. runHistory: 'Run History',
  17. goBackToEdit: 'Go back to editor',
  18. conversationLog: 'Conversation Log',
  19. features: 'Features',
  20. debugAndPreview: 'Debug and Preview',
  21. restart: 'Restart',
  22. currentDraft: 'Current Draft',
  23. currentDraftUnpublished: 'Current Draft Unpublished',
  24. latestPublished: 'Latest Published',
  25. publishedAt: 'Published',
  26. restore: 'Restore',
  27. runApp: 'Run App',
  28. batchRunApp: 'Batch Run App',
  29. accessAPIReference: 'Access API Reference',
  30. embedIntoSite: 'Embed Into Site',
  31. addTitle: 'Add title...',
  32. addDescription: 'Add description...',
  33. noVar: 'No variable',
  34. searchVar: 'Search variable',
  35. variableNamePlaceholder: 'Variable name',
  36. setVarValuePlaceholder: 'Set variable',
  37. needConnecttip: 'This step is not connected to anything',
  38. maxTreeDepth: 'Maximum limit of {{depth}} nodes per branch',
  39. needEndNode: 'The End block must be added',
  40. needAnswerNode: 'The Answer block must be added',
  41. workflowProcess: 'Workflow Process',
  42. notRunning: 'Not running yet',
  43. previewPlaceholder: 'Enter content in the box below to start debugging the Chatbot',
  44. effectVarConfirm: {
  45. title: 'Remove Variable',
  46. content: 'The variable is used in other nodes. Do you still want to remove it?',
  47. },
  48. insertVarTip: 'Press the \'/\' key to insert quickly',
  49. processData: 'Process Data',
  50. input: 'Input',
  51. output: 'Output',
  52. jinjaEditorPlaceholder: 'Type \'/\' or \'{\' to insert variable',
  53. viewOnly: 'View Only',
  54. showRunHistory: 'Show Run History',
  55. enableJinja: 'Enable Jinja template support',
  56. learnMore: 'Learn More',
  57. copy: 'Copy',
  58. duplicate: 'Duplicate',
  59. addBlock: 'Add Block',
  60. pasteHere: 'Paste Here',
  61. pointerMode: 'Pointer Mode',
  62. handMode: 'Hand Mode',
  63. },
  64. errorMsg: {
  65. fieldRequired: '{{field}} is required',
  66. authRequired: 'Authorization is required',
  67. invalidJson: '{{field}} is invalid JSON',
  68. fields: {
  69. variable: 'Variable Name',
  70. variableValue: 'Variable Value',
  71. code: 'Code',
  72. model: 'Model',
  73. rerankModel: 'Rerank Model',
  74. },
  75. invalidVariable: 'Invalid variable',
  76. },
  77. singleRun: {
  78. testRun: 'Test Run ',
  79. startRun: 'Start Run',
  80. running: 'Running',
  81. },
  82. tabs: {
  83. 'searchBlock': 'Search block',
  84. 'blocks': 'Blocks',
  85. 'builtInTool': 'Built-in Tool',
  86. 'customTool': 'Custom Tool',
  87. 'question-understand': 'Question Understand',
  88. 'logic': 'Logic',
  89. 'transform': 'Transform',
  90. 'utilities': 'Utilities',
  91. 'noResult': 'No match found',
  92. },
  93. blocks: {
  94. 'start': 'Start',
  95. 'end': 'End',
  96. 'answer': 'Answer',
  97. 'llm': 'LLM',
  98. 'knowledge-retrieval': 'Knowledge Retrieval',
  99. 'question-classifier': 'Question Classifier',
  100. 'if-else': 'IF/ELSE',
  101. 'code': 'Code',
  102. 'template-transform': 'Template',
  103. 'http-request': 'HTTP Request',
  104. 'variable-assigner': 'Variable Assigner',
  105. },
  106. blocksAbout: {
  107. 'start': 'Define the initial parameters for launching a workflow',
  108. 'end': 'Define the end and result type of a workflow',
  109. 'answer': 'Define the reply content of a chat conversation',
  110. 'llm': 'Invoking large language models to answer questions or process natural language',
  111. 'knowledge-retrieval': 'Allows you to query text content related to user questions from the Knowledge',
  112. 'question-classifier': 'Define the classification conditions of user questions, LLM can define how the conversation progresses based on the classification description',
  113. 'if-else': 'Allows you to split the workflow into two branches based on if/else conditions',
  114. 'code': 'Execute a piece of Python or NodeJS code to implement custom logic',
  115. 'template-transform': 'Convert data to string using Jinja template syntax',
  116. 'http-request': 'Allow server requests to be sent over the HTTP protocol',
  117. 'variable-assigner': 'Assign variables in different branches to the same variable to achieve unified configuration of post-nodes',
  118. },
  119. operator: {
  120. zoomIn: 'Zoom In',
  121. zoomOut: 'Zoom Out',
  122. zoomTo50: 'Zoom to 50%',
  123. zoomTo100: 'Zoom to 100%',
  124. zoomToFit: 'Zoom to Fit',
  125. },
  126. panel: {
  127. userInputField: 'User Input Field',
  128. changeBlock: 'Change Block',
  129. helpLink: 'Help Link',
  130. about: 'About',
  131. createdBy: 'Created By ',
  132. nextStep: 'Next Step',
  133. addNextStep: 'Add the next block in this workflow',
  134. selectNextStep: 'Select Next Block',
  135. runThisStep: 'Run this step',
  136. checklist: 'Checklist',
  137. checklistTip: 'Make sure all issues are resolved before publishing',
  138. checklistResolved: 'All issues are resolved',
  139. organizeBlocks: 'Organize blocks',
  140. change: 'Change',
  141. },
  142. nodes: {
  143. common: {
  144. outputVars: 'Output Variables',
  145. insertVarTip: 'Insert Variable',
  146. memory: {
  147. memory: 'Memory',
  148. memoryTip: 'Chat memory settings',
  149. windowSize: 'Window Size',
  150. conversationRoleName: 'Conversation Role Name',
  151. user: 'User prefix',
  152. assistant: 'Assistant prefix',
  153. },
  154. memories: {
  155. title: 'Memories',
  156. tip: 'Chat memory',
  157. builtIn: 'Built-in',
  158. },
  159. },
  160. start: {
  161. required: 'required',
  162. inputField: 'Input Field',
  163. builtInVar: 'Built-in Variables',
  164. outputVars: {
  165. query: 'User input',
  166. memories: {
  167. des: 'Conversation history',
  168. type: 'message type',
  169. content: 'message content',
  170. },
  171. files: 'File list',
  172. },
  173. noVarTip: 'Set inputs that can be used in the Workflow',
  174. },
  175. end: {
  176. outputs: 'Outputs',
  177. output: {
  178. type: 'output type',
  179. variable: 'output variable',
  180. },
  181. type: {
  182. 'none': 'None',
  183. 'plain-text': 'Plain Text',
  184. 'structured': 'Structured',
  185. },
  186. },
  187. answer: {
  188. answer: 'Answer',
  189. outputVars: 'Output Variables',
  190. },
  191. llm: {
  192. model: 'model',
  193. variables: 'variables',
  194. context: 'context',
  195. contextTooltip: 'You can import Knowledge as context',
  196. notSetContextInPromptTip: 'To enable the context feature, please fill in the context variable in PROMPT.',
  197. prompt: 'prompt',
  198. roleDescription: {
  199. system: 'Give high level instructions for the conversation',
  200. user: 'Provide instructions, queries, or any text-based input to the model',
  201. assistant: 'The model’s responses based on the user messages',
  202. },
  203. addMessage: 'Add Message',
  204. vision: 'vision',
  205. files: 'Files',
  206. resolution: {
  207. name: 'Resolution',
  208. high: 'High',
  209. low: 'Low',
  210. },
  211. outputVars: {
  212. output: 'Generate content',
  213. usage: 'Model Usage Information',
  214. },
  215. singleRun: {
  216. variable: 'Variable',
  217. },
  218. sysQueryInUser: 'sys.query in user message is required',
  219. },
  220. knowledgeRetrieval: {
  221. queryVariable: 'Query Variable',
  222. knowledge: 'Knowledge',
  223. outputVars: {
  224. output: 'Retrieval segmented data',
  225. content: 'Segmented content',
  226. title: 'Segmented title',
  227. icon: 'Segmented icon',
  228. url: 'Segmented URL',
  229. metadata: 'Other metadata',
  230. },
  231. },
  232. http: {
  233. inputVars: 'Input Variables',
  234. api: 'API',
  235. apiPlaceholder: 'Enter URL, type ‘/’ insert variable',
  236. notStartWithHttp: 'API should start with http:// or https://',
  237. key: 'Key',
  238. value: 'Value',
  239. bulkEdit: 'Bulk Edit',
  240. keyValueEdit: 'Key-Value Edit',
  241. headers: 'Headers',
  242. params: 'Params',
  243. body: 'Body',
  244. outputVars: {
  245. body: 'Response Content',
  246. statusCode: 'Response Status Code',
  247. headers: 'Response Header List JSON',
  248. files: 'Files List',
  249. },
  250. authorization: {
  251. 'authorization': 'Authorization',
  252. 'authorizationType': 'Authorization Type',
  253. 'no-auth': 'None',
  254. 'api-key': 'API-Key',
  255. 'auth-type': 'Auth Type',
  256. 'basic': 'Basic',
  257. 'bearer': 'Bearer',
  258. 'custom': 'Custom',
  259. 'api-key-title': 'API Key',
  260. 'header': 'Header',
  261. },
  262. insertVarPlaceholder: 'type \'/\' to insert variable',
  263. timeout: {
  264. title: 'Timeout',
  265. connectLabel: 'Connection Timeout',
  266. connectPlaceholder: 'Enter connection timeout in seconds',
  267. readLabel: 'Read Timeout',
  268. readPlaceholder: 'Enter read timeout in seconds',
  269. writeLabel: 'Write Timeout',
  270. writePlaceholder: 'Enter write timeout in seconds',
  271. },
  272. },
  273. code: {
  274. inputVars: 'Input Variables',
  275. outputVars: 'Output Variables',
  276. advancedDependencies: 'Advanced Dependencies',
  277. advancedDependenciesTip: 'Add some preloaded dependencies that take more time to consume or are not default built-in here',
  278. searchDependencies: 'Search Dependencies',
  279. },
  280. templateTransform: {
  281. inputVars: 'Input Variables',
  282. code: 'Code',
  283. codeSupportTip: 'Only supports Jinja2',
  284. outputVars: {
  285. output: 'Transformed content',
  286. },
  287. },
  288. ifElse: {
  289. if: 'If',
  290. else: 'Else',
  291. elseDescription: 'Used to define the logic that should be executed when the if condition is not met.',
  292. and: 'and',
  293. or: 'or',
  294. operator: 'Operator',
  295. notSetVariable: 'Please set variable first',
  296. comparisonOperator: {
  297. 'contains': 'contains',
  298. 'not contains': 'not contains',
  299. 'start with': 'start with',
  300. 'end with': 'end with',
  301. 'is': 'is',
  302. 'is not': 'is not',
  303. 'empty': 'is empty',
  304. 'not empty': 'is not empty',
  305. 'null': 'is null',
  306. 'not null': 'is not null',
  307. },
  308. enterValue: 'Enter value',
  309. addCondition: 'Add Condition',
  310. conditionNotSetup: 'Condition NOT setup',
  311. },
  312. variableAssigner: {
  313. title: 'Assign variables',
  314. outputType: 'Output Type',
  315. outputVarType: 'Output Variable Type',
  316. varNotSet: 'Variable not set',
  317. noVarTip: 'Add the variables to be assigned',
  318. type: {
  319. string: 'String',
  320. number: 'Number',
  321. object: 'Object',
  322. array: 'Array',
  323. },
  324. outputVars: {
  325. output: 'Assigned variable value',
  326. },
  327. },
  328. tool: {
  329. toAuthorize: 'To authorize',
  330. inputVars: 'Input Variables',
  331. outputVars: {
  332. text: 'tool generated content',
  333. files: {
  334. title: 'tool generated files',
  335. type: 'Support type. Now only support image',
  336. transfer_method: 'Transfer method.Value is remote_url or local_file',
  337. url: 'Image url',
  338. upload_file_id: 'Upload file id',
  339. },
  340. },
  341. },
  342. questionClassifiers: {
  343. model: 'model',
  344. inputVars: 'Input Variables',
  345. outputVars: {
  346. className: 'Class Name',
  347. },
  348. class: 'Class',
  349. classNamePlaceholder: 'Write your class name',
  350. advancedSetting: 'Advanced Setting',
  351. topicName: 'Topic Name',
  352. topicPlaceholder: 'Write your topic name',
  353. addClass: 'Add Class',
  354. instruction: 'Instruction',
  355. instructionPlaceholder: 'Write your instruction',
  356. },
  357. },
  358. tracing: {
  359. stopBy: 'Stop by {{user}}',
  360. },
  361. }
  362. export default translation