n8n-nodes-vercel-ai-sdk-universal-temp 0.2.28 → 0.2.29

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.
@@ -1,271 +1,1528 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.UNIVERSAL_TRANSCRIPTION_DESCRIPTION = exports.UNIVERSAL_AI_DESCRIPTION = exports.UNIVERSAL_EMBEDDING_DESCRIPTION = exports.UNIVERSAL_IMAGE_GEN_DESCRIPTION = exports.UNIVERSAL_SPEECH_GEN_DESCRIPTION = void 0;
4
- const builders_1 = require("./builders");
5
- exports.UNIVERSAL_SPEECH_GEN_DESCRIPTION = new builders_1.NodeDescriptionBuilder('Universal Speech Generation', 'universalSpeechGen', 'Generate speech audio from text using multiple AI providers', 'file:icons/UniversalSpeechGen.svg')
6
- .addProviderCredentials({
7
- google: builders_1.COMMON_CREDENTIALS.google,
8
- openai: builders_1.COMMON_CREDENTIALS.openai,
9
- })
10
- .addProviderProperty([builders_1.COMMON_PROVIDERS.google, builders_1.COMMON_PROVIDERS.openai])
11
- .addModelProperty()
12
- .addTextInput('Text', 'text', 'The text to convert to speech', true)
13
- .addVoiceProperty()
14
- .addOptionsCollection([
15
- {
16
- displayName: 'Output Format',
17
- name: 'outputFormat',
18
- type: 'options',
19
- options: [
20
- { name: 'MP3', value: 'mp3' },
21
- { name: 'WAV', value: 'wav' },
22
- { name: 'FLAC', value: 'flac' },
23
- { name: 'AAC', value: 'aac' },
24
- { name: 'OGG', value: 'ogg' },
25
- ],
26
- default: 'mp3',
27
- description: 'Audio format for the generated speech',
28
- displayOptions: { show: { '/provider': ['openai'] } },
4
+ exports.UNIVERSAL_SPEECH_GEN_DESCRIPTION = {
5
+ displayName: 'Universal Speech Generation',
6
+ name: 'universalSpeechGen',
7
+ icon: 'file:icons/UniversalSpeechGen.svg',
8
+ group: ['transform'],
9
+ version: 2,
10
+ subtitle: '={{$parameter["provider"] + ": " + $parameter["voice"]}}',
11
+ description: 'Generate speech audio from text using multiple AI providers',
12
+ defaults: {
13
+ name: 'Universal Speech Gen',
29
14
  },
30
- {
31
- displayName: 'Speed',
32
- name: 'speed',
33
- type: 'number',
34
- default: 1.0,
35
- typeOptions: { minValue: 0.25, maxValue: 4.0, numberPrecision: 2 },
36
- description: 'Speech speed multiplier (0.25-4.0)',
37
- displayOptions: { show: { '/provider': ['openai'] } },
15
+ inputs: ['main'],
16
+ outputs: ['main'],
17
+ credentials: [
18
+ {
19
+ name: 'googleGenerativeAIApi',
20
+ required: false,
21
+ displayOptions: {
22
+ show: {
23
+ provider: ['google'],
24
+ },
25
+ },
26
+ },
27
+ {
28
+ name: 'openAiApi',
29
+ required: false,
30
+ displayOptions: {
31
+ show: {
32
+ provider: ['openai'],
33
+ },
34
+ },
35
+ },
36
+ ],
37
+ properties: [
38
+ {
39
+ displayName: 'Provider',
40
+ name: 'provider',
41
+ type: 'options',
42
+ required: true,
43
+ noDataExpression: true,
44
+ options: [
45
+ {
46
+ name: 'Google Generative AI',
47
+ value: 'google',
48
+ },
49
+ {
50
+ name: 'OpenAI',
51
+ value: 'openai',
52
+ },
53
+ ],
54
+ default: 'google',
55
+ description: 'Choose which AI provider to use for speech generation',
56
+ },
57
+ {
58
+ displayName: 'Text',
59
+ name: 'text',
60
+ type: 'string',
61
+ typeOptions: {
62
+ rows: 4,
63
+ },
64
+ default: '',
65
+ required: true,
66
+ description: 'The text to convert to speech',
67
+ },
68
+ {
69
+ displayName: 'Voice',
70
+ name: 'voice',
71
+ type: 'options',
72
+ required: true,
73
+ typeOptions: {
74
+ loadOptionsMethod: 'getVoices',
75
+ loadOptionsDependsOn: ['provider'],
76
+ },
77
+ default: '',
78
+ description: 'The voice to use for speech generation',
79
+ },
80
+ {
81
+ displayName: 'Options',
82
+ name: 'options',
83
+ type: 'collection',
84
+ placeholder: 'Add Option',
85
+ default: {},
86
+ options: [
87
+ {
88
+ displayName: 'Output Format',
89
+ name: 'outputFormat',
90
+ type: 'options',
91
+ options: [
92
+ { name: 'MP3', value: 'mp3' },
93
+ { name: 'WAV', value: 'wav' },
94
+ { name: 'FLAC', value: 'flac' },
95
+ { name: 'AAC', value: 'aac' },
96
+ { name: 'OGG', value: 'ogg' },
97
+ ],
98
+ default: 'mp3',
99
+ description: 'Audio format for the generated speech',
100
+ displayOptions: {
101
+ show: {
102
+ '/provider': ['openai'],
103
+ },
104
+ },
105
+ },
106
+ {
107
+ displayName: 'Speed',
108
+ name: 'speed',
109
+ type: 'number',
110
+ default: 1.0,
111
+ typeOptions: {
112
+ minValue: 0.25,
113
+ maxValue: 4.0,
114
+ numberPrecision: 2,
115
+ },
116
+ description: 'Speech speed multiplier (0.25-4.0)',
117
+ displayOptions: {
118
+ show: {
119
+ '/provider': ['openai'],
120
+ },
121
+ },
122
+ },
123
+ {
124
+ displayName: 'Language',
125
+ name: 'language',
126
+ type: 'string',
127
+ default: '',
128
+ description: 'Language code (e.g., "en", "es", "fr") or "auto" for detection',
129
+ displayOptions: {
130
+ show: {
131
+ '/provider': ['openai'],
132
+ },
133
+ },
134
+ },
135
+ ],
136
+ },
137
+ ],
138
+ };
139
+ exports.UNIVERSAL_IMAGE_GEN_DESCRIPTION = {
140
+ displayName: 'Universal Image Generation',
141
+ name: 'universalImageGen',
142
+ icon: 'file:icons/UniversalImageGen.svg',
143
+ group: ['transform'],
144
+ version: 2,
145
+ subtitle: '={{$parameter["provider"] + ": " + $parameter["model"]}}',
146
+ description: 'Generate images using multiple AI providers',
147
+ defaults: {
148
+ name: 'Universal Image Gen',
38
149
  },
39
- {
40
- displayName: 'Language',
41
- name: 'language',
42
- type: 'string',
43
- default: '',
44
- description: 'Language code (e.g., "en", "es", "fr") or "auto" for detection',
45
- displayOptions: { show: { '/provider': ['openai'] } },
150
+ inputs: ['main'],
151
+ outputs: ['main'],
152
+ credentials: [
153
+ {
154
+ name: 'googleGenerativeAIApi',
155
+ required: false,
156
+ displayOptions: {
157
+ show: {
158
+ provider: ['google'],
159
+ },
160
+ },
161
+ },
162
+ {
163
+ name: 'openAiApi',
164
+ required: false,
165
+ displayOptions: {
166
+ show: {
167
+ provider: ['openai'],
168
+ },
169
+ },
170
+ },
171
+ ],
172
+ properties: [
173
+ {
174
+ displayName: 'Resource',
175
+ name: 'resource',
176
+ type: 'options',
177
+ required: true,
178
+ options: [
179
+ {
180
+ name: 'Image Generation',
181
+ value: 'imageGen',
182
+ },
183
+ ],
184
+ default: 'imageGen',
185
+ description: 'The resource to operate on',
186
+ },
187
+ {
188
+ displayName: 'Provider',
189
+ name: 'provider',
190
+ type: 'options',
191
+ required: true,
192
+ displayOptions: {
193
+ show: {
194
+ resource: ['imageGen'],
195
+ },
196
+ },
197
+ options: [
198
+ {
199
+ name: 'Google Generative AI (Imagen)',
200
+ value: 'google',
201
+ },
202
+ {
203
+ name: 'OpenAI (DALL-E)',
204
+ value: 'openai',
205
+ },
206
+ ],
207
+ default: 'google',
208
+ description: 'Choose which AI provider to use for image generation',
209
+ },
210
+ {
211
+ displayName: 'Model',
212
+ name: 'model',
213
+ type: 'options',
214
+ required: true,
215
+ typeOptions: {
216
+ loadOptionsMethod: 'getModels',
217
+ loadOptionsDependsOn: ['provider'],
218
+ },
219
+ default: '',
220
+ description: 'The image generation model to use',
221
+ },
222
+ {
223
+ displayName: 'Prompt',
224
+ name: 'prompt',
225
+ type: 'string',
226
+ typeOptions: {
227
+ rows: 4,
228
+ },
229
+ default: '',
230
+ required: true,
231
+ description: 'Description of the image to generate',
232
+ },
233
+ {
234
+ displayName: 'Options',
235
+ name: 'options',
236
+ type: 'collection',
237
+ placeholder: 'Add Option',
238
+ default: {},
239
+ options: [
240
+ {
241
+ displayName: 'Number of Images',
242
+ name: 'n',
243
+ type: 'number',
244
+ default: 1,
245
+ typeOptions: {
246
+ minValue: 1,
247
+ maxValue: 10,
248
+ },
249
+ description: 'Number of images to generate',
250
+ displayOptions: {
251
+ show: {
252
+ '/provider': ['google', 'openai'],
253
+ },
254
+ },
255
+ },
256
+ {
257
+ displayName: 'Aspect Ratio',
258
+ name: 'aspectRatio',
259
+ type: 'options',
260
+ options: [
261
+ { name: '1:1 (Square)', value: '1:1' },
262
+ { name: '16:9 (Landscape)', value: '16:9' },
263
+ { name: '9:16 (Portrait)', value: '9:16' },
264
+ { name: '4:3', value: '4:3' },
265
+ { name: '3:4', value: '3:4' },
266
+ ],
267
+ default: '1:1',
268
+ description: 'Aspect ratio for the generated image',
269
+ displayOptions: {
270
+ show: {
271
+ '/provider': ['google'],
272
+ },
273
+ },
274
+ },
275
+ {
276
+ displayName: 'Size',
277
+ name: 'size',
278
+ type: 'options',
279
+ options: [
280
+ { name: '256x256', value: '256x256' },
281
+ { name: '512x512', value: '512x512' },
282
+ { name: '1024x1024', value: '1024x1024' },
283
+ { name: '1792x1024', value: '1792x1024' },
284
+ { name: '1024x1792', value: '1024x1792' },
285
+ ],
286
+ default: '1024x1024',
287
+ description: 'Size of the generated image',
288
+ displayOptions: {
289
+ show: {
290
+ '/provider': ['openai'],
291
+ },
292
+ },
293
+ },
294
+ {
295
+ displayName: 'Negative Prompt',
296
+ name: 'negativePrompt',
297
+ type: 'string',
298
+ default: '',
299
+ description: 'What to avoid in the generated image',
300
+ displayOptions: {
301
+ show: {
302
+ '/provider': ['google'],
303
+ },
304
+ },
305
+ },
306
+ {
307
+ displayName: 'Safety Filter Level',
308
+ name: 'safetyFilterLevel',
309
+ type: 'options',
310
+ options: [
311
+ { name: 'Block Few', value: 'block_few' },
312
+ { name: 'Block Some', value: 'block_some' },
313
+ { name: 'Block Most', value: 'block_most' },
314
+ ],
315
+ default: 'block_some',
316
+ description: 'Safety filter level for generated images',
317
+ displayOptions: {
318
+ show: {
319
+ '/provider': ['google'],
320
+ },
321
+ },
322
+ },
323
+ {
324
+ displayName: 'Quality',
325
+ name: 'quality',
326
+ type: 'options',
327
+ options: [
328
+ { name: 'Standard', value: 'standard' },
329
+ { name: 'HD', value: 'hd' },
330
+ ],
331
+ default: 'standard',
332
+ description: 'Quality of the generated image',
333
+ displayOptions: {
334
+ show: {
335
+ '/provider': ['openai'],
336
+ },
337
+ },
338
+ },
339
+ {
340
+ displayName: 'Style',
341
+ name: 'style',
342
+ type: 'options',
343
+ options: [
344
+ { name: 'Vivid', value: 'vivid' },
345
+ { name: 'Natural', value: 'natural' },
346
+ ],
347
+ default: 'vivid',
348
+ description: 'Style of the generated image',
349
+ displayOptions: {
350
+ show: {
351
+ '/provider': ['openai'],
352
+ },
353
+ },
354
+ },
355
+ ],
356
+ },
357
+ ],
358
+ };
359
+ exports.UNIVERSAL_EMBEDDING_DESCRIPTION = {
360
+ displayName: 'Universal Embedding',
361
+ name: 'universalEmbedding',
362
+ icon: 'file:icons/UniversalEmbedding.svg',
363
+ group: ['transform'],
364
+ version: 2,
365
+ subtitle: '={{$parameter["provider"] + ": " + $parameter["model"]}}',
366
+ description: 'Generate embeddings using multiple AI providers',
367
+ defaults: {
368
+ name: 'Universal Embedding',
46
369
  },
47
- ])
48
- .build();
49
- exports.UNIVERSAL_IMAGE_GEN_DESCRIPTION = new builders_1.NodeDescriptionBuilder('Universal Image Generation', 'universalImageGen', 'Generate images using multiple AI providers', 'file:icons/UniversalImageGen.svg')
50
- .addProviderCredentials({
51
- google: builders_1.COMMON_CREDENTIALS.google,
52
- openai: builders_1.COMMON_CREDENTIALS.openai,
53
- })
54
- .addResourceProperty('Image Generation', 'imageGen')
55
- .addProviderProperty([builders_1.COMMON_PROVIDERS.google, builders_1.COMMON_PROVIDERS.openai], 'imageGen')
56
- .addModelProperty('imageGen')
57
- .addPromptInput()
58
- .addOptionsCollection([
59
- {
60
- displayName: 'Number of Images',
61
- name: 'n',
62
- type: 'number',
63
- default: 1,
64
- typeOptions: { minValue: 1, maxValue: 10 },
65
- description: 'Number of images to generate',
66
- displayOptions: { show: { '/provider': ['google', 'openai'] } },
370
+ inputs: ['main'],
371
+ outputs: ['main'],
372
+ credentials: [
373
+ {
374
+ name: 'googleGenerativeAIApi',
375
+ required: false,
376
+ displayOptions: {
377
+ show: {
378
+ provider: ['google'],
379
+ },
380
+ },
381
+ },
382
+ {
383
+ name: 'openAiApi',
384
+ required: false,
385
+ displayOptions: {
386
+ show: {
387
+ provider: ['openai'],
388
+ },
389
+ },
390
+ },
391
+ ],
392
+ properties: [
393
+ {
394
+ displayName: 'Resource',
395
+ name: 'resource',
396
+ type: 'options',
397
+ required: true,
398
+ options: [
399
+ {
400
+ name: 'Embedding',
401
+ value: 'embedding',
402
+ },
403
+ ],
404
+ default: 'embedding',
405
+ description: 'The resource to operate on',
406
+ },
407
+ {
408
+ displayName: 'Provider',
409
+ name: 'provider',
410
+ type: 'options',
411
+ required: true,
412
+ displayOptions: {
413
+ show: {
414
+ resource: ['embedding'],
415
+ },
416
+ },
417
+ options: [
418
+ {
419
+ name: 'Google Generative AI',
420
+ value: 'google',
421
+ },
422
+ {
423
+ name: 'OpenAI',
424
+ value: 'openai',
425
+ },
426
+ ],
427
+ default: 'google',
428
+ description: 'Choose which AI provider to use for embeddings',
429
+ },
430
+ {
431
+ displayName: 'Model',
432
+ name: 'model',
433
+ type: 'options',
434
+ required: true,
435
+ typeOptions: {
436
+ loadOptionsMethod: 'getModels',
437
+ loadOptionsDependsOn: ['provider'],
438
+ },
439
+ default: '',
440
+ description: 'The embedding model to use',
441
+ },
442
+ {
443
+ displayName: 'Operation',
444
+ name: 'operation',
445
+ type: 'options',
446
+ required: true,
447
+ options: [
448
+ {
449
+ name: 'Embed Single',
450
+ value: 'embedSingle',
451
+ description: 'Generate embedding for a single text',
452
+ },
453
+ {
454
+ name: 'Embed Many',
455
+ value: 'embedMany',
456
+ description: 'Generate embeddings for multiple texts',
457
+ },
458
+ {
459
+ name: 'Cosine Similarity',
460
+ value: 'cosineSimilarity',
461
+ description: 'Calculate similarity between two embeddings',
462
+ },
463
+ ],
464
+ default: 'embedSingle',
465
+ description: 'The operation to perform',
466
+ },
467
+ {
468
+ displayName: 'Text',
469
+ name: 'text',
470
+ type: 'string',
471
+ typeOptions: {
472
+ rows: 4,
473
+ },
474
+ default: '',
475
+ required: true,
476
+ displayOptions: {
477
+ show: {
478
+ operation: ['embedSingle'],
479
+ },
480
+ },
481
+ description: 'The text to generate an embedding for',
482
+ },
483
+ {
484
+ displayName: 'Texts',
485
+ name: 'texts',
486
+ type: 'string',
487
+ typeOptions: {
488
+ rows: 6,
489
+ },
490
+ default: '',
491
+ required: true,
492
+ displayOptions: {
493
+ show: {
494
+ operation: ['embedMany'],
495
+ },
496
+ },
497
+ description: 'Texts to generate embeddings for (one per line)',
498
+ },
499
+ {
500
+ displayName: 'Embedding 1',
501
+ name: 'embedding1',
502
+ type: 'string',
503
+ default: '',
504
+ required: true,
505
+ displayOptions: {
506
+ show: {
507
+ operation: ['cosineSimilarity'],
508
+ },
509
+ },
510
+ description: 'First embedding vector as JSON array (e.g., [0.1, 0.2, 0.3])',
511
+ },
512
+ {
513
+ displayName: 'Embedding 2',
514
+ name: 'embedding2',
515
+ type: 'string',
516
+ default: '',
517
+ required: true,
518
+ displayOptions: {
519
+ show: {
520
+ operation: ['cosineSimilarity'],
521
+ },
522
+ },
523
+ description: 'Second embedding vector as JSON array (e.g., [0.1, 0.2, 0.3])',
524
+ },
525
+ {
526
+ displayName: 'Options',
527
+ name: 'options',
528
+ type: 'collection',
529
+ placeholder: 'Add Option',
530
+ default: {},
531
+ options: [
532
+ {
533
+ displayName: 'Dimensions',
534
+ name: 'dimensions',
535
+ type: 'number',
536
+ default: 0,
537
+ description: 'Reduced dimension for output embedding (0 = use model default)',
538
+ displayOptions: {
539
+ show: {
540
+ '/provider': ['openai'],
541
+ },
542
+ },
543
+ },
544
+ {
545
+ displayName: 'Output Dimensionality',
546
+ name: 'outputDimensionality',
547
+ type: 'number',
548
+ default: 0,
549
+ description: 'Reduced dimension for output embedding (0 = use model default)',
550
+ displayOptions: {
551
+ show: {
552
+ '/provider': ['google'],
553
+ },
554
+ },
555
+ },
556
+ {
557
+ displayName: 'Task Type',
558
+ name: 'taskType',
559
+ type: 'options',
560
+ options: [
561
+ { name: 'Semantic Similarity', value: 'SEMANTIC_SIMILARITY' },
562
+ { name: 'Classification', value: 'CLASSIFICATION' },
563
+ { name: 'Clustering', value: 'CLUSTERING' },
564
+ { name: 'Retrieval Document', value: 'RETRIEVAL_DOCUMENT' },
565
+ { name: 'Retrieval Query', value: 'RETRIEVAL_QUERY' },
566
+ { name: 'Question Answering', value: 'QUESTION_ANSWERING' },
567
+ { name: 'Fact Verification', value: 'FACT_VERIFICATION' },
568
+ { name: 'Code Retrieval Query', value: 'CODE_RETRIEVAL_QUERY' },
569
+ ],
570
+ default: 'SEMANTIC_SIMILARITY',
571
+ description: 'Task type for generating embeddings',
572
+ displayOptions: {
573
+ show: {
574
+ '/provider': ['google'],
575
+ },
576
+ },
577
+ },
578
+ {
579
+ displayName: 'Max Parallel Calls',
580
+ name: 'maxParallelCalls',
581
+ type: 'number',
582
+ default: 2,
583
+ typeOptions: {
584
+ minValue: 1,
585
+ maxValue: 10,
586
+ },
587
+ description: 'Maximum number of parallel API calls for embedMany operation',
588
+ displayOptions: {
589
+ show: {
590
+ '/operation': ['embedMany'],
591
+ },
592
+ },
593
+ },
594
+ {
595
+ displayName: 'Max Retries',
596
+ name: 'maxRetries',
597
+ type: 'number',
598
+ default: 2,
599
+ typeOptions: {
600
+ minValue: 0,
601
+ maxValue: 5,
602
+ },
603
+ description: 'Maximum number of retries for failed requests (0 = no retries)',
604
+ },
605
+ ],
606
+ },
607
+ ],
608
+ };
609
+ exports.UNIVERSAL_AI_DESCRIPTION = {
610
+ displayName: 'Universal AI',
611
+ name: 'universalAi',
612
+ icon: 'file:icons/UniversalAI.svg',
613
+ iconColor: 'black',
614
+ group: ['transform'],
615
+ version: 2,
616
+ subtitle: '={{$parameter["resource"] + ": " + $parameter["provider"] + ": " + $parameter["model"]}}',
617
+ description: 'Use multiple AI providers via Vercel AI SDK',
618
+ defaults: {
619
+ name: 'Universal AI',
67
620
  },
68
- {
69
- displayName: 'Aspect Ratio',
70
- name: 'aspectRatio',
71
- type: 'options',
72
- options: [
73
- { name: '1:1 (Square)', value: '1:1' },
74
- { name: '16:9 (Landscape)', value: '16:9' },
75
- { name: '9:16 (Portrait)', value: '9:16' },
76
- { name: '4:3', value: '4:3' },
77
- { name: '3:4', value: '3:4' },
78
- ],
79
- default: '1:1',
80
- description: 'Aspect ratio for the generated image',
81
- displayOptions: { show: { '/provider': ['google'] } },
621
+ inputs: ['main'],
622
+ outputs: ['main'],
623
+ credentials: [
624
+ {
625
+ name: 'googleGenerativeAIApi',
626
+ required: false,
627
+ displayOptions: {
628
+ show: {
629
+ provider: ['google'],
630
+ },
631
+ },
632
+ },
633
+ {
634
+ name: 'deepSeekApi',
635
+ required: false,
636
+ displayOptions: {
637
+ show: {
638
+ provider: ['deepseek'],
639
+ },
640
+ },
641
+ },
642
+ {
643
+ name: 'groqApi',
644
+ required: false,
645
+ displayOptions: {
646
+ show: {
647
+ provider: ['groq'],
648
+ },
649
+ },
650
+ },
651
+ {
652
+ name: 'openRouterApi',
653
+ required: false,
654
+ displayOptions: {
655
+ show: {
656
+ provider: ['openrouter'],
657
+ },
658
+ },
659
+ },
660
+ ],
661
+ properties: [
662
+ {
663
+ displayName: 'Resource',
664
+ name: 'resource',
665
+ type: 'options',
666
+ required: true,
667
+ noDataExpression: true,
668
+ options: [
669
+ {
670
+ name: 'AI',
671
+ value: 'ai',
672
+ },
673
+ ],
674
+ default: 'ai',
675
+ description: 'The resource to operate on',
676
+ },
677
+ {
678
+ displayName: 'Provider',
679
+ name: 'provider',
680
+ type: 'options',
681
+ required: true,
682
+ noDataExpression: true,
683
+ displayOptions: {
684
+ show: {
685
+ resource: ['ai'],
686
+ },
687
+ },
688
+ options: [
689
+ {
690
+ name: 'Google Generative AI',
691
+ value: 'google',
692
+ description: 'Google Gemini models with multimodal support',
693
+ },
694
+ {
695
+ name: 'DeepSeek',
696
+ value: 'deepseek',
697
+ description: 'DeepSeek models with strong reasoning capabilities',
698
+ },
699
+ {
700
+ name: 'Groq',
701
+ value: 'groq',
702
+ description: 'High-performance models via Groq LPU',
703
+ },
704
+ {
705
+ name: 'OpenRouter',
706
+ value: 'openrouter',
707
+ description: 'Access multiple models through OpenRouter',
708
+ },
709
+ ],
710
+ default: 'google',
711
+ description: 'Choose which AI provider to use',
712
+ },
713
+ {
714
+ displayName: 'Operation',
715
+ name: 'operation',
716
+ type: 'options',
717
+ required: true,
718
+ noDataExpression: true,
719
+ options: [
720
+ {
721
+ name: 'Generate Text',
722
+ value: 'generateText',
723
+ description: 'Generate text using simple prompt or chat messages',
724
+ action: 'Generate text',
725
+ },
726
+ {
727
+ name: 'Generate Object',
728
+ value: 'generateObject',
729
+ description: 'Generate a structured object based on a JSON schema',
730
+ action: 'Generate object',
731
+ },
732
+ ],
733
+ default: 'generateText',
734
+ description: 'Which type of output you want to generate',
735
+ },
736
+ {
737
+ displayName: 'Model Name or ID',
738
+ name: 'model',
739
+ type: 'options',
740
+ required: true,
741
+ typeOptions: {
742
+ loadOptionsMethod: 'getModels',
743
+ loadOptionsDependsOn: ['provider'],
744
+ },
745
+ default: '',
746
+ 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>.',
747
+ },
748
+ {
749
+ displayName: 'Input Type',
750
+ name: 'inputType',
751
+ type: 'options',
752
+ required: true,
753
+ noDataExpression: true,
754
+ options: [
755
+ {
756
+ name: 'Simple Prompt',
757
+ value: 'prompt',
758
+ description: 'Use a single prompt',
759
+ },
760
+ {
761
+ name: 'Messages',
762
+ value: 'messages',
763
+ description: 'Use a conversation with multiple messages',
764
+ },
765
+ ],
766
+ default: 'prompt',
767
+ description: 'Choose how you want to provide input to the model',
768
+ },
769
+ {
770
+ displayName: 'System',
771
+ name: 'system',
772
+ type: 'string',
773
+ typeOptions: {
774
+ rows: 4,
775
+ },
776
+ displayOptions: {
777
+ show: {
778
+ inputType: ['prompt'],
779
+ },
780
+ },
781
+ default: 'You are a helpful assistant.',
782
+ description: "System prompt that specifies the model's behavior",
783
+ hint: "This field is optional, but can help guide the model's responses.",
784
+ requiresDataPath: 'single',
785
+ },
786
+ {
787
+ displayName: 'Cache System Instruction',
788
+ name: 'cacheSystemInstruction',
789
+ type: 'boolean',
790
+ default: false,
791
+ displayOptions: {
792
+ show: {
793
+ inputType: ['prompt'],
794
+ },
795
+ },
796
+ 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).',
797
+ },
798
+ {
799
+ displayName: 'Prompt',
800
+ name: 'prompt',
801
+ type: 'string',
802
+ typeOptions: {
803
+ rows: 4,
804
+ },
805
+ displayOptions: {
806
+ show: {
807
+ inputType: ['prompt'],
808
+ },
809
+ },
810
+ default: '',
811
+ required: true,
812
+ description: 'The single text prompt to generate a completion for',
813
+ hint: 'You can drag data from previous nodes here using expressions.',
814
+ requiresDataPath: 'single',
815
+ },
816
+ {
817
+ displayName: 'Cache Prompt',
818
+ name: 'cachePrompt',
819
+ type: 'boolean',
820
+ default: false,
821
+ displayOptions: {
822
+ show: {
823
+ inputType: ['prompt'],
824
+ },
825
+ },
826
+ description: 'Cache the prompt text. Only useful if this prompt will be reused across multiple requests with different parameters or context.',
827
+ },
828
+ {
829
+ displayName: 'Messages',
830
+ name: 'messages',
831
+ type: 'fixedCollection',
832
+ typeOptions: {
833
+ multipleValues: true,
834
+ sortable: true,
835
+ minValue: 1,
836
+ },
837
+ displayOptions: {
838
+ show: {
839
+ inputType: ['messages'],
840
+ },
841
+ },
842
+ description: 'The messages for the conversation',
843
+ default: {
844
+ messagesUi: [
845
+ {
846
+ role: 'system',
847
+ systemContent: 'You are a helpful assistant.',
848
+ },
849
+ {
850
+ role: 'user',
851
+ content: 'How can you help me?',
852
+ },
853
+ ],
854
+ },
855
+ required: true,
856
+ options: [
857
+ {
858
+ name: 'messagesUi',
859
+ displayName: 'Message',
860
+ values: [
861
+ {
862
+ displayName: 'Role',
863
+ name: 'role',
864
+ type: 'options',
865
+ noDataExpression: true,
866
+ options: [
867
+ {
868
+ name: 'Assistant',
869
+ value: 'assistant',
870
+ },
871
+ {
872
+ name: 'System',
873
+ value: 'system',
874
+ },
875
+ {
876
+ name: 'User',
877
+ value: 'user',
878
+ },
879
+ ],
880
+ default: 'user',
881
+ required: true,
882
+ },
883
+ {
884
+ displayName: 'Cache Message',
885
+ name: 'cacheMessage',
886
+ type: 'boolean',
887
+ default: false,
888
+ 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.',
889
+ displayOptions: {
890
+ show: {
891
+ role: ['system', 'assistant', 'user'],
892
+ '/provider': ['google'],
893
+ '/inputType': ['messages'],
894
+ },
895
+ },
896
+ },
897
+ {
898
+ displayName: 'System Content',
899
+ name: 'systemContent',
900
+ type: 'string',
901
+ description: 'The text content if role is System',
902
+ required: true,
903
+ displayOptions: {
904
+ show: {
905
+ role: ['system'],
906
+ },
907
+ },
908
+ typeOptions: {
909
+ rows: 4,
910
+ },
911
+ default: '',
912
+ requiresDataPath: 'single',
913
+ },
914
+ {
915
+ displayName: 'Text Content',
916
+ name: 'content',
917
+ type: 'string',
918
+ typeOptions: {
919
+ rows: 4,
920
+ },
921
+ displayOptions: {
922
+ show: {
923
+ role: ['assistant', 'user'],
924
+ },
925
+ },
926
+ default: '',
927
+ description: 'Primary text content of the message',
928
+ required: true,
929
+ requiresDataPath: 'single',
930
+ },
931
+ {
932
+ displayName: 'Attachments',
933
+ name: 'attachments',
934
+ type: 'fixedCollection',
935
+ typeOptions: {
936
+ multipleValues: true,
937
+ },
938
+ displayOptions: {
939
+ show: {
940
+ role: ['assistant', 'user'],
941
+ },
942
+ },
943
+ default: {},
944
+ options: [
945
+ {
946
+ name: 'attachment',
947
+ displayName: 'Attachment',
948
+ values: [
949
+ {
950
+ displayName: 'File Content',
951
+ name: 'fileContent',
952
+ type: 'string',
953
+ default: '',
954
+ description: 'Binary property name, base64 string, or http(s)/data: URL',
955
+ required: true,
956
+ },
957
+ {
958
+ displayName: 'MIME Type',
959
+ name: 'mimeType',
960
+ type: 'options',
961
+ default: 'application/octet-stream',
962
+ description: 'Select the MIME type of the file; choose Other to specify a custom MIME type',
963
+ options: [
964
+ {
965
+ name: 'JPEG Image (Image/jpeg)',
966
+ value: 'image/jpeg',
967
+ },
968
+ {
969
+ name: 'JSON (Application/json)',
970
+ value: 'application/json',
971
+ },
972
+ {
973
+ name: 'MP3 Audio (Audio/mpeg)',
974
+ value: 'audio/mpeg',
975
+ },
976
+ {
977
+ name: 'MP4 Video (Video/mp4)',
978
+ value: 'video/mp4',
979
+ },
980
+ {
981
+ name: 'Octet Stream (Default)',
982
+ value: 'application/octet-stream',
983
+ },
984
+ {
985
+ name: 'Other (Specify Below)',
986
+ value: 'other',
987
+ },
988
+ {
989
+ name: 'PDF (Application/pdf)',
990
+ value: 'application/pdf',
991
+ },
992
+ {
993
+ name: 'Plain Text (Text/plain)',
994
+ value: 'text/plain',
995
+ },
996
+ {
997
+ name: 'PNG Image (Image/png)',
998
+ value: 'image/png',
999
+ },
1000
+ {
1001
+ name: 'WAV Audio (Audio/wav)',
1002
+ value: 'audio/wav',
1003
+ },
1004
+ ],
1005
+ },
1006
+ {
1007
+ displayName: 'Other MIME Type',
1008
+ name: 'mimeTypeOther',
1009
+ type: 'string',
1010
+ default: '',
1011
+ description: 'Specify a custom MIME type, e.g. application/x-zip-compressed',
1012
+ displayOptions: {
1013
+ show: {
1014
+ mimeType: ['other'],
1015
+ },
1016
+ },
1017
+ },
1018
+ {
1019
+ displayName: 'Cache Attachment',
1020
+ name: 'cacheAttachment',
1021
+ type: 'boolean',
1022
+ default: false,
1023
+ description: 'Cache this file/attachment. Ideal for large documents that will be referenced in multiple requests.',
1024
+ displayOptions: {
1025
+ show: {
1026
+ '/inputType': ['messages'],
1027
+ },
1028
+ },
1029
+ },
1030
+ ],
1031
+ },
1032
+ ],
1033
+ },
1034
+ ],
1035
+ },
1036
+ ],
1037
+ },
1038
+ {
1039
+ displayName: 'Convert Messages to Model Messages',
1040
+ name: 'convertMessagesToModel',
1041
+ type: 'boolean',
1042
+ default: false,
1043
+ description: 'Convert UI messages to ModelMessage format using convertToModelMessages. Enable if you get "Invalid prompt: The messages must be a ModelMessage[]" errors.',
1044
+ displayOptions: {
1045
+ show: {
1046
+ inputType: ['messages'],
1047
+ },
1048
+ },
1049
+ },
1050
+ {
1051
+ displayName: 'Messages as JSON',
1052
+ name: 'messageAsJson',
1053
+ type: 'boolean',
1054
+ default: false,
1055
+ noDataExpression: true,
1056
+ description: 'Whether to input messages as a JSON array instead of using the UI',
1057
+ displayOptions: {
1058
+ show: {
1059
+ operation: ['generateText', 'generateObject'],
1060
+ inputType: ['messages'],
1061
+ },
1062
+ },
1063
+ },
1064
+ {
1065
+ displayName: 'Messages (JSON)',
1066
+ name: 'messagesJson',
1067
+ type: 'string',
1068
+ default: '=[{"role": "user", "content": "Hello!"}]',
1069
+ description: 'Enter an array of message objects in JSON format (role, content)',
1070
+ required: true,
1071
+ typeOptions: {
1072
+ rows: 4,
1073
+ },
1074
+ noDataExpression: false,
1075
+ requiresDataPath: 'single',
1076
+ displayOptions: {
1077
+ show: {
1078
+ operation: ['generateText', 'generateObject'],
1079
+ inputType: ['messages'],
1080
+ messageAsJson: [true],
1081
+ },
1082
+ },
1083
+ },
1084
+ {
1085
+ displayName: 'Schema Name',
1086
+ name: 'schemaName',
1087
+ type: 'string',
1088
+ default: '',
1089
+ description: 'Name of the output schema (optional)',
1090
+ hint: 'Some providers use this name for additional guidance when generating objects.',
1091
+ displayOptions: {
1092
+ show: {
1093
+ operation: ['generateObject'],
1094
+ },
1095
+ },
1096
+ },
1097
+ {
1098
+ displayName: 'Schema Description',
1099
+ name: 'schemaDescription',
1100
+ type: 'string',
1101
+ default: '',
1102
+ description: 'Description of the output schema (optional)',
1103
+ hint: 'Some providers use this description for additional guidance when generating objects.',
1104
+ displayOptions: {
1105
+ show: {
1106
+ operation: ['generateObject'],
1107
+ },
1108
+ },
1109
+ },
1110
+ {
1111
+ displayName: 'Schema',
1112
+ name: 'schema',
1113
+ type: 'json',
1114
+ displayOptions: {
1115
+ show: {
1116
+ operation: ['generateObject'],
1117
+ },
1118
+ },
1119
+ default: `{\n\t"type": "object",\n\t"properties": {\n\t\t"sentiment": {\n\t\t"type": "string",\n\t\t"enum": ["positive","negative","neutral"],\n\t\t"description": "The overall sentiment of the text"\n\t\t},\n\t\t"score": {\n\t\t"type": "number",\n\t\t"minimum": -1,\n\t\t"maximum": 1,\n\t\t"description": "Sentiment score from -1 (negative) to 1 (positive)"\n\t\t},\n\t\t"text": {\n\t\t"type": "string",\n\t\t"description": "The text content to analyze"\n\t\t}\n\t}\n}`,
1120
+ required: true,
1121
+ description: 'JSON schema describing the structure and constraints of the object to generate',
1122
+ hint: 'For example, a schema describing sentiment analysis output.',
1123
+ requiresDataPath: 'single',
1124
+ },
1125
+ {
1126
+ displayName: 'Options',
1127
+ name: 'options',
1128
+ type: 'collection',
1129
+ placeholder: 'Add Option',
1130
+ default: {},
1131
+ options: [
1132
+ {
1133
+ displayName: 'Max Tokens',
1134
+ name: 'maxTokens',
1135
+ type: 'number',
1136
+ typeOptions: {
1137
+ minValue: 1,
1138
+ },
1139
+ default: 2048,
1140
+ description: 'The maximum number of tokens to generate',
1141
+ },
1142
+ {
1143
+ displayName: 'Temperature',
1144
+ name: 'temperature',
1145
+ type: 'number',
1146
+ typeOptions: {
1147
+ minValue: 0,
1148
+ maxValue: 2,
1149
+ numberPrecision: 2,
1150
+ },
1151
+ default: 0.7,
1152
+ description: 'Higher values produce more random outputs',
1153
+ },
1154
+ {
1155
+ displayName: 'Top P',
1156
+ name: 'topP',
1157
+ type: 'number',
1158
+ typeOptions: {
1159
+ minValue: 0,
1160
+ maxValue: 1,
1161
+ numberPrecision: 2,
1162
+ },
1163
+ default: 1,
1164
+ description: 'Controls diversity via nucleus sampling. Lower values make outputs more focused.',
1165
+ },
1166
+ {
1167
+ displayName: 'Top K',
1168
+ name: 'topK',
1169
+ type: 'number',
1170
+ typeOptions: {
1171
+ minValue: 1,
1172
+ },
1173
+ default: 50,
1174
+ description: 'Limits the number of tokens considered for sampling. Only applies to some providers.',
1175
+ displayOptions: {
1176
+ show: {
1177
+ '/provider': ['google'],
1178
+ },
1179
+ },
1180
+ },
1181
+ {
1182
+ displayName: 'Frequency Penalty',
1183
+ name: 'frequencyPenalty',
1184
+ type: 'number',
1185
+ typeOptions: {
1186
+ minValue: -2,
1187
+ maxValue: 2,
1188
+ numberPrecision: 2,
1189
+ },
1190
+ default: 0,
1191
+ description: 'Reduces repetition of frequent tokens. Positive values decrease repetition.',
1192
+ },
1193
+ {
1194
+ displayName: 'Presence Penalty',
1195
+ name: 'presencePenalty',
1196
+ type: 'number',
1197
+ typeOptions: {
1198
+ minValue: -2,
1199
+ maxValue: 2,
1200
+ numberPrecision: 2,
1201
+ },
1202
+ default: 0,
1203
+ description: 'Encourages talking about new topics. Positive values increase likelihood of new topics.',
1204
+ },
1205
+ {
1206
+ displayName: 'Seed',
1207
+ name: 'seed',
1208
+ type: 'number',
1209
+ default: 0,
1210
+ description: 'Random seed for reproducible outputs. Not supported by all providers.',
1211
+ },
1212
+ {
1213
+ displayName: 'Stop Sequences',
1214
+ name: 'stopSequences',
1215
+ type: 'string',
1216
+ default: '',
1217
+ description: 'Sequences where the API will stop generating text. Separate multiple sequences with commas.',
1218
+ displayOptions: {
1219
+ show: {
1220
+ '/provider': ['google', 'openrouter'],
1221
+ },
1222
+ },
1223
+ },
1224
+ {
1225
+ displayName: 'Include Request Body',
1226
+ name: 'includeRequestBody',
1227
+ type: 'boolean',
1228
+ default: false,
1229
+ description: 'Whether to include the request body in the output',
1230
+ },
1231
+ {
1232
+ displayName: 'Cache TTL (seconds)',
1233
+ name: 'cacheTTL',
1234
+ type: 'number',
1235
+ default: 3600,
1236
+ description: 'How long to keep cached content (in seconds). Default: 3600 (1 hour). Longer TTL = more cost but better for repeated use.',
1237
+ },
1238
+ ],
1239
+ },
1240
+ {
1241
+ displayName: 'Safety Settings',
1242
+ name: 'safetySettings',
1243
+ type: 'fixedCollection',
1244
+ typeOptions: {
1245
+ multipleValues: true,
1246
+ },
1247
+ default: {},
1248
+ displayOptions: {
1249
+ show: {
1250
+ provider: ['google'],
1251
+ },
1252
+ },
1253
+ options: [
1254
+ {
1255
+ name: 'settings',
1256
+ displayName: 'Setting',
1257
+ values: [
1258
+ {
1259
+ displayName: 'Category',
1260
+ name: 'category',
1261
+ type: 'options',
1262
+ noDataExpression: true,
1263
+ options: [
1264
+ { name: 'Hate Speech', value: 'HARM_CATEGORY_HATE_SPEECH' },
1265
+ { name: 'Dangerous Content', value: 'HARM_CATEGORY_DANGEROUS_CONTENT' },
1266
+ { name: 'Harassment', value: 'HARM_CATEGORY_HARASSMENT' },
1267
+ { name: 'Sexually Explicit', value: 'HARM_CATEGORY_SEXUALLY_EXPLICIT' },
1268
+ ],
1269
+ default: 'HARM_CATEGORY_HATE_SPEECH',
1270
+ },
1271
+ {
1272
+ displayName: 'Threshold',
1273
+ name: 'threshold',
1274
+ type: 'options',
1275
+ noDataExpression: true,
1276
+ options: [
1277
+ { name: 'Block Low and Above', value: 'BLOCK_LOW_AND_ABOVE' },
1278
+ { name: 'Block Medium and Above', value: 'BLOCK_MEDIUM_AND_ABOVE' },
1279
+ { name: 'Block Only High', value: 'BLOCK_ONLY_HIGH' },
1280
+ { name: 'Block None', value: 'BLOCK_NONE' },
1281
+ ],
1282
+ default: 'BLOCK_MEDIUM_AND_ABOVE',
1283
+ },
1284
+ ],
1285
+ },
1286
+ ],
1287
+ description: 'Set safety categories and thresholds to block or filter certain outputs',
1288
+ },
1289
+ {
1290
+ displayName: 'Custom Headers',
1291
+ name: 'customHeaders',
1292
+ type: 'fixedCollection',
1293
+ default: {},
1294
+ typeOptions: {
1295
+ multipleValues: true,
1296
+ },
1297
+ displayOptions: {
1298
+ show: {
1299
+ provider: ['google'],
1300
+ },
1301
+ },
1302
+ options: [
1303
+ {
1304
+ name: 'headers',
1305
+ displayName: 'Header',
1306
+ values: [
1307
+ {
1308
+ displayName: 'Name',
1309
+ name: 'name',
1310
+ type: 'string',
1311
+ required: true,
1312
+ default: '',
1313
+ },
1314
+ {
1315
+ displayName: 'Value',
1316
+ name: 'value',
1317
+ type: 'string',
1318
+ required: true,
1319
+ default: '',
1320
+ },
1321
+ ],
1322
+ },
1323
+ ],
1324
+ description: 'Add custom HTTP headers to include with Google Generative AI requests.',
1325
+ },
1326
+ {
1327
+ displayName: 'Response Modalities',
1328
+ name: 'responseModalities',
1329
+ type: 'multiOptions',
1330
+ options: [
1331
+ { name: 'Text', value: 'TEXT' },
1332
+ { name: 'Image', value: 'IMAGE' },
1333
+ ],
1334
+ default: [],
1335
+ displayOptions: {
1336
+ show: {
1337
+ provider: ['google'],
1338
+ },
1339
+ },
1340
+ description: 'Output modalities for the response. Leave empty for text-only (default).',
1341
+ },
1342
+ {
1343
+ displayName: 'Thinking Budget',
1344
+ name: 'thinkingBudget',
1345
+ type: 'number',
1346
+ default: -1,
1347
+ typeOptions: {
1348
+ minValue: -1,
1349
+ maxValue: 8192,
1350
+ },
1351
+ displayOptions: {
1352
+ show: {
1353
+ provider: ['google'],
1354
+ },
1355
+ },
1356
+ description: 'Number of thinking tokens for reasoning models (Gemini 2.5+). Set to -1 for auto or 0 to disable thinking.',
1357
+ },
1358
+ {
1359
+ displayName: 'Include Thoughts',
1360
+ name: 'includeThoughts',
1361
+ type: 'boolean',
1362
+ default: false,
1363
+ displayOptions: {
1364
+ show: {
1365
+ provider: ['google'],
1366
+ },
1367
+ },
1368
+ description: 'Whether to include thought summaries in the response (reasoning insights)',
1369
+ },
1370
+ {
1371
+ displayName: 'Google Tools',
1372
+ name: 'googleTools',
1373
+ type: 'multiOptions',
1374
+ options: [
1375
+ { name: 'Google Search', value: 'google_search' },
1376
+ { name: 'URL Context', value: 'url_context' },
1377
+ { name: 'Code Execution', value: 'code_execution' },
1378
+ ],
1379
+ default: [],
1380
+ displayOptions: {
1381
+ show: {
1382
+ provider: ['google'],
1383
+ },
1384
+ },
1385
+ description: 'Enable Google-specific tools for enhanced capabilities',
1386
+ },
1387
+ {
1388
+ displayName: 'Enable Streaming',
1389
+ name: 'enableStreaming',
1390
+ type: 'boolean',
1391
+ default: false,
1392
+ displayOptions: {
1393
+ show: {
1394
+ operation: ['generateText'],
1395
+ },
1396
+ },
1397
+ description: 'Stream the response in chunks. Output will contain multiple items.',
1398
+ },
1399
+ ],
1400
+ };
1401
+ exports.UNIVERSAL_TRANSCRIPTION_DESCRIPTION = {
1402
+ displayName: 'Universal Transcription',
1403
+ name: 'universalTranscription',
1404
+ icon: 'file:icons/UniversalTranscription.svg',
1405
+ group: ['transform'],
1406
+ version: 2,
1407
+ subtitle: '={{$parameter["provider"] + ": " + $parameter["model"]}}',
1408
+ description: 'Generate transcripts from audio files using multiple AI providers',
1409
+ defaults: {
1410
+ name: 'Universal Transcription',
82
1411
  },
83
- {
84
- displayName: 'Size',
85
- name: 'size',
86
- type: 'options',
87
- options: [
88
- { name: '256x256', value: '256x256' },
89
- { name: '512x512', value: '512x512' },
90
- { name: '1024x1024', value: '1024x1024' },
91
- { name: '1792x1024', value: '1792x1024' },
92
- { name: '1024x1792', value: '1024x1792' },
93
- ],
94
- default: '1024x1024',
95
- description: 'Size of the generated image',
96
- displayOptions: { show: { '/provider': ['openai'] } },
97
- },
98
- {
99
- displayName: 'Negative Prompt',
100
- name: 'negativePrompt',
101
- type: 'string',
102
- default: '',
103
- description: 'What to avoid in the generated image',
104
- displayOptions: { show: { '/provider': ['google'] } },
105
- },
106
- {
107
- displayName: 'Safety Filter Level',
108
- name: 'safetyFilterLevel',
109
- type: 'options',
110
- options: [
111
- { name: 'Block Few', value: 'block_few' },
112
- { name: 'Block Some', value: 'block_some' },
113
- { name: 'Block Most', value: 'block_most' },
114
- ],
115
- default: 'block_some',
116
- description: 'Safety filter level for generated images',
117
- displayOptions: { show: { '/provider': ['google'] } },
118
- },
119
- {
120
- displayName: 'Quality',
121
- name: 'quality',
122
- type: 'options',
123
- options: [
124
- { name: 'Standard', value: 'standard' },
125
- { name: 'HD', value: 'hd' },
126
- ],
127
- default: 'standard',
128
- description: 'Quality of the generated image',
129
- displayOptions: { show: { '/provider': ['openai'] } },
130
- },
131
- {
132
- displayName: 'Style',
133
- name: 'style',
134
- type: 'options',
135
- options: [
136
- { name: 'Vivid', value: 'vivid' },
137
- { name: 'Natural', value: 'natural' },
138
- ],
139
- default: 'vivid',
140
- description: 'Style of the generated image',
141
- displayOptions: { show: { '/provider': ['openai'] } },
142
- },
143
- ])
144
- .build();
145
- exports.UNIVERSAL_EMBEDDING_DESCRIPTION = new builders_1.NodeDescriptionBuilder('Universal Embedding', 'universalEmbedding', 'Generate embeddings using multiple AI providers', 'file:icons/UniversalEmbedding.svg')
146
- .addProviderCredentials({
147
- google: builders_1.COMMON_CREDENTIALS.google,
148
- openai: builders_1.COMMON_CREDENTIALS.openai,
149
- })
150
- .addResourceProperty('Embedding', 'embedding')
151
- .addProviderProperty([builders_1.COMMON_PROVIDERS.google, builders_1.COMMON_PROVIDERS.openai], 'embedding')
152
- .addModelProperty('embedding')
153
- .addEmbeddingOperationProperty()
154
- .addEmbeddingProperties()
155
- .addOptionsCollection([
156
- {
157
- displayName: 'Dimensions',
158
- name: 'dimensions',
159
- type: 'number',
160
- default: 0,
161
- description: 'Reduced dimension for output embedding (0 = use model default)',
162
- displayOptions: { show: { '/provider': ['openai'] } },
163
- },
164
- {
165
- displayName: 'Output Dimensionality',
166
- name: 'outputDimensionality',
167
- type: 'number',
168
- default: 0,
169
- description: 'Reduced dimension for output embedding (0 = use model default)',
170
- displayOptions: { show: { '/provider': ['google'] } },
171
- },
172
- {
173
- displayName: 'Task Type',
174
- name: 'taskType',
175
- type: 'options',
176
- options: [
177
- { name: 'Semantic Similarity', value: 'SEMANTIC_SIMILARITY' },
178
- { name: 'Classification', value: 'CLASSIFICATION' },
179
- { name: 'Clustering', value: 'CLUSTERING' },
180
- { name: 'Retrieval Document', value: 'RETRIEVAL_DOCUMENT' },
181
- { name: 'Retrieval Query', value: 'RETRIEVAL_QUERY' },
182
- { name: 'Question Answering', value: 'QUESTION_ANSWERING' },
183
- { name: 'Fact Verification', value: 'FACT_VERIFICATION' },
184
- { name: 'Code Retrieval Query', value: 'CODE_RETRIEVAL_QUERY' },
185
- ],
186
- default: 'SEMANTIC_SIMILARITY',
187
- description: 'Task type for generating embeddings',
188
- displayOptions: { show: { '/provider': ['google'] } },
189
- },
190
- {
191
- displayName: 'Max Parallel Calls',
192
- name: 'maxParallelCalls',
193
- type: 'number',
194
- default: 2,
195
- typeOptions: { minValue: 1, maxValue: 10 },
196
- description: 'Maximum number of parallel API calls for embedMany operation',
197
- displayOptions: { show: { '/operation': ['embedMany'] } },
198
- },
199
- {
200
- displayName: 'Max Retries',
201
- name: 'maxRetries',
202
- type: 'number',
203
- default: 2,
204
- typeOptions: { minValue: 0, maxValue: 5 },
205
- description: 'Maximum number of retries for failed requests (0 = no retries)',
206
- },
207
- ])
208
- .build();
209
- exports.UNIVERSAL_AI_DESCRIPTION = new builders_1.NodeDescriptionBuilder('Universal AI', 'universalAi', 'Use multiple AI providers via Vercel AI SDK', 'file:icons/UniversalAI.svg')
210
- .addProviderCredentials({
211
- google: builders_1.COMMON_CREDENTIALS.google,
212
- deepseek: builders_1.COMMON_CREDENTIALS.deepseek,
213
- groq: builders_1.COMMON_CREDENTIALS.groq,
214
- openrouter: builders_1.COMMON_CREDENTIALS.openrouter,
215
- })
216
- .addResourceProperty('AI', 'ai')
217
- .addProviderProperty([
218
- builders_1.COMMON_PROVIDERS.google,
219
- builders_1.COMMON_PROVIDERS.deepseek,
220
- builders_1.COMMON_PROVIDERS.groq,
221
- builders_1.COMMON_PROVIDERS.openrouter,
222
- ], 'ai')
223
- .addOperationProperty([
224
- builders_1.COMMON_OPERATIONS.generateText,
225
- builders_1.COMMON_OPERATIONS.generateObject,
226
- ])
227
- .addModelProperty('ai')
228
- .addInputTypeProperty([
229
- builders_1.COMMON_INPUT_TYPES.prompt,
230
- builders_1.COMMON_INPUT_TYPES.messages,
231
- ])
232
- .addSystemProperties()
233
- .addPromptProperties()
234
- .addMessagesInput()
235
- .addGoogleProperties()
236
- .addUniversalAIOptions()
237
- .build();
238
- exports.UNIVERSAL_TRANSCRIPTION_DESCRIPTION = new builders_1.NodeDescriptionBuilder('Universal Transcription', 'universalTranscription', 'Generate transcripts from audio files using multiple AI providers', 'file:icons/UniversalTranscription.svg')
239
- .addProviderCredentials({
240
- openai: builders_1.COMMON_CREDENTIALS.openai,
241
- })
242
- .addProviderProperty([{
243
- name: 'OpenAI (Whisper)',
244
- value: 'openai',
245
- }])
246
- .addAudioSourceProperty()
247
- .addAudioProperty()
248
- .addAudioUrlProperty()
249
- .addModelProperty(undefined, [{
250
- name: 'Whisper Large v3',
251
- value: 'whisper-1',
252
- description: 'OpenAI\'s most advanced Whisper model',
253
- }])
254
- .addOptionsCollection([
255
- {
256
- displayName: 'Language',
257
- name: 'language',
258
- type: 'string',
259
- default: '',
260
- description: 'Language of the audio as ISO-639-1 format (e.g., "en", "es"). Leave empty for auto-detection.',
261
- },
262
- {
263
- displayName: 'Include Segments',
264
- name: 'includeSegments',
265
- type: 'boolean',
266
- default: false,
267
- description: 'Whether to include timestamped segments in the output',
268
- },
269
- ])
270
- .build();
1412
+ inputs: ['main'],
1413
+ outputs: ['main'],
1414
+ credentials: [
1415
+ {
1416
+ name: 'openAiApi',
1417
+ required: false,
1418
+ displayOptions: {
1419
+ show: {
1420
+ provider: ['openai'],
1421
+ },
1422
+ },
1423
+ },
1424
+ ],
1425
+ properties: [
1426
+ {
1427
+ displayName: 'Provider',
1428
+ name: 'provider',
1429
+ type: 'options',
1430
+ required: true,
1431
+ noDataExpression: true,
1432
+ options: [
1433
+ {
1434
+ name: 'OpenAI (Whisper)',
1435
+ value: 'openai',
1436
+ },
1437
+ ],
1438
+ default: 'openai',
1439
+ description: 'Choose which AI provider to use for transcription',
1440
+ },
1441
+ {
1442
+ displayName: 'Audio Source',
1443
+ name: 'audioSource',
1444
+ type: 'options',
1445
+ required: true,
1446
+ options: [
1447
+ {
1448
+ name: 'Binary Data',
1449
+ value: 'binary',
1450
+ description: 'Use binary data from n8n input',
1451
+ },
1452
+ {
1453
+ name: 'URL',
1454
+ value: 'url',
1455
+ description: 'Provide a URL to the audio file',
1456
+ },
1457
+ ],
1458
+ default: 'binary',
1459
+ description: 'Where the audio file is coming from',
1460
+ },
1461
+ {
1462
+ displayName: 'Audio Property',
1463
+ name: 'audioProperty',
1464
+ type: 'string',
1465
+ default: 'data',
1466
+ required: true,
1467
+ displayOptions: {
1468
+ show: {
1469
+ audioSource: ['binary'],
1470
+ },
1471
+ },
1472
+ description: 'Name of the binary property containing the audio data',
1473
+ },
1474
+ {
1475
+ displayName: 'Audio URL',
1476
+ name: 'audioUrl',
1477
+ type: 'string',
1478
+ default: '',
1479
+ required: true,
1480
+ displayOptions: {
1481
+ show: {
1482
+ audioSource: ['url'],
1483
+ },
1484
+ },
1485
+ description: 'URL of the audio file to transcribe',
1486
+ requiresDataPath: 'single',
1487
+ },
1488
+ {
1489
+ displayName: 'Model',
1490
+ name: 'model',
1491
+ type: 'options',
1492
+ required: true,
1493
+ options: [
1494
+ {
1495
+ name: 'Whisper Large v3',
1496
+ value: 'whisper-1',
1497
+ description: 'OpenAI\'s most advanced Whisper model',
1498
+ },
1499
+ ],
1500
+ default: 'whisper-1',
1501
+ description: 'The transcription model to use',
1502
+ },
1503
+ {
1504
+ displayName: 'Options',
1505
+ name: 'options',
1506
+ type: 'collection',
1507
+ placeholder: 'Add Option',
1508
+ default: {},
1509
+ options: [
1510
+ {
1511
+ displayName: 'Language',
1512
+ name: 'language',
1513
+ type: 'string',
1514
+ default: '',
1515
+ description: 'Language of the audio as ISO-639-1 format (e.g., "en", "es"). Leave empty for auto-detection.',
1516
+ },
1517
+ {
1518
+ displayName: 'Include Segments',
1519
+ name: 'includeSegments',
1520
+ type: 'boolean',
1521
+ default: false,
1522
+ description: 'Whether to include timestamped segments in the output',
1523
+ },
1524
+ ],
1525
+ },
1526
+ ],
1527
+ };
271
1528
  //# sourceMappingURL=descriptions.js.map