Переглянути джерело

Merge branch '1.1.3-master_web' of http://8.130.72.63:18081/shenzhen/tjdify into 1.1.3-master

CzRger 2 місяців тому
батько
коміт
161588f62f

+ 10 - 5
web/app/components/workflow/nodes/intent-recon-train/default.ts

@@ -10,17 +10,22 @@ import {
 const nodeDefault: NodeDefault<HttpNodeType> = {
   defaultValue: {
     variables: [],
-    method: Method.get,
-    url: '',
+    method: Method.post,
+    url: ['localhost', '1.95.78.201'].includes(location.hostname) ? 'http://1.95.78.201:30001/call' : 'http://10.76.102.168.:5006/call',
     authorization: {
       type: AuthorizationType.none,
       config: null,
     },
-    headers: '',
+    headers: 'accept:application/json\nContent-Type:application/json',
     params: '',
     body: {
-      type: BodyType.none,
-      data: [],
+      type: BodyType.rawText,
+      data: <any>[
+        {
+          type: 'text',
+          value: '{\n    "input": {\n      "text": ""\n    },\n    "parameters": {\n      "candidate_labels": []\n    }\n}',
+        },
+      ],
     },
     timeout: {
       max_connect_timeout: 0,

+ 9 - 9
web/utils/app-redirection.ts

@@ -5,13 +5,13 @@ export const getRedirection = (
   app: { id: string, mode: AppMode },
   redirectionFunc: (href: string) => void,
 ) => {
-  if (!isCurrentWorkspaceEditor) {
-    redirectionFunc(`/app/${app.id}/overview`)
-  }
-  else {
-    if (app.mode === 'workflow' || app.mode === 'advanced-chat')
-      redirectionFunc(`/app/${app.id}/workflow`)
-    else
-      redirectionFunc(`/app/${app.id}/configuration`)
-  }
+  // if (!isCurrentWorkspaceEditor) {
+  //   redirectionFunc(`/app/${app.id}/overview`)
+  // }
+  // else {
+  if (app.mode === 'workflow' || app.mode === 'advanced-chat')
+    redirectionFunc(`/app/${app.id}/workflow`)
+  else
+    redirectionFunc(`/app/${app.id}/configuration`)
+  // }
 }