workflow.ts 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  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. },
  56. errorMsg: {
  57. fieldRequired: '{{field}} is required',
  58. authRequired: 'Authorization is required',
  59. invalidJson: '{{field}} is invalid JSON',
  60. fields: {
  61. variable: 'Variable Name',
  62. variableValue: 'Variable Value',
  63. code: 'Code',
  64. model: 'Model',
  65. rerankModel: 'Rerank Model',
  66. },
  67. invalidVariable: 'Invalid variable',
  68. },
  69. singleRun: {
  70. testRun: 'Test Run ',
  71. startRun: 'Start Run',
  72. running: 'Running',
  73. },
  74. tabs: {
  75. 'searchBlock': 'Search block',
  76. 'blocks': 'Blocks',
  77. 'builtInTool': 'Built-in Tool',
  78. 'customTool': 'Custom Tool',
  79. 'question-understand': 'Question Understand',
  80. 'logic': 'Logic',
  81. 'transform': 'Transform',
  82. 'utilities': 'Utilities',
  83. 'noResult': 'No match found',
  84. },
  85. blocks: {
  86. 'start': 'Start',
  87. 'end': 'End',
  88. 'answer': 'Answer',
  89. 'llm': 'LLM',
  90. 'knowledge-retrieval': 'Knowledge Retrieval',
  91. 'question-classifier': 'Question Classifier',
  92. 'if-else': 'IF/ELSE',
  93. 'code': 'Code',
  94. 'template-transform': 'Template',
  95. 'http-request': 'HTTP Request',
  96. 'variable-assigner': 'Variable Assigner',
  97. },
  98. blocksAbout: {
  99. 'start': 'Define the initial parameters for launching a workflow',
  100. 'end': 'Define the end and result type of a workflow',
  101. 'answer': 'Define the reply content of a chat conversation',
  102. 'llm': 'Invoking large language models to answer questions or process natural language',
  103. 'knowledge-retrieval': 'Allows you to query text content related to user questions from the Knowledge',
  104. 'question-classifier': 'Define the classification conditions of user questions, LLM can define how the conversation progresses based on the classification description',
  105. 'if-else': 'Allows you to split the workflow into two branches based on if/else conditions',
  106. 'code': 'Execute a piece of Python or NodeJS code to implement custom logic',
  107. 'template-transform': 'Convert data to string using Jinja template syntax',
  108. 'http-request': 'Allow server requests to be sent over the HTTP protocol',
  109. 'variable-assigner': 'Assign variables in different branches to the same variable to achieve unified configuration of post-nodes',
  110. },
  111. operator: {
  112. zoomIn: 'Zoom In',
  113. zoomOut: 'Zoom Out',
  114. zoomTo50: 'Zoom to 50%',
  115. zoomTo100: 'Zoom to 100%',
  116. zoomToFit: 'Zoom to Fit',
  117. },
  118. panel: {
  119. userInputField: 'User Input Field',
  120. changeBlock: 'Change Block',
  121. helpLink: 'Help Link',
  122. about: 'About',
  123. createdBy: 'Created By ',
  124. nextStep: 'Next Step',
  125. addNextStep: 'Add the next block in this workflow',
  126. selectNextStep: 'Select Next Block',
  127. runThisStep: 'Run this step',
  128. checklist: 'Checklist',
  129. checklistTip: 'Make sure all issues are resolved before publishing',
  130. checklistResolved: 'All issues are resolved',
  131. organizeBlocks: 'Organize blocks',
  132. change: 'Change',
  133. },
  134. nodes: {
  135. common: {
  136. outputVars: 'Output Variables',
  137. insertVarTip: 'Insert Variable',
  138. memory: {
  139. memory: 'Memory',
  140. memoryTip: 'Chat memory settings',
  141. windowSize: 'Window Size',
  142. conversationRoleName: 'Conversation Role Name',
  143. user: 'User prefix',
  144. assistant: 'Assistant prefix',
  145. },
  146. memories: {
  147. title: 'Memories',
  148. tip: 'Chat memory',
  149. builtIn: 'Built-in',
  150. },
  151. },
  152. start: {
  153. required: 'required',
  154. inputField: 'Input Field',
  155. builtInVar: 'Built-in Variables',
  156. outputVars: {
  157. query: 'User input',
  158. memories: {
  159. des: 'Conversation history',
  160. type: 'message type',
  161. content: 'message content',
  162. },
  163. files: 'File list',
  164. },
  165. noVarTip: 'Set inputs that can be used in the Workflow',
  166. },
  167. end: {
  168. outputs: 'Outputs',
  169. output: {
  170. type: 'output type',
  171. variable: 'output variable',
  172. },
  173. type: {
  174. 'none': 'None',
  175. 'plain-text': 'Plain Text',
  176. 'structured': 'Structured',
  177. },
  178. },
  179. answer: {
  180. answer: 'Answer',
  181. outputVars: 'Output Variables',
  182. },
  183. llm: {
  184. model: 'model',
  185. variables: 'variables',
  186. context: 'context',
  187. contextTooltip: 'You can import Knowledge as context',
  188. notSetContextInPromptTip: 'To enable the context feature, please fill in the context variable in PROMPT.',
  189. prompt: 'prompt',
  190. roleDescription: {
  191. system: 'Give high level instructions for the conversation',
  192. user: 'Provide instructions, queries, or any text-based input to the model',
  193. assistant: 'The model’s responses based on the user messages',
  194. },
  195. addMessage: 'Add Message',
  196. vision: 'vision',
  197. files: 'Files',
  198. resolution: {
  199. name: 'Resolution',
  200. high: 'High',
  201. low: 'Low',
  202. },
  203. outputVars: {
  204. output: 'Generate content',
  205. usage: 'Model Usage Information',
  206. },
  207. singleRun: {
  208. variable: 'Variable',
  209. },
  210. sysQueryInUser: 'sys.query in user message is required',
  211. },
  212. knowledgeRetrieval: {
  213. queryVariable: 'Query Variable',
  214. knowledge: 'Knowledge',
  215. outputVars: {
  216. output: 'Retrieval segmented data',
  217. content: 'Segmented content',
  218. title: 'Segmented title',
  219. icon: 'Segmented icon',
  220. url: 'Segmented URL',
  221. metadata: 'Other metadata',
  222. },
  223. },
  224. http: {
  225. inputVars: 'Input Variables',
  226. api: 'API',
  227. apiPlaceholder: 'Enter URL, type ‘/’ insert variable',
  228. notStartWithHttp: 'API should start with http:// or https://',
  229. key: 'Key',
  230. value: 'Value',
  231. bulkEdit: 'Bulk Edit',
  232. keyValueEdit: 'Key-Value Edit',
  233. headers: 'Headers',
  234. params: 'Params',
  235. body: 'Body',
  236. outputVars: {
  237. body: 'Response Content',
  238. statusCode: 'Response Status Code',
  239. headers: 'Response Header List JSON',
  240. files: 'Files List',
  241. },
  242. authorization: {
  243. 'authorization': 'Authorization',
  244. 'authorizationType': 'Authorization Type',
  245. 'no-auth': 'None',
  246. 'api-key': 'API-Key',
  247. 'auth-type': 'Auth Type',
  248. 'basic': 'Basic',
  249. 'bearer': 'Bearer',
  250. 'custom': 'Custom',
  251. 'api-key-title': 'API Key',
  252. 'header': 'Header',
  253. },
  254. insertVarPlaceholder: 'type \'/\' to insert variable',
  255. timeout: {
  256. title: 'Timeout',
  257. connectLabel: 'Connection Timeout',
  258. connectPlaceholder: 'Enter connection timeout in seconds',
  259. readLabel: 'Read Timeout',
  260. readPlaceholder: 'Enter read timeout in seconds',
  261. writeLabel: 'Write Timeout',
  262. writePlaceholder: 'Enter write timeout in seconds',
  263. },
  264. },
  265. code: {
  266. inputVars: 'Input Variables',
  267. outputVars: 'Output Variables',
  268. },
  269. templateTransform: {
  270. inputVars: 'Input Variables',
  271. code: 'Code',
  272. codeSupportTip: 'Only supports Jinja2',
  273. outputVars: {
  274. output: 'Transformed content',
  275. },
  276. },
  277. ifElse: {
  278. if: 'If',
  279. else: 'Else',
  280. elseDescription: 'Used to define the logic that should be executed when the if condition is not met.',
  281. and: 'and',
  282. or: 'or',
  283. operator: 'Operator',
  284. notSetVariable: 'Please set variable first',
  285. comparisonOperator: {
  286. 'contains': 'contains',
  287. 'not contains': 'not contains',
  288. 'start with': 'start with',
  289. 'end with': 'end with',
  290. 'is': 'is',
  291. 'is not': 'is not',
  292. 'empty': 'is empty',
  293. 'not empty': 'is not empty',
  294. 'null': 'is null',
  295. 'not null': 'is not null',
  296. },
  297. enterValue: 'Enter value',
  298. addCondition: 'Add Condition',
  299. conditionNotSetup: 'Condition NOT setup',
  300. },
  301. variableAssigner: {
  302. title: 'Assign variables',
  303. outputType: 'Output Type',
  304. outputVarType: 'Output Variable Type',
  305. varNotSet: 'Variable not set',
  306. noVarTip: 'Add the variables to be assigned',
  307. type: {
  308. string: 'String',
  309. number: 'Number',
  310. object: 'Object',
  311. array: 'Array',
  312. },
  313. outputVars: {
  314. output: 'Assigned variable value',
  315. },
  316. },
  317. tool: {
  318. toAuthorize: 'To authorize',
  319. inputVars: 'Input Variables',
  320. outputVars: {
  321. text: 'tool generated content',
  322. files: {
  323. title: 'tool generated files',
  324. type: 'Support type. Now only support image',
  325. transfer_method: 'Transfer method.Value is remote_url or local_file',
  326. url: 'Image url',
  327. upload_file_id: 'Upload file id',
  328. },
  329. },
  330. },
  331. questionClassifiers: {
  332. model: 'model',
  333. inputVars: 'Input Variables',
  334. outputVars: {
  335. className: 'Class Name',
  336. },
  337. class: 'Class',
  338. classNamePlaceholder: 'Write your class name',
  339. advancedSetting: 'Advanced Setting',
  340. topicName: 'Topic Name',
  341. topicPlaceholder: 'Write your topic name',
  342. addClass: 'Add Class',
  343. instruction: 'Instruction',
  344. instructionPlaceholder: 'Write your instruction',
  345. },
  346. },
  347. tracing: {
  348. stopBy: 'Stop by {{user}}',
  349. },
  350. }
  351. export default translation