@atom8n/n8n-nodes-langchain 2.5.5 → 2.5.6
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/credentials/NineRouterApi.credentials.js +67 -0
- package/dist/credentials/NineRouterApi.credentials.js.map +1 -0
- package/dist/known/credentials.json +7 -0
- package/dist/known/nodes.json +4 -0
- package/dist/nodes/llms/LmChat9Router/9router.dark.svg +10 -0
- package/dist/nodes/llms/LmChat9Router/9router.svg +10 -0
- package/dist/nodes/llms/LmChat9Router/LmChat9Router.node.js +248 -0
- package/dist/nodes/llms/LmChat9Router/LmChat9Router.node.js.map +1 -0
- package/dist/nodes/llms/LmChatCursorAgent/LmChatCursorAgent.node.js +90 -9
- package/dist/nodes/llms/LmChatCursorAgent/LmChatCursorAgent.node.js.map +1 -1
- package/dist/types/credentials.json +1 -0
- package/dist/types/nodes.json +2 -1
- package/package.json +13 -11
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var NineRouterApi_credentials_exports = {};
|
|
20
|
+
__export(NineRouterApi_credentials_exports, {
|
|
21
|
+
NineRouterApi: () => NineRouterApi
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(NineRouterApi_credentials_exports);
|
|
24
|
+
class NineRouterApi {
|
|
25
|
+
constructor() {
|
|
26
|
+
this.name = "nineRouterApi";
|
|
27
|
+
this.displayName = "9Router";
|
|
28
|
+
this.documentationUrl = "nineRouter";
|
|
29
|
+
this.properties = [
|
|
30
|
+
{
|
|
31
|
+
displayName: "API Key",
|
|
32
|
+
name: "apiKey",
|
|
33
|
+
type: "string",
|
|
34
|
+
typeOptions: { password: true },
|
|
35
|
+
required: false,
|
|
36
|
+
default: "",
|
|
37
|
+
description: "Optional API key if REQUIRE_API_KEY is enabled on your 9Router instance"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
displayName: "Base URL",
|
|
41
|
+
name: "url",
|
|
42
|
+
type: "string",
|
|
43
|
+
default: "http://localhost:20128/api/v1",
|
|
44
|
+
description: "Base URL of your 9Router instance"
|
|
45
|
+
}
|
|
46
|
+
];
|
|
47
|
+
this.authenticate = {
|
|
48
|
+
type: "generic",
|
|
49
|
+
properties: {
|
|
50
|
+
headers: {
|
|
51
|
+
Authorization: "=Bearer {{$credentials.apiKey}}"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
this.test = {
|
|
56
|
+
request: {
|
|
57
|
+
baseURL: "={{ $credentials.url }}",
|
|
58
|
+
url: "/models"
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
64
|
+
0 && (module.exports = {
|
|
65
|
+
NineRouterApi
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=NineRouterApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../credentials/NineRouterApi.credentials.ts"],"sourcesContent":["import type {\n\tIAuthenticateGeneric,\n\tICredentialTestRequest,\n\tICredentialType,\n\tINodeProperties,\n} from 'n8n-workflow';\n\nexport class NineRouterApi implements ICredentialType {\n\tname = 'nineRouterApi';\n\n\tdisplayName = '9Router';\n\n\tdocumentationUrl = 'nineRouter';\n\n\tproperties: INodeProperties[] = [\n\t\t{\n\t\t\tdisplayName: 'API Key',\n\t\t\tname: 'apiKey',\n\t\t\ttype: 'string',\n\t\t\ttypeOptions: { password: true },\n\t\t\trequired: false,\n\t\t\tdefault: '',\n\t\t\tdescription: 'Optional API key if REQUIRE_API_KEY is enabled on your 9Router instance',\n\t\t},\n\t\t{\n\t\t\tdisplayName: 'Base URL',\n\t\t\tname: 'url',\n\t\t\ttype: 'string',\n\t\t\tdefault: 'http://localhost:20128/api/v1',\n\t\t\tdescription: 'Base URL of your 9Router instance',\n\t\t},\n\t];\n\n\tauthenticate: IAuthenticateGeneric = {\n\t\ttype: 'generic',\n\t\tproperties: {\n\t\t\theaders: {\n\t\t\t\tAuthorization: '=Bearer {{$credentials.apiKey}}',\n\t\t\t},\n\t\t},\n\t};\n\n\ttest: ICredentialTestRequest = {\n\t\trequest: {\n\t\t\tbaseURL: '={{ $credentials.url }}',\n\t\t\turl: '/models',\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOO,MAAM,cAAyC;AAAA,EAA/C;AACN,gBAAO;AAEP,uBAAc;AAEd,4BAAmB;AAEnB,sBAAgC;AAAA,MAC/B;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,aAAa,EAAE,UAAU,KAAK;AAAA,QAC9B,UAAU;AAAA,QACV,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,MACA;AAAA,QACC,aAAa;AAAA,QACb,MAAM;AAAA,QACN,MAAM;AAAA,QACN,SAAS;AAAA,QACT,aAAa;AAAA,MACd;AAAA,IACD;AAEA,wBAAqC;AAAA,MACpC,MAAM;AAAA,MACN,YAAY;AAAA,QACX,SAAS;AAAA,UACR,eAAe;AAAA,QAChB;AAAA,MACD;AAAA,IACD;AAEA,gBAA+B;AAAA,MAC9B,SAAS;AAAA,QACR,SAAS;AAAA,QACT,KAAK;AAAA,MACN;AAAA,IACD;AAAA;AACD;","names":[]}
|
|
@@ -125,6 +125,13 @@
|
|
|
125
125
|
"lmOllama"
|
|
126
126
|
]
|
|
127
127
|
},
|
|
128
|
+
"nineRouterApi": {
|
|
129
|
+
"className": "NineRouterApi",
|
|
130
|
+
"sourcePath": "dist/credentials/NineRouterApi.credentials.js",
|
|
131
|
+
"supportedNodes": [
|
|
132
|
+
"lmChat9Router"
|
|
133
|
+
]
|
|
134
|
+
},
|
|
128
135
|
"openRouterApi": {
|
|
129
136
|
"className": "OpenRouterApi",
|
|
130
137
|
"sourcePath": "dist/credentials/OpenRouterApi.credentials.js",
|
package/dist/known/nodes.json
CHANGED
|
@@ -159,6 +159,10 @@
|
|
|
159
159
|
"className": "LmChatOllama",
|
|
160
160
|
"sourcePath": "dist/nodes/llms/LMChatOllama/LmChatOllama.node.js"
|
|
161
161
|
},
|
|
162
|
+
"lmChat9Router": {
|
|
163
|
+
"className": "LmChat9Router",
|
|
164
|
+
"sourcePath": "dist/nodes/llms/LmChat9Router/LmChat9Router.node.js"
|
|
165
|
+
},
|
|
162
166
|
"lmChatOpenRouter": {
|
|
163
167
|
"className": "LmChatOpenRouter",
|
|
164
168
|
"sourcePath": "dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js"
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="40" height="40" rx="8" fill="url(#gradient_dark)"/>
|
|
3
|
+
<text x="20" y="30" font-family="system-ui, -apple-system, sans-serif" font-size="26" font-weight="700" fill="white" text-anchor="middle">9</text>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="gradient_dark" x1="0" y1="0" x2="40" y2="40" gradientUnits="userSpaceOnUse">
|
|
6
|
+
<stop stop-color="#fb923c"/>
|
|
7
|
+
<stop offset="1" stop-color="#ea6a12"/>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
</defs>
|
|
10
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<rect width="40" height="40" rx="8" fill="url(#gradient_light)"/>
|
|
3
|
+
<text x="20" y="30" font-family="system-ui, -apple-system, sans-serif" font-size="26" font-weight="700" fill="white" text-anchor="middle">9</text>
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="gradient_light" x1="0" y1="0" x2="40" y2="40" gradientUnits="userSpaceOnUse">
|
|
6
|
+
<stop stop-color="#f97815"/>
|
|
7
|
+
<stop offset="1" stop-color="#c2590a"/>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
</defs>
|
|
10
|
+
</svg>
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var LmChat9Router_node_exports = {};
|
|
20
|
+
__export(LmChat9Router_node_exports, {
|
|
21
|
+
LmChat9Router: () => LmChat9Router
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(LmChat9Router_node_exports);
|
|
24
|
+
var import_openai = require("@langchain/openai");
|
|
25
|
+
var import_n8n_workflow = require("n8n-workflow");
|
|
26
|
+
var import_httpProxyAgent = require("../../../utils/httpProxyAgent");
|
|
27
|
+
var import_sharedFields = require("../../../utils/sharedFields");
|
|
28
|
+
var import_error_handling = require("../../vendors/OpenAi/helpers/error-handling");
|
|
29
|
+
var import_n8nLlmFailedAttemptHandler = require("../n8nLlmFailedAttemptHandler");
|
|
30
|
+
var import_N8nLlmTracing = require("../N8nLlmTracing");
|
|
31
|
+
class LmChat9Router {
|
|
32
|
+
constructor() {
|
|
33
|
+
this.description = {
|
|
34
|
+
displayName: "9Router Chat Model",
|
|
35
|
+
name: "lmChat9Router",
|
|
36
|
+
icon: { light: "file:9router.svg", dark: "file:9router.dark.svg" },
|
|
37
|
+
group: ["transform"],
|
|
38
|
+
version: [1],
|
|
39
|
+
description: "For advanced usage with an AI chain",
|
|
40
|
+
defaults: {
|
|
41
|
+
name: "9Router Chat Model"
|
|
42
|
+
},
|
|
43
|
+
codex: {
|
|
44
|
+
categories: ["AI"],
|
|
45
|
+
subcategories: {
|
|
46
|
+
AI: ["Language Models", "Root Nodes"],
|
|
47
|
+
"Language Models": ["Chat Models (Recommended)"]
|
|
48
|
+
},
|
|
49
|
+
resources: {
|
|
50
|
+
primaryDocumentation: [
|
|
51
|
+
{
|
|
52
|
+
url: "https://github.com/9router/9router"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
inputs: [],
|
|
58
|
+
outputs: [import_n8n_workflow.NodeConnectionTypes.AiLanguageModel],
|
|
59
|
+
outputNames: ["Model"],
|
|
60
|
+
credentials: [
|
|
61
|
+
{
|
|
62
|
+
name: "nineRouterApi",
|
|
63
|
+
required: true
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
requestDefaults: {
|
|
67
|
+
ignoreHttpStatusErrors: true,
|
|
68
|
+
baseURL: "={{ $credentials?.url }}"
|
|
69
|
+
},
|
|
70
|
+
properties: [
|
|
71
|
+
(0, import_sharedFields.getConnectionHintNoticeField)([import_n8n_workflow.NodeConnectionTypes.AiChain, import_n8n_workflow.NodeConnectionTypes.AiAgent]),
|
|
72
|
+
{
|
|
73
|
+
displayName: 'If using JSON response format, you must include word "json" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.',
|
|
74
|
+
name: "notice",
|
|
75
|
+
type: "notice",
|
|
76
|
+
default: "",
|
|
77
|
+
displayOptions: {
|
|
78
|
+
show: {
|
|
79
|
+
"/options.responseFormat": ["json_object"]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
displayName: "Model",
|
|
85
|
+
name: "model",
|
|
86
|
+
type: "options",
|
|
87
|
+
description: 'The model which will generate the completion. <a href="http://localhost:20128">Learn more</a>.',
|
|
88
|
+
typeOptions: {
|
|
89
|
+
loadOptions: {
|
|
90
|
+
routing: {
|
|
91
|
+
request: {
|
|
92
|
+
method: "GET",
|
|
93
|
+
url: "/models"
|
|
94
|
+
},
|
|
95
|
+
output: {
|
|
96
|
+
postReceive: [
|
|
97
|
+
{
|
|
98
|
+
type: "rootProperty",
|
|
99
|
+
properties: {
|
|
100
|
+
property: "data"
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: "setKeyValue",
|
|
105
|
+
properties: {
|
|
106
|
+
name: "={{$responseItem.id}}",
|
|
107
|
+
value: "={{$responseItem.id}}"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
type: "sort",
|
|
112
|
+
properties: {
|
|
113
|
+
key: "name"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
routing: {
|
|
122
|
+
send: {
|
|
123
|
+
type: "body",
|
|
124
|
+
property: "model"
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
default: "openai/gpt-4o"
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
displayName: "Options",
|
|
131
|
+
name: "options",
|
|
132
|
+
placeholder: "Add Option",
|
|
133
|
+
description: "Additional options to add",
|
|
134
|
+
type: "collection",
|
|
135
|
+
default: {},
|
|
136
|
+
options: [
|
|
137
|
+
{
|
|
138
|
+
displayName: "Frequency Penalty",
|
|
139
|
+
name: "frequencyPenalty",
|
|
140
|
+
default: 0,
|
|
141
|
+
typeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },
|
|
142
|
+
description: "Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim",
|
|
143
|
+
type: "number"
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
displayName: "Maximum Number of Tokens",
|
|
147
|
+
name: "maxTokens",
|
|
148
|
+
default: -1,
|
|
149
|
+
description: "The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).",
|
|
150
|
+
type: "number",
|
|
151
|
+
typeOptions: {
|
|
152
|
+
maxValue: 32768
|
|
153
|
+
}
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
displayName: "Response Format",
|
|
157
|
+
name: "responseFormat",
|
|
158
|
+
default: "text",
|
|
159
|
+
type: "options",
|
|
160
|
+
options: [
|
|
161
|
+
{
|
|
162
|
+
name: "Text",
|
|
163
|
+
value: "text",
|
|
164
|
+
description: "Regular text response"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: "JSON",
|
|
168
|
+
value: "json_object",
|
|
169
|
+
description: "Enables JSON mode, which should guarantee the message the model generates is valid JSON"
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
displayName: "Presence Penalty",
|
|
175
|
+
name: "presencePenalty",
|
|
176
|
+
default: 0,
|
|
177
|
+
typeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },
|
|
178
|
+
description: "Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics",
|
|
179
|
+
type: "number"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
displayName: "Sampling Temperature",
|
|
183
|
+
name: "temperature",
|
|
184
|
+
default: 0.7,
|
|
185
|
+
typeOptions: { maxValue: 2, minValue: 0, numberPrecision: 1 },
|
|
186
|
+
description: "Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.",
|
|
187
|
+
type: "number"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
displayName: "Timeout",
|
|
191
|
+
name: "timeout",
|
|
192
|
+
default: 36e4,
|
|
193
|
+
description: "Maximum amount of time a request is allowed to take in milliseconds",
|
|
194
|
+
type: "number"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
displayName: "Max Retries",
|
|
198
|
+
name: "maxRetries",
|
|
199
|
+
default: 2,
|
|
200
|
+
description: "Maximum number of retries to attempt",
|
|
201
|
+
type: "number"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
displayName: "Top P",
|
|
205
|
+
name: "topP",
|
|
206
|
+
default: 1,
|
|
207
|
+
typeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },
|
|
208
|
+
description: "Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.",
|
|
209
|
+
type: "number"
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
}
|
|
213
|
+
]
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
async supplyData(itemIndex) {
|
|
217
|
+
const credentials = await this.getCredentials("nineRouterApi");
|
|
218
|
+
const modelName = this.getNodeParameter("model", itemIndex);
|
|
219
|
+
const options = this.getNodeParameter("options", itemIndex, {});
|
|
220
|
+
const configuration = {
|
|
221
|
+
baseURL: credentials.url,
|
|
222
|
+
fetchOptions: {
|
|
223
|
+
dispatcher: (0, import_httpProxyAgent.getProxyAgent)(credentials.url)
|
|
224
|
+
}
|
|
225
|
+
};
|
|
226
|
+
const model = new import_openai.ChatOpenAI({
|
|
227
|
+
apiKey: credentials.apiKey || "no-key",
|
|
228
|
+
model: modelName,
|
|
229
|
+
...options,
|
|
230
|
+
timeout: options.timeout ?? 6e4,
|
|
231
|
+
maxRetries: options.maxRetries ?? 2,
|
|
232
|
+
configuration,
|
|
233
|
+
callbacks: [new import_N8nLlmTracing.N8nLlmTracing(this)],
|
|
234
|
+
modelKwargs: options.responseFormat ? {
|
|
235
|
+
response_format: { type: options.responseFormat }
|
|
236
|
+
} : void 0,
|
|
237
|
+
onFailedAttempt: (0, import_n8nLlmFailedAttemptHandler.makeN8nLlmFailedAttemptHandler)(this, import_error_handling.openAiFailedAttemptHandler)
|
|
238
|
+
});
|
|
239
|
+
return {
|
|
240
|
+
response: model
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
245
|
+
0 && (module.exports = {
|
|
246
|
+
LmChat9Router
|
|
247
|
+
});
|
|
248
|
+
//# sourceMappingURL=LmChat9Router.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/llms/LmChat9Router/LmChat9Router.node.ts"],"sourcesContent":["import { ChatOpenAI, type ClientOptions } from '@langchain/openai';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { getProxyAgent } from '@utils/httpProxyAgent';\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nimport type { OpenAICompatibleCredential } from '../../../types/types';\nimport { openAiFailedAttemptHandler } from '../../vendors/OpenAi/helpers/error-handling';\nimport { makeN8nLlmFailedAttemptHandler } from '../n8nLlmFailedAttemptHandler';\nimport { N8nLlmTracing } from '../N8nLlmTracing';\n\nexport class LmChat9Router implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: '9Router Chat Model',\n\t\tname: 'lmChat9Router',\n\t\ticon: { light: 'file:9router.svg', dark: 'file:9router.dark.svg' },\n\t\tgroup: ['transform'],\n\t\tversion: [1],\n\t\tdescription: 'For advanced usage with an AI chain',\n\t\tdefaults: {\n\t\t\tname: '9Router Chat Model',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Language Models', 'Root Nodes'],\n\t\t\t\t'Language Models': ['Chat Models (Recommended)'],\n\t\t\t},\n\t\t\tresources: {\n\t\t\t\tprimaryDocumentation: [\n\t\t\t\t\t{\n\t\t\t\t\t\turl: 'https://github.com/9router/9router',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t},\n\n\t\tinputs: [],\n\n\t\toutputs: [NodeConnectionTypes.AiLanguageModel],\n\t\toutputNames: ['Model'],\n\t\tcredentials: [\n\t\t\t{\n\t\t\t\tname: 'nineRouterApi',\n\t\t\t\trequired: true,\n\t\t\t},\n\t\t],\n\t\trequestDefaults: {\n\t\t\tignoreHttpStatusErrors: true,\n\t\t\tbaseURL: '={{ $credentials?.url }}',\n\t\t},\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiChain, NodeConnectionTypes.AiAgent]),\n\t\t\t{\n\t\t\t\tdisplayName:\n\t\t\t\t\t'If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.',\n\t\t\t\tname: 'notice',\n\t\t\t\ttype: 'notice',\n\t\t\t\tdefault: '',\n\t\t\t\tdisplayOptions: {\n\t\t\t\t\tshow: {\n\t\t\t\t\t\t'/options.responseFormat': ['json_object'],\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Model',\n\t\t\t\tname: 'model',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription:\n\t\t\t\t\t'The model which will generate the completion. <a href=\"http://localhost:20128\">Learn more</a>.',\n\t\t\t\ttypeOptions: {\n\t\t\t\t\tloadOptions: {\n\t\t\t\t\t\trouting: {\n\t\t\t\t\t\t\trequest: {\n\t\t\t\t\t\t\t\tmethod: 'GET',\n\t\t\t\t\t\t\t\turl: '/models',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\toutput: {\n\t\t\t\t\t\t\t\tpostReceive: [\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'rootProperty',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tproperty: 'data',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'setKeyValue',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tname: '={{$responseItem.id}}',\n\t\t\t\t\t\t\t\t\t\t\tvalue: '={{$responseItem.id}}',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ttype: 'sort',\n\t\t\t\t\t\t\t\t\t\tproperties: {\n\t\t\t\t\t\t\t\t\t\t\tkey: 'name',\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trouting: {\n\t\t\t\t\tsend: {\n\t\t\t\t\t\ttype: 'body',\n\t\t\t\t\t\tproperty: 'model',\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdefault: 'openai/gpt-4o',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdescription: 'Additional options to add',\n\t\t\t\ttype: 'collection',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Frequency Penalty',\n\t\t\t\t\t\tname: 'frequencyPenalty',\n\t\t\t\t\t\tdefault: 0,\n\t\t\t\t\t\ttypeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim\",\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Maximum Number of Tokens',\n\t\t\t\t\t\tname: 'maxTokens',\n\t\t\t\t\t\tdefault: -1,\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t\ttypeOptions: {\n\t\t\t\t\t\t\tmaxValue: 32768,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Response Format',\n\t\t\t\t\t\tname: 'responseFormat',\n\t\t\t\t\t\tdefault: 'text',\n\t\t\t\t\t\ttype: 'options',\n\t\t\t\t\t\toptions: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'Text',\n\t\t\t\t\t\t\t\tvalue: 'text',\n\t\t\t\t\t\t\t\tdescription: 'Regular text response',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tname: 'JSON',\n\t\t\t\t\t\t\t\tvalue: 'json_object',\n\t\t\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\t\t'Enables JSON mode, which should guarantee the message the model generates is valid JSON',\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Presence Penalty',\n\t\t\t\t\t\tname: 'presencePenalty',\n\t\t\t\t\t\tdefault: 0,\n\t\t\t\t\t\ttypeOptions: { maxValue: 2, minValue: -2, numberPrecision: 1 },\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t\"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics\",\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Sampling Temperature',\n\t\t\t\t\t\tname: 'temperature',\n\t\t\t\t\t\tdefault: 0.7,\n\t\t\t\t\t\ttypeOptions: { maxValue: 2, minValue: 0, numberPrecision: 1 },\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Timeout',\n\t\t\t\t\t\tname: 'timeout',\n\t\t\t\t\t\tdefault: 360000,\n\t\t\t\t\t\tdescription: 'Maximum amount of time a request is allowed to take in milliseconds',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Max Retries',\n\t\t\t\t\t\tname: 'maxRetries',\n\t\t\t\t\t\tdefault: 2,\n\t\t\t\t\t\tdescription: 'Maximum number of retries to attempt',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Top P',\n\t\t\t\t\t\tname: 'topP',\n\t\t\t\t\t\tdefault: 1,\n\t\t\t\t\t\ttypeOptions: { maxValue: 1, minValue: 0, numberPrecision: 1 },\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.',\n\t\t\t\t\t\ttype: 'number',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst credentials = await this.getCredentials<OpenAICompatibleCredential>('nineRouterApi');\n\n\t\tconst modelName = this.getNodeParameter('model', itemIndex) as string;\n\n\t\tconst options = this.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tfrequencyPenalty?: number;\n\t\t\tmaxTokens?: number;\n\t\t\tmaxRetries: number;\n\t\t\ttimeout: number;\n\t\t\tpresencePenalty?: number;\n\t\t\ttemperature?: number;\n\t\t\ttopP?: number;\n\t\t\tresponseFormat?: 'text' | 'json_object';\n\t\t};\n\n\t\tconst configuration: ClientOptions = {\n\t\t\tbaseURL: credentials.url,\n\t\t\tfetchOptions: {\n\t\t\t\tdispatcher: getProxyAgent(credentials.url),\n\t\t\t},\n\t\t};\n\n\t\tconst model = new ChatOpenAI({\n\t\t\tapiKey: credentials.apiKey || 'no-key',\n\t\t\tmodel: modelName,\n\t\t\t...options,\n\t\t\ttimeout: options.timeout ?? 60000,\n\t\t\tmaxRetries: options.maxRetries ?? 2,\n\t\t\tconfiguration,\n\t\t\tcallbacks: [new N8nLlmTracing(this)],\n\t\t\tmodelKwargs: options.responseFormat\n\t\t\t\t? {\n\t\t\t\t\t\tresponse_format: { type: options.responseFormat },\n\t\t\t\t\t}\n\t\t\t\t: undefined,\n\t\t\tonFailedAttempt: makeN8nLlmFailedAttemptHandler(this, openAiFailedAttemptHandler),\n\t\t});\n\n\t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;AAAA,MAC1C;AAAA,IACD;AAEA,UAAM,QAAQ,IAAI,yBAAW;AAAA,MAC5B,QAAQ,YAAY,UAAU;AAAA,MAC9B,OAAO;AAAA,MACP,GAAG;AAAA,MACH,SAAS,QAAQ,WAAW;AAAA,MAC5B,YAAY,QAAQ,cAAc;AAAA,MAClC;AAAA,MACA,WAAW,CAAC,IAAI,mCAAc,IAAI,CAAC;AAAA,MACnC,aAAa,QAAQ,iBAClB;AAAA,QACA,iBAAiB,EAAE,MAAM,QAAQ,eAAe;AAAA,MACjD,IACC;AAAA,MACH,qBAAiB,kEAA+B,MAAM,gDAA0B;AAAA,IACjF,CAAC;AAED,WAAO;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACD;AACD;","names":[]}
|
|
@@ -218,19 +218,100 @@ class LmChatCursorAgent {
|
|
|
218
218
|
// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items
|
|
219
219
|
options: [
|
|
220
220
|
{ name: "Auto", value: "auto" },
|
|
221
|
-
|
|
221
|
+
// Composer models
|
|
222
|
+
{ name: "Composer 2 Fast", value: "composer-2-fast" },
|
|
223
|
+
{ name: "Composer 2", value: "composer-2" },
|
|
222
224
|
{ name: "Composer 1.5", value: "composer-1.5" },
|
|
225
|
+
// Claude 4.6 models
|
|
226
|
+
{ name: "Claude 4.6 Opus High", value: "claude-4.6-opus-high" },
|
|
227
|
+
{ name: "Claude 4.6 Opus High Thinking", value: "claude-4.6-opus-high-thinking" },
|
|
228
|
+
{ name: "Claude 4.6 Opus Max", value: "claude-4.6-opus-max" },
|
|
229
|
+
{ name: "Claude 4.6 Opus Max Thinking", value: "claude-4.6-opus-max-thinking" },
|
|
230
|
+
{ name: "Claude 4.6 Sonnet Medium", value: "claude-4.6-sonnet-medium" },
|
|
231
|
+
{ name: "Claude 4.6 Sonnet Medium Thinking", value: "claude-4.6-sonnet-medium-thinking" },
|
|
232
|
+
// Claude 4.5 models
|
|
233
|
+
{ name: "Claude 4.5 Opus High", value: "claude-4.5-opus-high" },
|
|
234
|
+
{ name: "Claude 4.5 Opus High Thinking", value: "claude-4.5-opus-high-thinking" },
|
|
235
|
+
{ name: "Claude 4.5 Sonnet", value: "claude-4.5-sonnet" },
|
|
236
|
+
{ name: "Claude 4.5 Sonnet Thinking", value: "claude-4.5-sonnet-thinking" },
|
|
237
|
+
// Claude 4 models
|
|
238
|
+
{ name: "Claude 4 Sonnet", value: "claude-4-sonnet" },
|
|
239
|
+
{ name: "Claude 4 Sonnet 1M", value: "claude-4-sonnet-1m" },
|
|
240
|
+
{ name: "Claude 4 Sonnet Thinking", value: "claude-4-sonnet-thinking" },
|
|
241
|
+
{ name: "Claude 4 Sonnet 1M Thinking", value: "claude-4-sonnet-1m-thinking" },
|
|
242
|
+
// Gemini models
|
|
243
|
+
{ name: "Gemini 3.1 Pro", value: "gemini-3.1-pro" },
|
|
223
244
|
{ name: "Gemini 3 Flash", value: "gemini-3-flash" },
|
|
224
|
-
|
|
225
|
-
{ name: "GPT-5.
|
|
226
|
-
{ name: "GPT-5.
|
|
245
|
+
// GPT-5.4 models
|
|
246
|
+
{ name: "GPT-5.4 Low", value: "gpt-5.4-low" },
|
|
247
|
+
{ name: "GPT-5.4 Medium", value: "gpt-5.4-medium" },
|
|
248
|
+
{ name: "GPT-5.4 Medium Fast", value: "gpt-5.4-medium-fast" },
|
|
249
|
+
{ name: "GPT-5.4 High", value: "gpt-5.4-high" },
|
|
250
|
+
{ name: "GPT-5.4 High Fast", value: "gpt-5.4-high-fast" },
|
|
251
|
+
{ name: "GPT-5.4 XHigh", value: "gpt-5.4-xhigh" },
|
|
252
|
+
{ name: "GPT-5.4 XHigh Fast", value: "gpt-5.4-xhigh-fast" },
|
|
253
|
+
{ name: "GPT-5.4 Mini None", value: "gpt-5.4-mini-none" },
|
|
254
|
+
{ name: "GPT-5.4 Mini Low", value: "gpt-5.4-mini-low" },
|
|
255
|
+
{ name: "GPT-5.4 Mini Medium", value: "gpt-5.4-mini-medium" },
|
|
256
|
+
{ name: "GPT-5.4 Mini High", value: "gpt-5.4-mini-high" },
|
|
257
|
+
{ name: "GPT-5.4 Mini XHigh", value: "gpt-5.4-mini-xhigh" },
|
|
258
|
+
{ name: "GPT-5.4 Nano None", value: "gpt-5.4-nano-none" },
|
|
259
|
+
{ name: "GPT-5.4 Nano Low", value: "gpt-5.4-nano-low" },
|
|
260
|
+
{ name: "GPT-5.4 Nano Medium", value: "gpt-5.4-nano-medium" },
|
|
261
|
+
{ name: "GPT-5.4 Nano High", value: "gpt-5.4-nano-high" },
|
|
262
|
+
{ name: "GPT-5.4 Nano XHigh", value: "gpt-5.4-nano-xhigh" },
|
|
263
|
+
// GPT-5.3 Codex models
|
|
264
|
+
{ name: "GPT-5.3 Codex Low", value: "gpt-5.3-codex-low" },
|
|
265
|
+
{ name: "GPT-5.3 Codex Low Fast", value: "gpt-5.3-codex-low-fast" },
|
|
266
|
+
{ name: "GPT-5.3 Codex", value: "gpt-5.3-codex" },
|
|
267
|
+
{ name: "GPT-5.3 Codex Fast", value: "gpt-5.3-codex-fast" },
|
|
268
|
+
{ name: "GPT-5.3 Codex High", value: "gpt-5.3-codex-high" },
|
|
269
|
+
{ name: "GPT-5.3 Codex High Fast", value: "gpt-5.3-codex-high-fast" },
|
|
270
|
+
{ name: "GPT-5.3 Codex XHigh", value: "gpt-5.3-codex-xhigh" },
|
|
271
|
+
{ name: "GPT-5.3 Codex XHigh Fast", value: "gpt-5.3-codex-xhigh-fast" },
|
|
272
|
+
{ name: "GPT-5.3 Codex Spark Preview Low", value: "gpt-5.3-codex-spark-preview-low" },
|
|
273
|
+
{ name: "GPT-5.3 Codex Spark Preview", value: "gpt-5.3-codex-spark-preview" },
|
|
274
|
+
{ name: "GPT-5.3 Codex Spark Preview High", value: "gpt-5.3-codex-spark-preview-high" },
|
|
275
|
+
{ name: "GPT-5.3 Codex Spark Preview XHigh", value: "gpt-5.3-codex-spark-preview-xhigh" },
|
|
276
|
+
// GPT-5.2 models
|
|
277
|
+
{ name: "GPT-5.2 Low", value: "gpt-5.2-low" },
|
|
278
|
+
{ name: "GPT-5.2 Low Fast", value: "gpt-5.2-low-fast" },
|
|
227
279
|
{ name: "GPT-5.2", value: "gpt-5.2" },
|
|
280
|
+
{ name: "GPT-5.2 Fast", value: "gpt-5.2-fast" },
|
|
228
281
|
{ name: "GPT-5.2 High", value: "gpt-5.2-high" },
|
|
229
|
-
{ name: "
|
|
230
|
-
{ name: "
|
|
231
|
-
{ name: "
|
|
232
|
-
{ name: "
|
|
233
|
-
{ name: "
|
|
282
|
+
{ name: "GPT-5.2 High Fast", value: "gpt-5.2-high-fast" },
|
|
283
|
+
{ name: "GPT-5.2 XHigh", value: "gpt-5.2-xhigh" },
|
|
284
|
+
{ name: "GPT-5.2 XHigh Fast", value: "gpt-5.2-xhigh-fast" },
|
|
285
|
+
{ name: "GPT-5.2 Codex Low", value: "gpt-5.2-codex-low" },
|
|
286
|
+
{ name: "GPT-5.2 Codex Low Fast", value: "gpt-5.2-codex-low-fast" },
|
|
287
|
+
{ name: "GPT-5.2 Codex", value: "gpt-5.2-codex" },
|
|
288
|
+
{ name: "GPT-5.2 Codex Fast", value: "gpt-5.2-codex-fast" },
|
|
289
|
+
{ name: "GPT-5.2 Codex High", value: "gpt-5.2-codex-high" },
|
|
290
|
+
{ name: "GPT-5.2 Codex High Fast", value: "gpt-5.2-codex-high-fast" },
|
|
291
|
+
{ name: "GPT-5.2 Codex XHigh", value: "gpt-5.2-codex-xhigh" },
|
|
292
|
+
{ name: "GPT-5.2 Codex XHigh Fast", value: "gpt-5.2-codex-xhigh-fast" },
|
|
293
|
+
// GPT-5.1 models
|
|
294
|
+
{ name: "GPT-5.1 Low", value: "gpt-5.1-low" },
|
|
295
|
+
{ name: "GPT-5.1", value: "gpt-5.1" },
|
|
296
|
+
{ name: "GPT-5.1 High", value: "gpt-5.1-high" },
|
|
297
|
+
{ name: "GPT-5.1 Codex Max Low", value: "gpt-5.1-codex-max-low" },
|
|
298
|
+
{ name: "GPT-5.1 Codex Max Low Fast", value: "gpt-5.1-codex-max-low-fast" },
|
|
299
|
+
{ name: "GPT-5.1 Codex Max Medium", value: "gpt-5.1-codex-max-medium" },
|
|
300
|
+
{ name: "GPT-5.1 Codex Max Medium Fast", value: "gpt-5.1-codex-max-medium-fast" },
|
|
301
|
+
{ name: "GPT-5.1 Codex Max High", value: "gpt-5.1-codex-max-high" },
|
|
302
|
+
{ name: "GPT-5.1 Codex Max High Fast", value: "gpt-5.1-codex-max-high-fast" },
|
|
303
|
+
{ name: "GPT-5.1 Codex Max XHigh", value: "gpt-5.1-codex-max-xhigh" },
|
|
304
|
+
{ name: "GPT-5.1 Codex Max XHigh Fast", value: "gpt-5.1-codex-max-xhigh-fast" },
|
|
305
|
+
{ name: "GPT-5.1 Codex Mini Low", value: "gpt-5.1-codex-mini-low" },
|
|
306
|
+
{ name: "GPT-5.1 Codex Mini", value: "gpt-5.1-codex-mini" },
|
|
307
|
+
{ name: "GPT-5.1 Codex Mini High", value: "gpt-5.1-codex-mini-high" },
|
|
308
|
+
// GPT-5 models
|
|
309
|
+
{ name: "GPT-5 Mini", value: "gpt-5-mini" },
|
|
310
|
+
// Grok models
|
|
311
|
+
{ name: "Grok 4 20", value: "grok-4-20" },
|
|
312
|
+
{ name: "Grok 4 20 Thinking", value: "grok-4-20-thinking" },
|
|
313
|
+
// Kimi models
|
|
314
|
+
{ name: "Kimi K2.5", value: "kimi-k2.5" }
|
|
234
315
|
],
|
|
235
316
|
default: "auto"
|
|
236
317
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../nodes/llms/LmChatCursorAgent/LmChatCursorAgent.node.ts"],"sourcesContent":["import { BaseChatModel } from '@langchain/core/language_models/chat_models';\nimport type { BaseMessage } from '@langchain/core/messages';\nimport { AIMessage, HumanMessage, SystemMessage } from '@langchain/core/messages';\nimport type { ChatResult } from '@langchain/core/outputs';\nimport type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';\nimport type { BindToolsInput } from '@langchain/core/language_models/chat_models';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nimport { N8nLlmTracing } from '../N8nLlmTracing';\nimport { spawn } from 'child_process';\n\ninterface CursorAgentFields {\n\tmodel: string;\n\tbinaryPath: string;\n\tworkingDirectory: string;\n}\n\ninterface ParsedToolCall {\n\tid: string;\n\tname: string;\n\targs: Record<string, unknown>;\n}\n\nconst TOOL_CALL_SYSTEM_PROMPT = `You have access to the following tools. When you need to call a tool, respond ONLY with a JSON block in this exact format (no other text before or after):\n\n\\`\\`\\`tool_calls\n[{\"id\": \"call_1\", \"name\": \"tool_name\", \"args\": {\"param\": \"value\"}}]\n\\`\\`\\`\n\nWhen you do NOT need to call a tool, respond normally with text. Never mix tool calls and text in the same response.\n\nAvailable tools:\n`;\n\n/**\n * Custom LangChain chat model that wraps the cursor-agent CLI binary.\n * Supports tool calling by injecting tool schemas into the prompt\n * and parsing structured JSON responses for tool calls.\n */\nclass ChatCursorAgentCLI extends BaseChatModel {\n\tmodel: string;\n\n\tbinaryPath: string;\n\n\tworkingDirectory: string;\n\n\tboundTools: BindToolsInput[] = [];\n\n\tconstructor(fields: CursorAgentFields) {\n\t\tsuper({});\n\t\tthis.model = fields.model;\n\t\tthis.binaryPath = fields.binaryPath;\n\t\tthis.workingDirectory = fields.workingDirectory;\n\t}\n\n\t_llmType(): string {\n\t\treturn 'cursor-agent-cli';\n\t}\n\n\toverride bindTools(tools: BindToolsInput[], kwargs?: Partial<this['ParsedCallOptions']>) {\n\t\tconst clone = new ChatCursorAgentCLI({\n\t\t\tmodel: this.model,\n\t\t\tbinaryPath: this.binaryPath,\n\t\t\tworkingDirectory: this.workingDirectory,\n\t\t});\n\t\tclone.boundTools = tools;\n\t\tclone.callbacks = this.callbacks;\n\t\tif (kwargs) {\n\t\t\treturn clone.bind(kwargs);\n\t\t}\n\t\treturn clone;\n\t}\n\n\tasync _generate(\n\t\tmessages: BaseMessage[],\n\t\t_options: this['ParsedCallOptions'],\n\t\t_runManager?: CallbackManagerForLLMRun,\n\t): Promise<ChatResult> {\n\t\t// If tools are bound, inject tool schemas into a system message\n\t\tconst processedMessages = [...messages];\n\t\tif (this.boundTools.length > 0) {\n\t\t\tconst toolDescriptions = this.boundTools\n\t\t\t\t.map((tool) => {\n\t\t\t\t\tconst t = tool as Record<string, unknown>;\n\t\t\t\t\tconst name = (t.name as string) ?? '';\n\t\t\t\t\tconst description = (t.description as string) ?? '';\n\t\t\t\t\tconst schema = t.parameters ?? t.schema ?? {};\n\t\t\t\t\treturn `- ${name}: ${description}\\n Parameters: ${JSON.stringify(schema)}`;\n\t\t\t\t})\n\t\t\t\t.join('\\n\\n');\n\n\t\t\tconst systemPrompt = TOOL_CALL_SYSTEM_PROMPT + toolDescriptions;\n\t\t\tprocessedMessages.unshift(new SystemMessage(systemPrompt));\n\t\t}\n\n\t\t// Build prompt from messages\n\t\tconst prompt = processedMessages\n\t\t\t.map((m) => {\n\t\t\t\tconst content = typeof m.content === 'string' ? m.content : JSON.stringify(m.content);\n\t\t\t\tif (m instanceof SystemMessage) return `[system]: ${content}`;\n\t\t\t\tif (m instanceof HumanMessage) return `[user]: ${content}`;\n\t\t\t\tif (m instanceof AIMessage) return `[assistant]: ${content}`;\n\t\t\t\treturn `[${m._getType()}]: ${content}`;\n\t\t\t})\n\t\t\t.join('\\n\\n');\n\n\t\t// Execute cursor-agent CLI\n\t\tconst rawResponse = await this.executeCursorAgent(prompt);\n\n\t\t// Check for tool calls in response\n\t\tif (this.boundTools.length > 0) {\n\t\t\tconst toolCalls = this.extractToolCalls(rawResponse);\n\t\t\tif (toolCalls.length > 0) {\n\t\t\t\tconst aiMessage = new AIMessage({\n\t\t\t\t\tcontent: '',\n\t\t\t\t\ttool_calls: toolCalls.map((tc) => ({\n\t\t\t\t\t\tid: tc.id,\n\t\t\t\t\t\tname: tc.name,\n\t\t\t\t\t\targs: tc.args,\n\t\t\t\t\t\ttype: 'tool_call' as const,\n\t\t\t\t\t})),\n\t\t\t\t});\n\n\t\t\t\treturn {\n\t\t\t\t\tgenerations: [{ message: aiMessage, text: '' }],\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Normal text response\n\t\tconst aiMessage = new AIMessage({ content: rawResponse });\n\t\treturn {\n\t\t\tgenerations: [{ message: aiMessage, text: rawResponse }],\n\t\t};\n\t}\n\n\tprivate extractToolCalls(text: string): ParsedToolCall[] {\n\t\t// Look for tool_calls JSON block\n\t\tconst toolCallRegex = /```tool_calls\\s*\\n([\\s\\S]*?)\\n```/;\n\t\tconst match = toolCallRegex.exec(text);\n\t\tif (!match) return [];\n\n\t\ttry {\n\t\t\tconst parsed = JSON.parse(match[1]) as Array<{\n\t\t\t\tid?: string;\n\t\t\t\tname: string;\n\t\t\t\targs: Record<string, unknown>;\n\t\t\t}>;\n\t\t\tif (!Array.isArray(parsed)) return [];\n\n\t\t\treturn parsed.map((tc, i) => ({\n\t\t\t\tid: tc.id ?? `call_${i}`,\n\t\t\t\tname: tc.name,\n\t\t\t\targs: tc.args ?? {},\n\t\t\t}));\n\t\t} catch {\n\t\t\treturn [];\n\t\t}\n\t}\n\n\tprivate async executeCursorAgent(prompt: string): Promise<string> {\n\t\tconst args = ['-p', '--output-format=stream-json', '--trust'];\n\t\tif (this.model && this.model !== 'auto') {\n\t\t\targs.push('--model', this.model);\n\t\t}\n\n\t\treturn await new Promise<string>((resolve, reject) => {\n\t\t\tconst child = spawn(this.binaryPath, args, {\n\t\t\t\tcwd: this.workingDirectory || undefined,\n\t\t\t\tstdio: ['pipe', 'pipe', 'pipe'],\n\t\t\t\tenv: { ...process.env },\n\t\t\t});\n\n\t\t\tlet stdout = '';\n\t\t\tlet stderr = '';\n\n\t\t\tchild.stdout.on('data', (data: Buffer) => {\n\t\t\t\tstdout += data.toString();\n\t\t\t});\n\n\t\t\tchild.stderr.on('data', (data: Buffer) => {\n\t\t\t\tstderr += data.toString();\n\t\t\t});\n\n\t\t\tchild.on('error', (err: Error) => {\n\t\t\t\treject(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\t`Failed to spawn cursor-agent: ${err.message}. Make sure cursor-agent CLI is installed and accessible.`,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t});\n\n\t\t\tchild.on('close', (code: number | null) => {\n\t\t\t\tif (code !== 0 && !stdout) {\n\t\t\t\t\tconst errorMsg = stderr.trim() || `cursor-agent exited with code ${code}`;\n\t\t\t\t\treject(new Error(errorMsg));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst assistantContent = this.parseStreamJsonOutput(stdout);\n\n\t\t\t\tif (!assistantContent) {\n\t\t\t\t\treject(new Error('No assistant response received from cursor-agent'));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresolve(assistantContent);\n\t\t\t});\n\n\t\t\tif (child.stdin) {\n\t\t\t\tchild.stdin.write(prompt);\n\t\t\t\tchild.stdin.end();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate parseStreamJsonOutput(output: string): string {\n\t\tconst lines = output.split('\\n').filter((line) => line.trim());\n\t\tconst assistantParts: string[] = [];\n\n\t\tfor (const line of lines) {\n\t\t\ttry {\n\t\t\t\tconst parsed = JSON.parse(line) as {\n\t\t\t\t\ttype?: string;\n\t\t\t\t\tmessage?: {\n\t\t\t\t\t\tcontent?: Array<{ type?: string; text?: string }>;\n\t\t\t\t\t};\n\t\t\t\t\ttext?: string;\n\t\t\t\t};\n\n\t\t\t\tif (parsed.type === 'assistant' && parsed.message?.content) {\n\t\t\t\t\tfor (const item of parsed.message.content) {\n\t\t\t\t\t\tif (item.type === 'text' && item.text) {\n\t\t\t\t\t\t\tassistantParts.push(item.text);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// Skip non-JSON lines\n\t\t\t}\n\t\t}\n\n\t\treturn assistantParts.join('');\n\t}\n}\n\nexport class LmChatCursorAgent implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Cursor Agent CLI Chat Model',\n\n\t\tname: 'lmChatCursorAgent',\n\t\ticon: 'file:cursorAgent.svg',\n\t\tgroup: ['transform'],\n\t\tversion: [1],\n\t\tdescription:\n\t\t\t'Chat model powered by the Cursor Agent CLI. Requires cursor-agent to be installed locally.',\n\t\tdefaults: {\n\t\t\tname: 'Cursor Agent CLI Chat Model',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Language Models', 'Root Nodes'],\n\t\t\t\t'Language Models': ['Chat Models (Recommended)'],\n\t\t\t},\n\t\t\tresources: {},\n\t\t},\n\n\t\tinputs: [],\n\n\t\toutputs: [NodeConnectionTypes.AiLanguageModel],\n\t\toutputNames: ['Model'],\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiChain, NodeConnectionTypes.AiAgent]),\n\t\t\t{\n\t\t\t\tdisplayName: 'Model',\n\t\t\t\tname: 'model',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription: 'The model to use via cursor-agent CLI.',\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\t\t\t\toptions: [\n\t\t\t\t\t{ name: 'Auto', value: 'auto' },\n\t\t\t\t\t{ name: 'Composer 1', value: 'composer-1' },\n\t\t\t\t\t{ name: 'Composer 1.5', value: 'composer-1.5' },\n\t\t\t\t\t{ name: 'Gemini 3 Flash', value: 'gemini-3-flash' },\n\t\t\t\t\t{ name: 'Gemini 3 Pro', value: 'gemini-3-pro' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max', value: 'gpt-5.1-codex-max' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max High', value: 'gpt-5.1-codex-max-high' },\n\t\t\t\t\t{ name: 'GPT-5.2', value: 'gpt-5.2' },\n\t\t\t\t\t{ name: 'GPT-5.2 High', value: 'gpt-5.2-high' },\n\t\t\t\t\t{ name: 'Grok', value: 'grok' },\n\t\t\t\t\t{ name: 'Opus 4.5', value: 'opus-4.5' },\n\t\t\t\t\t{ name: 'Opus 4.5 Thinking', value: 'opus-4.5-thinking' },\n\t\t\t\t\t{ name: 'Sonnet 4.5', value: 'sonnet-4.5' },\n\t\t\t\t\t{ name: 'Sonnet 4.5 Thinking', value: 'sonnet-4.5-thinking' },\n\t\t\t\t],\n\t\t\t\tdefault: 'auto',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdescription: 'Additional options to configure',\n\t\t\t\ttype: 'collection',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Binary Path',\n\t\t\t\t\t\tname: 'binaryPath',\n\t\t\t\t\t\tdefault: 'cursor-agent',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Path to the cursor-agent binary. Defaults to \"cursor-agent\" (must be in PATH).',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Working Directory',\n\t\t\t\t\t\tname: 'workingDirectory',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Working directory for the cursor-agent process. Leave empty to use the default.',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst modelName = this.getNodeParameter('model', itemIndex) as string;\n\n\t\tconst options = this.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tbinaryPath?: string;\n\t\t\tworkingDirectory?: string;\n\t\t};\n\n\t\tconst model = new ChatCursorAgentCLI({\n\t\t\tmodel: modelName,\n\t\t\tbinaryPath: options.binaryPath ?? 'cursor-agent',\n\t\t\tworkingDirectory: options.workingDirectory ?? '',\n\t\t});\n\n\t\tmodel.callbacks = [new N8nLlmTracing(this)];\n\n\t\treturn {\n\t\t\tresponse: model,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA8B;AAE9B,sBAAuD;AAIvD,0BAMO;AAEP,0BAA6C;AAE7C,2BAA8B;AAC9B,2BAAsB;AActB,MAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBhC,MAAM,2BAA2B,iCAAc;AAAA,EAS9C,YAAY,QAA2B;AACtC,UAAM,CAAC,CAAC;AAHT,sBAA+B,CAAC;AAI/B,SAAK,QAAQ,OAAO;AACpB,SAAK,aAAa,OAAO;AACzB,SAAK,mBAAmB,OAAO;AAAA,EAChC;AAAA,EAEA,WAAmB;AAClB,WAAO;AAAA,EACR;AAAA,EAES,UAAU,OAAyB,QAA6C;AACxF,UAAM,QAAQ,IAAI,mBAAmB;AAAA,MACpC,OAAO,KAAK;AAAA,MACZ,YAAY,KAAK;AAAA,MACjB,kBAAkB,KAAK;AAAA,IACxB,CAAC;AACD,UAAM,aAAa;AACnB,UAAM,YAAY,KAAK;AACvB,QAAI,QAAQ;AACX,aAAO,MAAM,KAAK,MAAM;AAAA,IACzB;AACA,WAAO;AAAA,EACR;AAAA,EAEA,MAAM,UACL,UACA,UACA,aACsB;AAEtB,UAAM,oBAAoB,CAAC,GAAG,QAAQ;AACtC,QAAI,KAAK,WAAW,SAAS,GAAG;AAC/B,YAAM,mBAAmB,KAAK,WAC5B,IAAI,CAAC,SAAS;AACd,cAAM,IAAI;AACV,cAAM,OAAQ,EAAE,QAAmB;AACnC,cAAM,cAAe,EAAE,eAA0B;AACjD,cAAM,SAAS,EAAE,cAAc,EAA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;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aACC;AAAA,cACD,MAAM;AAAA,YACP;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,WAAuC,WAAwC;AACpF,UAAM,YAAY,KAAK,iBAAiB,SAAS,SAAS;AAE1D,UAAM,UAAU,KAAK,iBAAiB,WAAW,WAAW,CAAC,CAAC;AAK9D,UAAM,QAAQ,IAAI,mBAAmB;AAAA,MACpC,OAAO;AAAA,MACP,YAAY,QAAQ,cAAc;AAAA,MAClC,kBAAkB,QAAQ,oBAAoB;AAAA,IAC/C,CAAC;AAED,UAAM,YAAY,CAAC,IAAI,mCAAc,IAAI,CAAC;AAE1C,WAAO;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACD;AACD;","names":["aiMessage"]}
|
|
1
|
+
{"version":3,"sources":["../../../../nodes/llms/LmChatCursorAgent/LmChatCursorAgent.node.ts"],"sourcesContent":["import { BaseChatModel } from '@langchain/core/language_models/chat_models';\nimport type { BaseMessage } from '@langchain/core/messages';\nimport { AIMessage, HumanMessage, SystemMessage } from '@langchain/core/messages';\nimport type { ChatResult } from '@langchain/core/outputs';\nimport type { CallbackManagerForLLMRun } from '@langchain/core/callbacks/manager';\nimport type { BindToolsInput } from '@langchain/core/language_models/chat_models';\nimport {\n\tNodeConnectionTypes,\n\ttype INodeType,\n\ttype INodeTypeDescription,\n\ttype ISupplyDataFunctions,\n\ttype SupplyData,\n} from 'n8n-workflow';\n\nimport { getConnectionHintNoticeField } from '@utils/sharedFields';\n\nimport { N8nLlmTracing } from '../N8nLlmTracing';\nimport { spawn } from 'child_process';\n\ninterface CursorAgentFields {\n\tmodel: string;\n\tbinaryPath: string;\n\tworkingDirectory: string;\n}\n\ninterface ParsedToolCall {\n\tid: string;\n\tname: string;\n\targs: Record<string, unknown>;\n}\n\nconst TOOL_CALL_SYSTEM_PROMPT = `You have access to the following tools. When you need to call a tool, respond ONLY with a JSON block in this exact format (no other text before or after):\n\n\\`\\`\\`tool_calls\n[{\"id\": \"call_1\", \"name\": \"tool_name\", \"args\": {\"param\": \"value\"}}]\n\\`\\`\\`\n\nWhen you do NOT need to call a tool, respond normally with text. Never mix tool calls and text in the same response.\n\nAvailable tools:\n`;\n\n/**\n * Custom LangChain chat model that wraps the cursor-agent CLI binary.\n * Supports tool calling by injecting tool schemas into the prompt\n * and parsing structured JSON responses for tool calls.\n */\nclass ChatCursorAgentCLI extends BaseChatModel {\n\tmodel: string;\n\n\tbinaryPath: string;\n\n\tworkingDirectory: string;\n\n\tboundTools: BindToolsInput[] = [];\n\n\tconstructor(fields: CursorAgentFields) {\n\t\tsuper({});\n\t\tthis.model = fields.model;\n\t\tthis.binaryPath = fields.binaryPath;\n\t\tthis.workingDirectory = fields.workingDirectory;\n\t}\n\n\t_llmType(): string {\n\t\treturn 'cursor-agent-cli';\n\t}\n\n\toverride bindTools(tools: BindToolsInput[], kwargs?: Partial<this['ParsedCallOptions']>) {\n\t\tconst clone = new ChatCursorAgentCLI({\n\t\t\tmodel: this.model,\n\t\t\tbinaryPath: this.binaryPath,\n\t\t\tworkingDirectory: this.workingDirectory,\n\t\t});\n\t\tclone.boundTools = tools;\n\t\tclone.callbacks = this.callbacks;\n\t\tif (kwargs) {\n\t\t\treturn clone.bind(kwargs);\n\t\t}\n\t\treturn clone;\n\t}\n\n\tasync _generate(\n\t\tmessages: BaseMessage[],\n\t\t_options: this['ParsedCallOptions'],\n\t\t_runManager?: CallbackManagerForLLMRun,\n\t): Promise<ChatResult> {\n\t\t// If tools are bound, inject tool schemas into a system message\n\t\tconst processedMessages = [...messages];\n\t\tif (this.boundTools.length > 0) {\n\t\t\tconst toolDescriptions = this.boundTools\n\t\t\t\t.map((tool) => {\n\t\t\t\t\tconst t = tool as Record<string, unknown>;\n\t\t\t\t\tconst name = (t.name as string) ?? '';\n\t\t\t\t\tconst description = (t.description as string) ?? '';\n\t\t\t\t\tconst schema = t.parameters ?? t.schema ?? {};\n\t\t\t\t\treturn `- ${name}: ${description}\\n Parameters: ${JSON.stringify(schema)}`;\n\t\t\t\t})\n\t\t\t\t.join('\\n\\n');\n\n\t\t\tconst systemPrompt = TOOL_CALL_SYSTEM_PROMPT + toolDescriptions;\n\t\t\tprocessedMessages.unshift(new SystemMessage(systemPrompt));\n\t\t}\n\n\t\t// Build prompt from messages\n\t\tconst prompt = processedMessages\n\t\t\t.map((m) => {\n\t\t\t\tconst content = typeof m.content === 'string' ? m.content : JSON.stringify(m.content);\n\t\t\t\tif (m instanceof SystemMessage) return `[system]: ${content}`;\n\t\t\t\tif (m instanceof HumanMessage) return `[user]: ${content}`;\n\t\t\t\tif (m instanceof AIMessage) return `[assistant]: ${content}`;\n\t\t\t\treturn `[${m._getType()}]: ${content}`;\n\t\t\t})\n\t\t\t.join('\\n\\n');\n\n\t\t// Execute cursor-agent CLI\n\t\tconst rawResponse = await this.executeCursorAgent(prompt);\n\n\t\t// Check for tool calls in response\n\t\tif (this.boundTools.length > 0) {\n\t\t\tconst toolCalls = this.extractToolCalls(rawResponse);\n\t\t\tif (toolCalls.length > 0) {\n\t\t\t\tconst aiMessage = new AIMessage({\n\t\t\t\t\tcontent: '',\n\t\t\t\t\ttool_calls: toolCalls.map((tc) => ({\n\t\t\t\t\t\tid: tc.id,\n\t\t\t\t\t\tname: tc.name,\n\t\t\t\t\t\targs: tc.args,\n\t\t\t\t\t\ttype: 'tool_call' as const,\n\t\t\t\t\t})),\n\t\t\t\t});\n\n\t\t\t\treturn {\n\t\t\t\t\tgenerations: [{ message: aiMessage, text: '' }],\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\n\t\t// Normal text response\n\t\tconst aiMessage = new AIMessage({ content: rawResponse });\n\t\treturn {\n\t\t\tgenerations: [{ message: aiMessage, text: rawResponse }],\n\t\t};\n\t}\n\n\tprivate extractToolCalls(text: string): ParsedToolCall[] {\n\t\t// Look for tool_calls JSON block\n\t\tconst toolCallRegex = /```tool_calls\\s*\\n([\\s\\S]*?)\\n```/;\n\t\tconst match = toolCallRegex.exec(text);\n\t\tif (!match) return [];\n\n\t\ttry {\n\t\t\tconst parsed = JSON.parse(match[1]) as Array<{\n\t\t\t\tid?: string;\n\t\t\t\tname: string;\n\t\t\t\targs: Record<string, unknown>;\n\t\t\t}>;\n\t\t\tif (!Array.isArray(parsed)) return [];\n\n\t\t\treturn parsed.map((tc, i) => ({\n\t\t\t\tid: tc.id ?? `call_${i}`,\n\t\t\t\tname: tc.name,\n\t\t\t\targs: tc.args ?? {},\n\t\t\t}));\n\t\t} catch {\n\t\t\treturn [];\n\t\t}\n\t}\n\n\tprivate async executeCursorAgent(prompt: string): Promise<string> {\n\t\tconst args = ['-p', '--output-format=stream-json', '--trust'];\n\t\tif (this.model && this.model !== 'auto') {\n\t\t\targs.push('--model', this.model);\n\t\t}\n\n\t\treturn await new Promise<string>((resolve, reject) => {\n\t\t\tconst child = spawn(this.binaryPath, args, {\n\t\t\t\tcwd: this.workingDirectory || undefined,\n\t\t\t\tstdio: ['pipe', 'pipe', 'pipe'],\n\t\t\t\tenv: { ...process.env },\n\t\t\t});\n\n\t\t\tlet stdout = '';\n\t\t\tlet stderr = '';\n\n\t\t\tchild.stdout.on('data', (data: Buffer) => {\n\t\t\t\tstdout += data.toString();\n\t\t\t});\n\n\t\t\tchild.stderr.on('data', (data: Buffer) => {\n\t\t\t\tstderr += data.toString();\n\t\t\t});\n\n\t\t\tchild.on('error', (err: Error) => {\n\t\t\t\treject(\n\t\t\t\t\tnew Error(\n\t\t\t\t\t\t`Failed to spawn cursor-agent: ${err.message}. Make sure cursor-agent CLI is installed and accessible.`,\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t});\n\n\t\t\tchild.on('close', (code: number | null) => {\n\t\t\t\tif (code !== 0 && !stdout) {\n\t\t\t\t\tconst errorMsg = stderr.trim() || `cursor-agent exited with code ${code}`;\n\t\t\t\t\treject(new Error(errorMsg));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst assistantContent = this.parseStreamJsonOutput(stdout);\n\n\t\t\t\tif (!assistantContent) {\n\t\t\t\t\treject(new Error('No assistant response received from cursor-agent'));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tresolve(assistantContent);\n\t\t\t});\n\n\t\t\tif (child.stdin) {\n\t\t\t\tchild.stdin.write(prompt);\n\t\t\t\tchild.stdin.end();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate parseStreamJsonOutput(output: string): string {\n\t\tconst lines = output.split('\\n').filter((line) => line.trim());\n\t\tconst assistantParts: string[] = [];\n\n\t\tfor (const line of lines) {\n\t\t\ttry {\n\t\t\t\tconst parsed = JSON.parse(line) as {\n\t\t\t\t\ttype?: string;\n\t\t\t\t\tmessage?: {\n\t\t\t\t\t\tcontent?: Array<{ type?: string; text?: string }>;\n\t\t\t\t\t};\n\t\t\t\t\ttext?: string;\n\t\t\t\t};\n\n\t\t\t\tif (parsed.type === 'assistant' && parsed.message?.content) {\n\t\t\t\t\tfor (const item of parsed.message.content) {\n\t\t\t\t\t\tif (item.type === 'text' && item.text) {\n\t\t\t\t\t\t\tassistantParts.push(item.text);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch {\n\t\t\t\t// Skip non-JSON lines\n\t\t\t}\n\t\t}\n\n\t\treturn assistantParts.join('');\n\t}\n}\n\nexport class LmChatCursorAgent implements INodeType {\n\tdescription: INodeTypeDescription = {\n\t\tdisplayName: 'Cursor Agent CLI Chat Model',\n\n\t\tname: 'lmChatCursorAgent',\n\t\ticon: 'file:cursorAgent.svg',\n\t\tgroup: ['transform'],\n\t\tversion: [1],\n\t\tdescription:\n\t\t\t'Chat model powered by the Cursor Agent CLI. Requires cursor-agent to be installed locally.',\n\t\tdefaults: {\n\t\t\tname: 'Cursor Agent CLI Chat Model',\n\t\t},\n\t\tcodex: {\n\t\t\tcategories: ['AI'],\n\t\t\tsubcategories: {\n\t\t\t\tAI: ['Language Models', 'Root Nodes'],\n\t\t\t\t'Language Models': ['Chat Models (Recommended)'],\n\t\t\t},\n\t\t\tresources: {},\n\t\t},\n\n\t\tinputs: [],\n\n\t\toutputs: [NodeConnectionTypes.AiLanguageModel],\n\t\toutputNames: ['Model'],\n\t\tproperties: [\n\t\t\tgetConnectionHintNoticeField([NodeConnectionTypes.AiChain, NodeConnectionTypes.AiAgent]),\n\t\t\t{\n\t\t\t\tdisplayName: 'Model',\n\t\t\t\tname: 'model',\n\t\t\t\ttype: 'options',\n\t\t\t\tdescription: 'The model to use via cursor-agent CLI.',\n\t\t\t\t// eslint-disable-next-line n8n-nodes-base/node-param-options-type-unsorted-items\n\t\t\t\toptions: [\n\t\t\t\t\t{ name: 'Auto', value: 'auto' },\n\t\t\t\t\t// Composer models\n\t\t\t\t\t{ name: 'Composer 2 Fast', value: 'composer-2-fast' },\n\t\t\t\t\t{ name: 'Composer 2', value: 'composer-2' },\n\t\t\t\t\t{ name: 'Composer 1.5', value: 'composer-1.5' },\n\t\t\t\t\t// Claude 4.6 models\n\t\t\t\t\t{ name: 'Claude 4.6 Opus High', value: 'claude-4.6-opus-high' },\n\t\t\t\t\t{ name: 'Claude 4.6 Opus High Thinking', value: 'claude-4.6-opus-high-thinking' },\n\t\t\t\t\t{ name: 'Claude 4.6 Opus Max', value: 'claude-4.6-opus-max' },\n\t\t\t\t\t{ name: 'Claude 4.6 Opus Max Thinking', value: 'claude-4.6-opus-max-thinking' },\n\t\t\t\t\t{ name: 'Claude 4.6 Sonnet Medium', value: 'claude-4.6-sonnet-medium' },\n\t\t\t\t\t{ name: 'Claude 4.6 Sonnet Medium Thinking', value: 'claude-4.6-sonnet-medium-thinking' },\n\t\t\t\t\t// Claude 4.5 models\n\t\t\t\t\t{ name: 'Claude 4.5 Opus High', value: 'claude-4.5-opus-high' },\n\t\t\t\t\t{ name: 'Claude 4.5 Opus High Thinking', value: 'claude-4.5-opus-high-thinking' },\n\t\t\t\t\t{ name: 'Claude 4.5 Sonnet', value: 'claude-4.5-sonnet' },\n\t\t\t\t\t{ name: 'Claude 4.5 Sonnet Thinking', value: 'claude-4.5-sonnet-thinking' },\n\t\t\t\t\t// Claude 4 models\n\t\t\t\t\t{ name: 'Claude 4 Sonnet', value: 'claude-4-sonnet' },\n\t\t\t\t\t{ name: 'Claude 4 Sonnet 1M', value: 'claude-4-sonnet-1m' },\n\t\t\t\t\t{ name: 'Claude 4 Sonnet Thinking', value: 'claude-4-sonnet-thinking' },\n\t\t\t\t\t{ name: 'Claude 4 Sonnet 1M Thinking', value: 'claude-4-sonnet-1m-thinking' },\n\t\t\t\t\t// Gemini models\n\t\t\t\t\t{ name: 'Gemini 3.1 Pro', value: 'gemini-3.1-pro' },\n\t\t\t\t\t{ name: 'Gemini 3 Flash', value: 'gemini-3-flash' },\n\t\t\t\t\t// GPT-5.4 models\n\t\t\t\t\t{ name: 'GPT-5.4 Low', value: 'gpt-5.4-low' },\n\t\t\t\t\t{ name: 'GPT-5.4 Medium', value: 'gpt-5.4-medium' },\n\t\t\t\t\t{ name: 'GPT-5.4 Medium Fast', value: 'gpt-5.4-medium-fast' },\n\t\t\t\t\t{ name: 'GPT-5.4 High', value: 'gpt-5.4-high' },\n\t\t\t\t\t{ name: 'GPT-5.4 High Fast', value: 'gpt-5.4-high-fast' },\n\t\t\t\t\t{ name: 'GPT-5.4 XHigh', value: 'gpt-5.4-xhigh' },\n\t\t\t\t\t{ name: 'GPT-5.4 XHigh Fast', value: 'gpt-5.4-xhigh-fast' },\n\t\t\t\t\t{ name: 'GPT-5.4 Mini None', value: 'gpt-5.4-mini-none' },\n\t\t\t\t\t{ name: 'GPT-5.4 Mini Low', value: 'gpt-5.4-mini-low' },\n\t\t\t\t\t{ name: 'GPT-5.4 Mini Medium', value: 'gpt-5.4-mini-medium' },\n\t\t\t\t\t{ name: 'GPT-5.4 Mini High', value: 'gpt-5.4-mini-high' },\n\t\t\t\t\t{ name: 'GPT-5.4 Mini XHigh', value: 'gpt-5.4-mini-xhigh' },\n\t\t\t\t\t{ name: 'GPT-5.4 Nano None', value: 'gpt-5.4-nano-none' },\n\t\t\t\t\t{ name: 'GPT-5.4 Nano Low', value: 'gpt-5.4-nano-low' },\n\t\t\t\t\t{ name: 'GPT-5.4 Nano Medium', value: 'gpt-5.4-nano-medium' },\n\t\t\t\t\t{ name: 'GPT-5.4 Nano High', value: 'gpt-5.4-nano-high' },\n\t\t\t\t\t{ name: 'GPT-5.4 Nano XHigh', value: 'gpt-5.4-nano-xhigh' },\n\t\t\t\t\t// GPT-5.3 Codex models\n\t\t\t\t\t{ name: 'GPT-5.3 Codex Low', value: 'gpt-5.3-codex-low' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex Low Fast', value: 'gpt-5.3-codex-low-fast' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex', value: 'gpt-5.3-codex' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex Fast', value: 'gpt-5.3-codex-fast' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex High', value: 'gpt-5.3-codex-high' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex High Fast', value: 'gpt-5.3-codex-high-fast' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex XHigh', value: 'gpt-5.3-codex-xhigh' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex XHigh Fast', value: 'gpt-5.3-codex-xhigh-fast' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex Spark Preview Low', value: 'gpt-5.3-codex-spark-preview-low' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex Spark Preview', value: 'gpt-5.3-codex-spark-preview' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex Spark Preview High', value: 'gpt-5.3-codex-spark-preview-high' },\n\t\t\t\t\t{ name: 'GPT-5.3 Codex Spark Preview XHigh', value: 'gpt-5.3-codex-spark-preview-xhigh' },\n\t\t\t\t\t// GPT-5.2 models\n\t\t\t\t\t{ name: 'GPT-5.2 Low', value: 'gpt-5.2-low' },\n\t\t\t\t\t{ name: 'GPT-5.2 Low Fast', value: 'gpt-5.2-low-fast' },\n\t\t\t\t\t{ name: 'GPT-5.2', value: 'gpt-5.2' },\n\t\t\t\t\t{ name: 'GPT-5.2 Fast', value: 'gpt-5.2-fast' },\n\t\t\t\t\t{ name: 'GPT-5.2 High', value: 'gpt-5.2-high' },\n\t\t\t\t\t{ name: 'GPT-5.2 High Fast', value: 'gpt-5.2-high-fast' },\n\t\t\t\t\t{ name: 'GPT-5.2 XHigh', value: 'gpt-5.2-xhigh' },\n\t\t\t\t\t{ name: 'GPT-5.2 XHigh Fast', value: 'gpt-5.2-xhigh-fast' },\n\t\t\t\t\t{ name: 'GPT-5.2 Codex Low', value: 'gpt-5.2-codex-low' },\n\t\t\t\t\t{ name: 'GPT-5.2 Codex Low Fast', value: 'gpt-5.2-codex-low-fast' },\n\t\t\t\t\t{ name: 'GPT-5.2 Codex', value: 'gpt-5.2-codex' },\n\t\t\t\t\t{ name: 'GPT-5.2 Codex Fast', value: 'gpt-5.2-codex-fast' },\n\t\t\t\t\t{ name: 'GPT-5.2 Codex High', value: 'gpt-5.2-codex-high' },\n\t\t\t\t\t{ name: 'GPT-5.2 Codex High Fast', value: 'gpt-5.2-codex-high-fast' },\n\t\t\t\t\t{ name: 'GPT-5.2 Codex XHigh', value: 'gpt-5.2-codex-xhigh' },\n\t\t\t\t\t{ name: 'GPT-5.2 Codex XHigh Fast', value: 'gpt-5.2-codex-xhigh-fast' },\n\t\t\t\t\t// GPT-5.1 models\n\t\t\t\t\t{ name: 'GPT-5.1 Low', value: 'gpt-5.1-low' },\n\t\t\t\t\t{ name: 'GPT-5.1', value: 'gpt-5.1' },\n\t\t\t\t\t{ name: 'GPT-5.1 High', value: 'gpt-5.1-high' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max Low', value: 'gpt-5.1-codex-max-low' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max Low Fast', value: 'gpt-5.1-codex-max-low-fast' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max Medium', value: 'gpt-5.1-codex-max-medium' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max Medium Fast', value: 'gpt-5.1-codex-max-medium-fast' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max High', value: 'gpt-5.1-codex-max-high' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max High Fast', value: 'gpt-5.1-codex-max-high-fast' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max XHigh', value: 'gpt-5.1-codex-max-xhigh' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Max XHigh Fast', value: 'gpt-5.1-codex-max-xhigh-fast' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Mini Low', value: 'gpt-5.1-codex-mini-low' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Mini', value: 'gpt-5.1-codex-mini' },\n\t\t\t\t\t{ name: 'GPT-5.1 Codex Mini High', value: 'gpt-5.1-codex-mini-high' },\n\t\t\t\t\t// GPT-5 models\n\t\t\t\t\t{ name: 'GPT-5 Mini', value: 'gpt-5-mini' },\n\t\t\t\t\t// Grok models\n\t\t\t\t\t{ name: 'Grok 4 20', value: 'grok-4-20' },\n\t\t\t\t\t{ name: 'Grok 4 20 Thinking', value: 'grok-4-20-thinking' },\n\t\t\t\t\t// Kimi models\n\t\t\t\t\t{ name: 'Kimi K2.5', value: 'kimi-k2.5' },\n\t\t\t\t],\n\t\t\t\tdefault: 'auto',\n\t\t\t},\n\t\t\t{\n\t\t\t\tdisplayName: 'Options',\n\t\t\t\tname: 'options',\n\t\t\t\tplaceholder: 'Add Option',\n\t\t\t\tdescription: 'Additional options to configure',\n\t\t\t\ttype: 'collection',\n\t\t\t\tdefault: {},\n\t\t\t\toptions: [\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Binary Path',\n\t\t\t\t\t\tname: 'binaryPath',\n\t\t\t\t\t\tdefault: 'cursor-agent',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Path to the cursor-agent binary. Defaults to \"cursor-agent\" (must be in PATH).',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tdisplayName: 'Working Directory',\n\t\t\t\t\t\tname: 'workingDirectory',\n\t\t\t\t\t\tdefault: '',\n\t\t\t\t\t\tdescription:\n\t\t\t\t\t\t\t'Working directory for the cursor-agent process. Leave empty to use the default.',\n\t\t\t\t\t\ttype: 'string',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t};\n\n\tasync supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData> {\n\t\tconst modelName = this.getNodeParameter('model', itemIndex) as string;\n\n\t\tconst options = this.getNodeParameter('options', itemIndex, {}) as {\n\t\t\tbinaryPath?: string;\n\t\t\tworkingDirectory?: string;\n\t\t};\n\n\t\tconst model = new ChatCursorAgentCLI({\n\t\t\tmodel: modelName,\n\t\t\tbinaryPath: options.binaryPath ?? 'cursor-agent',\n\t\t\tworkingDirectory: options.workingDirectory ?? '',\n\t\t});\n\n\t\tmodel.callbacks = [new N8nLlmTracing(this)];\n\n\t\treturn {\n\t\t\tresponse: model,\n\t\t};\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA8B;AAE9B,sBAAuD;AAIvD,0BAMO;AAEP,0BAA6C;AAE7C,2BAA8B;AAC9B,2BAAsB;AActB,MAAM,0BAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAgBhC,MAAM,2BAA2B,iCAAc;AAAA,EAS9C,YAAY,QAA2B;AACtC,UAAM,CAAC,CAAC;AAHT,sBAA+B,CAAC;AAI/B,SAAK,QAAQ,OAAO;AACpB,SAAK,aAAa,OAAO;AACzB,SAAK,mBAAmB,OAAO;AAAA,EAChC;AAAA,EAEA,WAAmB;AAClB,WAAO;A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AM;AAAA,UACN,aAAa;AAAA,UACb,aAAa;AAAA,UACb,MAAM;AAAA,UACN,SAAS,CAAC;AAAA,UACV,SAAS;AAAA,YACR;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aACC;AAAA,cACD,MAAM;AAAA,YACP;AAAA,YACA;AAAA,cACC,aAAa;AAAA,cACb,MAAM;AAAA,cACN,SAAS;AAAA,cACT,aACC;AAAA,cACD,MAAM;AAAA,YACP;AAAA,UACD;AAAA,QACD;AAAA,MACD;AAAA,IACD;AAAA;AAAA,EAEA,MAAM,WAAuC,WAAwC;AACpF,UAAM,YAAY,KAAK,iBAAiB,SAAS,SAAS;AAE1D,UAAM,UAAU,KAAK,iBAAiB,WAAW,WAAW,CAAC,CAAC;AAK9D,UAAM,QAAQ,IAAI,mBAAmB;AAAA,MACpC,OAAO;AAAA,MACP,YAAY,QAAQ,cAAc;AAAA,MAClC,kBAAkB,QAAQ,oBAAoB;AAAA,IAC/C,CAAC;AAED,UAAM,YAAY,CAAC,IAAI,mCAAc,IAAI,CAAC;AAE1C,WAAO;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACD;AACD;","names":["aiMessage"]}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
{"name":"mistralCloudApi","displayName":"Mistral Cloud API","documentationUrl":"mistral","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"https://api.mistral.ai/v1","url":"/models","method":"GET"}},"supportedNodes":["embeddingsMistralCloud","lmChatMistralCloud"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsMistralCloud/mistral.svg"},
|
|
15
15
|
{"name":"lemonadeApi","displayName":"Lemonade","documentationUrl":"lemonade","properties":[{"displayName":"Base URL","name":"baseUrl","required":true,"type":"string","default":"http://localhost:8000/api/v1"},{"displayName":"API Key","hint":"Optional API key for Lemonade server authentication. Not required for default Lemonade installation","name":"apiKey","type":"string","typeOptions":{"password":true},"default":"","required":false}],"test":{"request":{"baseURL":"={{ $credentials.baseUrl }}","url":"/models","method":"GET"}},"supportedNodes":["embeddingsLemonade","lmChatLemonade","lmLemonade"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/embeddings/EmbeddingsLemonade/lemonade.svg","authenticate":{}},
|
|
16
16
|
{"name":"ollamaApi","displayName":"Ollama","documentationUrl":"ollama","properties":[{"displayName":"Base URL","name":"baseUrl","required":true,"type":"string","default":"http://localhost:11434"},{"displayName":"API Key","hint":"When using Ollama behind a proxy with authentication (such as Open WebUI), provide the Bearer token/API key here. This is not required for the default Ollama installation","name":"apiKey","type":"string","typeOptions":{"password":true},"default":"","required":false}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.baseUrl }}","url":"/api/tags","method":"GET"}},"supportedNodes":["ollama","embeddingsOllama","lmChatOllama","lmOllama"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vendors/Ollama/ollama.svg"},
|
|
17
|
+
{"name":"nineRouterApi","displayName":"9Router","documentationUrl":"nineRouter","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":false,"default":"","description":"Optional API key if REQUIRE_API_KEY is enabled on your 9Router instance"},{"displayName":"Base URL","name":"url","type":"string","default":"http://localhost:20128/api/v1","description":"Base URL of your 9Router instance"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/models"}},"supportedNodes":["lmChat9Router"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChat9Router/9router.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChat9Router/9router.dark.svg"}},
|
|
17
18
|
{"name":"openRouterApi","displayName":"OpenRouter","documentationUrl":"openrouter","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""},{"displayName":"Base URL","name":"url","type":"hidden","default":"https://openrouter.ai/api/v1"}],"authenticate":{"type":"generic","properties":{"headers":{"Authorization":"=Bearer {{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{ $credentials.url }}","url":"/key"}},"supportedNodes":["lmChatOpenRouter"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatOpenRouter/openrouter.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatOpenRouter/openrouter.dark.svg"}},
|
|
18
19
|
{"name":"pineconeApi","displayName":"PineconeApi","documentationUrl":"pinecone","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"Api-Key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"https://api.pinecone.io/indexes","headers":{"accept":"application/json; charset=utf-8"}}},"supportedNodes":["vectorStorePinecone","vectorStorePineconeInsert","vectorStorePineconeLoad"],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStorePinecone/pinecone.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStorePinecone/pinecone.dark.svg"}},
|
|
19
20
|
{"name":"qdrantApi","displayName":"QdrantApi","documentationUrl":"https://docs.n8n.io/integrations/builtin/credentials/qdrant/","properties":[{"displayName":"API Key","name":"apiKey","type":"string","typeOptions":{"password":true},"required":false,"default":""},{"displayName":"Qdrant URL","name":"qdrantUrl","type":"string","required":true,"default":""}],"authenticate":{"type":"generic","properties":{"headers":{"api-key":"={{$credentials.apiKey}}"}}},"test":{"request":{"baseURL":"={{$credentials.qdrantUrl}}","url":"/collections"}},"supportedNodes":["vectorStoreQdrant"],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/vector_store/VectorStoreQdrant/qdrant.svg"},
|
package/dist/types/nodes.json
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
{"displayName":"Azure OpenAI Chat Model","name":"lmChatAzureOpenAi","group":["transform"],"version":1,"description":"For advanced usage with an AI chain","defaults":{"name":"Azure OpenAI Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatazureopenai/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"azureOpenAiApi","required":true,"displayOptions":{"show":{"authentication":["azureOpenAiApi"]}}},{"name":"azureEntraCognitiveServicesOAuth2Api","required":true,"displayOptions":{"show":{"authentication":["azureEntraCognitiveServicesOAuth2Api"]}}}],"properties":[{"displayName":"Authentication","name":"authentication","type":"options","default":"azureOpenAiApi","options":[{"name":"API Key","value":"azureOpenAiApi"},{"name":"Azure Entra ID (OAuth2)","value":"azureEntraCognitiveServicesOAuth2Api"}]},{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.","name":"notice","type":"notice","default":"","displayOptions":{"show":{"/options.responseFormat":["json_object"]}}},{"displayName":"Model (Deployment) Name","name":"model","type":"string","description":"The name of the model(deployment) to use (e.g., gpt-4, gpt-35-turbo)","required":true,"default":""},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Frequency Penalty","name":"frequencyPenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim","type":"number"},{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768). Use -1 for default.","type":"number","typeOptions":{"maxValue":128000}},{"displayName":"Response Format","name":"responseFormat","default":"text","type":"options","options":[{"name":"Text","value":"text","description":"Regular text response"},{"name":"JSON","value":"json_object","description":"Enables JSON mode, which should guarantee the message the model generates is valid JSON"}]},{"displayName":"Presence Penalty","name":"presencePenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Timeout (Ms)","name":"timeout","default":60000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt on failure","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatAzureOpenAi/azure.svg"},
|
|
37
37
|
{"displayName":"AWS Bedrock Chat Model","name":"lmChatAwsBedrock","group":["transform"],"version":[1,1.1],"description":"Language Model AWS Bedrock","defaults":{"name":"AWS Bedrock Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatawsbedrock/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"aws","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"=https://bedrock.{{$credentials?.region ?? \"eu-central-1\"}}.amazonaws.com"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model Source","name":"modelSource","type":"options","displayOptions":{"show":{"@version":[{"_cnd":{"gte":1.1}}]}},"options":[{"name":"On-Demand Models","value":"onDemand","description":"Standard foundation models with on-demand pricing"},{"name":"Inference Profiles","value":"inferenceProfile","description":"Cross-region inference profiles (required for models like Claude Sonnet 4 and others)"}],"default":"onDemand","description":"Choose between on-demand foundation models or inference profiles"},{"displayName":"Model","name":"model","type":"options","allowArbitraryValues":true,"description":"The model which will generate the completion. <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/foundation-models.html\">Learn more</a>.","displayOptions":{"hide":{"modelSource":["inferenceProfile"]}},"typeOptions":{"loadOptionsDependsOn":["modelSource"],"loadOptions":{"routing":{"request":{"method":"GET","url":"/foundation-models?&byOutputModality=TEXT&byInferenceType=ON_DEMAND"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"modelSummaries"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.modelName}}","description":"={{$responseItem.modelArn}}","value":"={{$responseItem.modelId}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":""},{"displayName":"Model","name":"model","type":"options","allowArbitraryValues":true,"description":"The inference profile which will generate the completion. <a href=\"https://docs.aws.amazon.com/bedrock/latest/userguide/inference-profiles-use.html\">Learn more</a>.","displayOptions":{"show":{"modelSource":["inferenceProfile"]}},"typeOptions":{"loadOptionsDependsOn":["modelSource"],"loadOptions":{"routing":{"request":{"method":"GET","url":"/inference-profiles?maxResults=1000"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"inferenceProfileSummaries"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.inferenceProfileName}}","description":"={{$responseItem.description || $responseItem.inferenceProfileArn}}","value":"={{$responseItem.inferenceProfileId}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":""},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Maximum Number of Tokens","name":"maxTokensToSample","default":2000,"description":"The maximum number of tokens to generate in the completion","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatAwsBedrock/bedrock.svg"},
|
|
38
38
|
{"displayName":"Cohere Chat Model","name":"lmChatCohere","group":["transform"],"version":[1],"description":"For advanced usage with an AI chain","defaults":{"name":"Cohere Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatcohere/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"cohereApi","required":true}],"requestDefaults":{"baseURL":"={{$credentials?.url}}","headers":{"accept":"application/json","authorization":"=Bearer {{$credentials?.apiKey}}"}},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"https://docs.cohere.com/docs/models\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/v1/models?page_size=100&endpoint=chat"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"models"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.name}}","value":"={{$responseItem.name}}","description":"={{$responseItem.description}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"default":"command-a-03-2025"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"}]}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatCohere/cohere.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatCohere/cohere.dark.svg"}},
|
|
39
|
-
{"displayName":"Cursor Agent CLI Chat Model","name":"lmChatCursorAgent","group":["transform"],"version":[1],"description":"Chat model powered by the Cursor Agent CLI. Requires cursor-agent to be installed locally.","defaults":{"name":"Cursor Agent CLI Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","description":"The model to use via cursor-agent CLI.","options":[{"name":"Auto","value":"auto"},{"name":"Composer
|
|
39
|
+
{"displayName":"Cursor Agent CLI Chat Model","name":"lmChatCursorAgent","group":["transform"],"version":[1],"description":"Chat model powered by the Cursor Agent CLI. Requires cursor-agent to be installed locally.","defaults":{"name":"Cursor Agent CLI Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","description":"The model to use via cursor-agent CLI.","options":[{"name":"Auto","value":"auto"},{"name":"Composer 2 Fast","value":"composer-2-fast"},{"name":"Composer 2","value":"composer-2"},{"name":"Composer 1.5","value":"composer-1.5"},{"name":"Claude 4.6 Opus High","value":"claude-4.6-opus-high"},{"name":"Claude 4.6 Opus High Thinking","value":"claude-4.6-opus-high-thinking"},{"name":"Claude 4.6 Opus Max","value":"claude-4.6-opus-max"},{"name":"Claude 4.6 Opus Max Thinking","value":"claude-4.6-opus-max-thinking"},{"name":"Claude 4.6 Sonnet Medium","value":"claude-4.6-sonnet-medium"},{"name":"Claude 4.6 Sonnet Medium Thinking","value":"claude-4.6-sonnet-medium-thinking"},{"name":"Claude 4.5 Opus High","value":"claude-4.5-opus-high"},{"name":"Claude 4.5 Opus High Thinking","value":"claude-4.5-opus-high-thinking"},{"name":"Claude 4.5 Sonnet","value":"claude-4.5-sonnet"},{"name":"Claude 4.5 Sonnet Thinking","value":"claude-4.5-sonnet-thinking"},{"name":"Claude 4 Sonnet","value":"claude-4-sonnet"},{"name":"Claude 4 Sonnet 1M","value":"claude-4-sonnet-1m"},{"name":"Claude 4 Sonnet Thinking","value":"claude-4-sonnet-thinking"},{"name":"Claude 4 Sonnet 1M Thinking","value":"claude-4-sonnet-1m-thinking"},{"name":"Gemini 3.1 Pro","value":"gemini-3.1-pro"},{"name":"Gemini 3 Flash","value":"gemini-3-flash"},{"name":"GPT-5.4 Low","value":"gpt-5.4-low"},{"name":"GPT-5.4 Medium","value":"gpt-5.4-medium"},{"name":"GPT-5.4 Medium Fast","value":"gpt-5.4-medium-fast"},{"name":"GPT-5.4 High","value":"gpt-5.4-high"},{"name":"GPT-5.4 High Fast","value":"gpt-5.4-high-fast"},{"name":"GPT-5.4 XHigh","value":"gpt-5.4-xhigh"},{"name":"GPT-5.4 XHigh Fast","value":"gpt-5.4-xhigh-fast"},{"name":"GPT-5.4 Mini None","value":"gpt-5.4-mini-none"},{"name":"GPT-5.4 Mini Low","value":"gpt-5.4-mini-low"},{"name":"GPT-5.4 Mini Medium","value":"gpt-5.4-mini-medium"},{"name":"GPT-5.4 Mini High","value":"gpt-5.4-mini-high"},{"name":"GPT-5.4 Mini XHigh","value":"gpt-5.4-mini-xhigh"},{"name":"GPT-5.4 Nano None","value":"gpt-5.4-nano-none"},{"name":"GPT-5.4 Nano Low","value":"gpt-5.4-nano-low"},{"name":"GPT-5.4 Nano Medium","value":"gpt-5.4-nano-medium"},{"name":"GPT-5.4 Nano High","value":"gpt-5.4-nano-high"},{"name":"GPT-5.4 Nano XHigh","value":"gpt-5.4-nano-xhigh"},{"name":"GPT-5.3 Codex Low","value":"gpt-5.3-codex-low"},{"name":"GPT-5.3 Codex Low Fast","value":"gpt-5.3-codex-low-fast"},{"name":"GPT-5.3 Codex","value":"gpt-5.3-codex"},{"name":"GPT-5.3 Codex Fast","value":"gpt-5.3-codex-fast"},{"name":"GPT-5.3 Codex High","value":"gpt-5.3-codex-high"},{"name":"GPT-5.3 Codex High Fast","value":"gpt-5.3-codex-high-fast"},{"name":"GPT-5.3 Codex XHigh","value":"gpt-5.3-codex-xhigh"},{"name":"GPT-5.3 Codex XHigh Fast","value":"gpt-5.3-codex-xhigh-fast"},{"name":"GPT-5.3 Codex Spark Preview Low","value":"gpt-5.3-codex-spark-preview-low"},{"name":"GPT-5.3 Codex Spark Preview","value":"gpt-5.3-codex-spark-preview"},{"name":"GPT-5.3 Codex Spark Preview High","value":"gpt-5.3-codex-spark-preview-high"},{"name":"GPT-5.3 Codex Spark Preview XHigh","value":"gpt-5.3-codex-spark-preview-xhigh"},{"name":"GPT-5.2 Low","value":"gpt-5.2-low"},{"name":"GPT-5.2 Low Fast","value":"gpt-5.2-low-fast"},{"name":"GPT-5.2","value":"gpt-5.2"},{"name":"GPT-5.2 Fast","value":"gpt-5.2-fast"},{"name":"GPT-5.2 High","value":"gpt-5.2-high"},{"name":"GPT-5.2 High Fast","value":"gpt-5.2-high-fast"},{"name":"GPT-5.2 XHigh","value":"gpt-5.2-xhigh"},{"name":"GPT-5.2 XHigh Fast","value":"gpt-5.2-xhigh-fast"},{"name":"GPT-5.2 Codex Low","value":"gpt-5.2-codex-low"},{"name":"GPT-5.2 Codex Low Fast","value":"gpt-5.2-codex-low-fast"},{"name":"GPT-5.2 Codex","value":"gpt-5.2-codex"},{"name":"GPT-5.2 Codex Fast","value":"gpt-5.2-codex-fast"},{"name":"GPT-5.2 Codex High","value":"gpt-5.2-codex-high"},{"name":"GPT-5.2 Codex High Fast","value":"gpt-5.2-codex-high-fast"},{"name":"GPT-5.2 Codex XHigh","value":"gpt-5.2-codex-xhigh"},{"name":"GPT-5.2 Codex XHigh Fast","value":"gpt-5.2-codex-xhigh-fast"},{"name":"GPT-5.1 Low","value":"gpt-5.1-low"},{"name":"GPT-5.1","value":"gpt-5.1"},{"name":"GPT-5.1 High","value":"gpt-5.1-high"},{"name":"GPT-5.1 Codex Max Low","value":"gpt-5.1-codex-max-low"},{"name":"GPT-5.1 Codex Max Low Fast","value":"gpt-5.1-codex-max-low-fast"},{"name":"GPT-5.1 Codex Max Medium","value":"gpt-5.1-codex-max-medium"},{"name":"GPT-5.1 Codex Max Medium Fast","value":"gpt-5.1-codex-max-medium-fast"},{"name":"GPT-5.1 Codex Max High","value":"gpt-5.1-codex-max-high"},{"name":"GPT-5.1 Codex Max High Fast","value":"gpt-5.1-codex-max-high-fast"},{"name":"GPT-5.1 Codex Max XHigh","value":"gpt-5.1-codex-max-xhigh"},{"name":"GPT-5.1 Codex Max XHigh Fast","value":"gpt-5.1-codex-max-xhigh-fast"},{"name":"GPT-5.1 Codex Mini Low","value":"gpt-5.1-codex-mini-low"},{"name":"GPT-5.1 Codex Mini","value":"gpt-5.1-codex-mini"},{"name":"GPT-5.1 Codex Mini High","value":"gpt-5.1-codex-mini-high"},{"name":"GPT-5 Mini","value":"gpt-5-mini"},{"name":"Grok 4 20","value":"grok-4-20"},{"name":"Grok 4 20 Thinking","value":"grok-4-20-thinking"},{"name":"Kimi K2.5","value":"kimi-k2.5"}],"default":"auto"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to configure","type":"collection","default":{},"options":[{"displayName":"Binary Path","name":"binaryPath","default":"cursor-agent","description":"Path to the cursor-agent binary. Defaults to \"cursor-agent\" (must be in PATH).","type":"string"},{"displayName":"Working Directory","name":"workingDirectory","default":"","description":"Working directory for the cursor-agent process. Leave empty to use the default.","type":"string"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatCursorAgent/cursorAgent.svg"},
|
|
40
40
|
{"displayName":"DeepSeek Chat Model","name":"lmChatDeepSeek","group":["transform"],"version":[1],"description":"For advanced usage with an AI chain","defaults":{"name":"DeepSeek Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatdeepseek/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"deepSeekApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials?.url }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.","name":"notice","type":"notice","default":"","displayOptions":{"show":{"/options.responseFormat":["json_object"]}}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"https://api-docs.deepseek.com/quick_start/pricing\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"deepseek-chat"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Frequency Penalty","name":"frequencyPenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim","type":"number"},{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).","type":"number","typeOptions":{"maxValue":32768}},{"displayName":"Response Format","name":"responseFormat","default":"text","type":"options","options":[{"name":"Text","value":"text","description":"Regular text response"},{"name":"JSON","value":"json_object","description":"Enables JSON mode, which should guarantee the message the model generates is valid JSON"}]},{"displayName":"Presence Penalty","name":"presencePenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Timeout","name":"timeout","default":360000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatDeepSeek/deepseek.svg"},
|
|
41
41
|
{"displayName":"Google Gemini Chat Model","name":"lmChatGoogleGemini","group":["transform"],"version":1,"description":"Chat Model Google Gemini","defaults":{"name":"Google Gemini Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglegemini/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"googlePalmApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials.host }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"modelName","type":"options","description":"The model which will generate the completion. <a href=\"https://developers.generativeai.google/api/rest/generativelanguage/models/list\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/v1beta/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"models"}},{"type":"filter","properties":{"pass":"={{ !$responseItem.name.includes('embedding') }}"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.name}}","value":"={{$responseItem.name}}","description":"={{$responseItem.description}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"models/gemini-2.5-flash"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Maximum Number of Tokens","name":"maxOutputTokens","default":2048,"description":"The maximum number of tokens to generate in the completion","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.4,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Top K","name":"topK","default":32,"typeOptions":{"maxValue":40,"minValue":-1,"numberPrecision":1},"description":"Used to remove \"long tail\" low probability responses. Defaults to -1, which disables it.","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"},{"displayName":"Safety Settings","name":"safetySettings","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{"values":{"category":"HARM_CATEGORY_HARASSMENT","threshold":"HARM_BLOCK_THRESHOLD_UNSPECIFIED"}},"placeholder":"Add Option","options":[{"name":"values","displayName":"Values","values":[{"displayName":"Safety Category","name":"category","type":"options","description":"The category of harmful content to block","default":"HARM_CATEGORY_UNSPECIFIED","options":[{"value":"HARM_CATEGORY_HARASSMENT","name":"HARM_CATEGORY_HARASSMENT","description":"Harassment content"},{"value":"HARM_CATEGORY_HATE_SPEECH","name":"HARM_CATEGORY_HATE_SPEECH","description":"Hate speech and content"},{"value":"HARM_CATEGORY_SEXUALLY_EXPLICIT","name":"HARM_CATEGORY_SEXUALLY_EXPLICIT","description":"Sexually explicit content"},{"value":"HARM_CATEGORY_DANGEROUS_CONTENT","name":"HARM_CATEGORY_DANGEROUS_CONTENT","description":"Dangerous content"}]},{"displayName":"Safety Threshold","name":"threshold","type":"options","description":"The threshold of harmful content to block","default":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","options":[{"value":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","name":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","description":"Threshold is unspecified"},{"value":"BLOCK_LOW_AND_ABOVE","name":"BLOCK_LOW_AND_ABOVE","description":"Content with NEGLIGIBLE will be allowed"},{"value":"BLOCK_MEDIUM_AND_ABOVE","name":"BLOCK_MEDIUM_AND_ABOVE","description":"Content with NEGLIGIBLE and LOW will be allowed"},{"value":"BLOCK_ONLY_HIGH","name":"BLOCK_ONLY_HIGH","description":"Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed"},{"value":"BLOCK_NONE","name":"BLOCK_NONE","description":"All content will be allowed"}]}]}]}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatGoogleGemini/google.svg"},
|
|
42
42
|
{"displayName":"Google Vertex Chat Model","name":"lmChatGoogleVertex","group":["transform"],"version":1,"description":"Chat Model Google Vertex","defaults":{"name":"Google Vertex Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatgooglevertex/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"googleApi","required":true}],"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Project ID","name":"projectId","type":"resourceLocator","default":{"mode":"list","value":""},"required":true,"description":"Select or enter your Google Cloud project ID","modes":[{"displayName":"From List","name":"list","type":"list","typeOptions":{"searchListMethod":"gcpProjectsList"}},{"displayName":"ID","name":"id","type":"string"}]},{"displayName":"Model Name","name":"modelName","type":"string","description":"The model which will generate the completion. <a href=\"https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models\">Learn more</a>.","default":"gemini-2.5-flash"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Maximum Number of Tokens","name":"maxOutputTokens","default":2048,"description":"The maximum number of tokens to generate in the completion","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.4,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Top K","name":"topK","default":32,"typeOptions":{"maxValue":40,"minValue":-1,"numberPrecision":1},"description":"Used to remove \"long tail\" low probability responses. Defaults to -1, which disables it.","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"},{"displayName":"Safety Settings","name":"safetySettings","type":"fixedCollection","typeOptions":{"multipleValues":true},"default":{"values":{"category":"HARM_CATEGORY_HARASSMENT","threshold":"HARM_BLOCK_THRESHOLD_UNSPECIFIED"}},"placeholder":"Add Option","options":[{"name":"values","displayName":"Values","values":[{"displayName":"Safety Category","name":"category","type":"options","description":"The category of harmful content to block","default":"HARM_CATEGORY_UNSPECIFIED","options":[{"value":"HARM_CATEGORY_HARASSMENT","name":"HARM_CATEGORY_HARASSMENT","description":"Harassment content"},{"value":"HARM_CATEGORY_HATE_SPEECH","name":"HARM_CATEGORY_HATE_SPEECH","description":"Hate speech and content"},{"value":"HARM_CATEGORY_SEXUALLY_EXPLICIT","name":"HARM_CATEGORY_SEXUALLY_EXPLICIT","description":"Sexually explicit content"},{"value":"HARM_CATEGORY_DANGEROUS_CONTENT","name":"HARM_CATEGORY_DANGEROUS_CONTENT","description":"Dangerous content"}]},{"displayName":"Safety Threshold","name":"threshold","type":"options","description":"The threshold of harmful content to block","default":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","options":[{"value":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","name":"HARM_BLOCK_THRESHOLD_UNSPECIFIED","description":"Threshold is unspecified"},{"value":"BLOCK_LOW_AND_ABOVE","name":"BLOCK_LOW_AND_ABOVE","description":"Content with NEGLIGIBLE will be allowed"},{"value":"BLOCK_MEDIUM_AND_ABOVE","name":"BLOCK_MEDIUM_AND_ABOVE","description":"Content with NEGLIGIBLE and LOW will be allowed"},{"value":"BLOCK_ONLY_HIGH","name":"BLOCK_ONLY_HIGH","description":"Content with NEGLIGIBLE, LOW, and MEDIUM will be allowed"},{"value":"BLOCK_NONE","name":"BLOCK_NONE","description":"All content will be allowed"}]}]}]},{"displayName":"Thinking Budget","name":"thinkingBudget","description":"Controls reasoning tokens for thinking models. Set to 0 to disable automatic thinking. Set to -1 for dynamic thinking. Leave empty for auto mode.","type":"number","typeOptions":{"minValue":-1,"numberPrecision":0}}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatGoogleVertex/google.svg"},
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
{"displayName":"Mistral Cloud Chat Model","name":"lmChatMistralCloud","group":["transform"],"version":1,"description":"For advanced usage with an AI chain","defaults":{"name":"Mistral Cloud Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatmistralcloud/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"mistralCloudApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"https://api.mistral.ai/v1"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"https://docs.mistral.ai/platform/endpoints/\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"filter","properties":{"pass":"={{ !$responseItem.id.includes('embed') }}"}},{"type":"setKeyValue","properties":{"name":"={{ $responseItem.id }}","value":"={{ $responseItem.id }}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"mistral-small"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).","type":"number","typeOptions":{"maxValue":32768}},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"},{"displayName":"Enable Safe Mode","name":"safeMode","default":false,"type":"boolean","description":"Whether to inject a safety prompt before all conversations"},{"displayName":"Random Seed","name":"randomSeed","type":"number","description":"The seed to use for random sampling. If set, different calls will generate deterministic results."}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatMistralCloud/mistral.svg"},
|
|
45
45
|
{"displayName":"Lemonade Chat Model","name":"lmChatLemonade","group":["transform"],"version":1,"description":"Language Model Lemonade Chat","defaults":{"name":"Lemonade Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatlemonade/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"lemonadeApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials.baseUrl.replace(new RegExp(\"/$\"), \"\") }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","default":"","description":"The model which will generate the completion. Models are loaded and managed through the Lemonade server.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"required":true},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls the randomness of the generated text. Lower values make the output more focused and deterministic, while higher values make it more diverse and random.","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Chooses from the smallest possible set of tokens whose cumulative probability exceeds the probability top_p. Helps generate more human-like text by reducing repetitions.","type":"number"},{"displayName":"Frequency Penalty","name":"frequencyPenalty","type":"number","default":0,"typeOptions":{"minValue":-2,"maxValue":2,"numberPrecision":1},"description":"Adjusts the penalty for tokens that have already appeared in the generated text. Positive values discourage repetition, negative values encourage it."},{"displayName":"Presence Penalty","name":"presencePenalty","type":"number","default":0,"typeOptions":{"minValue":-2,"maxValue":2,"numberPrecision":1},"description":"Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity."},{"displayName":"Max Tokens to Generate","name":"maxTokens","type":"number","default":-1,"description":"The maximum number of tokens to generate. Set to -1 for no limit. Be cautious when setting this to a large value, as it can lead to very long outputs."},{"displayName":"Stop Sequences","name":"stop","type":"string","default":"","description":"Comma-separated list of sequences where the model will stop generating text"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LMChatLemonade/lemonade.svg"},
|
|
46
46
|
{"displayName":"Ollama Chat Model","name":"lmChatOllama","group":["transform"],"version":1,"description":"Language Model Ollama","defaults":{"name":"Ollama Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatollama/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"ollamaApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials.baseUrl.replace(new RegExp(\"/$\"), \"\") }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"Model","name":"model","type":"options","default":"llama3.2","description":"The model which will generate the completion. To download models, visit <a href=\"https://ollama.ai/library\">Ollama Models Library</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/api/tags"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"models"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.name}}","value":"={{$responseItem.name}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"required":true},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls the randomness of the generated text. Lower values make the output more focused and deterministic, while higher values make it more diverse and random.","type":"number"},{"displayName":"Top K","name":"topK","default":-1,"typeOptions":{"maxValue":100,"minValue":-1,"numberPrecision":1},"description":"Limits the number of highest probability vocabulary tokens to consider at each step. A higher value increases diversity but may reduce coherence. Set to -1 to disable.","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Chooses from the smallest possible set of tokens whose cumulative probability exceeds the probability top_p. Helps generate more human-like text by reducing repetitions.","type":"number"},{"displayName":"Frequency Penalty","name":"frequencyPenalty","type":"number","default":0,"typeOptions":{"minValue":0},"description":"Adjusts the penalty for tokens that have already appeared in the generated text. Higher values discourage repetition."},{"displayName":"Keep Alive","name":"keepAlive","type":"string","default":"5m","description":"Specifies the duration to keep the loaded model in memory after use. Useful for frequently used models. Format: 1h30m (1 hour 30 minutes)."},{"displayName":"Low VRAM Mode","name":"lowVram","type":"boolean","default":false,"description":"Whether to Activate low VRAM mode, which reduces memory usage at the cost of slower generation speed. Useful for GPUs with limited memory."},{"displayName":"Main GPU ID","name":"mainGpu","type":"number","default":0,"description":"Specifies the ID of the GPU to use for the main computation. Only change this if you have multiple GPUs."},{"displayName":"Context Batch Size","name":"numBatch","type":"number","default":512,"description":"Sets the batch size for prompt processing. Larger batch sizes may improve generation speed but increase memory usage."},{"displayName":"Context Length","name":"numCtx","type":"number","default":2048,"description":"The maximum number of tokens to use as context for generating the next token. Smaller values reduce memory usage, while larger values provide more context to the model."},{"displayName":"Number of GPUs","name":"numGpu","type":"number","default":-1,"description":"Specifies the number of GPUs to use for parallel processing. Set to -1 for auto-detection."},{"displayName":"Max Tokens to Generate","name":"numPredict","type":"number","default":-1,"description":"The maximum number of tokens to generate. Set to -1 for no limit. Be cautious when setting this to a large value, as it can lead to very long outputs."},{"displayName":"Number of CPU Threads","name":"numThread","type":"number","default":0,"description":"Specifies the number of CPU threads to use for processing. Set to 0 for auto-detection."},{"displayName":"Penalize Newlines","name":"penalizeNewline","type":"boolean","default":true,"description":"Whether the model will be less likely to generate newline characters, encouraging longer continuous sequences of text"},{"displayName":"Presence Penalty","name":"presencePenalty","type":"number","default":0,"description":"Adjusts the penalty for tokens based on their presence in the generated text so far. Positive values penalize tokens that have already appeared, encouraging diversity."},{"displayName":"Repetition Penalty","name":"repeatPenalty","type":"number","default":1,"description":"Adjusts the penalty factor for repeated tokens. Higher values more strongly discourage repetition. Set to 1.0 to disable repetition penalty."},{"displayName":"Use Memory Locking","name":"useMLock","type":"boolean","default":false,"description":"Whether to lock the model in memory to prevent swapping. This can improve performance but requires sufficient available memory."},{"displayName":"Use Memory Mapping","name":"useMMap","type":"boolean","default":true,"description":"Whether to use memory mapping for loading the model. This can reduce memory usage but may impact performance. Recommended to keep enabled."},{"displayName":"Load Vocabulary Only","name":"vocabOnly","type":"boolean","default":false,"description":"Whether to only load the model vocabulary without the weights. Useful for quickly testing tokenization."},{"displayName":"Output Format","name":"format","type":"options","options":[{"name":"Default","value":"default"},{"name":"JSON","value":"json"}],"default":"default","description":"Specifies the format of the API response"}]}],"iconUrl":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LMChatOllama/ollama.svg"},
|
|
47
|
+
{"displayName":"9Router Chat Model","name":"lmChat9Router","group":["transform"],"version":[1],"description":"For advanced usage with an AI chain","defaults":{"name":"9Router Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://github.com/9router/9router"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"nineRouterApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials?.url }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.","name":"notice","type":"notice","default":"","displayOptions":{"show":{"/options.responseFormat":["json_object"]}}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"http://localhost:20128\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"openai/gpt-4o"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Frequency Penalty","name":"frequencyPenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim","type":"number"},{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).","type":"number","typeOptions":{"maxValue":32768}},{"displayName":"Response Format","name":"responseFormat","default":"text","type":"options","options":[{"name":"Text","value":"text","description":"Regular text response"},{"name":"JSON","value":"json_object","description":"Enables JSON mode, which should guarantee the message the model generates is valid JSON"}]},{"displayName":"Presence Penalty","name":"presencePenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Timeout","name":"timeout","default":360000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"}]}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChat9Router/9router.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChat9Router/9router.dark.svg"}},
|
|
47
48
|
{"displayName":"OpenRouter Chat Model","name":"lmChatOpenRouter","group":["transform"],"version":[1],"description":"For advanced usage with an AI chain","defaults":{"name":"OpenRouter Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenrouter/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"openRouterApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials?.url }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.","name":"notice","type":"notice","default":"","displayOptions":{"show":{"/options.responseFormat":["json_object"]}}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"https://openrouter.ai/docs/models\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"openai/gpt-4.1-mini"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Frequency Penalty","name":"frequencyPenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim","type":"number"},{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).","type":"number","typeOptions":{"maxValue":32768}},{"displayName":"Response Format","name":"responseFormat","default":"text","type":"options","options":[{"name":"Text","value":"text","description":"Regular text response"},{"name":"JSON","value":"json_object","description":"Enables JSON mode, which should guarantee the message the model generates is valid JSON"}]},{"displayName":"Presence Penalty","name":"presencePenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Timeout","name":"timeout","default":360000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"}]}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatOpenRouter/openrouter.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatOpenRouter/openrouter.dark.svg"}},
|
|
48
49
|
{"displayName":"Vercel AI Gateway Chat Model","name":"lmChatVercelAiGateway","group":["transform"],"version":[1],"description":"For advanced usage with an AI chain via Vercel AI Gateway","defaults":{"name":"Vercel AI Gateway Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatvercel/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"vercelAiGatewayApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials?.url }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.","name":"notice","type":"notice","default":"","displayOptions":{"show":{"/options.responseFormat":["json_object"]}}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"openai/gpt-4o"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Frequency Penalty","name":"frequencyPenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim","type":"number"},{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).","type":"number","typeOptions":{"maxValue":32768}},{"displayName":"Response Format","name":"responseFormat","default":"text","type":"options","options":[{"name":"Text","value":"text","description":"Regular text response"},{"name":"JSON","value":"json_object","description":"Enables JSON mode, which should guarantee the message the model generates is valid JSON"}]},{"displayName":"Presence Penalty","name":"presencePenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Timeout","name":"timeout","default":360000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"}]}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatVercelAiGateway/vercel.dark.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatVercelAiGateway/vercel.svg"}},
|
|
49
50
|
{"displayName":"xAI Grok Chat Model","name":"lmChatXAiGrok","group":["transform"],"version":[1],"description":"For advanced usage with an AI chain","defaults":{"name":"xAI Grok Chat Model"},"codex":{"categories":["AI"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]},"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatxaigrok/"}]}},"inputs":[],"outputs":["ai_languageModel"],"outputNames":["Model"],"credentials":[{"name":"xAiApi","required":true}],"requestDefaults":{"ignoreHttpStatusErrors":true,"baseURL":"={{ $credentials?.url }}"},"properties":[{"displayName":"This node must be connected to an AI chain. <a data-action='openSelectiveNodeCreator' data-action-parameter-creatorview='AI'>Insert one</a>","name":"notice","type":"notice","default":"","typeOptions":{"containerClass":"ndv-connection-hint-notice"}},{"displayName":"If using JSON response format, you must include word \"json\" in the prompt in your chain or agent. Also, make sure to select latest models released post November 2023.","name":"notice","type":"notice","default":"","displayOptions":{"show":{"/options.responseFormat":["json_object"]}}},{"displayName":"Model","name":"model","type":"options","description":"The model which will generate the completion. <a href=\"https://docs.x.ai/docs/models\">Learn more</a>.","typeOptions":{"loadOptions":{"routing":{"request":{"method":"GET","url":"/models"},"output":{"postReceive":[{"type":"rootProperty","properties":{"property":"data"}},{"type":"setKeyValue","properties":{"name":"={{$responseItem.id}}","value":"={{$responseItem.id}}"}},{"type":"sort","properties":{"key":"name"}}]}}}},"routing":{"send":{"type":"body","property":"model"}},"default":"grok-2-vision-1212"},{"displayName":"Options","name":"options","placeholder":"Add Option","description":"Additional options to add","type":"collection","default":{},"options":[{"displayName":"Frequency Penalty","name":"frequencyPenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim","type":"number"},{"displayName":"Maximum Number of Tokens","name":"maxTokens","default":-1,"description":"The maximum number of tokens to generate in the completion. Most models have a context length of 2048 tokens (except for the newest models, which support 32,768).","type":"number","typeOptions":{"maxValue":32768}},{"displayName":"Response Format","name":"responseFormat","default":"text","type":"options","options":[{"name":"Text","value":"text","description":"Regular text response"},{"name":"JSON","value":"json_object","description":"Enables JSON mode, which should guarantee the message the model generates is valid JSON"}]},{"displayName":"Presence Penalty","name":"presencePenalty","default":0,"typeOptions":{"maxValue":2,"minValue":-2,"numberPrecision":1},"description":"Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics","type":"number"},{"displayName":"Sampling Temperature","name":"temperature","default":0.7,"typeOptions":{"maxValue":2,"minValue":0,"numberPrecision":1},"description":"Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.","type":"number"},{"displayName":"Timeout","name":"timeout","default":360000,"description":"Maximum amount of time a request is allowed to take in milliseconds","type":"number"},{"displayName":"Max Retries","name":"maxRetries","default":2,"description":"Maximum number of retries to attempt","type":"number"},{"displayName":"Top P","name":"topP","default":1,"typeOptions":{"maxValue":1,"minValue":0,"numberPrecision":1},"description":"Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.","type":"number"}]}],"iconUrl":{"light":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatXAiGrok/logo.dark.svg","dark":"icons/@n8n/n8n-nodes-langchain/dist/nodes/llms/LmChatXAiGrok/logo.svg"}},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atom8n/n8n-nodes-langchain",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
"dist/credentials/MistralCloudApi.credentials.js",
|
|
41
41
|
"dist/credentials/LemonadeApi.credentials.js",
|
|
42
42
|
"dist/credentials/OllamaApi.credentials.js",
|
|
43
|
+
"dist/credentials/NineRouterApi.credentials.js",
|
|
43
44
|
"dist/credentials/OpenRouterApi.credentials.js",
|
|
44
45
|
"dist/credentials/PineconeApi.credentials.js",
|
|
45
46
|
"dist/credentials/QdrantApi.credentials.js",
|
|
@@ -93,6 +94,7 @@
|
|
|
93
94
|
"dist/nodes/llms/LmChatMistralCloud/LmChatMistralCloud.node.js",
|
|
94
95
|
"dist/nodes/llms/LMChatLemonade/LmChatLemonade.node.js",
|
|
95
96
|
"dist/nodes/llms/LMChatOllama/LmChatOllama.node.js",
|
|
97
|
+
"dist/nodes/llms/LmChat9Router/LmChat9Router.node.js",
|
|
96
98
|
"dist/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.js",
|
|
97
99
|
"dist/nodes/llms/LmChatVercelAiGateway/LmChatVercelAiGateway.node.js",
|
|
98
100
|
"dist/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.js",
|
|
@@ -164,7 +166,7 @@
|
|
|
164
166
|
"nodeTypePrefix": "@n8n/n8n-nodes-langchain"
|
|
165
167
|
},
|
|
166
168
|
"devDependencies": {
|
|
167
|
-
"@n8n/eslint-plugin-community-nodes": "npm:@atom8n/eslint-plugin-community-nodes@0.10.
|
|
169
|
+
"@n8n/eslint-plugin-community-nodes": "npm:@atom8n/eslint-plugin-community-nodes@0.10.6",
|
|
168
170
|
"@types/basic-auth": "^1.1.3",
|
|
169
171
|
"@types/cheerio": "^0.22.15",
|
|
170
172
|
"@types/html-to-text": "^9.0.1",
|
|
@@ -175,7 +177,7 @@
|
|
|
175
177
|
"@types/temp": "^0.9.1",
|
|
176
178
|
"fast-glob": "3.2.12",
|
|
177
179
|
"jest-mock-extended": "^3.0.4",
|
|
178
|
-
"n8n-core": "npm:@atom8n/n8n-core@2.5.
|
|
180
|
+
"n8n-core": "npm:@atom8n/n8n-core@2.5.6",
|
|
179
181
|
"tsup": "^8.5.0"
|
|
180
182
|
},
|
|
181
183
|
"dependencies": {
|
|
@@ -207,13 +209,13 @@
|
|
|
207
209
|
"@langchain/weaviate": "1.0.1",
|
|
208
210
|
"@modelcontextprotocol/sdk": "1.24.0",
|
|
209
211
|
"@mozilla/readability": "0.6.0",
|
|
210
|
-
"@n8n/client-oauth2": "npm:@atom8n/client-oauth2@1.3.
|
|
211
|
-
"@n8n/config": "npm:@atom8n/config@2.4.
|
|
212
|
-
"@n8n/di": "npm:@atom8n/di@0.13.
|
|
213
|
-
"@n8n/errors": "npm:@atom8n/errors@0.8.
|
|
214
|
-
"@n8n/json-schema-to-zod": "npm:@atom8n/json-schema-to-zod@1.9.
|
|
212
|
+
"@n8n/client-oauth2": "npm:@atom8n/client-oauth2@1.3.6",
|
|
213
|
+
"@n8n/config": "npm:@atom8n/config@2.4.6",
|
|
214
|
+
"@n8n/di": "npm:@atom8n/di@0.13.6",
|
|
215
|
+
"@n8n/errors": "npm:@atom8n/errors@0.8.6",
|
|
216
|
+
"@n8n/json-schema-to-zod": "npm:@atom8n/json-schema-to-zod@1.9.6",
|
|
215
217
|
"@n8n/typeorm": "0.3.20-15",
|
|
216
|
-
"@n8n/typescript-config": "npm:@atom8n/typescript-config@1.6.
|
|
218
|
+
"@n8n/typescript-config": "npm:@atom8n/typescript-config@1.6.6",
|
|
217
219
|
"@n8n/vm2": "3.9.25",
|
|
218
220
|
"@pinecone-database/pinecone": "^5.0.2",
|
|
219
221
|
"@qdrant/js-client-rest": "^1.16.2",
|
|
@@ -238,8 +240,8 @@
|
|
|
238
240
|
"mammoth": "1.11.0",
|
|
239
241
|
"mime-types": "3.0.1",
|
|
240
242
|
"mongodb": "^6.17.0",
|
|
241
|
-
"n8n-nodes-base": "npm:@atom8n/n8n-nodes-base@2.5.
|
|
242
|
-
"n8n-workflow": "npm:@atom8n/n8n-workflow@2.5.
|
|
243
|
+
"n8n-nodes-base": "npm:@atom8n/n8n-nodes-base@2.5.6",
|
|
244
|
+
"n8n-workflow": "npm:@atom8n/n8n-workflow@2.5.6",
|
|
243
245
|
"openai": "^6.9.0",
|
|
244
246
|
"pdf-parse": "1.1.1",
|
|
245
247
|
"pg": "8.12.0",
|