@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.
@@ -360,7 +360,7 @@ var Language;
360
360
  */
361
361
  Language["PYTHON"] = "PYTHON";
362
362
  })(Language || (Language = {}));
363
- /** Specifies how the response should be scheduled in the conversation. */
363
+ /** Specifies how the response should be scheduled in the conversation. Only applicable to NON_BLOCKING function calls, is ignored otherwise. Defaults to WHEN_IDLE. */
364
364
  var FunctionResponseScheduling;
365
365
  (function (FunctionResponseScheduling) {
366
366
  /**
@@ -944,30 +944,34 @@ var TrafficType;
944
944
  */
945
945
  TrafficType["PROVISIONED_THROUGHPUT"] = "PROVISIONED_THROUGHPUT";
946
946
  })(TrafficType || (TrafficType = {}));
947
- /** Server content modalities. */
948
- var Modality;
949
- (function (Modality) {
947
+ /** The modality that this token count applies to. */
948
+ var MediaModality;
949
+ (function (MediaModality) {
950
950
  /**
951
- * The modality is unspecified.
951
+ * When a modality is not specified, it is treated as `TEXT`.
952
952
  */
953
- Modality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
953
+ MediaModality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
954
954
  /**
955
- * Indicates the model should return text
955
+ * The `Part` contains plain text.
956
956
  */
957
- Modality["TEXT"] = "TEXT";
957
+ MediaModality["TEXT"] = "TEXT";
958
958
  /**
959
- * Indicates the model should return images.
959
+ * The `Part` contains an image.
960
960
  */
961
- Modality["IMAGE"] = "IMAGE";
961
+ MediaModality["IMAGE"] = "IMAGE";
962
962
  /**
963
- * Indicates the model should return audio.
963
+ * The `Part` contains a video.
964
964
  */
965
- Modality["AUDIO"] = "AUDIO";
965
+ MediaModality["VIDEO"] = "VIDEO";
966
966
  /**
967
- * Indicates the model should return video.
967
+ * The `Part` contains audio.
968
968
  */
969
- Modality["VIDEO"] = "VIDEO";
970
- })(Modality || (Modality = {}));
969
+ MediaModality["AUDIO"] = "AUDIO";
970
+ /**
971
+ * The `Part` contains a document, such as a PDF.
972
+ */
973
+ MediaModality["DOCUMENT"] = "DOCUMENT";
974
+ })(MediaModality || (MediaModality = {}));
971
975
  /** The stage of the underlying model. This enum is not supported in Vertex AI. */
972
976
  var ModelStage;
973
977
  (function (ModelStage) {
@@ -1024,6 +1028,30 @@ var MediaResolution;
1024
1028
  */
1025
1029
  MediaResolution["MEDIA_RESOLUTION_HIGH"] = "MEDIA_RESOLUTION_HIGH";
1026
1030
  })(MediaResolution || (MediaResolution = {}));
1031
+ /** Server content modalities. */
1032
+ var Modality;
1033
+ (function (Modality) {
1034
+ /**
1035
+ * The modality is unspecified.
1036
+ */
1037
+ Modality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
1038
+ /**
1039
+ * Indicates the model should return text
1040
+ */
1041
+ Modality["TEXT"] = "TEXT";
1042
+ /**
1043
+ * Indicates the model should return images.
1044
+ */
1045
+ Modality["IMAGE"] = "IMAGE";
1046
+ /**
1047
+ * Indicates the model should return audio.
1048
+ */
1049
+ Modality["AUDIO"] = "AUDIO";
1050
+ /**
1051
+ * Indicates the model should return video.
1052
+ */
1053
+ Modality["VIDEO"] = "VIDEO";
1054
+ })(Modality || (Modality = {}));
1027
1055
  /** Tuning mode. This enum is not supported in Gemini API. */
1028
1056
  var TuningMode;
1029
1057
  (function (TuningMode) {
@@ -1292,6 +1320,26 @@ var DocumentState;
1292
1320
  */
1293
1321
  DocumentState["STATE_FAILED"] = "STATE_FAILED";
1294
1322
  })(DocumentState || (DocumentState = {}));
1323
+ /** Pricing and performance service tier. */
1324
+ var ServiceTier;
1325
+ (function (ServiceTier) {
1326
+ /**
1327
+ * Default service tier, which is standard.
1328
+ */
1329
+ ServiceTier["UNSPECIFIED"] = "unspecified";
1330
+ /**
1331
+ * Flex service tier.
1332
+ */
1333
+ ServiceTier["FLEX"] = "flex";
1334
+ /**
1335
+ * Standard service tier.
1336
+ */
1337
+ ServiceTier["STANDARD"] = "standard";
1338
+ /**
1339
+ * Priority service tier.
1340
+ */
1341
+ ServiceTier["PRIORITY"] = "priority";
1342
+ })(ServiceTier || (ServiceTier = {}));
1295
1343
  /** The tokenization quality used for given media. */
1296
1344
  var PartMediaResolutionLevel;
1297
1345
  (function (PartMediaResolutionLevel) {
@@ -1356,26 +1404,6 @@ var ResourceScope;
1356
1404
  */
1357
1405
  ResourceScope["COLLECTION"] = "COLLECTION";
1358
1406
  })(ResourceScope || (ResourceScope = {}));
1359
- /** Pricing and performance service tier. */
1360
- var ServiceTier;
1361
- (function (ServiceTier) {
1362
- /**
1363
- * Default service tier, which is standard.
1364
- */
1365
- ServiceTier["UNSPECIFIED"] = "unspecified";
1366
- /**
1367
- * Flex service tier.
1368
- */
1369
- ServiceTier["FLEX"] = "flex";
1370
- /**
1371
- * Standard service tier.
1372
- */
1373
- ServiceTier["STANDARD"] = "standard";
1374
- /**
1375
- * Priority service tier.
1376
- */
1377
- ServiceTier["PRIORITY"] = "priority";
1378
- })(ServiceTier || (ServiceTier = {}));
1379
1407
  /** Options for feature selection preference. */
1380
1408
  var FeatureSelectionPreference;
1381
1409
  (function (FeatureSelectionPreference) {
@@ -1556,6 +1584,58 @@ var ImageResizeMode;
1556
1584
  */
1557
1585
  ImageResizeMode["PAD"] = "PAD";
1558
1586
  })(ImageResizeMode || (ImageResizeMode = {}));
1587
+ /** Defines how to parse sample response. */
1588
+ var ResponseParseType;
1589
+ (function (ResponseParseType) {
1590
+ /**
1591
+ * Default value. This value is unused.
1592
+ */
1593
+ ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
1594
+ /**
1595
+ * Use the sample response as is.
1596
+ */
1597
+ ResponseParseType["IDENTITY"] = "IDENTITY";
1598
+ /**
1599
+ * Use regex to extract the important part of sample response.
1600
+ */
1601
+ ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
1602
+ })(ResponseParseType || (ResponseParseType = {}));
1603
+ /** Match operation to use for evaluation. */
1604
+ var MatchOperation;
1605
+ (function (MatchOperation) {
1606
+ /**
1607
+ * Default value. This value is unused.
1608
+ */
1609
+ MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
1610
+ /**
1611
+ * Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
1612
+ */
1613
+ MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
1614
+ /**
1615
+ * `expression` is a substring of target.
1616
+ */
1617
+ MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
1618
+ /**
1619
+ * `expression` is an exact match of target.
1620
+ */
1621
+ MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
1622
+ })(MatchOperation || (MatchOperation = {}));
1623
+ /** Represents how much to think for the tuning job. */
1624
+ var ReinforcementTuningThinkingLevel;
1625
+ (function (ReinforcementTuningThinkingLevel) {
1626
+ /**
1627
+ * Unspecified thinking level.
1628
+ */
1629
+ ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
1630
+ /**
1631
+ * Little to no thinking.
1632
+ */
1633
+ ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
1634
+ /**
1635
+ * High thinking level.
1636
+ */
1637
+ ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
1638
+ })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
1559
1639
  /** Enum representing the tuning method. */
1560
1640
  var TuningMethod;
1561
1641
  (function (TuningMethod) {
@@ -1708,34 +1788,6 @@ var TurnCompleteReason;
1708
1788
  */
1709
1789
  TurnCompleteReason["MAX_REGENERATION_REACHED"] = "MAX_REGENERATION_REACHED";
1710
1790
  })(TurnCompleteReason || (TurnCompleteReason = {}));
1711
- /** Server content modalities. */
1712
- var MediaModality;
1713
- (function (MediaModality) {
1714
- /**
1715
- * The modality is unspecified.
1716
- */
1717
- MediaModality["MODALITY_UNSPECIFIED"] = "MODALITY_UNSPECIFIED";
1718
- /**
1719
- * Plain text.
1720
- */
1721
- MediaModality["TEXT"] = "TEXT";
1722
- /**
1723
- * Images.
1724
- */
1725
- MediaModality["IMAGE"] = "IMAGE";
1726
- /**
1727
- * Video.
1728
- */
1729
- MediaModality["VIDEO"] = "VIDEO";
1730
- /**
1731
- * Audio.
1732
- */
1733
- MediaModality["AUDIO"] = "AUDIO";
1734
- /**
1735
- * Document, e.g. PDF.
1736
- */
1737
- MediaModality["DOCUMENT"] = "DOCUMENT";
1738
- })(MediaModality || (MediaModality = {}));
1739
1791
  /** The type of the VAD signal. */
1740
1792
  var VadSignalType;
1741
1793
  (function (VadSignalType) {
@@ -1772,7 +1824,7 @@ var VoiceActivityType;
1772
1824
  var StartSensitivity;
1773
1825
  (function (StartSensitivity) {
1774
1826
  /**
1775
- * The default is START_SENSITIVITY_LOW.
1827
+ * The default is START_SENSITIVITY_LOW for Gemini Enterprise Agent Platform and START_SENSITIVITY_HIGH for Gemini Live.
1776
1828
  */
1777
1829
  StartSensitivity["START_SENSITIVITY_UNSPECIFIED"] = "START_SENSITIVITY_UNSPECIFIED";
1778
1830
  /**
@@ -1788,7 +1840,7 @@ var StartSensitivity;
1788
1840
  var EndSensitivity;
1789
1841
  (function (EndSensitivity) {
1790
1842
  /**
1791
- * The default is END_SENSITIVITY_LOW.
1843
+ * The default is END_SENSITIVITY_LOW for Gemini Enterprise Agent Platform and END_SENSITIVITY_HIGH for Gemini Live.
1792
1844
  */
1793
1845
  EndSensitivity["END_SENSITIVITY_UNSPECIFIED"] = "END_SENSITIVITY_UNSPECIFIED";
1794
1846
  /**
@@ -2094,7 +2146,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
2094
2146
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
2095
2147
  const USER_AGENT_HEADER = 'User-Agent';
2096
2148
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2097
- const SDK_VERSION = '2.7.0'; // x-release-please-version
2149
+ const SDK_VERSION = '2.9.0-rc.0'; // x-release-please-version
2098
2150
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2099
2151
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2100
2152
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';