n8n-nodes-simple 2.3.0 → 2.4.1
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/dist/nodes/CoreAgent/description.js +0 -1
- package/dist/nodes/CoreAgent/description.js.map +1 -1
- package/dist/nodes/ModelOverview/ModelOverview.node.d.ts +10 -0
- package/dist/nodes/ModelOverview/ModelOverview.node.js +220 -0
- package/dist/nodes/ModelOverview/ModelOverview.node.js.map +1 -0
- package/dist/nodes/shared/config/descriptionGenerator.js +3 -3
- package/dist/nodes/shared/config/descriptionGenerator.js.map +1 -1
- package/dist/nodes/shared/config/properties/model.js.map +1 -1
- package/dist/nodes/shared/config/properties/output.js +14 -7
- package/dist/nodes/shared/config/properties/output.js.map +1 -1
- package/dist/nodes/shared/core/execution/executor.d.ts +2 -4
- package/dist/nodes/shared/core/execution/executor.js +10 -27
- package/dist/nodes/shared/core/execution/executor.js.map +1 -1
- package/dist/nodes/shared/core/execution/messageOperation.d.ts +1 -1
- package/dist/nodes/shared/core/execution/messageOperation.js +4 -4
- package/dist/nodes/shared/core/execution/messageOperation.js.map +1 -1
- package/dist/nodes/shared/core/execution/outputData.d.ts +1 -2
- package/dist/nodes/shared/core/execution/outputData.js +13 -34
- package/dist/nodes/shared/core/execution/outputData.js.map +1 -1
- package/dist/nodes/shared/core/execution/router.d.ts +1 -1
- package/dist/nodes/shared/core/execution/router.js +6 -6
- package/dist/nodes/shared/core/execution/router.js.map +1 -1
- package/dist/nodes/shared/core/messages/processor.d.ts +1 -1
- package/dist/nodes/shared/core/messages/processor.js +1 -6
- package/dist/nodes/shared/core/messages/processor.js.map +1 -1
- package/dist/nodes/shared/core/tools/connector.js +16 -25
- package/dist/nodes/shared/core/tools/connector.js.map +1 -1
- package/dist/nodes/shared/core/tools/executor.js +7 -1
- package/dist/nodes/shared/core/tools/executor.js.map +1 -1
- package/dist/nodes/shared/core/tools/manager.d.ts +0 -2
- package/dist/nodes/shared/core/tools/manager.js +0 -49
- package/dist/nodes/shared/core/tools/manager.js.map +1 -1
- package/dist/nodes/shared/core/tools/n8nTool.js +1 -2
- package/dist/nodes/shared/core/tools/n8nTool.js.map +1 -1
- package/dist/nodes/shared/core/tools/subagentTool.d.ts +0 -11
- package/dist/nodes/shared/core/tools/subagentTool.js +0 -58
- package/dist/nodes/shared/core/tools/subagentTool.js.map +1 -1
- package/dist/package.json +3 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +3 -2
- package/dist/nodes/Subagent/Subagent.node.d.ts +0 -11
- package/dist/nodes/Subagent/Subagent.node.js +0 -23
- package/dist/nodes/Subagent/Subagent.node.js.map +0 -1
- package/dist/nodes/Subagent/description.d.ts +0 -2
- package/dist/nodes/Subagent/description.js +0 -35
- package/dist/nodes/Subagent/description.js.map +0 -1
- package/dist/nodes/shared/actions/executor.d.ts +0 -7
- package/dist/nodes/shared/actions/executor.js +0 -61
- package/dist/nodes/shared/actions/executor.js.map +0 -1
- package/dist/nodes/shared/actions/memory.d.ts +0 -5
- package/dist/nodes/shared/actions/memory.js +0 -93
- package/dist/nodes/shared/actions/memory.js.map +0 -1
- package/dist/nodes/shared/actions/message.operation.d.ts +0 -2
- package/dist/nodes/shared/actions/message.operation.js +0 -14
- package/dist/nodes/shared/actions/message.operation.js.map +0 -1
- package/dist/nodes/shared/actions/messageProcessor.d.ts +0 -4
- package/dist/nodes/shared/actions/messageProcessor.js +0 -23
- package/dist/nodes/shared/actions/messageProcessor.js.map +0 -1
- package/dist/nodes/shared/actions/outputProcessor.d.ts +0 -5
- package/dist/nodes/shared/actions/outputProcessor.js +0 -112
- package/dist/nodes/shared/actions/outputProcessor.js.map +0 -1
- package/dist/nodes/shared/actions/parameterParser.d.ts +0 -9
- package/dist/nodes/shared/actions/parameterParser.js +0 -96
- package/dist/nodes/shared/actions/parameterParser.js.map +0 -1
- package/dist/nodes/shared/actions/parameters.d.ts +0 -26
- package/dist/nodes/shared/actions/parameters.js +0 -35
- package/dist/nodes/shared/actions/parameters.js.map +0 -1
- package/dist/nodes/shared/actions/requestBuilder.d.ts +0 -2
- package/dist/nodes/shared/actions/requestBuilder.js +0 -38
- package/dist/nodes/shared/actions/requestBuilder.js.map +0 -1
- package/dist/nodes/shared/actions/responseConfig.d.ts +0 -3
- package/dist/nodes/shared/actions/responseConfig.js +0 -26
- package/dist/nodes/shared/actions/responseConfig.js.map +0 -1
- package/dist/nodes/shared/actions/router.d.ts +0 -2
- package/dist/nodes/shared/actions/router.js +0 -117
- package/dist/nodes/shared/actions/router.js.map +0 -1
- package/dist/nodes/shared/actions/tool.d.ts +0 -2
- package/dist/nodes/shared/actions/tool.js +0 -51
- package/dist/nodes/shared/actions/tool.js.map +0 -1
- package/dist/nodes/shared/actions/toolExecutor.d.ts +0 -6
- package/dist/nodes/shared/actions/toolExecutor.js +0 -124
- package/dist/nodes/shared/actions/toolExecutor.js.map +0 -1
- package/dist/nodes/shared/actions/toolSetup.d.ts +0 -8
- package/dist/nodes/shared/actions/toolSetup.js +0 -59
- package/dist/nodes/shared/actions/toolSetup.js.map +0 -1
- package/dist/nodes/shared/config/properties/memory.d.ts +0 -2
- package/dist/nodes/shared/config/properties/memory.js +0 -5
- package/dist/nodes/shared/config/properties/memory.js.map +0 -1
- package/dist/nodes/shared/config/properties/toolParameters.d.ts +0 -2
- package/dist/nodes/shared/config/properties/toolParameters.js +0 -101
- package/dist/nodes/shared/config/properties/toolParameters.js.map +0 -1
- package/dist/nodes/shared/config/properties/tools.d.ts +0 -2
- package/dist/nodes/shared/config/properties/tools.js +0 -5
- package/dist/nodes/shared/config/properties/tools.js.map +0 -1
- package/dist/nodes/shared/config/responseConfig.d.ts +0 -3
- package/dist/nodes/shared/config/responseConfig.js +0 -26
- package/dist/nodes/shared/config/responseConfig.js.map +0 -1
- package/dist/nodes/shared/core/memory/optimizer.d.ts +0 -3
- package/dist/nodes/shared/core/memory/optimizer.js +0 -30
- package/dist/nodes/shared/core/memory/optimizer.js.map +0 -1
- package/dist/nodes/shared/core/memory/properties.d.ts +0 -2
- package/dist/nodes/shared/core/memory/properties.js +0 -5
- package/dist/nodes/shared/core/memory/properties.js.map +0 -1
- package/dist/nodes/shared/core/memory/supplier.d.ts +0 -2
- package/dist/nodes/shared/core/memory/supplier.js +0 -53
- package/dist/nodes/shared/core/memory/supplier.js.map +0 -1
- package/dist/nodes/shared/core/messages/memoryOptimizer.d.ts +0 -3
- package/dist/nodes/shared/core/messages/memoryOptimizer.js +0 -30
- package/dist/nodes/shared/core/messages/memoryOptimizer.js.map +0 -1
- package/dist/nodes/shared/core/messages/toolExtractor.d.ts +0 -6
- package/dist/nodes/shared/core/messages/toolExtractor.js +0 -28
- package/dist/nodes/shared/core/messages/toolExtractor.js.map +0 -1
- package/dist/nodes/shared/core/output/processor.d.ts +0 -5
- package/dist/nodes/shared/core/output/processor.js +0 -108
- package/dist/nodes/shared/core/output/processor.js.map +0 -1
- package/dist/nodes/shared/core/request/builder.d.ts +0 -2
- package/dist/nodes/shared/core/request/builder.js +0 -43
- package/dist/nodes/shared/core/request/builder.js.map +0 -1
- package/dist/nodes/shared/core/response/config.d.ts +0 -3
- package/dist/nodes/shared/core/response/config.js +0 -26
- package/dist/nodes/shared/core/response/config.js.map +0 -1
- package/dist/nodes/shared/core/schema/visualEditor.d.ts +0 -32
- package/dist/nodes/shared/core/schema/visualEditor.js +0 -70
- package/dist/nodes/shared/core/schema/visualEditor.js.map +0 -1
- package/dist/nodes/shared/descriptionGenerator.d.ts +0 -2
- package/dist/nodes/shared/descriptionGenerator.js +0 -36
- package/dist/nodes/shared/descriptionGenerator.js.map +0 -1
- package/dist/nodes/shared/gradientRobot.svg +0 -11
- package/dist/nodes/shared/gradientRobotRed.svg +0 -11
- package/dist/nodes/shared/message/chatHistoryProcessor.d.ts +0 -2
- package/dist/nodes/shared/message/chatHistoryProcessor.js +0 -63
- package/dist/nodes/shared/message/chatHistoryProcessor.js.map +0 -1
- package/dist/nodes/shared/message/memoryOptimizer.d.ts +0 -3
- package/dist/nodes/shared/message/memoryOptimizer.js +0 -30
- package/dist/nodes/shared/message/memoryOptimizer.js.map +0 -1
- package/dist/nodes/shared/message/messageConverter.d.ts +0 -4
- package/dist/nodes/shared/message/messageConverter.js +0 -76
- package/dist/nodes/shared/message/messageConverter.js.map +0 -1
- package/dist/nodes/shared/message/processor.d.ts +0 -3
- package/dist/nodes/shared/message/processor.js +0 -11
- package/dist/nodes/shared/message/processor.js.map +0 -1
- package/dist/nodes/shared/message/toolMessageExtractor.d.ts +0 -6
- package/dist/nodes/shared/message/toolMessageExtractor.js +0 -28
- package/dist/nodes/shared/message/toolMessageExtractor.js.map +0 -1
- package/dist/nodes/shared/message/types.d.ts +0 -48
- package/dist/nodes/shared/message/types.js +0 -12
- package/dist/nodes/shared/message/types.js.map +0 -1
- package/dist/nodes/shared/methods/index.d.ts +0 -1
- package/dist/nodes/shared/methods/index.js +0 -38
- package/dist/nodes/shared/methods/index.js.map +0 -1
- package/dist/nodes/shared/processing/memory.d.ts +0 -5
- package/dist/nodes/shared/processing/memory.js +0 -93
- package/dist/nodes/shared/processing/memory.js.map +0 -1
- package/dist/nodes/shared/processing/outputProcessor.d.ts +0 -5
- package/dist/nodes/shared/processing/outputProcessor.js +0 -108
- package/dist/nodes/shared/processing/outputProcessor.js.map +0 -1
- package/dist/nodes/shared/processing/requestBuilder.d.ts +0 -2
- package/dist/nodes/shared/processing/requestBuilder.js +0 -43
- package/dist/nodes/shared/processing/requestBuilder.js.map +0 -1
- package/dist/nodes/shared/processing/visualEditor.d.ts +0 -32
- package/dist/nodes/shared/processing/visualEditor.js +0 -70
- package/dist/nodes/shared/processing/visualEditor.js.map +0 -1
- package/dist/nodes/shared/properties.d.ts +0 -2
- package/dist/nodes/shared/properties.js +0 -550
- package/dist/nodes/shared/properties.js.map +0 -1
- package/dist/nodes/shared/tool/schemaGenerator.d.ts +0 -6
- package/dist/nodes/shared/tool/schemaGenerator.js +0 -23
- package/dist/nodes/shared/tool/schemaGenerator.js.map +0 -1
- package/dist/nodes/shared/tool/subagentTool.d.ts +0 -11
- package/dist/nodes/shared/tool/subagentTool.js +0 -60
- package/dist/nodes/shared/tool/subagentTool.js.map +0 -1
- package/dist/nodes/shared/tool/visualEditor.d.ts +0 -32
- package/dist/nodes/shared/tool/visualEditor.js +0 -70
- package/dist/nodes/shared/tool/visualEditor.js.map +0 -1
- package/dist/nodes/shared/toolManager/getConnectedTools.d.ts +0 -3
- package/dist/nodes/shared/toolManager/getConnectedTools.js +0 -37
- package/dist/nodes/shared/toolManager/getConnectedTools.js.map +0 -1
- package/dist/nodes/shared/toolManager/n8nTool.d.ts +0 -9
- package/dist/nodes/shared/toolManager/n8nTool.js +0 -91
- package/dist/nodes/shared/toolManager/n8nTool.js.map +0 -1
- package/dist/nodes/shared/utils/descriptionGenerator.d.ts +0 -2
- package/dist/nodes/shared/utils/descriptionGenerator.js +0 -36
- package/dist/nodes/shared/utils/descriptionGenerator.js.map +0 -1
- package/dist/nodes/shared/utils/index.d.ts +0 -1
- package/dist/nodes/shared/utils/index.js +0 -18
- package/dist/nodes/shared/utils/index.js.map +0 -1
- package/dist/nodes/shared/utils/listSearch.d.ts +0 -2
- package/dist/nodes/shared/utils/listSearch.js +0 -34
- package/dist/nodes/shared/utils/listSearch.js.map +0 -1
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.toolParametersProperties = void 0;
|
|
4
|
-
exports.toolParametersProperties = [
|
|
5
|
-
{
|
|
6
|
-
displayName: 'Tool Parameters',
|
|
7
|
-
name: 'toolParameters',
|
|
8
|
-
type: 'fixedCollection',
|
|
9
|
-
typeOptions: {
|
|
10
|
-
multipleValues: true,
|
|
11
|
-
sortable: false,
|
|
12
|
-
},
|
|
13
|
-
displayOptions: {
|
|
14
|
-
show: {
|
|
15
|
-
agentType: ['subAgent'],
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
description: 'Define parameters that the AI can request when using this tool. Use $fromAI() expressions for dynamic values.',
|
|
19
|
-
default: {},
|
|
20
|
-
options: [
|
|
21
|
-
{
|
|
22
|
-
displayName: 'Parameters',
|
|
23
|
-
name: 'parameters',
|
|
24
|
-
values: [
|
|
25
|
-
{
|
|
26
|
-
displayName: 'Parameter Name',
|
|
27
|
-
name: 'name',
|
|
28
|
-
type: 'string',
|
|
29
|
-
default: '',
|
|
30
|
-
placeholder: 'email',
|
|
31
|
-
description: 'Name of the parameter (e.g., email, name, count)',
|
|
32
|
-
required: true,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
displayName: 'Description',
|
|
36
|
-
name: 'description',
|
|
37
|
-
type: 'string',
|
|
38
|
-
default: '',
|
|
39
|
-
placeholder: 'User email address',
|
|
40
|
-
description: 'Description of what this parameter represents',
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
displayName: 'Type',
|
|
44
|
-
name: 'type',
|
|
45
|
-
type: 'options',
|
|
46
|
-
options: [
|
|
47
|
-
{
|
|
48
|
-
name: 'String',
|
|
49
|
-
value: 'string',
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
name: 'Number',
|
|
53
|
-
value: 'number',
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
name: 'Boolean',
|
|
57
|
-
value: 'boolean',
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
name: 'JSON',
|
|
61
|
-
value: 'json',
|
|
62
|
-
},
|
|
63
|
-
],
|
|
64
|
-
default: 'string',
|
|
65
|
-
description: 'Data type for this parameter',
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
displayName: 'Required',
|
|
69
|
-
name: 'required',
|
|
70
|
-
type: 'boolean',
|
|
71
|
-
default: true,
|
|
72
|
-
description: 'Whether this parameter is required',
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
displayName: 'Default Value',
|
|
76
|
-
name: 'defaultValue',
|
|
77
|
-
type: 'string',
|
|
78
|
-
default: '',
|
|
79
|
-
placeholder: 'jane.doe@example.com',
|
|
80
|
-
description: 'Default value for this parameter (optional)',
|
|
81
|
-
displayOptions: {
|
|
82
|
-
show: {
|
|
83
|
-
required: [false],
|
|
84
|
-
},
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
displayName: 'Value',
|
|
89
|
-
name: 'value',
|
|
90
|
-
type: 'string',
|
|
91
|
-
default: '',
|
|
92
|
-
placeholder: '{{ $fromAI("email", "User email address", "string") }}',
|
|
93
|
-
description: 'Value for this parameter. Use $fromAI() for AI-determined values.',
|
|
94
|
-
required: true,
|
|
95
|
-
},
|
|
96
|
-
],
|
|
97
|
-
},
|
|
98
|
-
],
|
|
99
|
-
},
|
|
100
|
-
];
|
|
101
|
-
//# sourceMappingURL=toolParameters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolParameters.js","sourceRoot":"","sources":["../../../../../nodes/shared/config/properties/toolParameters.ts"],"names":[],"mappings":";;;AAEa,QAAA,wBAAwB,GAAsB;IAC1D;QACC,WAAW,EAAE,iBAAiB;QAC9B,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,iBAAiB;QACvB,WAAW,EAAE;YACZ,cAAc,EAAE,IAAI;YACpB,QAAQ,EAAE,KAAK;SACf;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,SAAS,EAAE,CAAC,UAAU,CAAC;aACvB;SACD;QACD,WAAW,EAAE,+GAA+G;QAC5H,OAAO,EAAE,EAAE;QACX,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,YAAY;gBACzB,IAAI,EAAE,YAAY;gBAClB,MAAM,EAAE;oBACP;wBACC,WAAW,EAAE,gBAAgB;wBAC7B,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,QAAQ;wBACd,OAAO,EAAE,EAAE;wBACX,WAAW,EAAE,OAAO;wBACpB,WAAW,EAAE,kDAAkD;wBAC/D,QAAQ,EAAE,IAAI;qBACd;oB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|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../../../nodes/shared/config/properties/tools.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAsB,EAGjD,CAAC"}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { IDataObject } from 'n8n-workflow';
|
|
2
|
-
import { VisualEditorProperties } from '../processing/visualEditor';
|
|
3
|
-
export declare function configureResponseFormat(responseFormat: string, outputJsonSchemaDefinition: string, structuredOutputName: string, structuredOutputDescription: string, structuredOutputProperties: VisualEditorProperties[], structuredOutputIsArray: boolean, structuredOutputArrayName: string, structuredOutputArrayDescription: string): IDataObject | undefined;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.configureResponseFormat = configureResponseFormat;
|
|
4
|
-
const visualEditor_1 = require("../processing/visualEditor");
|
|
5
|
-
function configureResponseFormat(responseFormat, outputJsonSchemaDefinition, structuredOutputName, structuredOutputDescription, structuredOutputProperties, structuredOutputIsArray, structuredOutputArrayName, structuredOutputArrayDescription) {
|
|
6
|
-
let response_format;
|
|
7
|
-
if (responseFormat === 'structuredOutputSchema') {
|
|
8
|
-
response_format = { type: 'json_schema', json_schema: JSON.parse(outputJsonSchemaDefinition) };
|
|
9
|
-
}
|
|
10
|
-
else if (responseFormat === 'structuredOutputVisual') {
|
|
11
|
-
response_format = {
|
|
12
|
-
type: 'json_schema',
|
|
13
|
-
json_schema: {
|
|
14
|
-
name: structuredOutputName,
|
|
15
|
-
...(structuredOutputDescription.trim() && { description: structuredOutputDescription }),
|
|
16
|
-
schema: (0, visualEditor_1.convertVisualEditorToSchema)(structuredOutputProperties, structuredOutputIsArray, structuredOutputArrayName, structuredOutputArrayDescription),
|
|
17
|
-
strict: true,
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
else if (responseFormat === 'jsonMode') {
|
|
22
|
-
response_format = { type: 'json_object' };
|
|
23
|
-
}
|
|
24
|
-
return response_format;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=responseConfig.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"responseConfig.js","sourceRoot":"","sources":["../../../../nodes/shared/config/responseConfig.ts"],"names":[],"mappings":";;AAMA,0DAiCC;AAtCD,6DAAiG;AAKjG,SAAgB,uBAAuB,CACtC,cAAsB,EACtB,0BAAkC,EAClC,oBAA4B,EAC5B,2BAAmC,EACnC,0BAAoD,EACpD,uBAAgC,EAChC,yBAAiC,EACjC,gCAAwC;IAExC,IAAI,eAAe,CAAC;IACpB,IAAI,cAAc,KAAK,wBAAwB,EAAE,CAAC;QACjD,eAAe,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC;IAChG,CAAC;SAAM,IAAI,cAAc,KAAK,wBAAwB,EAAE,CAAC;QACxD,eAAe,GAAG;YACjB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE;gBACZ,IAAI,EAAE,oBAAoB;gBAC1B,GAAG,CAAC,2BAA2B,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;gBACvF,MAAM,EAAE,IAAA,0CAA2B,EAClC,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,gCAAgC,CAChC;gBACD,MAAM,EAAE,IAAI;aACZ;SACD,CAAC;IACH,CAAC;SAAM,IAAI,cAAc,KAAK,UAAU,EAAE,CAAC;QAC1C,eAAe,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC3C,CAAC;IAED,OAAO,eAAe,CAAC;AACxB,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLastKMessages = getLastKMessages;
|
|
4
|
-
async function getLastKMessages(memory, k) {
|
|
5
|
-
if (!(memory === null || memory === void 0 ? void 0 : memory.chatHistory)) {
|
|
6
|
-
return [];
|
|
7
|
-
}
|
|
8
|
-
if (k === 0) {
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
if (k === -1) {
|
|
12
|
-
return await memory.chatHistory.getMessages();
|
|
13
|
-
}
|
|
14
|
-
if (k > 0) {
|
|
15
|
-
const chatHistory = memory.chatHistory;
|
|
16
|
-
if (typeof chatHistory.getMessagesSlice === 'function') {
|
|
17
|
-
return await chatHistory.getMessagesSlice(-k);
|
|
18
|
-
}
|
|
19
|
-
else if (typeof chatHistory.getLastMessages === 'function') {
|
|
20
|
-
return await chatHistory.getLastMessages(k);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
const allMessages = await memory.chatHistory.getMessages();
|
|
24
|
-
const validK = Math.min(Math.max(k, 1), allMessages.length);
|
|
25
|
-
return allMessages.slice(-validK);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=optimizer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"optimizer.js","sourceRoot":"","sources":["../../../../../nodes/shared/core/memory/optimizer.ts"],"names":[],"mappings":";;AAOA,4CAwCC;AAxCM,KAAK,UAAU,gBAAgB,CAAC,MAAsB,EAAE,CAAS;IACvE,IAAI,CAAC,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,WAAW,CAAA,EAAE,CAAC;QAC1B,OAAO,EAAE,CAAC;IACX,CAAC;IAGD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;IACX,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAEd,OAAO,MAAM,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;IAC/C,CAAC;IAGD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAGX,MAAM,WAAW,GAAG,MAAM,CAAC,WAAkB,CAAC;QAG9C,IAAI,OAAO,WAAW,CAAC,gBAAgB,KAAK,UAAU,EAAE,CAAC;YAExD,OAAO,MAAM,WAAW,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/C,CAAC;aAAM,IAAI,OAAO,WAAW,CAAC,eAAe,KAAK,UAAU,EAAE,CAAC;YAE9D,OAAO,MAAM,WAAW,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YAGP,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;YAG3D,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;YAC5D,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;QACnC,CAAC;IACF,CAAC;IAED,OAAO,EAAE,CAAC;AACX,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../../../../nodes/shared/core/memory/properties.ts"],"names":[],"mappings":";;;AAEa,QAAA,gBAAgB,GAAsB,EAGlD,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.supplyMemoryData = supplyMemoryData;
|
|
4
|
-
async function getMemoryFromSupplyInput(supplyFunctions) {
|
|
5
|
-
let memoryInput;
|
|
6
|
-
try {
|
|
7
|
-
memoryInput = (await supplyFunctions.getInputConnectionData('ai_memory', 0, undefined));
|
|
8
|
-
}
|
|
9
|
-
catch (error) {
|
|
10
|
-
memoryInput = undefined;
|
|
11
|
-
}
|
|
12
|
-
return Array.isArray(memoryInput) ? memoryInput[0] : memoryInput;
|
|
13
|
-
}
|
|
14
|
-
async function supplyMemoryData(itemIndex) {
|
|
15
|
-
try {
|
|
16
|
-
const memory = await getMemoryFromSupplyInput(this);
|
|
17
|
-
if (!memory || !memory.chatHistory) {
|
|
18
|
-
return {
|
|
19
|
-
response: [],
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
const messages = await memory.chatHistory.getMessages();
|
|
23
|
-
if (messages.length === 0) {
|
|
24
|
-
return {
|
|
25
|
-
response: [],
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
const formattedMessages = messages.map((message, index) => {
|
|
29
|
-
const messageData = {
|
|
30
|
-
id: index,
|
|
31
|
-
role: message._getType() === 'human' ? 'user' : 'assistant',
|
|
32
|
-
content: message.content,
|
|
33
|
-
};
|
|
34
|
-
if (message.additional_kwargs && Object.keys(message.additional_kwargs).length > 0) {
|
|
35
|
-
messageData.additional_kwargs = message.additional_kwargs;
|
|
36
|
-
}
|
|
37
|
-
if (message.tool_calls && Array.isArray(message.tool_calls)) {
|
|
38
|
-
messageData.tool_calls = message.tool_calls;
|
|
39
|
-
}
|
|
40
|
-
return messageData;
|
|
41
|
-
});
|
|
42
|
-
return {
|
|
43
|
-
response: formattedMessages,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
catch (error) {
|
|
47
|
-
console.error('Error supplying memory data:', error);
|
|
48
|
-
return {
|
|
49
|
-
response: [],
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=supplier.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"supplier.js","sourceRoot":"","sources":["../../../../../nodes/shared/core/memory/supplier.ts"],"names":[],"mappings":";;AA2BA,4CAqDC;AA1ED,KAAK,UAAU,wBAAwB,CACtC,eAAqC;IAErC,IAAI,WAA0D,CAAC;IAC/D,IAAI,CAAC;QACJ,WAAW,GAAG,CAAC,MAAM,eAAe,CAAC,sBAAsB,CAAC,WAAW,EAAE,CAAC,EAAE,SAAS,C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,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC/E,WAAW,CAAC,UAAU,GAAI,OAAe,CAAC,UAAU,CAAC;YACtD,CAAC;YAED,OAAO,WAAW,CAAC;QACpB,CAAC,CAAC,CAAC;QAEH,OAAO;YACN,QAAQ,EAAE,iBAAiB;SAC3B,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;QACrD,OAAO;YACN,QAAQ,EAAE,EAAE;SACZ,CAAC;IACH,CAAC;AACF,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLastKMessages = getLastKMessages;
|
|
4
|
-
async function getLastKMessages(memory, k) {
|
|
5
|
-
if (!(memory === null || memory === void 0 ? void 0 : memory.chatHistory)) {
|
|
6
|
-
return [];
|
|
7
|
-
}
|
|
8
|
-
if (k === 0) {
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
if (k === -1) {
|
|
12
|
-
return await memory.chatHistory.getMessages();
|
|
13
|
-
}
|
|
14
|
-
if (k > 0) {
|
|
15
|
-
const chatHistory = memory.chatHistory;
|
|
16
|
-
if (typeof chatHistory.getMessagesSlice === 'function') {
|
|
17
|
-
return await chatHistory.getMessagesSlice(-k);
|
|
18
|
-
}
|
|
19
|
-
else if (typeof chatHistory.getLastMessages === 'function') {
|
|
20
|
-
return await chatHistory.getLastMessages(k);
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
const allMessages = await memory.chatHistory.getMessages();
|
|
24
|
-
const validK = Math.min(Math.max(k, 1), allMessages.length);
|
|
25
|
-
return allMessages.slice(-validK);
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return [];
|
|
29
|
-
}
|
|
30
|
-
//# sourceMappingURL=memoryOptimizer.js.map
|
|
@@ -1 +0,0 @@
|
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|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.extractToolMessages = extractToolMessages;
|
|
4
|
-
function extractToolMessages(messagesFromRequestBody) {
|
|
5
|
-
const toolMessagesFromRequestBody = messagesFromRequestBody.filter((msg) => msg.role === 'tool');
|
|
6
|
-
const processedToolMessages = [];
|
|
7
|
-
for (const message of messagesFromRequestBody) {
|
|
8
|
-
if (message.role === 'assistant' && message.tool_calls && message.tool_calls.length > 0) {
|
|
9
|
-
for (const toolCall of message.tool_calls) {
|
|
10
|
-
const toolName = toolCall.function.name;
|
|
11
|
-
let toolInput = JSON.parse(toolCall.function.arguments);
|
|
12
|
-
if (toolInput.input && Object.entries(toolInput).length === 1) {
|
|
13
|
-
toolInput = toolInput.input;
|
|
14
|
-
}
|
|
15
|
-
const toolMessage = toolMessagesFromRequestBody.find((toolMsg) => toolMsg.tool_call_id === toolCall.id);
|
|
16
|
-
if (toolMessage) {
|
|
17
|
-
processedToolMessages.push({
|
|
18
|
-
tool: toolName,
|
|
19
|
-
input: toolInput,
|
|
20
|
-
output: toolMessage.content,
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return processedToolMessages;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=toolExtractor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toolExtractor.js","sourceRoot":"","sources":["../../../../../nodes/shared/core/messages/toolExtractor.ts"],"names":[],"mappings":";;AAOA,kDAiCC;AAjCD,SAAgB,mBAAmB,CAClC,uBAAkC;IAElC,MAAM,2BAA2B,GAAG,uBAAuB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,MAAM,CAAC,CAAC;IACjG,MAAM,qBAAqB,GAAsD,EAAE,CAAC;IAEpF,KAAK,MAAM,OAAO,IAAI,uBAAuB,EAAE,CAAC;QAC/C,IAAI,OAAO,CAAC,IAAI,KAAK,WAAW,IAAI,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzF,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;gBAC3C,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACxC,IAAI,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;gBAGxD,IAAI,SAAS,CAAC,KAAK,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;oBAC/D,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC;gBAC7B,CAAC;gBAED,MAAM,WAAW,GAAG,2BAA2B,CAAC,IAAI,CACnD,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,KAAK,QAAQ,CAAC,EAAE,CACjD,CAAC;gBAEF,IAAI,WAAW,EAAE,CAAC;oBACjB,qBAAqB,CAAC,IAAI,CAAC;wBAC1B,IAAI,EAAE,QAAQ;wBACd,KAAK,EAAE,SAAS;wBAChB,MAAM,EAAE,WAAW,CAAC,OAAQ;qBAC5B,CAAC,CAAC;gBACJ,CAAC;YACF,CAAC;QACF,CAAC;IACF,CAAC;IAED,OAAO,qBAAqB,CAAC;AAC9B,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { IExecuteFunctions, INodeExecutionData, IDataObject } from 'n8n-workflow';
|
|
2
|
-
import type { ChatCompletion } from '../../api/types';
|
|
3
|
-
export declare function prepareOutputData(response: ChatCompletion, output: any, messages: IDataObject[], originalMessagesLength: number, addToOutput: string[], agentType: string, executeFunctions: IExecuteFunctions, index: number, body: IDataObject, model: string, parentMessageContentStr: string): Promise<INodeExecutionData[]>;
|
|
4
|
-
export declare function addModelOverview(executeFunctions: IExecuteFunctions, model: string, outputData: INodeExecutionData[]): Promise<void>;
|
|
5
|
-
export declare function reorderOutputFields(outputData: INodeExecutionData[]): void;
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.prepareOutputData = prepareOutputData;
|
|
4
|
-
exports.addModelOverview = addModelOverview;
|
|
5
|
-
exports.reorderOutputFields = reorderOutputFields;
|
|
6
|
-
const messageExtractor_1 = require("../tools/messageExtractor");
|
|
7
|
-
async function prepareOutputData(response, output, messages, originalMessagesLength, addToOutput, agentType, executeFunctions, index, body, model, parentMessageContentStr) {
|
|
8
|
-
const outputData = [];
|
|
9
|
-
if (agentType == 'subAgent' && parentMessageContentStr !== '') {
|
|
10
|
-
outputData.push({
|
|
11
|
-
json: { response: response },
|
|
12
|
-
pairedItem: { item: 0 },
|
|
13
|
-
});
|
|
14
|
-
return outputData;
|
|
15
|
-
}
|
|
16
|
-
if (body.response_format) {
|
|
17
|
-
response.choices = response.choices.map((choice) => {
|
|
18
|
-
try {
|
|
19
|
-
choice.message.content = JSON.parse(choice.message.content);
|
|
20
|
-
}
|
|
21
|
-
catch (error) { }
|
|
22
|
-
return choice;
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
output = output ? output : response.choices[0].message.content;
|
|
26
|
-
var outputStringified = typeof output === 'string' ? output : JSON.stringify(output);
|
|
27
|
-
outputData.push({ json: { output: output }, pairedItem: { item: index } });
|
|
28
|
-
if (addToOutput.includes('fullResponse') || agentType === 'subAgent') {
|
|
29
|
-
outputData.forEach((item) => {
|
|
30
|
-
item.json.response = response;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
const newMessages = messages.slice(originalMessagesLength);
|
|
34
|
-
if (addToOutput.includes('tool_calls')) {
|
|
35
|
-
outputData.forEach((item) => {
|
|
36
|
-
item.json.tool_calls = (0, messageExtractor_1.extractToolMessages)(newMessages);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
if (addToOutput.includes('chatHistory')) {
|
|
40
|
-
const includeToolCallsInChatHistory = executeFunctions.getNodeParameter('includeToolCallsInChatHistory', index, true);
|
|
41
|
-
const includeSystemMessagesInChatHistory = executeFunctions.getNodeParameter('includeSystemMessagesInChatHistory', index, true);
|
|
42
|
-
let chatHistoryMessages = structuredClone(messages);
|
|
43
|
-
if (!includeToolCallsInChatHistory) {
|
|
44
|
-
chatHistoryMessages = chatHistoryMessages
|
|
45
|
-
.filter((msg) => msg.content !== null && msg.role !== 'tool')
|
|
46
|
-
.map(({ role, content }) => ({ role, content }));
|
|
47
|
-
}
|
|
48
|
-
if (!includeSystemMessagesInChatHistory) {
|
|
49
|
-
chatHistoryMessages = chatHistoryMessages.filter((msg) => msg.role !== 'system');
|
|
50
|
-
}
|
|
51
|
-
const finalMessage = response === null || response === void 0 ? void 0 : response.choices[0].message;
|
|
52
|
-
if (finalMessage) {
|
|
53
|
-
let rootMessage = {
|
|
54
|
-
role: finalMessage.role,
|
|
55
|
-
content: outputStringified,
|
|
56
|
-
};
|
|
57
|
-
chatHistoryMessages.push(rootMessage);
|
|
58
|
-
}
|
|
59
|
-
for (const msg of chatHistoryMessages) {
|
|
60
|
-
if (msg.role === 'assistant') {
|
|
61
|
-
delete msg.reasoning_details;
|
|
62
|
-
delete msg.reasoning;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
outputData.forEach((item) => {
|
|
66
|
-
item.json.chat_history = chatHistoryMessages;
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
if (addToOutput.includes('request')) {
|
|
70
|
-
outputData.forEach((item) => {
|
|
71
|
-
item.json.request = body;
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
if (addToOutput.includes('modelOverview') && model.includes('/')) {
|
|
75
|
-
await addModelOverview(executeFunctions, model, outputData);
|
|
76
|
-
}
|
|
77
|
-
reorderOutputFields(outputData);
|
|
78
|
-
return outputData;
|
|
79
|
-
}
|
|
80
|
-
async function addModelOverview(executeFunctions, model, outputData) {
|
|
81
|
-
const requestOptions = {
|
|
82
|
-
method: 'GET',
|
|
83
|
-
url: `https://openrouter.ai/api/v1/models/${model}/endpoints`,
|
|
84
|
-
};
|
|
85
|
-
for (const item of outputData) {
|
|
86
|
-
try {
|
|
87
|
-
const modelOverviewResponse = await executeFunctions.helpers.httpRequest(requestOptions);
|
|
88
|
-
item.json.model_overview = modelOverviewResponse;
|
|
89
|
-
}
|
|
90
|
-
catch (error) {
|
|
91
|
-
console.error('Error fetching model endpoints:', error);
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
function reorderOutputFields(outputData) {
|
|
96
|
-
outputData.forEach((item) => {
|
|
97
|
-
const reordered = {
|
|
98
|
-
output: item.json.output,
|
|
99
|
-
request: item.json.request,
|
|
100
|
-
tool_calls: item.json.tool_calls,
|
|
101
|
-
response: item.json.response,
|
|
102
|
-
chat_history: item.json.chat_history,
|
|
103
|
-
model_overview: item.json.model_overview,
|
|
104
|
-
};
|
|
105
|
-
item.json = Object.fromEntries(Object.entries(reordered).filter(([_, value]) => value !== undefined));
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
//# sourceMappingURL=processor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"processor.js","sourceRoot":"","sources":["../../../../../nodes/shared/core/output/processor.ts"],"names":[],"mappings":";;AAcA,8CA2HC;AAKD,4CAkBC;AAKD,kDAgBC;AA7KD,gEAAgE;AAMzD,KAAK,UAAU,iBAAiB,CACtC,QAAwB,EACxB,MAAW,EACX,QAAuB,EACvB,sBAA8B,EAC9B,WAAqB,EACrB,SAAiB,EACjB,gBAAmC,EACnC,KAAa,EACb,IAAiB,EACjB,KAAa,EACb,uBAA+B;IAE/B,MAAM,UAAU,GAAyB,EAAE,CAAC;IAG5C,IAAI,SAAS,IAAI,UAAU,IAAI,uBAAuB,KAAK,EAAE,EAAE,CAAC;QAC/D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,MAAM,qBAAqB,GAAG,MAAM,gBAAgB,CAAC,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;YACzF,IAAI,CAAC,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC;QAClD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YAChB,OAAO,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACzD,CAAC;IACF,CAAC;AACF,CAAC;AAKD,SAAgB,mBAAmB,CAAC,UAAgC;IACnE,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QAC3B,MAAM,SAAS,GAAG;YACjB,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,MAAM;YACxB,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO;YAC1B,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,UAAU;YAChC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,QAAQ;YAC5B,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,YAAY;YACpC,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc;SACxC,CAAC;QAGF,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,WAAW,CAC7B,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CACrE,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import type { IDataObject } from 'n8n-workflow';
|
|
2
|
-
export declare function prepareRequestBody(model: string, messages: IDataObject[], tools: any[], tool_choice: string | undefined, response_format: IDataObject | undefined, options: IDataObject, customParameters: string | IDataObject): IDataObject;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.prepareRequestBody = prepareRequestBody;
|
|
7
|
-
const omit_1 = __importDefault(require("lodash/omit"));
|
|
8
|
-
const types_1 = require("../messages/types");
|
|
9
|
-
function prepareRequestBody(model, messages, tools, tool_choice, response_format, options, customParameters) {
|
|
10
|
-
let customParamsObj = {};
|
|
11
|
-
if (customParameters) {
|
|
12
|
-
if (typeof customParameters === 'string' && customParameters.trim()) {
|
|
13
|
-
try {
|
|
14
|
-
customParamsObj = JSON.parse(customParameters);
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
throw new Error('Invalid JSON in customParameters');
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
else if (typeof customParameters !== 'string') {
|
|
21
|
-
customParamsObj = customParameters;
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
const cleanOptions = (0, omit_1.default)(options, [
|
|
25
|
-
'customParameters',
|
|
26
|
-
'fallbackModelId',
|
|
27
|
-
'maxToolsIterations',
|
|
28
|
-
]);
|
|
29
|
-
const body = {
|
|
30
|
-
model,
|
|
31
|
-
messages,
|
|
32
|
-
...(tools.length > 0 ? { tools } : {}),
|
|
33
|
-
tool_choice,
|
|
34
|
-
response_format,
|
|
35
|
-
...cleanOptions,
|
|
36
|
-
...customParamsObj,
|
|
37
|
-
};
|
|
38
|
-
if (!Array.isArray(messages) || !messages.every(types_1.isValidMessage)) {
|
|
39
|
-
throw new Error("Invalid or missing 'messages' in the request body.");
|
|
40
|
-
}
|
|
41
|
-
return body;
|
|
42
|
-
}
|
|
43
|
-
//# sourceMappingURL=builder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../../../../../nodes/shared/core/request/builder.ts"],"names":[],"mappings":";;;;;AAOA,gDA6CC;AAnDD,uDAAgC;AAChC,6CAAmD;AAKnD,SAAgB,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|
3
|
-
export declare function configureResponseFormat(responseFormat: string, outputJsonSchemaDefinition: string, structuredOutputName: string, structuredOutputDescription: string, structuredOutputProperties: VisualEditorProperties[], structuredOutputIsArray: boolean, structuredOutputArrayName: string, structuredOutputArrayDescription: string): IDataObject | undefined;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.configureResponseFormat = configureResponseFormat;
|
|
4
|
-
const visualEditor_1 = require("../schema/visualEditor");
|
|
5
|
-
function configureResponseFormat(responseFormat, outputJsonSchemaDefinition, structuredOutputName, structuredOutputDescription, structuredOutputProperties, structuredOutputIsArray, structuredOutputArrayName, structuredOutputArrayDescription) {
|
|
6
|
-
let response_format;
|
|
7
|
-
if (responseFormat === 'structuredOutputSchema') {
|
|
8
|
-
response_format = { type: 'json_schema', json_schema: JSON.parse(outputJsonSchemaDefinition) };
|
|
9
|
-
}
|
|
10
|
-
else if (responseFormat === 'structuredOutputVisual') {
|
|
11
|
-
response_format = {
|
|
12
|
-
type: 'json_schema',
|
|
13
|
-
json_schema: {
|
|
14
|
-
name: structuredOutputName,
|
|
15
|
-
...(structuredOutputDescription.trim() && { description: structuredOutputDescription }),
|
|
16
|
-
schema: (0, visualEditor_1.convertVisualEditorToSchema)(structuredOutputProperties, structuredOutputIsArray, structuredOutputArrayName, structuredOutputArrayDescription),
|
|
17
|
-
strict: true,
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
else if (responseFormat === 'jsonMode') {
|
|
22
|
-
response_format = { type: 'json_object' };
|
|
23
|
-
}
|
|
24
|
-
return response_format;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=config.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../../nodes/shared/core/response/config.ts"],"names":[],"mappings":";;AAMA,0DAiCC;AAtCD,yDAA6F;AAK7F,SAAgB,uBAAuB,CACtC,cAAsB,EACtB,0BAAkC,EAClC,oBAA4B,EAC5B,2BAAmC,EACnC,0BAAoD,EACpD,uBAAgC,EAChC,yBAAiC,EACjC,gCAAwC;IAExC,IAAI,eAAe,CAAC;IACpB,IAAI,cAAc,KAAK,wBAAwB,EAAE,CAAC;QACjD,eAAe,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,0BAA0B,CAAC,EAAE,CAAC;IAChG,CAAC;SAAM,IAAI,cAAc,KAAK,wBAAwB,EAAE,CAAC;QACxD,eAAe,GAAG;YACjB,IAAI,EAAE,aAAa;YACnB,WAAW,EAAE;gBACZ,IAAI,EAAE,oBAAoB;gBAC1B,GAAG,CAAC,2BAA2B,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,2BAA2B,EAAE,CAAC;gBACvF,MAAM,EAAE,IAAA,0CAA2B,EAClC,0BAA0B,EAC1B,uBAAuB,EACvB,yBAAyB,EACzB,gCAAgC,CAChC;gBACD,MAAM,EAAE,IAAI;aACZ;SACD,CAAC;IACH,CAAC;SAAM,IAAI,cAAc,KAAK,UAAU,EAAE,CAAC;QAC1C,eAAe,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC;IAC3C,CAAC;IAED,OAAO,eAAe,CAAC;AACxB,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export type VisualEditorProperties = {
|
|
2
|
-
name: string;
|
|
3
|
-
type: string;
|
|
4
|
-
description: string;
|
|
5
|
-
isEnum: boolean;
|
|
6
|
-
enumValues?: string[];
|
|
7
|
-
elementDescription?: string;
|
|
8
|
-
isOptional: boolean;
|
|
9
|
-
};
|
|
10
|
-
type SchemaProperty = {
|
|
11
|
-
name?: string;
|
|
12
|
-
type?: string | string[];
|
|
13
|
-
enum?: string[];
|
|
14
|
-
description?: string;
|
|
15
|
-
items?: SchemaProperty | RefProperty;
|
|
16
|
-
properties?: Record<string, SchemaProperty>;
|
|
17
|
-
$ref?: string;
|
|
18
|
-
required?: string[];
|
|
19
|
-
additionalProperties?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type RefProperty = {
|
|
22
|
-
$ref: string;
|
|
23
|
-
};
|
|
24
|
-
type Schema = {
|
|
25
|
-
type: 'object';
|
|
26
|
-
properties: Record<string, SchemaProperty>;
|
|
27
|
-
required: string[];
|
|
28
|
-
additionalProperties: false;
|
|
29
|
-
$defs?: Record<string, Schema>;
|
|
30
|
-
};
|
|
31
|
-
export declare function convertVisualEditorToSchema(visualEditorProperties: VisualEditorProperties[], structuredOutputIsArray?: boolean, structuredOutputArrayName?: string, structuredOutputArrayDescription?: string): Schema;
|
|
32
|
-
export {};
|