workflow.ts 11 KB

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