workflow.ts 10 KB

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