@tiger16601/n8n-nodes-fastgpt 1.1.14 → 1.1.16
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.
|
@@ -14,51 +14,12 @@ exports.chatOperations = [
|
|
|
14
14
|
},
|
|
15
15
|
},
|
|
16
16
|
options: [
|
|
17
|
-
|
|
18
|
-
name: "客服对话",
|
|
19
|
-
value: "客服对话",
|
|
20
|
-
action: "客服对话",
|
|
21
|
-
description: "Create one or more completions for a given text",
|
|
22
|
-
routing: {
|
|
23
|
-
request: {
|
|
24
|
-
method: "POST",
|
|
25
|
-
url: "/v1/chat/completions",
|
|
26
|
-
body: {
|
|
27
|
-
stream: false,
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
output: {
|
|
31
|
-
postReceive: [GenericFunctions_1.sendErrorPostReceive],
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
// NEW: 纯文本对话 - 纯文本消息
|
|
36
|
-
{
|
|
37
|
-
name: "纯文本对话",
|
|
38
|
-
value: "纯文本对话",
|
|
39
|
-
action: "纯文本对话",
|
|
40
|
-
description: "请求对话Agent进行纯文本对话,使用固定消息格式。",
|
|
41
|
-
routing: {
|
|
42
|
-
request: {
|
|
43
|
-
method: "POST",
|
|
44
|
-
// NEW: 纯文本对话端点
|
|
45
|
-
url: "/v1/chat/completions",
|
|
46
|
-
body: {
|
|
47
|
-
stream: false,
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
output: {
|
|
51
|
-
postReceive: [GenericFunctions_1.sendErrorPostReceive],
|
|
52
|
-
},
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
// NEW: 多模态对话 - 支持图片/文件
|
|
17
|
+
// NEW: 多模态对话 - 纯文本消息
|
|
56
18
|
{
|
|
57
19
|
name: "多模态对话",
|
|
58
20
|
value: "多模态对话",
|
|
59
21
|
action: "多模态对话",
|
|
60
|
-
description:
|
|
61
|
-
"请求对话Agent进行多模态对话,支持上传图片(image_url)和文件(file_url)。",
|
|
22
|
+
description: "请求对话Agent进行多模态对话,使用固定消息格式。",
|
|
62
23
|
routing: {
|
|
63
24
|
request: {
|
|
64
25
|
method: "POST",
|
|
@@ -73,17 +34,17 @@ exports.chatOperations = [
|
|
|
73
34
|
},
|
|
74
35
|
},
|
|
75
36
|
},
|
|
76
|
-
// NEW: 请求插件,通过variables
|
|
37
|
+
// NEW: 请求插件,通过appId指定应用,variables传递输入参数
|
|
77
38
|
{
|
|
78
39
|
name: "请求插件",
|
|
79
40
|
value: "请求插件",
|
|
80
41
|
action: "请求插件",
|
|
81
42
|
description:
|
|
82
|
-
"
|
|
43
|
+
"调用插件类型的应用。通过appId指定应用,variables传入插件参数,通过pluginData获取输出。",
|
|
83
44
|
routing: {
|
|
84
45
|
request: {
|
|
85
46
|
method: "POST",
|
|
86
|
-
// NEW:
|
|
47
|
+
// NEW: 请求插件端点
|
|
87
48
|
url: "/v1/chat/completions",
|
|
88
49
|
body: {
|
|
89
50
|
stream: false,
|
|
@@ -327,7 +288,7 @@ exports.chatOperations = [
|
|
|
327
288
|
},
|
|
328
289
|
},
|
|
329
290
|
],
|
|
330
|
-
default: "
|
|
291
|
+
default: "多模态对话",
|
|
331
292
|
},
|
|
332
293
|
];
|
|
333
294
|
const completeOperations = [
|
|
@@ -339,13 +300,7 @@ const completeOperations = [
|
|
|
339
300
|
required: true,
|
|
340
301
|
displayOptions: {
|
|
341
302
|
show: {
|
|
342
|
-
operation: [
|
|
343
|
-
"客服对话",
|
|
344
|
-
"纯文本对话",
|
|
345
|
-
"多模态对话",
|
|
346
|
-
"交互节点继续运行",
|
|
347
|
-
"请求插件",
|
|
348
|
-
],
|
|
303
|
+
operation: ["多模态对话", "交互节点继续运行"],
|
|
349
304
|
resource: ["chat"],
|
|
350
305
|
},
|
|
351
306
|
},
|
|
@@ -367,7 +322,7 @@ const completeOperations = [
|
|
|
367
322
|
displayOptions: {
|
|
368
323
|
show: {
|
|
369
324
|
resource: ["chat"],
|
|
370
|
-
operation: ["
|
|
325
|
+
operation: ["多模态对话", "交互节点继续运行"],
|
|
371
326
|
},
|
|
372
327
|
},
|
|
373
328
|
required: true,
|
|
@@ -506,7 +461,7 @@ const completeOperations = [
|
|
|
506
461
|
displayOptions: {
|
|
507
462
|
show: {
|
|
508
463
|
resource: ["chat"],
|
|
509
|
-
operation: ["
|
|
464
|
+
operation: ["多模态对话", "请求插件"],
|
|
510
465
|
},
|
|
511
466
|
},
|
|
512
467
|
placeholder: "添加变量",
|
|
@@ -539,58 +494,52 @@ const completeOperations = [
|
|
|
539
494
|
},
|
|
540
495
|
},
|
|
541
496
|
},
|
|
497
|
+
// NEW: 应用ID - 用于请求插件
|
|
542
498
|
{
|
|
543
|
-
displayName: "
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
499
|
+
displayName: "应用ID",
|
|
500
|
+
description: "插件应用的App ID",
|
|
501
|
+
name: "pluginAppId",
|
|
502
|
+
type: "string",
|
|
503
|
+
default: "",
|
|
504
|
+
required: true,
|
|
547
505
|
displayOptions: {
|
|
548
506
|
show: {
|
|
549
|
-
operation: [
|
|
550
|
-
"客服对话",
|
|
551
|
-
"纯文本对话",
|
|
552
|
-
"多模态对话",
|
|
553
|
-
"交互节点继续运行",
|
|
554
|
-
],
|
|
507
|
+
operation: ["请求插件"],
|
|
555
508
|
resource: ["chat"],
|
|
556
509
|
},
|
|
557
510
|
},
|
|
558
511
|
routing: {
|
|
559
512
|
send: {
|
|
560
513
|
type: "body",
|
|
561
|
-
property: "
|
|
514
|
+
property: "appId",
|
|
562
515
|
},
|
|
563
516
|
},
|
|
564
517
|
},
|
|
565
|
-
// NEW: 响应对话项ID - 用于Agent对话
|
|
566
518
|
{
|
|
567
|
-
displayName: "
|
|
568
|
-
name: "
|
|
569
|
-
type: "
|
|
570
|
-
default:
|
|
571
|
-
description: "指定响应对话项的ID,用于跟踪对话项(选填)",
|
|
519
|
+
displayName: "响应对话详情",
|
|
520
|
+
name: "detail",
|
|
521
|
+
type: "boolean",
|
|
522
|
+
default: false,
|
|
572
523
|
displayOptions: {
|
|
573
524
|
show: {
|
|
574
|
-
operation: ["
|
|
525
|
+
operation: ["多模态对话", "交互节点继续运行"],
|
|
575
526
|
resource: ["chat"],
|
|
576
527
|
},
|
|
577
528
|
},
|
|
578
529
|
routing: {
|
|
579
530
|
send: {
|
|
580
531
|
type: "body",
|
|
581
|
-
property: "
|
|
532
|
+
property: "detail",
|
|
582
533
|
},
|
|
583
534
|
},
|
|
584
535
|
},
|
|
585
|
-
// NEW:
|
|
536
|
+
// NEW: 响应对话项ID - 用于多模态对话
|
|
586
537
|
{
|
|
587
|
-
displayName: "
|
|
588
|
-
name: "
|
|
589
|
-
type: "
|
|
590
|
-
default:
|
|
591
|
-
|
|
592
|
-
description:
|
|
593
|
-
'消息列表,JSON格式。content支持字符串或数组(可包含text/image_url/file_url类型)。示例:[{"role":"user","content":[{"type":"text","text":"导演是谁"},{"type":"image_url","image_url":{"url":"图片链接"}}]}]',
|
|
538
|
+
displayName: "响应对话项ID",
|
|
539
|
+
name: "responseChatItemId",
|
|
540
|
+
type: "string",
|
|
541
|
+
default: "",
|
|
542
|
+
description: "指定响应对话项的ID,用于跟踪对话项(选填)",
|
|
594
543
|
displayOptions: {
|
|
595
544
|
show: {
|
|
596
545
|
operation: ["多模态对话"],
|
|
@@ -600,25 +549,7 @@ const completeOperations = [
|
|
|
600
549
|
routing: {
|
|
601
550
|
send: {
|
|
602
551
|
type: "body",
|
|
603
|
-
property: "
|
|
604
|
-
// NEW: 确保messages以JSON数组形式发送
|
|
605
|
-
preSend: [
|
|
606
|
-
async function (requestOptions) {
|
|
607
|
-
const messagesValue =
|
|
608
|
-
this.getNodeParameter("agentMessages");
|
|
609
|
-
if (typeof messagesValue === "string") {
|
|
610
|
-
try {
|
|
611
|
-
requestOptions.body.messages =
|
|
612
|
-
JSON.parse(messagesValue);
|
|
613
|
-
} catch (e) {
|
|
614
|
-
requestOptions.body.messages = [];
|
|
615
|
-
}
|
|
616
|
-
} else {
|
|
617
|
-
requestOptions.body.messages = messagesValue;
|
|
618
|
-
}
|
|
619
|
-
return requestOptions;
|
|
620
|
-
},
|
|
621
|
-
],
|
|
552
|
+
property: "responseChatItemId",
|
|
622
553
|
},
|
|
623
554
|
},
|
|
624
555
|
},
|
|
@@ -629,12 +560,7 @@ const completeOperations = [
|
|
|
629
560
|
default: true,
|
|
630
561
|
displayOptions: {
|
|
631
562
|
show: {
|
|
632
|
-
operation: [
|
|
633
|
-
"客服对话",
|
|
634
|
-
"纯文本对话",
|
|
635
|
-
"多模态对话",
|
|
636
|
-
"交互节点继续运行",
|
|
637
|
-
],
|
|
563
|
+
operation: ["多模态对话", "交互节点继续运行"],
|
|
638
564
|
resource: ["chat"],
|
|
639
565
|
},
|
|
640
566
|
},
|