@google/genai 2.8.0 → 2.9.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.
@@ -965,30 +965,34 @@ var TrafficType;
965
965
  */
966
966
  TrafficType["PROVISIONED_THROUGHPUT"] = "PROVISIONED_THROUGHPUT";
967
967
  })(TrafficType || (TrafficType = {}));
968
- /** Server content modalities. */
969
- var Modality;
970
- (function (Modality) {
968
+ /** The modality that this token count applies to. */
969
+ var MediaModality;
970
+ (function (MediaModality) {
971
971
  /**
972
- * The modality is unspecified.
972
+ * When a modality is not specified, it is treated as `TEXT`.
973
973
  */
974
- Modality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
974
+ MediaModality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
975
975
  /**
976
- * Indicates the model should return text
976
+ * The `Part` contains plain text.
977
977
  */
978
- Modality["TEXT"] = "TEXT";
978
+ MediaModality["TEXT"] = "TEXT";
979
979
  /**
980
- * Indicates the model should return images.
980
+ * The `Part` contains an image.
981
981
  */
982
- Modality["IMAGE"] = "IMAGE";
982
+ MediaModality["IMAGE"] = "IMAGE";
983
983
  /**
984
- * Indicates the model should return audio.
984
+ * The `Part` contains a video.
985
985
  */
986
- Modality["AUDIO"] = "AUDIO";
986
+ MediaModality["VIDEO"] = "VIDEO";
987
987
  /**
988
- * Indicates the model should return video.
988
+ * The `Part` contains audio.
989
989
  */
990
- Modality["VIDEO"] = "VIDEO";
991
- })(Modality || (Modality = {}));
990
+ MediaModality["AUDIO"] = "AUDIO";
991
+ /**
992
+ * The `Part` contains a document, such as a PDF.
993
+ */
994
+ MediaModality["DOCUMENT"] = "DOCUMENT";
995
+ })(MediaModality || (MediaModality = {}));
992
996
  /** The stage of the underlying model. This enum is not supported in Vertex AI. */
993
997
  var ModelStage;
994
998
  (function (ModelStage) {
@@ -1045,6 +1049,30 @@ var MediaResolution;
1045
1049
  */
1046
1050
  MediaResolution["MEDIA_RESOLUTION_HIGH"] = "MEDIA_RESOLUTION_HIGH";
1047
1051
  })(MediaResolution || (MediaResolution = {}));
1052
+ /** Server content modalities. */
1053
+ var Modality;
1054
+ (function (Modality) {
1055
+ /**
1056
+ * The modality is unspecified.
1057
+ */
1058
+ Modality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
1059
+ /**
1060
+ * Indicates the model should return text
1061
+ */
1062
+ Modality["TEXT"] = "TEXT";
1063
+ /**
1064
+ * Indicates the model should return images.
1065
+ */
1066
+ Modality["IMAGE"] = "IMAGE";
1067
+ /**
1068
+ * Indicates the model should return audio.
1069
+ */
1070
+ Modality["AUDIO"] = "AUDIO";
1071
+ /**
1072
+ * Indicates the model should return video.
1073
+ */
1074
+ Modality["VIDEO"] = "VIDEO";
1075
+ })(Modality || (Modality = {}));
1048
1076
  /** Tuning mode. This enum is not supported in Gemini API. */
1049
1077
  var TuningMode;
1050
1078
  (function (TuningMode) {
@@ -1313,6 +1341,26 @@ var DocumentState;
1313
1341
  */
1314
1342
  DocumentState["STATE_FAILED"] = "STATE_FAILED";
1315
1343
  })(DocumentState || (DocumentState = {}));
1344
+ /** Pricing and performance service tier. */
1345
+ var ServiceTier;
1346
+ (function (ServiceTier) {
1347
+ /**
1348
+ * Default service tier, which is standard.
1349
+ */
1350
+ ServiceTier["UNSPECIFIED"] = "unspecified";
1351
+ /**
1352
+ * Flex service tier.
1353
+ */
1354
+ ServiceTier["FLEX"] = "flex";
1355
+ /**
1356
+ * Standard service tier.
1357
+ */
1358
+ ServiceTier["STANDARD"] = "standard";
1359
+ /**
1360
+ * Priority service tier.
1361
+ */
1362
+ ServiceTier["PRIORITY"] = "priority";
1363
+ })(ServiceTier || (ServiceTier = {}));
1316
1364
  /** The tokenization quality used for given media. */
1317
1365
  var PartMediaResolutionLevel;
1318
1366
  (function (PartMediaResolutionLevel) {
@@ -1377,26 +1425,6 @@ var ResourceScope;
1377
1425
  */
1378
1426
  ResourceScope["COLLECTION"] = "COLLECTION";
1379
1427
  })(ResourceScope || (ResourceScope = {}));
1380
- /** Pricing and performance service tier. */
1381
- var ServiceTier;
1382
- (function (ServiceTier) {
1383
- /**
1384
- * Default service tier, which is standard.
1385
- */
1386
- ServiceTier["UNSPECIFIED"] = "unspecified";
1387
- /**
1388
- * Flex service tier.
1389
- */
1390
- ServiceTier["FLEX"] = "flex";
1391
- /**
1392
- * Standard service tier.
1393
- */
1394
- ServiceTier["STANDARD"] = "standard";
1395
- /**
1396
- * Priority service tier.
1397
- */
1398
- ServiceTier["PRIORITY"] = "priority";
1399
- })(ServiceTier || (ServiceTier = {}));
1400
1428
  /** Options for feature selection preference. */
1401
1429
  var FeatureSelectionPreference;
1402
1430
  (function (FeatureSelectionPreference) {
@@ -1781,34 +1809,6 @@ var TurnCompleteReason;
1781
1809
  */
1782
1810
  TurnCompleteReason["MAX_REGENERATION_REACHED"] = "MAX_REGENERATION_REACHED";
1783
1811
  })(TurnCompleteReason || (TurnCompleteReason = {}));
1784
- /** Server content modalities. */
1785
- var MediaModality;
1786
- (function (MediaModality) {
1787
- /**
1788
- * The modality is unspecified.
1789
- */
1790
- MediaModality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
1791
- /**
1792
- * Plain text.
1793
- */
1794
- MediaModality["TEXT"] = "TEXT";
1795
- /**
1796
- * Images.
1797
- */
1798
- MediaModality["IMAGE"] = "IMAGE";
1799
- /**
1800
- * Video.
1801
- */
1802
- MediaModality["VIDEO"] = "VIDEO";
1803
- /**
1804
- * Audio.
1805
- */
1806
- MediaModality["AUDIO"] = "AUDIO";
1807
- /**
1808
- * Document, e.g. PDF.
1809
- */
1810
- MediaModality["DOCUMENT"] = "DOCUMENT";
1811
- })(MediaModality || (MediaModality = {}));
1812
1812
  /** The type of the VAD signal. */
1813
1813
  var VadSignalType;
1814
1814
  (function (VadSignalType) {
@@ -1845,7 +1845,7 @@ var VoiceActivityType;
1845
1845
  var StartSensitivity;
1846
1846
  (function (StartSensitivity) {
1847
1847
  /**
1848
- * The default is START_SENSITIVITY_LOW.
1848
+ * The default is START_SENSITIVITY_LOW for Gemini Enterprise Agent Platform and START_SENSITIVITY_HIGH for Gemini Live.
1849
1849
  */
1850
1850
  StartSensitivity["START_SENSITIVITY_UNSPECIFIED"] = "START_SENSITIVITY_UNSPECIFIED";
1851
1851
  /**
@@ -1861,7 +1861,7 @@ var StartSensitivity;
1861
1861
  var EndSensitivity;
1862
1862
  (function (EndSensitivity) {
1863
1863
  /**
1864
- * The default is END_SENSITIVITY_LOW.
1864
+ * The default is END_SENSITIVITY_LOW for Gemini Enterprise Agent Platform and END_SENSITIVITY_HIGH for Gemini Live.
1865
1865
  */
1866
1866
  EndSensitivity["END_SENSITIVITY_UNSPECIFIED"] = "END_SENSITIVITY_UNSPECIFIED";
1867
1867
  /**
@@ -2167,7 +2167,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
2167
2167
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
2168
2168
  const USER_AGENT_HEADER = 'User-Agent';
2169
2169
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2170
- const SDK_VERSION = '2.8.0'; // x-release-please-version
2170
+ const SDK_VERSION = '2.9.0'; // x-release-please-version
2171
2171
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2172
2172
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2173
2173
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';