@google/genai 2.6.0 → 2.8.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
  /**
@@ -587,30 +587,6 @@ var DynamicRetrievalConfigMode;
587
587
  */
588
588
  DynamicRetrievalConfigMode["MODE_DYNAMIC"] = "MODE_DYNAMIC";
589
589
  })(DynamicRetrievalConfigMode || (DynamicRetrievalConfigMode = {}));
590
- /** Function calling mode. */
591
- var FunctionCallingConfigMode;
592
- (function (FunctionCallingConfigMode) {
593
- /**
594
- * Unspecified function calling mode. This value should not be used.
595
- */
596
- FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
597
- /**
598
- * Default model behavior, model decides to predict either function calls or natural language response.
599
- */
600
- FunctionCallingConfigMode["AUTO"] = "AUTO";
601
- /**
602
- * Model is constrained to always predicting function calls only. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations".
603
- */
604
- FunctionCallingConfigMode["ANY"] = "ANY";
605
- /**
606
- * Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
607
- */
608
- FunctionCallingConfigMode["NONE"] = "NONE";
609
- /**
610
- * Model is constrained to predict either function calls or natural language response. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations".
611
- */
612
- FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
613
- })(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
614
590
  /** The number of thoughts tokens that the model should generate. */
615
591
  var ThinkingLevel;
616
592
  (function (ThinkingLevel) {
@@ -759,6 +735,30 @@ var HarmBlockThreshold;
759
735
  */
760
736
  HarmBlockThreshold["OFF"] = "OFF";
761
737
  })(HarmBlockThreshold || (HarmBlockThreshold = {}));
738
+ /** Function calling mode. */
739
+ var FunctionCallingConfigMode;
740
+ (function (FunctionCallingConfigMode) {
741
+ /**
742
+ * Unspecified function calling mode. This value should not be used.
743
+ */
744
+ FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
745
+ /**
746
+ * Default model behavior, model decides to predict either function calls or natural language response.
747
+ */
748
+ FunctionCallingConfigMode["AUTO"] = "AUTO";
749
+ /**
750
+ * Model is constrained to always predicting function calls only. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations".
751
+ */
752
+ FunctionCallingConfigMode["ANY"] = "ANY";
753
+ /**
754
+ * Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
755
+ */
756
+ FunctionCallingConfigMode["NONE"] = "NONE";
757
+ /**
758
+ * Model is constrained to predict either function calls or natural language response. If "allowed_function_names" are set, the predicted function calls will be limited to any one of "allowed_function_names", else the predicted function calls will be any one of the provided "function_declarations".
759
+ */
760
+ FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
761
+ })(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
762
762
  /** Output only. The reason why the model stopped generating tokens.
763
763
 
764
764
  If empty, the model has not stopped generating the tokens. */
@@ -1577,6 +1577,58 @@ var ImageResizeMode;
1577
1577
  */
1578
1578
  ImageResizeMode["PAD"] = "PAD";
1579
1579
  })(ImageResizeMode || (ImageResizeMode = {}));
1580
+ /** Defines how to parse sample response. */
1581
+ var ResponseParseType;
1582
+ (function (ResponseParseType) {
1583
+ /**
1584
+ * Default value. This value is unused.
1585
+ */
1586
+ ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
1587
+ /**
1588
+ * Use the sample response as is.
1589
+ */
1590
+ ResponseParseType["IDENTITY"] = "IDENTITY";
1591
+ /**
1592
+ * Use regex to extract the important part of sample response.
1593
+ */
1594
+ ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
1595
+ })(ResponseParseType || (ResponseParseType = {}));
1596
+ /** Match operation to use for evaluation. */
1597
+ var MatchOperation;
1598
+ (function (MatchOperation) {
1599
+ /**
1600
+ * Default value. This value is unused.
1601
+ */
1602
+ MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
1603
+ /**
1604
+ * Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
1605
+ */
1606
+ MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
1607
+ /**
1608
+ * `expression` is a substring of target.
1609
+ */
1610
+ MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
1611
+ /**
1612
+ * `expression` is an exact match of target.
1613
+ */
1614
+ MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
1615
+ })(MatchOperation || (MatchOperation = {}));
1616
+ /** Represents how much to think for the tuning job. */
1617
+ var ReinforcementTuningThinkingLevel;
1618
+ (function (ReinforcementTuningThinkingLevel) {
1619
+ /**
1620
+ * Unspecified thinking level.
1621
+ */
1622
+ ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
1623
+ /**
1624
+ * Little to no thinking.
1625
+ */
1626
+ ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
1627
+ /**
1628
+ * High thinking level.
1629
+ */
1630
+ ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
1631
+ })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
1580
1632
  /** Enum representing the tuning method. */
1581
1633
  var TuningMethod;
1582
1634
  (function (TuningMethod) {
@@ -1592,6 +1644,10 @@ var TuningMethod;
1592
1644
  * Distillation tuning.
1593
1645
  */
1594
1646
  TuningMethod["DISTILLATION"] = "DISTILLATION";
1647
+ /**
1648
+ * Reinforcement tuning.
1649
+ */
1650
+ TuningMethod["REINFORCEMENT_TUNING"] = "REINFORCEMENT_TUNING";
1595
1651
  })(TuningMethod || (TuningMethod = {}));
1596
1652
  /** State for the lifecycle of a File. */
1597
1653
  var FileState;
@@ -2111,7 +2167,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
2111
2167
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
2112
2168
  const USER_AGENT_HEADER = 'User-Agent';
2113
2169
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2114
- const SDK_VERSION = '2.6.0'; // x-release-please-version
2170
+ const SDK_VERSION = '2.8.0'; // x-release-please-version
2115
2171
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2116
2172
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2117
2173
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';