@tiger16601/n8n-nodes-fastgpt 1.1.14 → 1.1.15
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",
|
|
@@ -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: "添加变量",
|
|
@@ -546,12 +501,7 @@ const completeOperations = [
|
|
|
546
501
|
default: false,
|
|
547
502
|
displayOptions: {
|
|
548
503
|
show: {
|
|
549
|
-
operation: [
|
|
550
|
-
"客服对话",
|
|
551
|
-
"纯文本对话",
|
|
552
|
-
"多模态对话",
|
|
553
|
-
"交互节点继续运行",
|
|
554
|
-
],
|
|
504
|
+
operation: ["多模态对话", "交互节点继续运行"],
|
|
555
505
|
resource: ["chat"],
|
|
556
506
|
},
|
|
557
507
|
},
|
|
@@ -562,35 +512,13 @@ const completeOperations = [
|
|
|
562
512
|
},
|
|
563
513
|
},
|
|
564
514
|
},
|
|
565
|
-
// NEW: 响应对话项ID -
|
|
515
|
+
// NEW: 响应对话项ID - 用于多模态对话
|
|
566
516
|
{
|
|
567
517
|
displayName: "响应对话项ID",
|
|
568
518
|
name: "responseChatItemId",
|
|
569
519
|
type: "string",
|
|
570
520
|
default: "",
|
|
571
521
|
description: "指定响应对话项的ID,用于跟踪对话项(选填)",
|
|
572
|
-
displayOptions: {
|
|
573
|
-
show: {
|
|
574
|
-
operation: ["纯文本对话", "多模态对话"],
|
|
575
|
-
resource: ["chat"],
|
|
576
|
-
},
|
|
577
|
-
},
|
|
578
|
-
routing: {
|
|
579
|
-
send: {
|
|
580
|
-
type: "body",
|
|
581
|
-
property: "responseChatItemId",
|
|
582
|
-
},
|
|
583
|
-
},
|
|
584
|
-
},
|
|
585
|
-
// NEW: 多模态对话消息 - 支持文本/图片/文件
|
|
586
|
-
{
|
|
587
|
-
displayName: "Agent对话消息",
|
|
588
|
-
name: "agentMessages",
|
|
589
|
-
type: "json",
|
|
590
|
-
default: '[{"role":"user","content":""}]',
|
|
591
|
-
required: true,
|
|
592
|
-
description:
|
|
593
|
-
'消息列表,JSON格式。content支持字符串或数组(可包含text/image_url/file_url类型)。示例:[{"role":"user","content":[{"type":"text","text":"导演是谁"},{"type":"image_url","image_url":{"url":"图片链接"}}]}]',
|
|
594
522
|
displayOptions: {
|
|
595
523
|
show: {
|
|
596
524
|
operation: ["多模态对话"],
|
|
@@ -600,25 +528,7 @@ const completeOperations = [
|
|
|
600
528
|
routing: {
|
|
601
529
|
send: {
|
|
602
530
|
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
|
-
],
|
|
531
|
+
property: "responseChatItemId",
|
|
622
532
|
},
|
|
623
533
|
},
|
|
624
534
|
},
|
|
@@ -629,12 +539,7 @@ const completeOperations = [
|
|
|
629
539
|
default: true,
|
|
630
540
|
displayOptions: {
|
|
631
541
|
show: {
|
|
632
|
-
operation: [
|
|
633
|
-
"客服对话",
|
|
634
|
-
"纯文本对话",
|
|
635
|
-
"多模态对话",
|
|
636
|
-
"交互节点继续运行",
|
|
637
|
-
],
|
|
542
|
+
operation: ["多模态对话", "交互节点继续运行"],
|
|
638
543
|
resource: ["chat"],
|
|
639
544
|
},
|
|
640
545
|
},
|