@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.
- package/dist/genai.d.ts +487 -69
- package/dist/index.cjs +567 -144
- package/dist/index.mjs +565 -145
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +567 -144
- package/dist/node/index.mjs +565 -145
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +487 -69
- package/dist/tokenizer/node.cjs +81 -25
- package/dist/tokenizer/node.d.ts +16 -31
- package/dist/tokenizer/node.mjs +81 -25
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +82 -26
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +371 -66
- package/dist/vertex_internal/index.js +82 -26
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +565 -145
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +487 -69
- package/package.json +1 -1
|
@@ -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
|
/**
|
|
@@ -566,30 +566,6 @@ var DynamicRetrievalConfigMode;
|
|
|
566
566
|
*/
|
|
567
567
|
DynamicRetrievalConfigMode["MODE_DYNAMIC"] = "MODE_DYNAMIC";
|
|
568
568
|
})(DynamicRetrievalConfigMode || (DynamicRetrievalConfigMode = {}));
|
|
569
|
-
/** Function calling mode. */
|
|
570
|
-
var FunctionCallingConfigMode;
|
|
571
|
-
(function (FunctionCallingConfigMode) {
|
|
572
|
-
/**
|
|
573
|
-
* Unspecified function calling mode. This value should not be used.
|
|
574
|
-
*/
|
|
575
|
-
FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
|
|
576
|
-
/**
|
|
577
|
-
* Default model behavior, model decides to predict either function calls or natural language response.
|
|
578
|
-
*/
|
|
579
|
-
FunctionCallingConfigMode["AUTO"] = "AUTO";
|
|
580
|
-
/**
|
|
581
|
-
* 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".
|
|
582
|
-
*/
|
|
583
|
-
FunctionCallingConfigMode["ANY"] = "ANY";
|
|
584
|
-
/**
|
|
585
|
-
* Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
|
|
586
|
-
*/
|
|
587
|
-
FunctionCallingConfigMode["NONE"] = "NONE";
|
|
588
|
-
/**
|
|
589
|
-
* 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".
|
|
590
|
-
*/
|
|
591
|
-
FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
|
|
592
|
-
})(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
|
|
593
569
|
/** The number of thoughts tokens that the model should generate. */
|
|
594
570
|
var ThinkingLevel;
|
|
595
571
|
(function (ThinkingLevel) {
|
|
@@ -738,6 +714,30 @@ var HarmBlockThreshold;
|
|
|
738
714
|
*/
|
|
739
715
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
740
716
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
717
|
+
/** Function calling mode. */
|
|
718
|
+
var FunctionCallingConfigMode;
|
|
719
|
+
(function (FunctionCallingConfigMode) {
|
|
720
|
+
/**
|
|
721
|
+
* Unspecified function calling mode. This value should not be used.
|
|
722
|
+
*/
|
|
723
|
+
FunctionCallingConfigMode["MODE_UNSPECIFIED"] = "MODE_UNSPECIFIED";
|
|
724
|
+
/**
|
|
725
|
+
* Default model behavior, model decides to predict either function calls or natural language response.
|
|
726
|
+
*/
|
|
727
|
+
FunctionCallingConfigMode["AUTO"] = "AUTO";
|
|
728
|
+
/**
|
|
729
|
+
* 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".
|
|
730
|
+
*/
|
|
731
|
+
FunctionCallingConfigMode["ANY"] = "ANY";
|
|
732
|
+
/**
|
|
733
|
+
* Model will not predict any function calls. Model behavior is same as when not passing any function declarations.
|
|
734
|
+
*/
|
|
735
|
+
FunctionCallingConfigMode["NONE"] = "NONE";
|
|
736
|
+
/**
|
|
737
|
+
* 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".
|
|
738
|
+
*/
|
|
739
|
+
FunctionCallingConfigMode["VALIDATED"] = "VALIDATED";
|
|
740
|
+
})(FunctionCallingConfigMode || (FunctionCallingConfigMode = {}));
|
|
741
741
|
/** Output only. The reason why the model stopped generating tokens.
|
|
742
742
|
|
|
743
743
|
If empty, the model has not stopped generating the tokens. */
|
|
@@ -1556,6 +1556,58 @@ var ImageResizeMode;
|
|
|
1556
1556
|
*/
|
|
1557
1557
|
ImageResizeMode["PAD"] = "PAD";
|
|
1558
1558
|
})(ImageResizeMode || (ImageResizeMode = {}));
|
|
1559
|
+
/** Defines how to parse sample response. */
|
|
1560
|
+
var ResponseParseType;
|
|
1561
|
+
(function (ResponseParseType) {
|
|
1562
|
+
/**
|
|
1563
|
+
* Default value. This value is unused.
|
|
1564
|
+
*/
|
|
1565
|
+
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1566
|
+
/**
|
|
1567
|
+
* Use the sample response as is.
|
|
1568
|
+
*/
|
|
1569
|
+
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1570
|
+
/**
|
|
1571
|
+
* Use regex to extract the important part of sample response.
|
|
1572
|
+
*/
|
|
1573
|
+
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1574
|
+
})(ResponseParseType || (ResponseParseType = {}));
|
|
1575
|
+
/** Match operation to use for evaluation. */
|
|
1576
|
+
var MatchOperation;
|
|
1577
|
+
(function (MatchOperation) {
|
|
1578
|
+
/**
|
|
1579
|
+
* Default value. This value is unused.
|
|
1580
|
+
*/
|
|
1581
|
+
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1582
|
+
/**
|
|
1583
|
+
* Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
|
|
1584
|
+
*/
|
|
1585
|
+
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1586
|
+
/**
|
|
1587
|
+
* `expression` is a substring of target.
|
|
1588
|
+
*/
|
|
1589
|
+
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1590
|
+
/**
|
|
1591
|
+
* `expression` is an exact match of target.
|
|
1592
|
+
*/
|
|
1593
|
+
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1594
|
+
})(MatchOperation || (MatchOperation = {}));
|
|
1595
|
+
/** Represents how much to think for the tuning job. */
|
|
1596
|
+
var ReinforcementTuningThinkingLevel;
|
|
1597
|
+
(function (ReinforcementTuningThinkingLevel) {
|
|
1598
|
+
/**
|
|
1599
|
+
* Unspecified thinking level.
|
|
1600
|
+
*/
|
|
1601
|
+
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1602
|
+
/**
|
|
1603
|
+
* Little to no thinking.
|
|
1604
|
+
*/
|
|
1605
|
+
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1606
|
+
/**
|
|
1607
|
+
* High thinking level.
|
|
1608
|
+
*/
|
|
1609
|
+
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1610
|
+
})(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
|
|
1559
1611
|
/** Enum representing the tuning method. */
|
|
1560
1612
|
var TuningMethod;
|
|
1561
1613
|
(function (TuningMethod) {
|
|
@@ -1571,6 +1623,10 @@ var TuningMethod;
|
|
|
1571
1623
|
* Distillation tuning.
|
|
1572
1624
|
*/
|
|
1573
1625
|
TuningMethod["DISTILLATION"] = "DISTILLATION";
|
|
1626
|
+
/**
|
|
1627
|
+
* Reinforcement tuning.
|
|
1628
|
+
*/
|
|
1629
|
+
TuningMethod["REINFORCEMENT_TUNING"] = "REINFORCEMENT_TUNING";
|
|
1574
1630
|
})(TuningMethod || (TuningMethod = {}));
|
|
1575
1631
|
/** State for the lifecycle of a File. */
|
|
1576
1632
|
var FileState;
|
|
@@ -2090,7 +2146,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
2090
2146
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
2091
2147
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
2092
2148
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
2093
|
-
const SDK_VERSION = '2.
|
|
2149
|
+
const SDK_VERSION = '2.8.0'; // x-release-please-version
|
|
2094
2150
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
2095
2151
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
2096
2152
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|