n8n-nodes-vercel-ai-sdk-universal-temp 0.2.71 → 0.2.73
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/nodes/UniversalAgent/UniversalAgent.node.js +6 -5
- package/dist/nodes/UniversalAgent/UniversalAgent.node.js.map +1 -1
- package/dist/nodes/shared/descriptions.js +1 -1
- package/dist/nodes/shared/descriptions.js.map +1 -1
- package/package.json +5 -3
- package/dist/credentials/UniversalAi.credentials.d.ts +0 -7
- package/dist/credentials/UniversalAi.credentials.js +0 -33
- package/dist/credentials/UniversalAi.credentials.js.map +0 -1
- package/dist/nodes/DeepSeek/DeepSeek.node.d.ts +0 -10
- package/dist/nodes/DeepSeek/DeepSeek.node.js +0 -574
- package/dist/nodes/DeepSeek/DeepSeek.node.js.map +0 -1
- package/dist/nodes/DeepSeek/icons/deepseek.svg +0 -1
- package/dist/nodes/GoogleGenerativeAI/GoogleGenerativeAI.node.d.ts +0 -10
- package/dist/nodes/GoogleGenerativeAI/GoogleGenerativeAI.node.js +0 -845
- package/dist/nodes/GoogleGenerativeAI/GoogleGenerativeAI.node.js.map +0 -1
- package/dist/nodes/GoogleGenerativeAI/icons/GoogleGenerativeAI.svg +0 -1
- package/dist/nodes/Groq/Groq.node.d.ts +0 -10
- package/dist/nodes/Groq/Groq.node.js +0 -552
- package/dist/nodes/Groq/Groq.node.js.map +0 -1
- package/dist/nodes/Groq/icons/groq.svg +0 -1
- package/dist/nodes/UniversalAI/model-lists.d.ts +0 -55
- package/dist/nodes/UniversalAI/model-lists.js +0 -269
- package/dist/nodes/UniversalAI/model-lists.js.map +0 -1
- package/dist/nodes/UniversalAIEmbedding/UniversalEmbedding.node.d.ts +0 -10
- package/dist/nodes/UniversalAIEmbedding/UniversalEmbedding.node.js +0 -332
- package/dist/nodes/UniversalAIEmbedding/UniversalEmbedding.node.js.map +0 -1
- package/dist/nodes/UniversalAIImageGen/UniversalImageGen.node.d.ts +0 -10
- package/dist/nodes/UniversalAIImageGen/UniversalImageGen.node.js +0 -359
- package/dist/nodes/UniversalAIImageGen/UniversalImageGen.node.js.map +0 -1
- package/dist/nodes/shared/builders/descriptions.d.ts +0 -103
- package/dist/nodes/shared/builders/descriptions.js +0 -713
- package/dist/nodes/shared/builders/descriptions.js.map +0 -1
- package/dist/nodes/shared/letta/enhanced-wrapper.d.ts +0 -49
- package/dist/nodes/shared/letta/enhanced-wrapper.js +0 -349
- package/dist/nodes/shared/letta/enhanced-wrapper.js.map +0 -1
- package/dist/nodes/shared/letta/fallback-wrapper.d.ts +0 -56
- package/dist/nodes/shared/letta/fallback-wrapper.js +0 -321
- package/dist/nodes/shared/letta/fallback-wrapper.js.map +0 -1
- package/dist/nodes/shared/letta/wrapper.d.ts +0 -3
- package/dist/nodes/shared/letta/wrapper.js +0 -58
- package/dist/nodes/shared/letta/wrapper.js.map +0 -1
- package/dist/package.json +0 -82
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -1,713 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.COMMON_INPUT_TYPES = exports.COMMON_OPERATIONS = exports.COMMON_CREDENTIALS = exports.COMMON_PROVIDERS = exports.NodeDescriptionBuilder = void 0;
|
|
4
|
-
class NodeDescriptionBuilder {
|
|
5
|
-
constructor(displayName, name, descriptionText, icon) {
|
|
6
|
-
this.description = {
|
|
7
|
-
version: 2,
|
|
8
|
-
group: ['transform'],
|
|
9
|
-
inputs: ['main'],
|
|
10
|
-
outputs: ['main'],
|
|
11
|
-
defaults: {},
|
|
12
|
-
credentials: [],
|
|
13
|
-
properties: [],
|
|
14
|
-
};
|
|
15
|
-
this.description.displayName = displayName;
|
|
16
|
-
this.description.name = name;
|
|
17
|
-
this.description.description = descriptionText;
|
|
18
|
-
this.description.icon = icon;
|
|
19
|
-
this.description.defaults = { name: displayName };
|
|
20
|
-
this.description.subtitle = `={{$parameter["provider"] + ": " + $parameter["model"]}}`;
|
|
21
|
-
}
|
|
22
|
-
addProviderCredentials(providerMap) {
|
|
23
|
-
const credentials = Object.entries(providerMap).map(([provider, credentialName]) => ({
|
|
24
|
-
name: credentialName,
|
|
25
|
-
required: false,
|
|
26
|
-
displayOptions: {
|
|
27
|
-
show: {
|
|
28
|
-
provider: [provider],
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
}));
|
|
32
|
-
this.description.credentials = credentials;
|
|
33
|
-
return this;
|
|
34
|
-
}
|
|
35
|
-
addResourceProperty(resourceName, resourceValue) {
|
|
36
|
-
const resourceProperty = {
|
|
37
|
-
displayName: 'Resource',
|
|
38
|
-
name: 'resource',
|
|
39
|
-
type: 'options',
|
|
40
|
-
required: true,
|
|
41
|
-
options: [{
|
|
42
|
-
name: resourceName,
|
|
43
|
-
value: resourceValue,
|
|
44
|
-
}],
|
|
45
|
-
default: resourceValue,
|
|
46
|
-
description: 'The resource to operate on',
|
|
47
|
-
};
|
|
48
|
-
this.description.properties.push(resourceProperty);
|
|
49
|
-
return this;
|
|
50
|
-
}
|
|
51
|
-
addProviderProperty(providers, resourceFilter) {
|
|
52
|
-
var _a;
|
|
53
|
-
const providerProperty = {
|
|
54
|
-
displayName: 'Provider',
|
|
55
|
-
name: 'provider',
|
|
56
|
-
type: 'options',
|
|
57
|
-
required: true,
|
|
58
|
-
noDataExpression: true,
|
|
59
|
-
options: providers,
|
|
60
|
-
default: ((_a = providers[0]) === null || _a === void 0 ? void 0 : _a.value) || 'google',
|
|
61
|
-
description: 'Choose which AI provider to use',
|
|
62
|
-
};
|
|
63
|
-
if (resourceFilter) {
|
|
64
|
-
providerProperty.displayOptions = {
|
|
65
|
-
show: {
|
|
66
|
-
resource: [resourceFilter],
|
|
67
|
-
},
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
this.description.properties.push(providerProperty);
|
|
71
|
-
return this;
|
|
72
|
-
}
|
|
73
|
-
addModelProperty(resourceFilter, predefinedModels) {
|
|
74
|
-
var _a;
|
|
75
|
-
const modelProperty = {
|
|
76
|
-
displayName: 'Model Name or ID',
|
|
77
|
-
name: 'model',
|
|
78
|
-
type: 'options',
|
|
79
|
-
required: true,
|
|
80
|
-
default: ((_a = predefinedModels === null || predefinedModels === void 0 ? void 0 : predefinedModels[0]) === null || _a === void 0 ? void 0 : _a.value) || '',
|
|
81
|
-
description: 'Select which model to use. Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code-examples/expressions/">expression</a>.',
|
|
82
|
-
};
|
|
83
|
-
if (predefinedModels) {
|
|
84
|
-
modelProperty.options = predefinedModels;
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
modelProperty.typeOptions = {
|
|
88
|
-
loadOptionsMethod: 'getModels',
|
|
89
|
-
loadOptionsDependsOn: ['provider'],
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
if (resourceFilter) {
|
|
93
|
-
modelProperty.displayOptions = {
|
|
94
|
-
show: {
|
|
95
|
-
resource: [resourceFilter],
|
|
96
|
-
},
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
this.description.properties.push(modelProperty);
|
|
100
|
-
return this;
|
|
101
|
-
}
|
|
102
|
-
addOperationProperty(operations) {
|
|
103
|
-
var _a;
|
|
104
|
-
const operationProperty = {
|
|
105
|
-
displayName: 'Operation',
|
|
106
|
-
name: 'operation',
|
|
107
|
-
type: 'options',
|
|
108
|
-
required: true,
|
|
109
|
-
noDataExpression: true,
|
|
110
|
-
options: operations,
|
|
111
|
-
default: ((_a = operations[0]) === null || _a === void 0 ? void 0 : _a.value) || '',
|
|
112
|
-
description: 'Which type of output you want to generate',
|
|
113
|
-
};
|
|
114
|
-
this.description.properties.push(operationProperty);
|
|
115
|
-
return this;
|
|
116
|
-
}
|
|
117
|
-
addInputTypeProperty(types) {
|
|
118
|
-
var _a;
|
|
119
|
-
const inputTypeProperty = {
|
|
120
|
-
displayName: 'Input Type',
|
|
121
|
-
name: 'inputType',
|
|
122
|
-
type: 'options',
|
|
123
|
-
required: true,
|
|
124
|
-
noDataExpression: true,
|
|
125
|
-
options: types,
|
|
126
|
-
default: ((_a = types[0]) === null || _a === void 0 ? void 0 : _a.value) || 'prompt',
|
|
127
|
-
description: 'Choose how you want to provide input to the model',
|
|
128
|
-
};
|
|
129
|
-
this.description.properties.push(inputTypeProperty);
|
|
130
|
-
return this;
|
|
131
|
-
}
|
|
132
|
-
addTextInputs() {
|
|
133
|
-
this.description.properties.push({
|
|
134
|
-
displayName: 'System',
|
|
135
|
-
name: 'system',
|
|
136
|
-
type: 'string',
|
|
137
|
-
typeOptions: { rows: 4 },
|
|
138
|
-
displayOptions: { show: { inputType: ['prompt'] } },
|
|
139
|
-
default: 'You are a helpful assistant.',
|
|
140
|
-
description: "System prompt that specifies the model's behavior",
|
|
141
|
-
hint: "This field is optional, but can help guide the model's responses.",
|
|
142
|
-
requiresDataPath: 'single',
|
|
143
|
-
});
|
|
144
|
-
this.description.properties.push({
|
|
145
|
-
displayName: 'Cache System Instruction',
|
|
146
|
-
name: 'cacheSystemInstruction',
|
|
147
|
-
type: 'boolean',
|
|
148
|
-
default: false,
|
|
149
|
-
displayOptions: { show: { inputType: ['prompt'] } },
|
|
150
|
-
description: 'Cache the system instruction to reduce costs when making multiple requests with the same system context. Requires minimum 1,024 tokens (roughly 700-800 words).',
|
|
151
|
-
});
|
|
152
|
-
this.description.properties.push({
|
|
153
|
-
displayName: 'Prompt',
|
|
154
|
-
name: 'prompt',
|
|
155
|
-
type: 'string',
|
|
156
|
-
typeOptions: { rows: 4 },
|
|
157
|
-
displayOptions: { show: { inputType: ['prompt'] } },
|
|
158
|
-
default: '',
|
|
159
|
-
required: true,
|
|
160
|
-
description: 'The single text prompt to generate a completion for',
|
|
161
|
-
hint: 'You can drag data from previous nodes here using expressions.',
|
|
162
|
-
requiresDataPath: 'single',
|
|
163
|
-
});
|
|
164
|
-
this.description.properties.push({
|
|
165
|
-
displayName: 'Cache Prompt',
|
|
166
|
-
name: 'cachePrompt',
|
|
167
|
-
type: 'boolean',
|
|
168
|
-
default: false,
|
|
169
|
-
displayOptions: { show: { inputType: ['prompt'] } },
|
|
170
|
-
description: 'Cache the prompt text. Only useful if this prompt will be reused across multiple requests with different parameters or context.',
|
|
171
|
-
});
|
|
172
|
-
return this;
|
|
173
|
-
}
|
|
174
|
-
addMessagesInput() {
|
|
175
|
-
this.description.properties.push({
|
|
176
|
-
displayName: 'Messages',
|
|
177
|
-
name: 'messages',
|
|
178
|
-
type: 'fixedCollection',
|
|
179
|
-
typeOptions: {
|
|
180
|
-
multipleValues: true,
|
|
181
|
-
sortable: true,
|
|
182
|
-
minValue: 1,
|
|
183
|
-
},
|
|
184
|
-
displayOptions: { show: { inputType: ['messages'] } },
|
|
185
|
-
description: 'The messages for the conversation',
|
|
186
|
-
default: {
|
|
187
|
-
messagesUi: [
|
|
188
|
-
{ role: 'system', systemContent: 'You are a helpful assistant.' },
|
|
189
|
-
{ role: 'user', content: 'How can you help me?' },
|
|
190
|
-
],
|
|
191
|
-
},
|
|
192
|
-
required: true,
|
|
193
|
-
options: [{
|
|
194
|
-
name: 'messagesUi',
|
|
195
|
-
displayName: 'Message',
|
|
196
|
-
values: [
|
|
197
|
-
{
|
|
198
|
-
displayName: 'Role',
|
|
199
|
-
name: 'role',
|
|
200
|
-
type: 'options',
|
|
201
|
-
noDataExpression: true,
|
|
202
|
-
options: [
|
|
203
|
-
{ name: 'Assistant', value: 'assistant' },
|
|
204
|
-
{ name: 'System', value: 'system' },
|
|
205
|
-
{ name: 'User', value: 'user' },
|
|
206
|
-
],
|
|
207
|
-
default: 'user',
|
|
208
|
-
required: true,
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
displayName: 'Cache Message',
|
|
212
|
-
name: 'cacheMessage',
|
|
213
|
-
type: 'boolean',
|
|
214
|
-
default: false,
|
|
215
|
-
description: 'Cache this message content. Useful for static context that will be reused across multiple requests. Requires minimum 1,024 tokens total in cached content.',
|
|
216
|
-
displayOptions: {
|
|
217
|
-
show: {
|
|
218
|
-
role: ['system', 'assistant', 'user'],
|
|
219
|
-
'/provider': ['google'],
|
|
220
|
-
'/inputType': ['messages'],
|
|
221
|
-
},
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
displayName: 'System Content',
|
|
226
|
-
name: 'systemContent',
|
|
227
|
-
type: 'string',
|
|
228
|
-
description: 'The text content if role is System',
|
|
229
|
-
required: true,
|
|
230
|
-
displayOptions: { show: { role: ['system'] } },
|
|
231
|
-
typeOptions: { rows: 4 },
|
|
232
|
-
default: '',
|
|
233
|
-
requiresDataPath: 'single',
|
|
234
|
-
},
|
|
235
|
-
{
|
|
236
|
-
displayName: 'Text Content',
|
|
237
|
-
name: 'content',
|
|
238
|
-
type: 'string',
|
|
239
|
-
typeOptions: { rows: 4 },
|
|
240
|
-
displayOptions: { show: { role: ['assistant', 'user'] } },
|
|
241
|
-
default: '',
|
|
242
|
-
description: 'Primary text content of the message',
|
|
243
|
-
required: true,
|
|
244
|
-
requiresDataPath: 'single',
|
|
245
|
-
},
|
|
246
|
-
],
|
|
247
|
-
}],
|
|
248
|
-
});
|
|
249
|
-
return this;
|
|
250
|
-
}
|
|
251
|
-
addOptionsCollection(options) {
|
|
252
|
-
this.description.properties.push({
|
|
253
|
-
displayName: 'Options',
|
|
254
|
-
name: 'options',
|
|
255
|
-
type: 'collection',
|
|
256
|
-
placeholder: 'Add Option',
|
|
257
|
-
default: {},
|
|
258
|
-
options,
|
|
259
|
-
});
|
|
260
|
-
return this;
|
|
261
|
-
}
|
|
262
|
-
addTextInput(displayName, name, description, required = false) {
|
|
263
|
-
const textProperty = {
|
|
264
|
-
displayName,
|
|
265
|
-
name,
|
|
266
|
-
type: 'string',
|
|
267
|
-
typeOptions: { rows: 4 },
|
|
268
|
-
default: '',
|
|
269
|
-
description,
|
|
270
|
-
};
|
|
271
|
-
if (required) {
|
|
272
|
-
textProperty.required = true;
|
|
273
|
-
}
|
|
274
|
-
this.description.properties.push(textProperty);
|
|
275
|
-
return this;
|
|
276
|
-
}
|
|
277
|
-
addVoiceProperty() {
|
|
278
|
-
const voiceProperty = {
|
|
279
|
-
displayName: 'Voice',
|
|
280
|
-
name: 'voice',
|
|
281
|
-
type: 'options',
|
|
282
|
-
required: true,
|
|
283
|
-
typeOptions: {
|
|
284
|
-
loadOptionsMethod: 'getVoices',
|
|
285
|
-
loadOptionsDependsOn: ['provider'],
|
|
286
|
-
},
|
|
287
|
-
default: '',
|
|
288
|
-
description: 'The voice to use for speech generation',
|
|
289
|
-
};
|
|
290
|
-
this.description.properties.push(voiceProperty);
|
|
291
|
-
return this;
|
|
292
|
-
}
|
|
293
|
-
addPromptInput() {
|
|
294
|
-
const promptProperty = {
|
|
295
|
-
displayName: 'Prompt',
|
|
296
|
-
name: 'prompt',
|
|
297
|
-
type: 'string',
|
|
298
|
-
typeOptions: { rows: 4 },
|
|
299
|
-
default: '',
|
|
300
|
-
required: true,
|
|
301
|
-
description: 'The single text prompt to generate a completion for',
|
|
302
|
-
hint: 'You can drag data from previous nodes here using expressions.',
|
|
303
|
-
requiresDataPath: 'single',
|
|
304
|
-
};
|
|
305
|
-
this.description.properties.push(promptProperty);
|
|
306
|
-
return this;
|
|
307
|
-
}
|
|
308
|
-
addAudioSourceProperty() {
|
|
309
|
-
const audioSourceProperty = {
|
|
310
|
-
displayName: 'Audio Source',
|
|
311
|
-
name: 'audioSource',
|
|
312
|
-
type: 'options',
|
|
313
|
-
required: true,
|
|
314
|
-
options: [
|
|
315
|
-
{
|
|
316
|
-
name: 'Binary Data',
|
|
317
|
-
value: 'binary',
|
|
318
|
-
description: 'Use binary data from n8n input',
|
|
319
|
-
},
|
|
320
|
-
{
|
|
321
|
-
name: 'URL',
|
|
322
|
-
value: 'url',
|
|
323
|
-
description: 'Provide a URL to the audio file',
|
|
324
|
-
},
|
|
325
|
-
],
|
|
326
|
-
default: 'binary',
|
|
327
|
-
description: 'Where the audio file is coming from',
|
|
328
|
-
};
|
|
329
|
-
this.description.properties.push(audioSourceProperty);
|
|
330
|
-
return this;
|
|
331
|
-
}
|
|
332
|
-
addAudioProperty() {
|
|
333
|
-
const audioProperty = {
|
|
334
|
-
displayName: 'Audio Property',
|
|
335
|
-
name: 'audioProperty',
|
|
336
|
-
type: 'string',
|
|
337
|
-
default: 'data',
|
|
338
|
-
required: true,
|
|
339
|
-
displayOptions: {
|
|
340
|
-
show: {
|
|
341
|
-
audioSource: ['binary'],
|
|
342
|
-
},
|
|
343
|
-
},
|
|
344
|
-
description: 'Name of the binary property containing the audio data',
|
|
345
|
-
};
|
|
346
|
-
this.description.properties.push(audioProperty);
|
|
347
|
-
return this;
|
|
348
|
-
}
|
|
349
|
-
addAudioUrlProperty() {
|
|
350
|
-
const audioUrlProperty = {
|
|
351
|
-
displayName: 'Audio URL',
|
|
352
|
-
name: 'audioUrl',
|
|
353
|
-
type: 'string',
|
|
354
|
-
default: '',
|
|
355
|
-
required: true,
|
|
356
|
-
displayOptions: {
|
|
357
|
-
show: {
|
|
358
|
-
audioSource: ['url'],
|
|
359
|
-
},
|
|
360
|
-
},
|
|
361
|
-
description: 'URL of the audio file to transcribe',
|
|
362
|
-
requiresDataPath: 'single',
|
|
363
|
-
};
|
|
364
|
-
this.description.properties.push(audioUrlProperty);
|
|
365
|
-
return this;
|
|
366
|
-
}
|
|
367
|
-
addEmbeddingOperationProperty() {
|
|
368
|
-
const operationProperty = {
|
|
369
|
-
displayName: 'Operation',
|
|
370
|
-
name: 'operation',
|
|
371
|
-
type: 'options',
|
|
372
|
-
required: true,
|
|
373
|
-
options: [
|
|
374
|
-
{
|
|
375
|
-
name: 'Embed Single',
|
|
376
|
-
value: 'embedSingle',
|
|
377
|
-
description: 'Generate embedding for a single text',
|
|
378
|
-
},
|
|
379
|
-
{
|
|
380
|
-
name: 'Embed Many',
|
|
381
|
-
value: 'embedMany',
|
|
382
|
-
description: 'Generate embeddings for multiple texts',
|
|
383
|
-
},
|
|
384
|
-
{
|
|
385
|
-
name: 'Cosine Similarity',
|
|
386
|
-
value: 'cosineSimilarity',
|
|
387
|
-
description: 'Calculate similarity between two embeddings',
|
|
388
|
-
},
|
|
389
|
-
],
|
|
390
|
-
default: 'embedSingle',
|
|
391
|
-
description: 'The operation to perform',
|
|
392
|
-
};
|
|
393
|
-
this.description.properties.push(operationProperty);
|
|
394
|
-
return this;
|
|
395
|
-
}
|
|
396
|
-
addEmbeddingProperties() {
|
|
397
|
-
this.description.properties.push({
|
|
398
|
-
displayName: 'Text',
|
|
399
|
-
name: 'text',
|
|
400
|
-
type: 'string',
|
|
401
|
-
typeOptions: { rows: 4 },
|
|
402
|
-
default: '',
|
|
403
|
-
required: true,
|
|
404
|
-
displayOptions: { show: { operation: ['embedSingle'] } },
|
|
405
|
-
description: 'The text to generate an embedding for',
|
|
406
|
-
});
|
|
407
|
-
this.description.properties.push({
|
|
408
|
-
displayName: 'Texts',
|
|
409
|
-
name: 'texts',
|
|
410
|
-
type: 'string',
|
|
411
|
-
typeOptions: { rows: 6 },
|
|
412
|
-
default: '',
|
|
413
|
-
required: true,
|
|
414
|
-
displayOptions: { show: { operation: ['embedMany'] } },
|
|
415
|
-
description: 'Texts to generate embeddings for (one per line)',
|
|
416
|
-
});
|
|
417
|
-
this.description.properties.push({
|
|
418
|
-
displayName: 'Embedding 1',
|
|
419
|
-
name: 'embedding1',
|
|
420
|
-
type: 'string',
|
|
421
|
-
default: '',
|
|
422
|
-
required: true,
|
|
423
|
-
displayOptions: { show: { operation: ['cosineSimilarity'] } },
|
|
424
|
-
description: 'First embedding vector as JSON array (e.g., [0.1, 0.2, 0.3])',
|
|
425
|
-
});
|
|
426
|
-
this.description.properties.push({
|
|
427
|
-
displayName: 'Embedding 2',
|
|
428
|
-
name: 'embedding2',
|
|
429
|
-
type: 'string',
|
|
430
|
-
default: '',
|
|
431
|
-
required: true,
|
|
432
|
-
displayOptions: { show: { operation: ['cosineSimilarity'] } },
|
|
433
|
-
description: 'Second embedding vector as JSON array (e.g., [0.1, 0.2, 0.3])',
|
|
434
|
-
});
|
|
435
|
-
return this;
|
|
436
|
-
}
|
|
437
|
-
addSystemProperties() {
|
|
438
|
-
this.description.properties.push({
|
|
439
|
-
displayName: 'System',
|
|
440
|
-
name: 'system',
|
|
441
|
-
type: 'string',
|
|
442
|
-
typeOptions: { rows: 4 },
|
|
443
|
-
displayOptions: { show: { inputType: ['prompt'] } },
|
|
444
|
-
default: 'You are a helpful assistant.',
|
|
445
|
-
description: "System prompt that specifies the model's behavior",
|
|
446
|
-
hint: "This field is optional, but can help guide the model's responses.",
|
|
447
|
-
requiresDataPath: 'single',
|
|
448
|
-
});
|
|
449
|
-
this.description.properties.push({
|
|
450
|
-
displayName: 'Cache System Instruction',
|
|
451
|
-
name: 'cacheSystemInstruction',
|
|
452
|
-
type: 'boolean',
|
|
453
|
-
default: false,
|
|
454
|
-
displayOptions: { show: { inputType: ['prompt'] } },
|
|
455
|
-
description: 'Cache the system instruction to reduce costs when making multiple requests with the same system context. Requires minimum 1,024 tokens (roughly 700-800 words).',
|
|
456
|
-
});
|
|
457
|
-
return this;
|
|
458
|
-
}
|
|
459
|
-
addPromptProperties() {
|
|
460
|
-
this.description.properties.push({
|
|
461
|
-
displayName: 'Prompt',
|
|
462
|
-
name: 'prompt',
|
|
463
|
-
type: 'string',
|
|
464
|
-
typeOptions: { rows: 4 },
|
|
465
|
-
displayOptions: { show: { inputType: ['prompt'] } },
|
|
466
|
-
default: '',
|
|
467
|
-
required: true,
|
|
468
|
-
description: 'The single text prompt to generate a completion for',
|
|
469
|
-
hint: 'You can drag data from previous nodes here using expressions.',
|
|
470
|
-
requiresDataPath: 'single',
|
|
471
|
-
});
|
|
472
|
-
this.description.properties.push({
|
|
473
|
-
displayName: 'Cache Prompt',
|
|
474
|
-
name: 'cachePrompt',
|
|
475
|
-
type: 'boolean',
|
|
476
|
-
default: false,
|
|
477
|
-
displayOptions: { show: { inputType: ['prompt'] } },
|
|
478
|
-
description: 'Cache the prompt text. Only useful if this prompt will be reused across multiple requests with different parameters or context.',
|
|
479
|
-
});
|
|
480
|
-
return this;
|
|
481
|
-
}
|
|
482
|
-
addGoogleProperties() {
|
|
483
|
-
this.description.properties.push({
|
|
484
|
-
displayName: 'Thinking Budget',
|
|
485
|
-
name: 'thinkingBudget',
|
|
486
|
-
type: 'number',
|
|
487
|
-
default: -1,
|
|
488
|
-
description: 'Maximum number of tokens to use for thinking (-1 = use model default)',
|
|
489
|
-
displayOptions: { show: { '/provider': ['google'] } },
|
|
490
|
-
});
|
|
491
|
-
this.description.properties.push({
|
|
492
|
-
displayName: 'Include Thoughts',
|
|
493
|
-
name: 'includeThoughts',
|
|
494
|
-
type: 'boolean',
|
|
495
|
-
default: false,
|
|
496
|
-
description: 'Whether to include the model\'s thinking process in the response',
|
|
497
|
-
displayOptions: { show: { '/provider': ['google'] } },
|
|
498
|
-
});
|
|
499
|
-
this.description.properties.push({
|
|
500
|
-
displayName: 'Custom Headers',
|
|
501
|
-
name: 'customHeaders',
|
|
502
|
-
type: 'fixedCollection',
|
|
503
|
-
typeOptions: { multipleValues: true },
|
|
504
|
-
default: {},
|
|
505
|
-
displayOptions: { show: { '/provider': ['google'] } },
|
|
506
|
-
description: 'Additional headers to send with Google API requests',
|
|
507
|
-
options: [{
|
|
508
|
-
name: 'headers',
|
|
509
|
-
displayName: 'Header',
|
|
510
|
-
values: [
|
|
511
|
-
{
|
|
512
|
-
displayName: 'Name',
|
|
513
|
-
name: 'name',
|
|
514
|
-
type: 'string',
|
|
515
|
-
default: '',
|
|
516
|
-
description: 'Header name',
|
|
517
|
-
},
|
|
518
|
-
{
|
|
519
|
-
displayName: 'Value',
|
|
520
|
-
name: 'value',
|
|
521
|
-
type: 'string',
|
|
522
|
-
default: '',
|
|
523
|
-
description: 'Header value',
|
|
524
|
-
},
|
|
525
|
-
],
|
|
526
|
-
}],
|
|
527
|
-
});
|
|
528
|
-
this.description.properties.push({
|
|
529
|
-
displayName: 'Google Tools',
|
|
530
|
-
name: 'googleTools',
|
|
531
|
-
type: 'multiOptions',
|
|
532
|
-
displayOptions: { show: { '/provider': ['google'] } },
|
|
533
|
-
options: [
|
|
534
|
-
{ name: 'Google Search', value: 'google_search' },
|
|
535
|
-
{ name: 'URL Context', value: 'url_context' },
|
|
536
|
-
{ name: 'Code Execution', value: 'code_execution' },
|
|
537
|
-
],
|
|
538
|
-
default: [],
|
|
539
|
-
description: 'Google-specific tools to enable',
|
|
540
|
-
});
|
|
541
|
-
this.description.properties.push({
|
|
542
|
-
displayName: 'Safety Settings',
|
|
543
|
-
name: 'safetySettings',
|
|
544
|
-
type: 'fixedCollection',
|
|
545
|
-
typeOptions: { multipleValues: true },
|
|
546
|
-
displayOptions: { show: { '/provider': ['google'] } },
|
|
547
|
-
default: {},
|
|
548
|
-
description: 'Content safety settings for Google models',
|
|
549
|
-
options: [{
|
|
550
|
-
name: 'settings',
|
|
551
|
-
displayName: 'Setting',
|
|
552
|
-
values: [
|
|
553
|
-
{
|
|
554
|
-
displayName: 'Category',
|
|
555
|
-
name: 'category',
|
|
556
|
-
type: 'options',
|
|
557
|
-
options: [
|
|
558
|
-
{ name: 'Harassment', value: 'HARM_CATEGORY_HARASSMENT' },
|
|
559
|
-
{ name: 'Hate Speech', value: 'HARM_CATEGORY_HATE_SPEECH' },
|
|
560
|
-
{ name: 'Sexually Explicit', value: 'HARM_CATEGORY_SEXUALLY_EXPLICIT' },
|
|
561
|
-
{ name: 'Dangerous Content', value: 'HARM_CATEGORY_DANGEROUS_CONTENT' },
|
|
562
|
-
],
|
|
563
|
-
default: '',
|
|
564
|
-
required: true,
|
|
565
|
-
},
|
|
566
|
-
{
|
|
567
|
-
displayName: 'Threshold',
|
|
568
|
-
name: 'threshold',
|
|
569
|
-
type: 'options',
|
|
570
|
-
options: [
|
|
571
|
-
{ name: 'Block None', value: 'HARM_BLOCK_THRESHOLD_UNSPECIFIED' },
|
|
572
|
-
{ name: 'Block Few', value: 'BLOCK_LOW_AND_ABOVE' },
|
|
573
|
-
{ name: 'Block Some', value: 'BLOCK_MEDIUM_AND_ABOVE' },
|
|
574
|
-
{ name: 'Block Most', value: 'BLOCK_ONLY_HIGH' },
|
|
575
|
-
],
|
|
576
|
-
default: 'BLOCK_MEDIUM_AND_ABOVE',
|
|
577
|
-
required: true,
|
|
578
|
-
},
|
|
579
|
-
],
|
|
580
|
-
}],
|
|
581
|
-
});
|
|
582
|
-
this.description.properties.push({
|
|
583
|
-
displayName: 'Response Modalities',
|
|
584
|
-
name: 'responseModalities',
|
|
585
|
-
type: 'multiOptions',
|
|
586
|
-
displayOptions: { show: { '/provider': ['google'] } },
|
|
587
|
-
options: [
|
|
588
|
-
{ name: 'Text', value: 'text' },
|
|
589
|
-
{ name: 'Image', value: 'image' },
|
|
590
|
-
],
|
|
591
|
-
default: [],
|
|
592
|
-
description: 'Response modalities to generate',
|
|
593
|
-
});
|
|
594
|
-
this.description.properties.push({
|
|
595
|
-
displayName: 'Cache TTL (seconds)',
|
|
596
|
-
name: 'cacheTTL',
|
|
597
|
-
type: 'number',
|
|
598
|
-
default: 3600,
|
|
599
|
-
displayOptions: { show: { '/provider': ['google'] } },
|
|
600
|
-
description: 'How long to keep cached content (in seconds). Default: 3600 (1 hour). Longer TTL = more cost but better for repeated use.',
|
|
601
|
-
});
|
|
602
|
-
return this;
|
|
603
|
-
}
|
|
604
|
-
addUniversalAIOptions() {
|
|
605
|
-
this.addOptionsCollection([
|
|
606
|
-
{
|
|
607
|
-
displayName: 'Max Tokens',
|
|
608
|
-
name: 'maxTokens',
|
|
609
|
-
type: 'number',
|
|
610
|
-
default: 0,
|
|
611
|
-
description: 'Maximum number of tokens to generate (0 = use model default)',
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
displayName: 'Temperature',
|
|
615
|
-
name: 'temperature',
|
|
616
|
-
type: 'number',
|
|
617
|
-
default: 0.7,
|
|
618
|
-
typeOptions: { minValue: 0, maxValue: 2, numberPrecision: 2 },
|
|
619
|
-
description: 'Controls randomness. Lower = more focused, higher = more creative.',
|
|
620
|
-
},
|
|
621
|
-
{
|
|
622
|
-
displayName: 'Top P',
|
|
623
|
-
name: 'topP',
|
|
624
|
-
type: 'number',
|
|
625
|
-
default: 1,
|
|
626
|
-
typeOptions: { minValue: 0, maxValue: 1, numberPrecision: 2 },
|
|
627
|
-
description: 'Controls diversity via nucleus sampling. Lower = more focused.',
|
|
628
|
-
},
|
|
629
|
-
{
|
|
630
|
-
displayName: 'Top K',
|
|
631
|
-
name: 'topK',
|
|
632
|
-
type: 'number',
|
|
633
|
-
default: 0,
|
|
634
|
-
typeOptions: { minValue: 0 },
|
|
635
|
-
description: 'Limits token selection to top K options (0 = disabled)',
|
|
636
|
-
displayOptions: { show: { '/provider': ['google'] } },
|
|
637
|
-
},
|
|
638
|
-
{
|
|
639
|
-
displayName: 'Frequency Penalty',
|
|
640
|
-
name: 'frequencyPenalty',
|
|
641
|
-
type: 'number',
|
|
642
|
-
default: 0,
|
|
643
|
-
typeOptions: { minValue: -2, maxValue: 2, numberPrecision: 2 },
|
|
644
|
-
description: 'Reduces the likelihood of repeating the same words. Positive values decrease repetition.',
|
|
645
|
-
},
|
|
646
|
-
{
|
|
647
|
-
displayName: 'Presence Penalty',
|
|
648
|
-
name: 'presencePenalty',
|
|
649
|
-
type: 'number',
|
|
650
|
-
default: 0,
|
|
651
|
-
typeOptions: { minValue: -2, maxValue: 2, numberPrecision: 2 },
|
|
652
|
-
description: 'Encourages the model to talk about new topics. Positive values increase the likelihood of new topics.',
|
|
653
|
-
},
|
|
654
|
-
{
|
|
655
|
-
displayName: 'Seed',
|
|
656
|
-
name: 'seed',
|
|
657
|
-
type: 'number',
|
|
658
|
-
default: 0,
|
|
659
|
-
description: 'Random seed for reproducible results. 0 means no seed.',
|
|
660
|
-
typeOptions: { minValue: 0 },
|
|
661
|
-
},
|
|
662
|
-
{
|
|
663
|
-
displayName: 'Stop Sequences',
|
|
664
|
-
name: 'stopSequences',
|
|
665
|
-
type: 'string',
|
|
666
|
-
default: '',
|
|
667
|
-
description: 'Sequences where the API will stop generating further tokens. Separate multiple sequences with commas.',
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
displayName: 'Include Request Body',
|
|
671
|
-
name: 'includeRequestBody',
|
|
672
|
-
type: 'boolean',
|
|
673
|
-
default: false,
|
|
674
|
-
description: 'Whether to include the request body in the output',
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
displayName: 'Cache TTL (seconds)',
|
|
678
|
-
name: 'cacheTTL',
|
|
679
|
-
type: 'number',
|
|
680
|
-
default: 3600,
|
|
681
|
-
description: 'How long to keep cached content (in seconds). Default: 3600 (1 hour). Longer TTL = more cost but better for repeated use.',
|
|
682
|
-
},
|
|
683
|
-
]);
|
|
684
|
-
return this;
|
|
685
|
-
}
|
|
686
|
-
build() {
|
|
687
|
-
return this.description;
|
|
688
|
-
}
|
|
689
|
-
}
|
|
690
|
-
exports.NodeDescriptionBuilder = NodeDescriptionBuilder;
|
|
691
|
-
exports.COMMON_PROVIDERS = {
|
|
692
|
-
google: { name: 'Google Generative AI', value: 'google', description: 'Google Gemini models with multimodal support' },
|
|
693
|
-
openai: { name: 'OpenAI', value: 'openai' },
|
|
694
|
-
deepseek: { name: 'DeepSeek', value: 'deepseek', description: 'DeepSeek models with strong reasoning capabilities' },
|
|
695
|
-
groq: { name: 'Groq', value: 'groq', description: 'High-performance models via Groq LPU' },
|
|
696
|
-
openrouter: { name: 'OpenRouter', value: 'openrouter', description: 'Access multiple models through OpenRouter' },
|
|
697
|
-
};
|
|
698
|
-
exports.COMMON_CREDENTIALS = {
|
|
699
|
-
google: 'googleGenerativeAIApi',
|
|
700
|
-
openai: 'openAiApi',
|
|
701
|
-
deepseek: 'deepSeekApi',
|
|
702
|
-
groq: 'groqApi',
|
|
703
|
-
openrouter: 'openRouterApi',
|
|
704
|
-
};
|
|
705
|
-
exports.COMMON_OPERATIONS = {
|
|
706
|
-
generateText: { name: 'Generate Text', value: 'generateText', description: 'Generate text using simple prompt or chat messages', action: 'Generate text' },
|
|
707
|
-
generateObject: { name: 'Generate Object', value: 'generateObject', description: 'Generate a structured object based on a JSON schema', action: 'Generate object' },
|
|
708
|
-
};
|
|
709
|
-
exports.COMMON_INPUT_TYPES = {
|
|
710
|
-
prompt: { name: 'Simple Prompt', value: 'prompt', description: 'Use a single prompt' },
|
|
711
|
-
messages: { name: 'Messages', value: 'messages', description: 'Use a conversation with multiple messages' },
|
|
712
|
-
};
|
|
713
|
-
//# sourceMappingURL=descriptions.js.map
|