n8n-nodes-vercel-ai-sdk-universal-temp 0.1.20 → 0.1.21

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.
@@ -13,9 +13,11 @@ const ai_1 = require("ai");
13
13
  const zod_1 = require("zod");
14
14
  const ajv_1 = __importDefault(require("ajv"));
15
15
  const model_lists_1 = require("./model-lists");
16
+ const descriptions_1 = require("../shared/descriptions");
16
17
  const modelCache = new Map();
17
18
  const providerCache = new Map();
18
19
  async function buildInput(exec, itemIndex) {
20
+ var _a;
19
21
  const inputType = exec.getNodeParameter('inputType', itemIndex);
20
22
  if (inputType === 'prompt') {
21
23
  const promptVal = exec.getNodeParameter('prompt', itemIndex);
@@ -64,7 +66,8 @@ async function buildInput(exec, itemIndex) {
64
66
  });
65
67
  continue;
66
68
  }
67
- if (msg.contentType === 'text') {
69
+ const attachments = ((_a = msg.attachments) === null || _a === void 0 ? void 0 : _a.attachment) || [];
70
+ if (attachments.length === 0) {
68
71
  builtMessages.push({
69
72
  role,
70
73
  content: msg.content || '',
@@ -78,43 +81,42 @@ async function buildInput(exec, itemIndex) {
78
81
  text: msg.content,
79
82
  });
80
83
  }
81
- const fileContentInput = msg.fileContent || '';
82
- let fileData;
83
- let detectedMimeType = msg.mimeType || undefined;
84
- if (detectedMimeType === 'other') {
85
- detectedMimeType = msg.mimeTypeOther || undefined;
86
- }
87
- if (fileContentInput.startsWith('http://') || fileContentInput.startsWith('https://') || fileContentInput.startsWith('data:')) {
88
- fileData = fileContentInput;
89
- }
90
- else {
91
- const itemBinary = items[itemIndex].binary;
92
- if (itemBinary && itemBinary[fileContentInput]) {
93
- const binaryData = itemBinary[fileContentInput];
94
- const buffer = Buffer.from(binaryData.data, binaryData.data ? 'base64' : undefined);
95
- fileData = buffer;
96
- if (!detectedMimeType && binaryData.mimeType) {
97
- detectedMimeType = binaryData.mimeType;
98
- }
84
+ for (const attachment of attachments) {
85
+ const fileContentInput = attachment.fileContent;
86
+ let detectedMimeType = attachment.mimeType || 'application/octet-stream';
87
+ if (detectedMimeType === 'other') {
88
+ detectedMimeType = attachment.mimeTypeOther || 'application/octet-stream';
89
+ }
90
+ let fileData;
91
+ if (fileContentInput.startsWith('http://') || fileContentInput.startsWith('https://') || fileContentInput.startsWith('data:')) {
92
+ fileData = fileContentInput;
99
93
  }
100
94
  else {
101
- try {
102
- fileData = Buffer.from(fileContentInput, 'base64');
95
+ const itemBinary = items[itemIndex].binary;
96
+ if (itemBinary === null || itemBinary === void 0 ? void 0 : itemBinary[fileContentInput]) {
97
+ const binaryData = itemBinary[fileContentInput];
98
+ fileData = Buffer.from(binaryData.data, 'base64');
99
+ if (!attachment.mimeType && binaryData.mimeType) {
100
+ detectedMimeType = binaryData.mimeType;
101
+ }
103
102
  }
104
- catch (error) {
105
- throw new n8n_workflow_1.NodeOperationError(exec.getNode(), `Invalid base64 data in file content for message ${itemIndex + 1}: ${error.message}`);
103
+ else {
104
+ try {
105
+ fileData = Buffer.from(fileContentInput, 'base64');
106
+ }
107
+ catch (error) {
108
+ throw new n8n_workflow_1.NodeOperationError(exec.getNode(), `Invalid base64 data in attachment for message ${itemIndex + 1}: ${error.message}`);
109
+ }
106
110
  }
107
111
  }
112
+ if (fileData && !(Buffer.isBuffer(fileData) && fileData.length === 0)) {
113
+ parts.push({
114
+ type: 'file',
115
+ data: fileData,
116
+ mediaType: detectedMimeType,
117
+ });
118
+ }
108
119
  }
109
- if (fileData == null || (Buffer.isBuffer(fileData) && fileData.length === 0)) {
110
- continue;
111
- }
112
- const mediaType = detectedMimeType || 'application/octet-stream';
113
- parts.push({
114
- type: 'file',
115
- data: fileData,
116
- mediaType,
117
- });
118
120
  if (parts.length > 0) {
119
121
  builtMessages.push({
120
122
  role,
@@ -220,764 +222,7 @@ function formatObjectResult(result, includeRequestBody) {
220
222
  }
221
223
  class UniversalAI {
222
224
  constructor() {
223
- this.description = {
224
- displayName: 'Universal AI',
225
- name: 'universalAi',
226
- icon: 'file:icons/UniversalAI.svg',
227
- group: ['transform'],
228
- version: 2,
229
- subtitle: '={{$parameter["resource"] + ": " + $parameter["provider"] + ": " + $parameter["model"]}}',
230
- description: 'Use multiple AI providers via Vercel AI SDK',
231
- defaults: {
232
- name: 'Universal AI',
233
- },
234
- inputs: [{ type: "main" }],
235
- outputs: [{ type: "main" }],
236
- credentials: [
237
- {
238
- name: 'googleGenerativeAIApi',
239
- required: false,
240
- displayOptions: {
241
- show: {
242
- provider: ['google'],
243
- },
244
- },
245
- },
246
- {
247
- name: 'deepSeekApi',
248
- required: false,
249
- displayOptions: {
250
- show: {
251
- provider: ['deepseek'],
252
- },
253
- },
254
- },
255
- {
256
- name: 'groqApi',
257
- required: false,
258
- displayOptions: {
259
- show: {
260
- provider: ['groq'],
261
- },
262
- },
263
- },
264
- {
265
- name: 'openRouterApi',
266
- required: false,
267
- displayOptions: {
268
- show: {
269
- provider: ['openrouter'],
270
- },
271
- },
272
- },
273
- ],
274
- properties: [
275
- {
276
- displayName: 'Resource',
277
- name: 'resource',
278
- type: 'options',
279
- required: true,
280
- noDataExpression: true,
281
- options: [
282
- {
283
- name: 'AI',
284
- value: 'ai',
285
- },
286
- ],
287
- default: 'ai',
288
- description: 'The resource to operate on',
289
- },
290
- {
291
- displayName: 'Provider',
292
- name: 'provider',
293
- type: 'options',
294
- required: true,
295
- noDataExpression: true,
296
- displayOptions: {
297
- show: {
298
- resource: ['ai'],
299
- },
300
- },
301
- options: [
302
- {
303
- name: 'Google Generative AI',
304
- value: 'google',
305
- description: 'Google Gemini models with multimodal support',
306
- },
307
- {
308
- name: 'DeepSeek',
309
- value: 'deepseek',
310
- description: 'DeepSeek models with strong reasoning capabilities',
311
- },
312
- {
313
- name: 'Groq',
314
- value: 'groq',
315
- description: 'High-performance models via Groq LPU',
316
- },
317
- {
318
- name: 'OpenRouter',
319
- value: 'openrouter',
320
- description: 'Access multiple models through OpenRouter',
321
- },
322
- ],
323
- default: 'google',
324
- description: 'Choose which AI provider to use',
325
- },
326
- {
327
- displayName: 'Operation',
328
- name: 'operation',
329
- type: 'options',
330
- required: true,
331
- noDataExpression: true,
332
- options: [
333
- {
334
- name: 'Generate Text',
335
- value: 'generateText',
336
- description: 'Generate text using simple prompt or chat messages',
337
- action: 'Generate text',
338
- },
339
- {
340
- name: 'Generate Object',
341
- value: 'generateObject',
342
- description: 'Generate a structured object based on a JSON schema',
343
- action: 'Generate object',
344
- },
345
- ],
346
- default: 'generateText',
347
- description: 'Which type of output you want to generate',
348
- },
349
- {
350
- displayName: 'Model Name or ID',
351
- name: 'model',
352
- type: 'options',
353
- required: true,
354
- typeOptions: {
355
- loadOptionsMethod: 'getModels',
356
- loadOptionsDependsOn: ['provider'],
357
- },
358
- default: '',
359
- 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>.',
360
- },
361
- {
362
- displayName: 'Input Type',
363
- name: 'inputType',
364
- type: 'options',
365
- required: true,
366
- noDataExpression: true,
367
- options: [
368
- {
369
- name: 'Simple Prompt',
370
- value: 'prompt',
371
- description: 'Use a single prompt',
372
- },
373
- {
374
- name: 'Messages',
375
- value: 'messages',
376
- description: 'Use a conversation with multiple messages',
377
- },
378
- ],
379
- default: 'prompt',
380
- description: 'Choose how you want to provide input to the model',
381
- },
382
- {
383
- displayName: 'System',
384
- name: 'system',
385
- type: 'string',
386
- typeOptions: {
387
- rows: 4,
388
- },
389
- displayOptions: {
390
- show: {
391
- inputType: ['prompt'],
392
- },
393
- },
394
- default: 'You are a helpful assistant.',
395
- description: "System prompt that specifies the model's behavior",
396
- hint: "This field is optional, but can help guide the model's responses.",
397
- requiresDataPath: 'single',
398
- },
399
- {
400
- displayName: 'Prompt',
401
- name: 'prompt',
402
- type: 'string',
403
- typeOptions: {
404
- rows: 4,
405
- },
406
- displayOptions: {
407
- show: {
408
- inputType: ['prompt'],
409
- },
410
- },
411
- default: '',
412
- required: true,
413
- description: 'The single text prompt to generate a completion for',
414
- hint: 'You can drag data from previous nodes here using expressions.',
415
- requiresDataPath: 'single',
416
- },
417
- {
418
- displayName: 'Messages',
419
- name: 'messages',
420
- type: 'fixedCollection',
421
- typeOptions: {
422
- multipleValues: true,
423
- sortable: true,
424
- minValue: 1,
425
- },
426
- displayOptions: {
427
- show: {
428
- inputType: ['messages'],
429
- messageAsJson: [false],
430
- },
431
- },
432
- description: 'The messages for the conversation',
433
- default: {
434
- messagesUi: [
435
- {
436
- role: 'system',
437
- systemContent: 'You are a helpful assistant.',
438
- },
439
- {
440
- role: 'user',
441
- contentType: 'text',
442
- content: 'How can you help me?',
443
- },
444
- ],
445
- },
446
- required: true,
447
- options: [
448
- {
449
- name: 'messagesUi',
450
- displayName: 'Message',
451
- values: [
452
- {
453
- displayName: 'Role',
454
- name: 'role',
455
- type: 'options',
456
- noDataExpression: true,
457
- options: [
458
- {
459
- name: 'Assistant',
460
- value: 'assistant',
461
- },
462
- {
463
- name: 'System',
464
- value: 'system',
465
- },
466
- {
467
- name: 'User',
468
- value: 'user',
469
- },
470
- ],
471
- default: 'user',
472
- required: true,
473
- },
474
- {
475
- displayName: 'System Content',
476
- name: 'systemContent',
477
- type: 'string',
478
- description: 'The text content if role is System',
479
- required: true,
480
- typeOptions: {
481
- rows: 4,
482
- },
483
- default: '',
484
- displayOptions: {
485
- show: {
486
- role: ['system'],
487
- },
488
- },
489
- requiresDataPath: 'single',
490
- },
491
- {
492
- displayName: 'Content Type',
493
- name: 'contentType',
494
- type: 'options',
495
- noDataExpression: true,
496
- options: [
497
- {
498
- name: 'Text',
499
- value: 'text',
500
- },
501
- {
502
- name: 'Binary File',
503
- value: 'file',
504
- },
505
- ],
506
- default: 'text',
507
- description: 'The type of content to send',
508
- required: true,
509
- displayOptions: {
510
- show: {
511
- role: ['assistant', 'user'],
512
- },
513
- },
514
- },
515
- {
516
- displayName: 'Text Content',
517
- name: 'content',
518
- type: 'string',
519
- typeOptions: {
520
- rows: 4,
521
- },
522
- displayOptions: {
523
- show: {
524
- role: ['assistant', 'user'],
525
- contentType: ['text'],
526
- },
527
- },
528
- default: '',
529
- description: 'The text content of the message',
530
- required: true,
531
- requiresDataPath: 'single',
532
- },
533
- {
534
- displayName: 'File Content',
535
- name: 'fileContent',
536
- type: 'string',
537
- default: '',
538
- displayOptions: {
539
- show: {
540
- role: ['assistant', 'user'],
541
- contentType: ['file'],
542
- },
543
- },
544
- description: 'File content: binary property name, base64 string, or http(s)/data: URL',
545
- required: true,
546
- },
547
- {
548
- displayName: 'MIME Type',
549
- name: 'mimeType',
550
- type: 'options',
551
- default: 'application/octet-stream',
552
- description: 'Select the MIME type of the file; choose Other to specify a custom MIME type',
553
- options: [
554
- {
555
- name: 'JPEG Image (Image/jpeg)',
556
- value: 'image/jpeg',
557
- },
558
- {
559
- name: 'JSON (Application/json)',
560
- value: 'application/json',
561
- },
562
- {
563
- name: 'MP3 Audio (Audio/mpeg)',
564
- value: 'audio/mpeg',
565
- },
566
- {
567
- name: 'MP4 Video (Video/mp4)',
568
- value: 'video/mp4',
569
- },
570
- {
571
- name: 'Octet Stream (Default)',
572
- value: 'application/octet-stream',
573
- },
574
- {
575
- name: 'Other (Specify Below)',
576
- value: 'other',
577
- },
578
- {
579
- name: 'PDF (Application/pdf)',
580
- value: 'application/pdf',
581
- },
582
- {
583
- name: 'Plain Text (Text/plain)',
584
- value: 'text/plain',
585
- },
586
- {
587
- name: 'PNG Image (Image/png)',
588
- value: 'image/png',
589
- },
590
- {
591
- name: 'WAV Audio (Audio/wav)',
592
- value: 'audio/wav',
593
- },
594
- ],
595
- displayOptions: {
596
- show: {
597
- role: ['assistant', 'user'],
598
- contentType: ['file'],
599
- },
600
- },
601
- },
602
- {
603
- displayName: 'Other MIME Type',
604
- name: 'mimeTypeOther',
605
- type: 'string',
606
- default: '',
607
- description: 'Specify a custom MIME type, e.g. application/x-zip-compressed',
608
- displayOptions: {
609
- show: {
610
- role: ['assistant', 'user'],
611
- contentType: ['file'],
612
- mimeType: ['other'],
613
- },
614
- },
615
- },
616
- {
617
- displayName: 'Additional Text',
618
- name: 'content',
619
- type: 'string',
620
- typeOptions: {
621
- rows: 2,
622
- },
623
- displayOptions: {
624
- show: {
625
- role: ['assistant', 'user'],
626
- contentType: ['file'],
627
- },
628
- },
629
- default: 'Please analyze this file.',
630
- description: 'Additional text to include with the file',
631
- required: true,
632
- requiresDataPath: 'single',
633
- },
634
- ],
635
- },
636
- ],
637
- },
638
- {
639
- displayName: 'Convert Messages to Model Messages',
640
- name: 'convertMessagesToModel',
641
- type: 'boolean',
642
- default: false,
643
- description: 'Convert UI messages to ModelMessage format using convertToModelMessages. Enable if you get "Invalid prompt: The messages must be a ModelMessage[]" errors.',
644
- displayOptions: {
645
- show: {
646
- inputType: ['messages'],
647
- },
648
- },
649
- },
650
- {
651
- displayName: 'Messages as JSON',
652
- name: 'messageAsJson',
653
- type: 'boolean',
654
- default: false,
655
- noDataExpression: true,
656
- description: 'Whether to input messages as a JSON array instead of using the UI',
657
- displayOptions: {
658
- show: {
659
- operation: ['generateText', 'generateObject'],
660
- inputType: ['messages'],
661
- },
662
- },
663
- },
664
- {
665
- displayName: 'Messages (JSON)',
666
- name: 'messagesJson',
667
- type: 'string',
668
- default: '=[{"role": "user", "content": "Hello!"}]',
669
- description: 'Enter an array of message objects in JSON format (role, content)',
670
- required: true,
671
- typeOptions: {
672
- rows: 4,
673
- },
674
- noDataExpression: false,
675
- requiresDataPath: 'single',
676
- displayOptions: {
677
- show: {
678
- operation: ['generateText', 'generateObject'],
679
- inputType: ['messages'],
680
- messageAsJson: [true],
681
- },
682
- },
683
- },
684
- {
685
- displayName: 'Schema Name',
686
- name: 'schemaName',
687
- type: 'string',
688
- default: '',
689
- description: 'Name of the output schema (optional)',
690
- hint: 'Some providers use this name for additional guidance when generating objects.',
691
- displayOptions: {
692
- show: {
693
- operation: ['generateObject'],
694
- },
695
- },
696
- },
697
- {
698
- displayName: 'Schema Description',
699
- name: 'schemaDescription',
700
- type: 'string',
701
- default: '',
702
- description: 'Description of the output schema (optional)',
703
- hint: 'Some providers use this description for additional guidance when generating objects.',
704
- displayOptions: {
705
- show: {
706
- operation: ['generateObject'],
707
- },
708
- },
709
- },
710
- {
711
- displayName: 'Schema',
712
- name: 'schema',
713
- type: 'json',
714
- displayOptions: {
715
- show: {
716
- operation: ['generateObject'],
717
- },
718
- },
719
- 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}`,
720
- required: true,
721
- description: 'JSON schema describing the structure and constraints of the object to generate',
722
- hint: 'For example, a schema describing sentiment analysis output.',
723
- requiresDataPath: 'single',
724
- },
725
- {
726
- displayName: 'Options',
727
- name: 'options',
728
- type: 'collection',
729
- placeholder: 'Add Option',
730
- default: {},
731
- options: [
732
- {
733
- displayName: 'Max Tokens',
734
- name: 'maxTokens',
735
- type: 'number',
736
- typeOptions: {
737
- minValue: 1,
738
- },
739
- default: 2048,
740
- description: 'The maximum number of tokens to generate',
741
- },
742
- {
743
- displayName: 'Temperature',
744
- name: 'temperature',
745
- type: 'number',
746
- typeOptions: {
747
- minValue: 0,
748
- maxValue: 2,
749
- numberPrecision: 2,
750
- },
751
- default: 0.7,
752
- description: 'Higher values produce more random outputs',
753
- },
754
- {
755
- displayName: 'Top P',
756
- name: 'topP',
757
- type: 'number',
758
- typeOptions: {
759
- minValue: 0,
760
- maxValue: 1,
761
- numberPrecision: 2,
762
- },
763
- default: 1,
764
- description: 'Controls diversity via nucleus sampling. Lower values make outputs more focused.',
765
- },
766
- {
767
- displayName: 'Top K',
768
- name: 'topK',
769
- type: 'number',
770
- typeOptions: {
771
- minValue: 1,
772
- },
773
- default: 50,
774
- description: 'Limits the number of tokens considered for sampling. Only applies to some providers.',
775
- displayOptions: {
776
- show: {
777
- '/provider': ['google'],
778
- },
779
- },
780
- },
781
- {
782
- displayName: 'Frequency Penalty',
783
- name: 'frequencyPenalty',
784
- type: 'number',
785
- typeOptions: {
786
- minValue: -2,
787
- maxValue: 2,
788
- numberPrecision: 2,
789
- },
790
- default: 0,
791
- description: 'Reduces repetition of frequent tokens. Positive values decrease repetition.',
792
- },
793
- {
794
- displayName: 'Presence Penalty',
795
- name: 'presencePenalty',
796
- type: 'number',
797
- typeOptions: {
798
- minValue: -2,
799
- maxValue: 2,
800
- numberPrecision: 2,
801
- },
802
- default: 0,
803
- description: 'Encourages talking about new topics. Positive values increase likelihood of new topics.',
804
- },
805
- {
806
- displayName: 'Seed',
807
- name: 'seed',
808
- type: 'number',
809
- default: 0,
810
- description: 'Random seed for reproducible outputs. Not supported by all providers.',
811
- },
812
- {
813
- displayName: 'Stop Sequences',
814
- name: 'stopSequences',
815
- type: 'string',
816
- default: '',
817
- description: 'Sequences where the API will stop generating text. Separate multiple sequences with commas.',
818
- displayOptions: {
819
- show: {
820
- '/provider': ['google', 'openrouter'],
821
- },
822
- },
823
- },
824
- {
825
- displayName: 'Include Request Body',
826
- name: 'includeRequestBody',
827
- type: 'boolean',
828
- default: false,
829
- description: 'Whether to include the request body in the output',
830
- },
831
- ],
832
- },
833
- {
834
- displayName: 'Safety Settings',
835
- name: 'safetySettings',
836
- type: 'fixedCollection',
837
- typeOptions: {
838
- multipleValues: true,
839
- },
840
- default: {},
841
- displayOptions: {
842
- show: {
843
- provider: ['google'],
844
- },
845
- },
846
- options: [
847
- {
848
- name: 'settings',
849
- displayName: 'Setting',
850
- values: [
851
- {
852
- displayName: 'Category',
853
- name: 'category',
854
- type: 'options',
855
- noDataExpression: true,
856
- options: [
857
- { name: 'Hate Speech', value: 'HARM_CATEGORY_HATE_SPEECH' },
858
- { name: 'Dangerous Content', value: 'HARM_CATEGORY_DANGEROUS_CONTENT' },
859
- { name: 'Harassment', value: 'HARM_CATEGORY_HARASSMENT' },
860
- { name: 'Sexually Explicit', value: 'HARM_CATEGORY_SEXUALLY_EXPLICIT' },
861
- ],
862
- default: 'HARM_CATEGORY_HATE_SPEECH',
863
- },
864
- {
865
- displayName: 'Threshold',
866
- name: 'threshold',
867
- type: 'options',
868
- noDataExpression: true,
869
- options: [
870
- { name: 'Block Low and Above', value: 'BLOCK_LOW_AND_ABOVE' },
871
- { name: 'Block Medium and Above', value: 'BLOCK_MEDIUM_AND_ABOVE' },
872
- { name: 'Block Only High', value: 'BLOCK_ONLY_HIGH' },
873
- { name: 'Block None', value: 'BLOCK_NONE' },
874
- ],
875
- default: 'BLOCK_MEDIUM_AND_ABOVE',
876
- },
877
- ],
878
- },
879
- ],
880
- description: 'Set safety categories and thresholds to block or filter certain outputs',
881
- },
882
- {
883
- displayName: 'Use Search Grounding',
884
- name: 'useSearchGrounding',
885
- type: 'boolean',
886
- default: false,
887
- displayOptions: {
888
- show: {
889
- provider: ['google'],
890
- },
891
- },
892
- description: 'Whether to enable real-time or up-to-date information if supported by the model',
893
- },
894
- {
895
- displayName: 'Cached Content',
896
- name: 'cachedContent',
897
- type: 'string',
898
- default: '',
899
- displayOptions: {
900
- show: {
901
- provider: ['google'],
902
- },
903
- },
904
- description: 'Name of cached content to use (format: cachedContents/{cachedContent}). Reduces costs for repetitive content.',
905
- },
906
- {
907
- displayName: 'Response Modalities',
908
- name: 'responseModalities',
909
- type: 'multiOptions',
910
- options: [
911
- { name: 'Text', value: 'TEXT' },
912
- { name: 'Image', value: 'IMAGE' },
913
- ],
914
- default: [],
915
- displayOptions: {
916
- show: {
917
- provider: ['google'],
918
- },
919
- },
920
- description: 'Output modalities for the response. Leave empty for text-only (default).',
921
- },
922
- {
923
- displayName: 'Thinking Budget',
924
- name: 'thinkingBudget',
925
- type: 'number',
926
- default: 0,
927
- typeOptions: {
928
- minValue: 0,
929
- maxValue: 8192,
930
- },
931
- displayOptions: {
932
- show: {
933
- provider: ['google'],
934
- },
935
- },
936
- description: 'Number of thinking tokens for reasoning models (Gemini 2.5+). Set to 0 to disable thinking.',
937
- },
938
- {
939
- displayName: 'Include Thoughts',
940
- name: 'includeThoughts',
941
- type: 'boolean',
942
- default: false,
943
- displayOptions: {
944
- show: {
945
- provider: ['google'],
946
- },
947
- },
948
- description: 'Whether to include thought summaries in the response (reasoning insights)',
949
- },
950
- {
951
- displayName: 'Google Tools',
952
- name: 'googleTools',
953
- type: 'multiOptions',
954
- options: [
955
- { name: 'Google Search', value: 'google_search' },
956
- { name: 'URL Context', value: 'url_context' },
957
- { name: 'Code Execution', value: 'code_execution' },
958
- ],
959
- default: [],
960
- displayOptions: {
961
- show: {
962
- provider: ['google'],
963
- },
964
- },
965
- description: 'Enable Google-specific tools for enhanced capabilities',
966
- },
967
- {
968
- displayName: 'Enable Streaming',
969
- name: 'enableStreaming',
970
- type: 'boolean',
971
- default: false,
972
- displayOptions: {
973
- show: {
974
- operation: ['generateText'],
975
- },
976
- },
977
- description: 'Whether to stream the response in chunks. Output will contain multiple items.',
978
- },
979
- ],
980
- };
225
+ this.description = descriptions_1.UNIVERSAL_AI_DESCRIPTION;
981
226
  this.methods = {
982
227
  loadOptions: {
983
228
  async getModels() {