Browse Source

意图识别接口

CzRger 2 months ago
parent
commit
14784f0b6d
1 changed files with 10 additions and 5 deletions
  1. 10 5
      web/app/components/workflow/nodes/intent-recon-train/default.ts

+ 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,