@google/genai 1.43.0 → 1.44.0

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.
@@ -61,7 +61,7 @@ var FunctionResponseScheduling;
61
61
  */
62
62
  FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
63
63
  })(FunctionResponseScheduling || (FunctionResponseScheduling = {}));
64
- /** The type of the data. */
64
+ /** Data type of the schema field. */
65
65
  var Type;
66
66
  (function (Type) {
67
67
  /**
@@ -129,22 +129,6 @@ var PhishBlockThreshold;
129
129
  */
130
130
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
131
131
  })(PhishBlockThreshold || (PhishBlockThreshold = {}));
132
- /** The API spec that the external API implements. This enum is not supported in Gemini API. */
133
- var ApiSpec;
134
- (function (ApiSpec) {
135
- /**
136
- * Unspecified API spec. This value should not be used.
137
- */
138
- ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
139
- /**
140
- * Simple search API spec.
141
- */
142
- ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
143
- /**
144
- * Elastic search API spec.
145
- */
146
- ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
147
- })(ApiSpec || (ApiSpec = {}));
148
132
  /** Type of auth scheme. This enum is not supported in Gemini API. */
149
133
  var AuthType;
150
134
  (function (AuthType) {
@@ -199,6 +183,22 @@ var HttpElementLocation;
199
183
  */
200
184
  HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
201
185
  })(HttpElementLocation || (HttpElementLocation = {}));
186
+ /** The API spec that the external API implements. This enum is not supported in Gemini API. */
187
+ var ApiSpec;
188
+ (function (ApiSpec) {
189
+ /**
190
+ * Unspecified API spec. This value should not be used.
191
+ */
192
+ ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
193
+ /**
194
+ * Simple search API spec.
195
+ */
196
+ ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
197
+ /**
198
+ * Elastic search API spec.
199
+ */
200
+ ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
201
+ })(ApiSpec || (ApiSpec = {}));
202
202
  /** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
203
203
  var Behavior;
204
204
  (function (Behavior) {
@@ -275,27 +275,43 @@ var ThinkingLevel;
275
275
  */
276
276
  ThinkingLevel["MINIMAL"] = "MINIMAL";
277
277
  })(ThinkingLevel || (ThinkingLevel = {}));
278
- /** Harm category. */
278
+ /** Enum that controls the generation of people. */
279
+ var PersonGeneration;
280
+ (function (PersonGeneration) {
281
+ /**
282
+ * Block generation of images of people.
283
+ */
284
+ PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
285
+ /**
286
+ * Generate images of adults, but not children.
287
+ */
288
+ PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
289
+ /**
290
+ * Generate images that include adults and children.
291
+ */
292
+ PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
293
+ })(PersonGeneration || (PersonGeneration = {}));
294
+ /** The harm category to be blocked. */
279
295
  var HarmCategory;
280
296
  (function (HarmCategory) {
281
297
  /**
282
- * The harm category is unspecified.
298
+ * Default value. This value is unused.
283
299
  */
284
300
  HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
285
301
  /**
286
- * The harm category is harassment.
302
+ * Abusive, threatening, or content intended to bully, torment, or ridicule.
287
303
  */
288
304
  HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
289
305
  /**
290
- * The harm category is hate speech.
306
+ * Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
291
307
  */
292
308
  HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
293
309
  /**
294
- * The harm category is sexually explicit content.
310
+ * Content that contains sexually explicit material.
295
311
  */
296
312
  HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
297
313
  /**
298
- * The harm category is dangerous content.
314
+ * Content that promotes, facilitates, or enables dangerous activities.
299
315
  */
300
316
  HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
301
317
  /**
@@ -303,27 +319,27 @@ var HarmCategory;
303
319
  */
304
320
  HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
305
321
  /**
306
- * The harm category is image hate. This enum value is not supported in Gemini API.
322
+ * Images that contain hate speech. This enum value is not supported in Gemini API.
307
323
  */
308
324
  HarmCategory["HARM_CATEGORY_IMAGE_HATE"] = "HARM_CATEGORY_IMAGE_HATE";
309
325
  /**
310
- * The harm category is image dangerous content. This enum value is not supported in Gemini API.
326
+ * Images that contain dangerous content. This enum value is not supported in Gemini API.
311
327
  */
312
328
  HarmCategory["HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT"] = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT";
313
329
  /**
314
- * The harm category is image harassment. This enum value is not supported in Gemini API.
330
+ * Images that contain harassment. This enum value is not supported in Gemini API.
315
331
  */
316
332
  HarmCategory["HARM_CATEGORY_IMAGE_HARASSMENT"] = "HARM_CATEGORY_IMAGE_HARASSMENT";
317
333
  /**
318
- * The harm category is image sexually explicit content. This enum value is not supported in Gemini API.
334
+ * Images that contain sexually explicit content. This enum value is not supported in Gemini API.
319
335
  */
320
336
  HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
321
337
  /**
322
- * The harm category is for jailbreak prompts. This enum value is not supported in Gemini API.
338
+ * Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
323
339
  */
324
340
  HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
325
341
  })(HarmCategory || (HarmCategory = {}));
326
- /** Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This enum is not supported in Gemini API. */
342
+ /** The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API. */
327
343
  var HarmBlockMethod;
328
344
  (function (HarmBlockMethod) {
329
345
  /**
@@ -339,31 +355,31 @@ var HarmBlockMethod;
339
355
  */
340
356
  HarmBlockMethod["PROBABILITY"] = "PROBABILITY";
341
357
  })(HarmBlockMethod || (HarmBlockMethod = {}));
342
- /** The harm block threshold. */
358
+ /** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
343
359
  var HarmBlockThreshold;
344
360
  (function (HarmBlockThreshold) {
345
361
  /**
346
- * Unspecified harm block threshold.
362
+ * The harm block threshold is unspecified.
347
363
  */
348
364
  HarmBlockThreshold["HARM_BLOCK_THRESHOLD_UNSPECIFIED"] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
349
365
  /**
350
- * Block low threshold and above (i.e. block more).
366
+ * Block content with a low harm probability or higher.
351
367
  */
352
368
  HarmBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
353
369
  /**
354
- * Block medium threshold and above.
370
+ * Block content with a medium harm probability or higher.
355
371
  */
356
372
  HarmBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
357
373
  /**
358
- * Block only high threshold (i.e. block less).
374
+ * Block content with a high harm probability.
359
375
  */
360
376
  HarmBlockThreshold["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
361
377
  /**
362
- * Block none.
378
+ * Do not block any content, regardless of its harm probability.
363
379
  */
364
380
  HarmBlockThreshold["BLOCK_NONE"] = "BLOCK_NONE";
365
381
  /**
366
- * Turn off the safety filter.
382
+ * Turn off the safety filter entirely.
367
383
  */
368
384
  HarmBlockThreshold["OFF"] = "OFF";
369
385
  })(HarmBlockThreshold || (HarmBlockThreshold = {}));
@@ -441,55 +457,55 @@ var FinishReason;
441
457
  */
442
458
  FinishReason["IMAGE_OTHER"] = "IMAGE_OTHER";
443
459
  })(FinishReason || (FinishReason = {}));
444
- /** Output only. Harm probability levels in the content. */
460
+ /** Output only. The probability of harm for this category. */
445
461
  var HarmProbability;
446
462
  (function (HarmProbability) {
447
463
  /**
448
- * Harm probability unspecified.
464
+ * The harm probability is unspecified.
449
465
  */
450
466
  HarmProbability["HARM_PROBABILITY_UNSPECIFIED"] = "HARM_PROBABILITY_UNSPECIFIED";
451
467
  /**
452
- * Negligible level of harm.
468
+ * The harm probability is negligible.
453
469
  */
454
470
  HarmProbability["NEGLIGIBLE"] = "NEGLIGIBLE";
455
471
  /**
456
- * Low level of harm.
472
+ * The harm probability is low.
457
473
  */
458
474
  HarmProbability["LOW"] = "LOW";
459
475
  /**
460
- * Medium level of harm.
476
+ * The harm probability is medium.
461
477
  */
462
478
  HarmProbability["MEDIUM"] = "MEDIUM";
463
479
  /**
464
- * High level of harm.
480
+ * The harm probability is high.
465
481
  */
466
482
  HarmProbability["HIGH"] = "HIGH";
467
483
  })(HarmProbability || (HarmProbability = {}));
468
- /** Output only. Harm severity levels in the content. This enum is not supported in Gemini API. */
484
+ /** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
469
485
  var HarmSeverity;
470
486
  (function (HarmSeverity) {
471
487
  /**
472
- * Harm severity unspecified.
488
+ * The harm severity is unspecified.
473
489
  */
474
490
  HarmSeverity["HARM_SEVERITY_UNSPECIFIED"] = "HARM_SEVERITY_UNSPECIFIED";
475
491
  /**
476
- * Negligible level of harm severity.
492
+ * The harm severity is negligible.
477
493
  */
478
494
  HarmSeverity["HARM_SEVERITY_NEGLIGIBLE"] = "HARM_SEVERITY_NEGLIGIBLE";
479
495
  /**
480
- * Low level of harm severity.
496
+ * The harm severity is low.
481
497
  */
482
498
  HarmSeverity["HARM_SEVERITY_LOW"] = "HARM_SEVERITY_LOW";
483
499
  /**
484
- * Medium level of harm severity.
500
+ * The harm severity is medium.
485
501
  */
486
502
  HarmSeverity["HARM_SEVERITY_MEDIUM"] = "HARM_SEVERITY_MEDIUM";
487
503
  /**
488
- * High level of harm severity.
504
+ * The harm severity is high.
489
505
  */
490
506
  HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
491
507
  })(HarmSeverity || (HarmSeverity = {}));
492
- /** Status of the url retrieval. */
508
+ /** The status of the URL retrieval. */
493
509
  var UrlRetrievalStatus;
494
510
  (function (UrlRetrievalStatus) {
495
511
  /**
@@ -497,11 +513,11 @@ var UrlRetrievalStatus;
497
513
  */
498
514
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_UNSPECIFIED"] = "URL_RETRIEVAL_STATUS_UNSPECIFIED";
499
515
  /**
500
- * Url retrieval is successful.
516
+ * The URL was retrieved successfully.
501
517
  */
502
518
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_SUCCESS"] = "URL_RETRIEVAL_STATUS_SUCCESS";
503
519
  /**
504
- * Url retrieval is failed due to error.
520
+ * The URL retrieval failed.
505
521
  */
506
522
  UrlRetrievalStatus["URL_RETRIEVAL_STATUS_ERROR"] = "URL_RETRIEVAL_STATUS_ERROR";
507
523
  /**
@@ -560,6 +576,14 @@ var TrafficType;
560
576
  * The request was processed using Pay-As-You-Go quota.
561
577
  */
562
578
  TrafficType["ON_DEMAND"] = "ON_DEMAND";
579
+ /**
580
+ * Type for Priority Pay-As-You-Go traffic.
581
+ */
582
+ TrafficType["ON_DEMAND_PRIORITY"] = "ON_DEMAND_PRIORITY";
583
+ /**
584
+ * Type for Flex traffic.
585
+ */
586
+ TrafficType["ON_DEMAND_FLEX"] = "ON_DEMAND_FLEX";
563
587
  /**
564
588
  * Type for Provisioned Throughput traffic.
565
589
  */
@@ -705,6 +729,102 @@ var JobState;
705
729
  */
706
730
  JobState["JOB_STATE_PARTIALLY_SUCCEEDED"] = "JOB_STATE_PARTIALLY_SUCCEEDED";
707
731
  })(JobState || (JobState = {}));
732
+ /** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
733
+ var TuningJobState;
734
+ (function (TuningJobState) {
735
+ /**
736
+ * Default tuning job state.
737
+ */
738
+ TuningJobState["TUNING_JOB_STATE_UNSPECIFIED"] = "TUNING_JOB_STATE_UNSPECIFIED";
739
+ /**
740
+ * Tuning job is waiting for job quota.
741
+ */
742
+ TuningJobState["TUNING_JOB_STATE_WAITING_FOR_QUOTA"] = "TUNING_JOB_STATE_WAITING_FOR_QUOTA";
743
+ /**
744
+ * Tuning job is validating the dataset.
745
+ */
746
+ TuningJobState["TUNING_JOB_STATE_PROCESSING_DATASET"] = "TUNING_JOB_STATE_PROCESSING_DATASET";
747
+ /**
748
+ * Tuning job is waiting for hardware capacity.
749
+ */
750
+ TuningJobState["TUNING_JOB_STATE_WAITING_FOR_CAPACITY"] = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY";
751
+ /**
752
+ * Tuning job is running.
753
+ */
754
+ TuningJobState["TUNING_JOB_STATE_TUNING"] = "TUNING_JOB_STATE_TUNING";
755
+ /**
756
+ * Tuning job is doing some post processing steps.
757
+ */
758
+ TuningJobState["TUNING_JOB_STATE_POST_PROCESSING"] = "TUNING_JOB_STATE_POST_PROCESSING";
759
+ })(TuningJobState || (TuningJobState = {}));
760
+ /** Aggregation metric. This enum is not supported in Gemini API. */
761
+ var AggregationMetric;
762
+ (function (AggregationMetric) {
763
+ /**
764
+ * Unspecified aggregation metric.
765
+ */
766
+ AggregationMetric["AGGREGATION_METRIC_UNSPECIFIED"] = "AGGREGATION_METRIC_UNSPECIFIED";
767
+ /**
768
+ * Average aggregation metric. Not supported for Pairwise metric.
769
+ */
770
+ AggregationMetric["AVERAGE"] = "AVERAGE";
771
+ /**
772
+ * Mode aggregation metric.
773
+ */
774
+ AggregationMetric["MODE"] = "MODE";
775
+ /**
776
+ * Standard deviation aggregation metric. Not supported for pairwise metric.
777
+ */
778
+ AggregationMetric["STANDARD_DEVIATION"] = "STANDARD_DEVIATION";
779
+ /**
780
+ * Variance aggregation metric. Not supported for pairwise metric.
781
+ */
782
+ AggregationMetric["VARIANCE"] = "VARIANCE";
783
+ /**
784
+ * Minimum aggregation metric. Not supported for pairwise metric.
785
+ */
786
+ AggregationMetric["MINIMUM"] = "MINIMUM";
787
+ /**
788
+ * Maximum aggregation metric. Not supported for pairwise metric.
789
+ */
790
+ AggregationMetric["MAXIMUM"] = "MAXIMUM";
791
+ /**
792
+ * Median aggregation metric. Not supported for pairwise metric.
793
+ */
794
+ AggregationMetric["MEDIAN"] = "MEDIAN";
795
+ /**
796
+ * 90th percentile aggregation metric. Not supported for pairwise metric.
797
+ */
798
+ AggregationMetric["PERCENTILE_P90"] = "PERCENTILE_P90";
799
+ /**
800
+ * 95th percentile aggregation metric. Not supported for pairwise metric.
801
+ */
802
+ AggregationMetric["PERCENTILE_P95"] = "PERCENTILE_P95";
803
+ /**
804
+ * 99th percentile aggregation metric. Not supported for pairwise metric.
805
+ */
806
+ AggregationMetric["PERCENTILE_P99"] = "PERCENTILE_P99";
807
+ })(AggregationMetric || (AggregationMetric = {}));
808
+ /** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
809
+ var PairwiseChoice;
810
+ (function (PairwiseChoice) {
811
+ /**
812
+ * Unspecified prediction choice.
813
+ */
814
+ PairwiseChoice["PAIRWISE_CHOICE_UNSPECIFIED"] = "PAIRWISE_CHOICE_UNSPECIFIED";
815
+ /**
816
+ * Baseline prediction wins
817
+ */
818
+ PairwiseChoice["BASELINE"] = "BASELINE";
819
+ /**
820
+ * Candidate prediction wins
821
+ */
822
+ PairwiseChoice["CANDIDATE"] = "CANDIDATE";
823
+ /**
824
+ * Winner cannot be determined
825
+ */
826
+ PairwiseChoice["TIE"] = "TIE";
827
+ })(PairwiseChoice || (PairwiseChoice = {}));
708
828
  /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
709
829
  var TuningTask;
710
830
  (function (TuningTask) {
@@ -817,22 +937,6 @@ var SafetyFilterLevel;
817
937
  SafetyFilterLevel["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
818
938
  SafetyFilterLevel["BLOCK_NONE"] = "BLOCK_NONE";
819
939
  })(SafetyFilterLevel || (SafetyFilterLevel = {}));
820
- /** Enum that controls the generation of people. */
821
- var PersonGeneration;
822
- (function (PersonGeneration) {
823
- /**
824
- * Block generation of images of people.
825
- */
826
- PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
827
- /**
828
- * Generate images of adults, but not children.
829
- */
830
- PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
831
- /**
832
- * Generate images that include adults and children.
833
- */
834
- PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
835
- })(PersonGeneration || (PersonGeneration = {}));
836
940
  /** Enum that specifies the language of the text in the prompt. */
837
941
  var ImagePromptLanguage;
838
942
  (function (ImagePromptLanguage) {