@google/genai 2.7.0 → 2.9.0-rc.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.
@@ -381,7 +381,7 @@ var Language;
381
381
  */
382
382
  Language["PYTHON"] = "PYTHON";
383
383
  })(Language || (Language = {}));
384
- /** Specifies how the response should be scheduled in the conversation. */
384
+ /** Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. */
385
385
  var FunctionResponseScheduling;
386
386
  (function (FunctionResponseScheduling) {
387
387
  /**
@@ -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) {
@@ -1577,6 +1605,58 @@ var ImageResizeMode;
1577
1605
  */
1578
1606
  ImageResizeMode["PAD"] = "PAD";
1579
1607
  })(ImageResizeMode || (ImageResizeMode = {}));
1608
+ /** Defines how to parse sample response. */
1609
+ var ResponseParseType;
1610
+ (function (ResponseParseType) {
1611
+ /**
1612
+ * Default value. This value is unused.
1613
+ */
1614
+ ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
1615
+ /**
1616
+ * Use the sample response as is.
1617
+ */
1618
+ ResponseParseType["IDENTITY"] = "IDENTITY";
1619
+ /**
1620
+ * Use regex to extract the important part of sample response.
1621
+ */
1622
+ ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
1623
+ })(ResponseParseType || (ResponseParseType = {}));
1624
+ /** Match operation to use for evaluation. */
1625
+ var MatchOperation;
1626
+ (function (MatchOperation) {
1627
+ /**
1628
+ * Default value. This value is unused.
1629
+ */
1630
+ MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
1631
+ /**
1632
+ * Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
1633
+ */
1634
+ MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
1635
+ /**
1636
+ * `expression` is a substring of target.
1637
+ */
1638
+ MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
1639
+ /**
1640
+ * `expression` is an exact match of target.
1641
+ */
1642
+ MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
1643
+ })(MatchOperation || (MatchOperation = {}));
1644
+ /** Represents how much to think for the tuning job. */
1645
+ var ReinforcementTuningThinkingLevel;
1646
+ (function (ReinforcementTuningThinkingLevel) {
1647
+ /**
1648
+ * Unspecified thinking level.
1649
+ */
1650
+ ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
1651
+ /**
1652
+ * Little to no thinking.
1653
+ */
1654
+ ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
1655
+ /**
1656
+ * High thinking level.
1657
+ */
1658
+ ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
1659
+ })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
1580
1660
  /** Enum representing the tuning method. */
1581
1661
  var TuningMethod;
1582
1662
  (function (TuningMethod) {
@@ -1729,34 +1809,6 @@ var TurnCompleteReason;
1729
1809
  */
1730
1810
  TurnCompleteReason["MAX_REGENERATION_REACHED"] = "MAX_REGENERATION_REACHED";
1731
1811
  })(TurnCompleteReason || (TurnCompleteReason = {}));
1732
- /** Server content modalities. */
1733
- var MediaModality;
1734
- (function (MediaModality) {
1735
- /**
1736
- * The modality is unspecified.
1737
- */
1738
- MediaModality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
1739
- /**
1740
- * Plain text.
1741
- */
1742
- MediaModality["TEXT"] = "TEXT";
1743
- /**
1744
- * Images.
1745
- */
1746
- MediaModality["IMAGE"] = "IMAGE";
1747
- /**
1748
- * Video.
1749
- */
1750
- MediaModality["VIDEO"] = "VIDEO";
1751
- /**
1752
- * Audio.
1753
- */
1754
- MediaModality["AUDIO"] = "AUDIO";
1755
- /**
1756
- * Document, e.g. PDF.
1757
- */
1758
- MediaModality["DOCUMENT"] = "DOCUMENT";
1759
- })(MediaModality || (MediaModality = {}));
1760
1812
  /** The type of the VAD signal. */
1761
1813
  var VadSignalType;
1762
1814
  (function (VadSignalType) {
@@ -1793,7 +1845,7 @@ var VoiceActivityType;
1793
1845
  var StartSensitivity;
1794
1846
  (function (StartSensitivity) {
1795
1847
  /**
1796
- * 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.
1797
1849
  */
1798
1850
  StartSensitivity["START_SENSITIVITY_UNSPECIFIED"] = "START_SENSITIVITY_UNSPECIFIED";
1799
1851
  /**
@@ -1809,7 +1861,7 @@ var StartSensitivity;
1809
1861
  var EndSensitivity;
1810
1862
  (function (EndSensitivity) {
1811
1863
  /**
1812
- * 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.
1813
1865
  */
1814
1866
  EndSensitivity["END_SENSITIVITY_UNSPECIFIED"] = "END_SENSITIVITY_UNSPECIFIED";
1815
1867
  /**
@@ -2115,7 +2167,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
2115
2167
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
2116
2168
  const USER_AGENT_HEADER = 'User-Agent';
2117
2169
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2118
- const SDK_VERSION = '2.7.0'; // x-release-please-version
2170
+ const SDK_VERSION = '2.9.0-rc.0'; // x-release-please-version
2119
2171
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2120
2172
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2121
2173
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';