@tiger16601/n8n-nodes-fastgpt 1.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +19 -0
- package/README.md +3 -0
- package/dist/credentials/FastGPTApi.credentials.d.ts +13 -0
- package/dist/credentials/FastGPTApi.credentials.js +64 -0
- package/dist/credentials/FastGPTApi.credentials.js.map +1 -0
- package/dist/nodes/FastGPT/ChatDescription.d.ts +3 -0
- package/dist/nodes/FastGPT/ChatDescription.js +229 -0
- package/dist/nodes/FastGPT/ChatDescription.js.map +1 -0
- package/dist/nodes/FastGPT/DatasetDescription.d.ts +3 -0
- package/dist/nodes/FastGPT/DatasetDescription.js +732 -0
- package/dist/nodes/FastGPT/DatasetDescription.js.map +1 -0
- package/dist/nodes/FastGPT/FastGPT.node.d.ts +4 -0
- package/dist/nodes/FastGPT/FastGPT.node.js +65 -0
- package/dist/nodes/FastGPT/FastGPT.node.js.map +1 -0
- package/dist/nodes/FastGPT/FastGPT.node.json +19 -0
- package/dist/nodes/FastGPT/FastGPT.svg +1 -0
- package/dist/nodes/FastGPT/GenericFunctions.d.ts +2 -0
- package/dist/nodes/FastGPT/GenericFunctions.js +19 -0
- package/dist/nodes/FastGPT/GenericFunctions.js.map +1 -0
- package/dist/nodes/FastGPT/KnowledgeDescription.d.ts +3 -0
- package/dist/nodes/FastGPT/KnowledgeDescription.js +523 -0
- package/dist/nodes/FastGPT/KnowledgeDescription.js.map +1 -0
- package/dist/package.json +55 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/index.js +0 -0
- package/package.json +42 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatasetDescription.js","sourceRoot":"","sources":["../../../nodes/FastGPT/DatasetDescription.ts"],"names":[],"mappings":";;;AACA,yDAA0D;AAE7C,QAAA,iBAAiB,GAAsB;IACnD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,E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B,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,SAAS;aACnB;SACD;KACD;IACD;QACC,WAAW,EAAE,MAAM;QACnB,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,UAAU;aACpB;SACD;KACD;IACD;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,mBAAmB;QACzB,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,QAAQ,CAAC;gBACrB,QAAQ,EAAE,CAAC,SAAS,CAAC;aACrB;SACD;QACD,OAAO,EAAE;YACR,IAAI,EAAE;gBACL,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,YAAY;aACtB;SACD;KACD;CACD,CAAC;AAEF,MAAM,gBAAgB,GAAsB,EAiB3C,CAAC;AAEW,QAAA,aAAa,GAAsB;IAI/C,GAAG,kBAAkB;IAKrB,GAAG,gBAAgB;CACnB,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FastGPT = void 0;
|
|
4
|
+
const ChatDescription_1 = require("./ChatDescription");
|
|
5
|
+
const KnowledgeDescription_1 = require("./KnowledgeDescription");
|
|
6
|
+
const DatasetDescription_1 = require("./DatasetDescription");
|
|
7
|
+
class FastGPT {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.description = {
|
|
10
|
+
displayName: 'FastGPT',
|
|
11
|
+
name: 'fastGPT',
|
|
12
|
+
icon: 'file:FastGPT.svg',
|
|
13
|
+
group: ['transform'],
|
|
14
|
+
version: [1],
|
|
15
|
+
subtitle: '={{$parameter["operation"] + ": " + $parameter["resource"]}}',
|
|
16
|
+
description: 'AI智能客服平台',
|
|
17
|
+
defaults: {
|
|
18
|
+
name: 'FastGPT',
|
|
19
|
+
},
|
|
20
|
+
inputs: ["main"],
|
|
21
|
+
outputs: ["main"],
|
|
22
|
+
credentials: [
|
|
23
|
+
{
|
|
24
|
+
name: 'fastGPTApi',
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
requestDefaults: {
|
|
29
|
+
ignoreHttpStatusErrors: true,
|
|
30
|
+
baseURL: '={{$credentials.baseUrl}}',
|
|
31
|
+
},
|
|
32
|
+
properties: [
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Resource',
|
|
35
|
+
name: 'resource',
|
|
36
|
+
type: 'options',
|
|
37
|
+
noDataExpression: true,
|
|
38
|
+
options: [
|
|
39
|
+
{
|
|
40
|
+
name: '对话',
|
|
41
|
+
value: 'chat',
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
name: '知识库',
|
|
45
|
+
value: 'knowledge',
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: '集合',
|
|
49
|
+
value: 'dataset',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
default: 'chat',
|
|
53
|
+
},
|
|
54
|
+
...ChatDescription_1.chatOperations,
|
|
55
|
+
...ChatDescription_1.chatFields,
|
|
56
|
+
...KnowledgeDescription_1.knowledgeOperations,
|
|
57
|
+
...KnowledgeDescription_1.knowledgeFields,
|
|
58
|
+
...DatasetDescription_1.datasetOperations,
|
|
59
|
+
...DatasetDescription_1.datasetFields,
|
|
60
|
+
],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.FastGPT = FastGPT;
|
|
65
|
+
//# sourceMappingURL=FastGPT.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FastGPT.node.js","sourceRoot":"","sources":["../../../nodes/FastGPT/FastGPT.node.ts"],"names":[],"mappings":";;;AACA,uDAA+D;AAC/D,iEAA8E;AAC9E,6DAAwE;AAExE,MAAa,OAAO;IAApB;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,SAAS;YAEtB,IAAI,EAAE,SAAS;YACf,IAAI,EAAE,kBAAkB;YACxB,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC,CAAC,CAAC;YACZ,QAAQ,EAAE,8DAA8D;YACxE,WAAW,EAAE,UAAU;YACvB,QAAQ,EAAE;gBACT,IAAI,EAAE,SAAS;aACf;YAED,MAAM,EAAE,QAAyB;YAEjC,OAAO,EAAE,QAAyB;YAElC,WAAW,EAAE;gBACZ;oBACC,IAAI,EAAE,YAAY;oBAClB,QAAQ,EAAE,IAAI;iBACd;aACD;YACD,eAAe,EAAE;gBAChB,sBAAsB,EAAE,IAAI;gBAC5B,OAAO,EAAE,2BAA2B;aACpC;YACD,UAAU,EAAE;gBACX;oBACC,WAAW,EAAE,UAAU;oBACvB,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,SAAS;oBACf,gBAAgB,EAAE,IAAI;oBACtB,OAAO,EAAE;wBACR;4BACC,IAAI,EAAE,IAAI;4BACV,KAAK,EAAE,MAAM;yBACb;wBACD;4BACC,IAAI,EAAE,KAAK;4BACX,KAAK,EAAE,WAAW;yBAClB;wBACD;4BACC,IAAI,EAAE,IAAI;4BACV,KAAK,EAAE,SAAS;yBAChB;qBACD;oBACD,OAAO,EAAE,MAAM;iBACf;gBACD,GAAG,gCAAc;gBACjB,GAAG,4BAAU;gBACb,GAAG,0CAAmB;gBACtB,GAAG,sCAAe;gBAClB,GAAG,sCAAiB;gBACpB,GAAG,kCAAa;aAChB;SACD,CAAC;IACH,CAAC;CAAA;AA1DD,0BA0DC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": "n8n-nodes-base.fastgpt",
|
|
3
|
+
"nodeVersion": "1.0",
|
|
4
|
+
"codexVersion": "1.0",
|
|
5
|
+
"categories": ["Utility"],
|
|
6
|
+
"resources": {
|
|
7
|
+
"credentialDocumentation": [
|
|
8
|
+
{
|
|
9
|
+
"url": "https://github.com/labring/FastGPT"
|
|
10
|
+
}
|
|
11
|
+
],
|
|
12
|
+
"primaryDocumentation": [
|
|
13
|
+
{
|
|
14
|
+
"url": "https://github.com/labring/FastGPT"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"alias": ["fastgpt", "智能问答", "RAG"]
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg viewBox="0 0 1041 1348" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M340.837.33933 681.068.338989V.455643C684.032.378397 686.999.339702 689.967.339702 735.961.3397 781.504 9.62899 823.997 27.6772 866.49 45.7254 905.099 72.1791 937.622 105.528 970.144 138.877 995.942 178.467 1013.54 222.04 1031.14 265.612 1040.2 312.312 1040.2 359.474H340.836V1347.84C296.157 1347.84 251.914 1338.55 210.636 1320.49 169.357 1302.43 131.85 1275.95 100.257 1242.58 68.6636 1209.21 43.6023 1169.59 26.5041 1125.99 11.3834 1087.43 2.75216 1046.42.957956 1004.81H.605869L.605897 368.098H.70363c-.597878-26.267 1.53378-52.655 6.43943-78.687C20.2709 219.745 52.6748 155.754 100.257 105.528 147.839 55.3017 208.462 21.0975 274.461 7.24017 296.426 2.62833 318.657.339101 340.837.33933z" fill="url(#paint0_linear_1172_228)"></path><path d="M633.639 904.645H513.029V576.37H635.422V576.377C678.161 576.607 720.454 585.093 759.951 601.37 799.997 617.874 836.384 642.064 867.033 672.559c30.65 30.495 54.963 66.698 71.55 106.542C955.171 818.944 963.709 861.648 963.709 904.775H633.639V904.645z" fill="url(#paint1_linear_1172_228)"></path><defs><linearGradient id="paint0_linear_1172_228" x1="520.404" y1=".338989" x2="520.404" y2="1347.84" gradientUnits="userSpaceOnUse"><stop stop-color="#326dff"></stop><stop offset="1" stop-color="#8eaeff"></stop></linearGradient><linearGradient id="paint1_linear_1172_228" x1="738.369" y1="576.37" x2="738.369" y2="904.775" gradientUnits="userSpaceOnUse"><stop stop-color="#326dff"></stop><stop offset="1" stop-color="#8eaeff"></stop></linearGradient></defs></svg>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.sendErrorPostReceive = void 0;
|
|
4
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
5
|
+
async function sendErrorPostReceive(data, response) {
|
|
6
|
+
const responseData = response.body;
|
|
7
|
+
const code = responseData.code || 200;
|
|
8
|
+
const message = responseData.message || response.statusMessage;
|
|
9
|
+
if (String(response.statusCode).startsWith('4') || String(response.statusCode).startsWith('5') || code != 200) {
|
|
10
|
+
throw new n8n_workflow_1.NodeApiError(this.getNode(), response, {
|
|
11
|
+
message: String(message),
|
|
12
|
+
httpCode: String(response.statusCode),
|
|
13
|
+
description: String(responseData.statusText),
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return data;
|
|
17
|
+
}
|
|
18
|
+
exports.sendErrorPostReceive = sendErrorPostReceive;
|
|
19
|
+
//# sourceMappingURL=GenericFunctions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GenericFunctions.js","sourceRoot":"","sources":["../../../nodes/FastGPT/GenericFunctions.ts"],"names":[],"mappings":";;;AAMA,+CAA4C;AAErC,KAAK,UAAU,oBAAoB,CAEzC,IAA0B,EAC1B,QAA8B;IAE9B,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAkB,CAAC;IAEjD,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,IAAI,GAAG,CAAC;IACtC,MAAM,OAAO,GAAG,YAAY,CAAC,OAAO,IAAI,QAAQ,CAAC,aAAa,CAAC;IAC/D,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,IAAI,IAAI,GAAG,EAAE;QAC9G,MAAM,IAAI,2BAAY,CAAC,IAAI,CAAC,OAAO,EAAE,EAAE,QAAiC,EAAE;YACzE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC;YACxB,QAAQ,EAAE,MAAM,CAAC,QAAQ,CAAC,UAAU,CAAC;YACrC,WAAW,EAAE,MAAM,CAAC,YAAY,CAAC,UAAU,CAAC;SAC5C,CAAC,CAAC;KACH;IACD,OAAO,IAAI,CAAC;AACb,CAAC;AAjBD,oDAiBC"}
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.knowledgeFields = exports.knowledgeOperations = void 0;
|
|
4
|
+
const GenericFunctions_1 = require("./GenericFunctions");
|
|
5
|
+
exports.knowledgeOperations = [
|
|
6
|
+
{
|
|
7
|
+
displayName: 'Operation',
|
|
8
|
+
name: 'operation',
|
|
9
|
+
type: 'options',
|
|
10
|
+
noDataExpression: true,
|
|
11
|
+
displayOptions: {
|
|
12
|
+
show: {
|
|
13
|
+
resource: ['knowledge'],
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
options: [
|
|
17
|
+
{
|
|
18
|
+
name: '获取知识库列表',
|
|
19
|
+
value: '获取知识库列表',
|
|
20
|
+
action: '获取知识库列表',
|
|
21
|
+
description: '获取已经创建的知识库',
|
|
22
|
+
routing: {
|
|
23
|
+
request: {
|
|
24
|
+
method: 'POST',
|
|
25
|
+
url: '/core/dataset/list',
|
|
26
|
+
// [FIX] 新FastGPT API: parentId需同时作为query string参数,body由字段routing.send处理
|
|
27
|
+
qs: {
|
|
28
|
+
parentId: '={{ $parameter.parentId }}',
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
output: { postReceive: [GenericFunctions_1.sendErrorPostReceive] },
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: '获取知识库详情',
|
|
36
|
+
value: '获取知识库详情',
|
|
37
|
+
action: '获取知识库详情',
|
|
38
|
+
description: '获取指定ID的知识库详情',
|
|
39
|
+
routing: {
|
|
40
|
+
request: {
|
|
41
|
+
method: 'GET',
|
|
42
|
+
url: '/core/dataset/detail',
|
|
43
|
+
},
|
|
44
|
+
output: { postReceive: [GenericFunctions_1.sendErrorPostReceive] },
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: '删除一个知识库',
|
|
49
|
+
value: '删除一个知识库',
|
|
50
|
+
action: '删除一个知识库',
|
|
51
|
+
description: '删除指定ID的知识库',
|
|
52
|
+
routing: {
|
|
53
|
+
request: {
|
|
54
|
+
method: 'DELETE',
|
|
55
|
+
url: '/core/dataset/delete',
|
|
56
|
+
},
|
|
57
|
+
output: { postReceive: [GenericFunctions_1.sendErrorPostReceive] },
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
name: '创建一个知识库',
|
|
62
|
+
value: '创建一个知识库',
|
|
63
|
+
action: '创建一个知识库',
|
|
64
|
+
description: '创建一个知识库或者文件夹',
|
|
65
|
+
routing: {
|
|
66
|
+
request: {
|
|
67
|
+
method: 'POST',
|
|
68
|
+
url: '/core/dataset/create',
|
|
69
|
+
},
|
|
70
|
+
output: { postReceive: [GenericFunctions_1.sendErrorPostReceive] },
|
|
71
|
+
},
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: '知识库检索',
|
|
75
|
+
value: '知识库检索',
|
|
76
|
+
action: '知识库检索',
|
|
77
|
+
description: '在指定的知识库检索,返回知识库的召回结果',
|
|
78
|
+
routing: {
|
|
79
|
+
request: {
|
|
80
|
+
method: 'POST',
|
|
81
|
+
url: '/core/dataset/searchTest',
|
|
82
|
+
},
|
|
83
|
+
output: { postReceive: [GenericFunctions_1.sendErrorPostReceive] },
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
// [FIX] 新增"创建训练订单"操作,对应FastGPT的createTrainingUsage API
|
|
87
|
+
{
|
|
88
|
+
name: '创建训练订单',
|
|
89
|
+
value: '创建训练订单',
|
|
90
|
+
action: '创建训练订单',
|
|
91
|
+
description: '创建知识库训练订单,返回billId可用于添加知识库数据时进行账单聚合',
|
|
92
|
+
routing: {
|
|
93
|
+
request: {
|
|
94
|
+
method: 'POST',
|
|
95
|
+
url: '/support/wallet/usage/createTrainingUsage',
|
|
96
|
+
},
|
|
97
|
+
output: { postReceive: [GenericFunctions_1.sendErrorPostReceive] },
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
],
|
|
101
|
+
default: '获取知识库列表',
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
const completeOperations = [
|
|
105
|
+
// [FIX] 新增parentId字段,用于新FastGPT API获取知识库列表及创建知识库时指定父级知识库
|
|
106
|
+
{
|
|
107
|
+
displayName: '父级知识库ID',
|
|
108
|
+
name: 'parentId',
|
|
109
|
+
type: 'string',
|
|
110
|
+
default: '',
|
|
111
|
+
displayOptions: {
|
|
112
|
+
show: {
|
|
113
|
+
operation: ['获取知识库列表', '创建一个知识库'],
|
|
114
|
+
resource: ['knowledge'],
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
description: '父级知识库ID,留空/null则代表根目录',
|
|
118
|
+
routing: {
|
|
119
|
+
send: {
|
|
120
|
+
type: 'body',
|
|
121
|
+
property: 'parentId',
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
displayName: '知识库ID',
|
|
127
|
+
name: 'knowledgeId',
|
|
128
|
+
type: 'string',
|
|
129
|
+
default: '',
|
|
130
|
+
displayOptions: {
|
|
131
|
+
show: {
|
|
132
|
+
operation: ['获取知识库详情', '删除一个知识库'],
|
|
133
|
+
resource: ['knowledge'],
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
routing: {
|
|
137
|
+
send: {
|
|
138
|
+
type: 'query',
|
|
139
|
+
property: 'id',
|
|
140
|
+
},
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
displayName: '类型',
|
|
145
|
+
// knowledgeType修改为type
|
|
146
|
+
name: 'type',
|
|
147
|
+
type: 'options',
|
|
148
|
+
default: 'dataset',
|
|
149
|
+
displayOptions: {
|
|
150
|
+
show: {
|
|
151
|
+
operation: ['创建一个知识库'],
|
|
152
|
+
resource: ['knowledge'],
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
options: [
|
|
156
|
+
{
|
|
157
|
+
name: '普通知识库',
|
|
158
|
+
value: 'dataset',
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
name: '文件夹',
|
|
162
|
+
value: 'folder',
|
|
163
|
+
},
|
|
164
|
+
],
|
|
165
|
+
routing: {
|
|
166
|
+
send: {
|
|
167
|
+
type: 'body',
|
|
168
|
+
property: 'type',
|
|
169
|
+
},
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
displayName: '名称',
|
|
174
|
+
name: 'knowledgeName',
|
|
175
|
+
type: 'string',
|
|
176
|
+
default: '',
|
|
177
|
+
required: true,
|
|
178
|
+
displayOptions: {
|
|
179
|
+
show: {
|
|
180
|
+
operation: ['创建一个知识库'],
|
|
181
|
+
resource: ['knowledge'],
|
|
182
|
+
},
|
|
183
|
+
},
|
|
184
|
+
routing: {
|
|
185
|
+
send: {
|
|
186
|
+
type: 'body',
|
|
187
|
+
property: 'name',
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
displayName: '简介',
|
|
193
|
+
name: 'knowledgeIntro',
|
|
194
|
+
type: 'string',
|
|
195
|
+
default: '',
|
|
196
|
+
displayOptions: {
|
|
197
|
+
show: {
|
|
198
|
+
operation: ['创建一个知识库'],
|
|
199
|
+
resource: ['knowledge'],
|
|
200
|
+
},
|
|
201
|
+
},
|
|
202
|
+
routing: {
|
|
203
|
+
send: {
|
|
204
|
+
type: 'body',
|
|
205
|
+
property: 'intro',
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
displayName: '选择知识库',
|
|
211
|
+
name: 'knowledgeDatasetId',
|
|
212
|
+
type: 'options',
|
|
213
|
+
default: '',
|
|
214
|
+
displayOptions: {
|
|
215
|
+
show: {
|
|
216
|
+
operation: ['知识库检索'],
|
|
217
|
+
resource: ['knowledge'],
|
|
218
|
+
},
|
|
219
|
+
},
|
|
220
|
+
typeOptions: {
|
|
221
|
+
loadOptions: {
|
|
222
|
+
routing: {
|
|
223
|
+
request: {
|
|
224
|
+
// [FIX] 新FastGPT API: 改为POST,parentId需同时作为query string和body参数
|
|
225
|
+
method: 'POST',
|
|
226
|
+
url: '/core/dataset/list',
|
|
227
|
+
qs: {
|
|
228
|
+
parentId: '',
|
|
229
|
+
},
|
|
230
|
+
body: {
|
|
231
|
+
parentId: '',
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
output: {
|
|
235
|
+
postReceive: [
|
|
236
|
+
{
|
|
237
|
+
type: 'rootProperty',
|
|
238
|
+
properties: {
|
|
239
|
+
property: 'data',
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
type: 'filter',
|
|
244
|
+
properties: {
|
|
245
|
+
pass: "={{ $responseItem.type === 'dataset' }}",
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
type: 'setKeyValue',
|
|
250
|
+
properties: {
|
|
251
|
+
name: '={{$responseItem.name}}',
|
|
252
|
+
value: '={{$responseItem._id}}',
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
type: 'sort',
|
|
257
|
+
properties: {
|
|
258
|
+
key: 'name',
|
|
259
|
+
},
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
},
|
|
266
|
+
routing: {
|
|
267
|
+
send: {
|
|
268
|
+
type: 'body',
|
|
269
|
+
property: 'datasetId',
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
displayName: '检索文本',
|
|
275
|
+
name: 'knowledgeSearchText',
|
|
276
|
+
type: 'string',
|
|
277
|
+
default: '',
|
|
278
|
+
displayOptions: {
|
|
279
|
+
show: {
|
|
280
|
+
operation: ['知识库检索'],
|
|
281
|
+
resource: ['knowledge'],
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
routing: {
|
|
285
|
+
send: {
|
|
286
|
+
type: 'body',
|
|
287
|
+
property: 'text',
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
displayName: '最大Tokens数量',
|
|
293
|
+
name: 'knowledgeSearchLimit',
|
|
294
|
+
type: 'number',
|
|
295
|
+
default: 5000,
|
|
296
|
+
displayOptions: {
|
|
297
|
+
show: {
|
|
298
|
+
operation: ['知识库检索'],
|
|
299
|
+
resource: ['knowledge'],
|
|
300
|
+
},
|
|
301
|
+
},
|
|
302
|
+
routing: {
|
|
303
|
+
send: {
|
|
304
|
+
type: 'body',
|
|
305
|
+
property: 'limit',
|
|
306
|
+
},
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
displayName: '最低相关度',
|
|
311
|
+
name: 'knowledgeSearchSimilarity',
|
|
312
|
+
type: 'number',
|
|
313
|
+
default: 0,
|
|
314
|
+
typeOptions: {
|
|
315
|
+
maxValue: 1,
|
|
316
|
+
minValue: 0
|
|
317
|
+
},
|
|
318
|
+
displayOptions: {
|
|
319
|
+
show: {
|
|
320
|
+
operation: ['知识库检索'],
|
|
321
|
+
resource: ['knowledge'],
|
|
322
|
+
},
|
|
323
|
+
},
|
|
324
|
+
routing: {
|
|
325
|
+
send: {
|
|
326
|
+
type: 'body',
|
|
327
|
+
property: 'similarity',
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
displayName: '类型',
|
|
333
|
+
name: 'knowledgeDatasetSearchMode',
|
|
334
|
+
type: 'options',
|
|
335
|
+
default: 'embedding',
|
|
336
|
+
required: true,
|
|
337
|
+
displayOptions: {
|
|
338
|
+
show: {
|
|
339
|
+
operation: ['知识库检索'],
|
|
340
|
+
resource: ['knowledge'],
|
|
341
|
+
},
|
|
342
|
+
},
|
|
343
|
+
options: [
|
|
344
|
+
{
|
|
345
|
+
name: '语义检索',
|
|
346
|
+
value: 'embedding',
|
|
347
|
+
description: '使用向量进行文本相关性查询'
|
|
348
|
+
},
|
|
349
|
+
{
|
|
350
|
+
name: '全文检索',
|
|
351
|
+
value: 'fullTextRecall',
|
|
352
|
+
description: '使用传统的全文检索,适合查找一些关键词和主谓语特殊的数据'
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
name: '混合检索',
|
|
356
|
+
value: 'mixedRecall',
|
|
357
|
+
description: '使用向量检索与全文检索的综合结果返回,使用 RRF 算法进行排序。'
|
|
358
|
+
},
|
|
359
|
+
],
|
|
360
|
+
routing: {
|
|
361
|
+
send: {
|
|
362
|
+
type: 'body',
|
|
363
|
+
property: 'searchMode',
|
|
364
|
+
},
|
|
365
|
+
},
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
displayName: '使用ReRank',
|
|
369
|
+
name: 'knowledgeSearchReRank',
|
|
370
|
+
type: 'boolean',
|
|
371
|
+
default: false,
|
|
372
|
+
displayOptions: {
|
|
373
|
+
show: {
|
|
374
|
+
operation: ['知识库检索'],
|
|
375
|
+
resource: ['knowledge'],
|
|
376
|
+
},
|
|
377
|
+
},
|
|
378
|
+
routing: {
|
|
379
|
+
send: {
|
|
380
|
+
type: 'body',
|
|
381
|
+
property: 'usingReRank',
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
// FIX: 新增知识库检索的问题优化相关字段
|
|
386
|
+
{
|
|
387
|
+
displayName: '使用问题优化',
|
|
388
|
+
name: 'knowledgeSearchExtensionQuery',
|
|
389
|
+
type: 'boolean',
|
|
390
|
+
default: false,
|
|
391
|
+
description: '启用问题优化,对检索文本进行改写以提升召回率',
|
|
392
|
+
displayOptions: {
|
|
393
|
+
show: {
|
|
394
|
+
operation: ['知识库检索'],
|
|
395
|
+
resource: ['knowledge'],
|
|
396
|
+
},
|
|
397
|
+
},
|
|
398
|
+
routing: {
|
|
399
|
+
send: {
|
|
400
|
+
type: 'body',
|
|
401
|
+
property: 'datasetSearchUsingExtensionQuery',
|
|
402
|
+
},
|
|
403
|
+
},
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
displayName: '问题优化模型',
|
|
407
|
+
name: 'knowledgeSearchExtensionModel',
|
|
408
|
+
type: 'string',
|
|
409
|
+
default: '',
|
|
410
|
+
description: '用于问题优化的模型,如:gpt-5。需先启用"使用问题优化"',
|
|
411
|
+
displayOptions: {
|
|
412
|
+
show: {
|
|
413
|
+
operation: ['知识库检索'],
|
|
414
|
+
resource: ['knowledge'],
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
routing: {
|
|
418
|
+
send: {
|
|
419
|
+
type: 'body',
|
|
420
|
+
property: 'datasetSearchExtensionModel',
|
|
421
|
+
},
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
displayName: '问题优化背景',
|
|
426
|
+
name: 'knowledgeSearchExtensionBg',
|
|
427
|
+
type: 'string',
|
|
428
|
+
default: '',
|
|
429
|
+
description: '问题优化的背景描述,用于帮助模型更好地理解上下文',
|
|
430
|
+
displayOptions: {
|
|
431
|
+
show: {
|
|
432
|
+
operation: ['知识库检索'],
|
|
433
|
+
resource: ['knowledge'],
|
|
434
|
+
},
|
|
435
|
+
},
|
|
436
|
+
routing: {
|
|
437
|
+
send: {
|
|
438
|
+
type: 'body',
|
|
439
|
+
property: 'datasetSearchExtensionBg',
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
},
|
|
443
|
+
// [FIX] 新增"创建训练订单"相关字段
|
|
444
|
+
{
|
|
445
|
+
displayName: '知识库ID',
|
|
446
|
+
name: 'trainingDatasetId',
|
|
447
|
+
type: 'string',
|
|
448
|
+
default: '',
|
|
449
|
+
required: true,
|
|
450
|
+
displayOptions: {
|
|
451
|
+
show: {
|
|
452
|
+
operation: ['创建训练订单'],
|
|
453
|
+
resource: ['knowledge'],
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
routing: {
|
|
457
|
+
send: {
|
|
458
|
+
type: 'body',
|
|
459
|
+
property: 'datasetId',
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
displayName: '订单名称',
|
|
465
|
+
name: 'trainingName',
|
|
466
|
+
type: 'string',
|
|
467
|
+
default: '',
|
|
468
|
+
displayOptions: {
|
|
469
|
+
show: {
|
|
470
|
+
operation: ['创建训练订单'],
|
|
471
|
+
resource: ['knowledge'],
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
description: '可选,自定义订单名称,例如:文档训练-fastgpt.docx',
|
|
475
|
+
routing: {
|
|
476
|
+
send: {
|
|
477
|
+
type: 'body',
|
|
478
|
+
property: 'name',
|
|
479
|
+
},
|
|
480
|
+
},
|
|
481
|
+
},
|
|
482
|
+
];
|
|
483
|
+
const sharedOperations = [
|
|
484
|
+
{
|
|
485
|
+
displayName: '选项',
|
|
486
|
+
name: 'options',
|
|
487
|
+
placeholder: '添加选项',
|
|
488
|
+
description: 'Additional options to add',
|
|
489
|
+
type: 'collection',
|
|
490
|
+
default: {},
|
|
491
|
+
displayOptions: {
|
|
492
|
+
show: {
|
|
493
|
+
operation: ['创建一个知识库'],
|
|
494
|
+
resource: ['knowledge'],
|
|
495
|
+
},
|
|
496
|
+
},
|
|
497
|
+
options: [
|
|
498
|
+
{
|
|
499
|
+
displayName: '父级ID',
|
|
500
|
+
name: 'knowledgeParentId',
|
|
501
|
+
type: 'string',
|
|
502
|
+
default: '',
|
|
503
|
+
displayOptions: {
|
|
504
|
+
show: {
|
|
505
|
+
'/operation': ['创建一个知识库'],
|
|
506
|
+
'/resource': ['knowledge'],
|
|
507
|
+
},
|
|
508
|
+
},
|
|
509
|
+
routing: {
|
|
510
|
+
send: {
|
|
511
|
+
type: 'body',
|
|
512
|
+
property: 'parentId',
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
},
|
|
516
|
+
],
|
|
517
|
+
},
|
|
518
|
+
];
|
|
519
|
+
exports.knowledgeFields = [
|
|
520
|
+
...completeOperations,
|
|
521
|
+
...sharedOperations,
|
|
522
|
+
];
|
|
523
|
+
//# sourceMappingURL=KnowledgeDescription.js.map
|