workflow.ts 10 KB

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