@google/genai 1.46.0 → 1.47.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 +423 -243
- package/dist/index.cjs +390 -77
- package/dist/index.mjs +391 -78
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +390 -77
- package/dist/node/index.mjs +391 -78
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +423 -243
- package/dist/tokenizer/node.cjs +140 -68
- package/dist/tokenizer/node.d.ts +31 -27
- package/dist/tokenizer/node.mjs +140 -68
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +146 -70
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +232 -84
- package/dist/vertex_internal/index.js +146 -70
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +391 -78
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +423 -243
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -682,38 +682,18 @@ var Type;
|
|
|
682
682
|
*/
|
|
683
683
|
Type["NULL"] = "NULL";
|
|
684
684
|
})(Type || (Type = {}));
|
|
685
|
-
/**
|
|
686
|
-
var
|
|
687
|
-
(function (
|
|
688
|
-
/**
|
|
689
|
-
* Defaults to unspecified.
|
|
690
|
-
*/
|
|
691
|
-
PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
692
|
-
/**
|
|
693
|
-
* Blocks Low and above confidence URL that is risky.
|
|
694
|
-
*/
|
|
695
|
-
PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
696
|
-
/**
|
|
697
|
-
* Blocks Medium and above confidence URL that is risky.
|
|
698
|
-
*/
|
|
699
|
-
PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
700
|
-
/**
|
|
701
|
-
* Blocks High and above confidence URL that is risky.
|
|
702
|
-
*/
|
|
703
|
-
PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
|
|
704
|
-
/**
|
|
705
|
-
* Blocks Higher and above confidence URL that is risky.
|
|
706
|
-
*/
|
|
707
|
-
PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
|
|
685
|
+
/** The environment being operated. */
|
|
686
|
+
var Environment;
|
|
687
|
+
(function (Environment) {
|
|
708
688
|
/**
|
|
709
|
-
*
|
|
689
|
+
* Defaults to browser.
|
|
710
690
|
*/
|
|
711
|
-
|
|
691
|
+
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
712
692
|
/**
|
|
713
|
-
*
|
|
693
|
+
* Operates in a web browser.
|
|
714
694
|
*/
|
|
715
|
-
|
|
716
|
-
})(
|
|
695
|
+
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
696
|
+
})(Environment || (Environment = {}));
|
|
717
697
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
718
698
|
var AuthType;
|
|
719
699
|
(function (AuthType) {
|
|
@@ -784,6 +764,38 @@ var ApiSpec;
|
|
|
784
764
|
*/
|
|
785
765
|
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
786
766
|
})(ApiSpec || (ApiSpec = {}));
|
|
767
|
+
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
768
|
+
var PhishBlockThreshold;
|
|
769
|
+
(function (PhishBlockThreshold) {
|
|
770
|
+
/**
|
|
771
|
+
* Defaults to unspecified.
|
|
772
|
+
*/
|
|
773
|
+
PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
774
|
+
/**
|
|
775
|
+
* Blocks Low and above confidence URL that is risky.
|
|
776
|
+
*/
|
|
777
|
+
PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
778
|
+
/**
|
|
779
|
+
* Blocks Medium and above confidence URL that is risky.
|
|
780
|
+
*/
|
|
781
|
+
PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
782
|
+
/**
|
|
783
|
+
* Blocks High and above confidence URL that is risky.
|
|
784
|
+
*/
|
|
785
|
+
PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
|
|
786
|
+
/**
|
|
787
|
+
* Blocks Higher and above confidence URL that is risky.
|
|
788
|
+
*/
|
|
789
|
+
PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
|
|
790
|
+
/**
|
|
791
|
+
* Blocks Very high and above confidence URL that is risky.
|
|
792
|
+
*/
|
|
793
|
+
PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
|
|
794
|
+
/**
|
|
795
|
+
* Blocks Extremely high confidence URL that is risky.
|
|
796
|
+
*/
|
|
797
|
+
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
798
|
+
})(PhishBlockThreshold || (PhishBlockThreshold = {}));
|
|
787
799
|
/** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
|
|
788
800
|
var Behavior;
|
|
789
801
|
(function (Behavior) {
|
|
@@ -843,6 +855,10 @@ var ThinkingLevel;
|
|
|
843
855
|
* Unspecified thinking level.
|
|
844
856
|
*/
|
|
845
857
|
ThinkingLevel["THINKING_LEVEL_UNSPECIFIED"] = "THINKING_LEVEL_UNSPECIFIED";
|
|
858
|
+
/**
|
|
859
|
+
* MINIMAL thinking level.
|
|
860
|
+
*/
|
|
861
|
+
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
846
862
|
/**
|
|
847
863
|
* Low thinking level.
|
|
848
864
|
*/
|
|
@@ -855,10 +871,6 @@ var ThinkingLevel;
|
|
|
855
871
|
* High thinking level.
|
|
856
872
|
*/
|
|
857
873
|
ThinkingLevel["HIGH"] = "HIGH";
|
|
858
|
-
/**
|
|
859
|
-
* MINIMAL thinking level.
|
|
860
|
-
*/
|
|
861
|
-
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
862
874
|
})(ThinkingLevel || (ThinkingLevel = {}));
|
|
863
875
|
/** Enum that controls the generation of people. */
|
|
864
876
|
var PersonGeneration;
|
|
@@ -876,6 +888,22 @@ var PersonGeneration;
|
|
|
876
888
|
*/
|
|
877
889
|
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
878
890
|
})(PersonGeneration || (PersonGeneration = {}));
|
|
891
|
+
/** Controls whether prominent people (celebrities) generation is allowed. If used with personGeneration, personGeneration enum would take precedence. For instance, if ALLOW_NONE is set, all person generation would be blocked. If this field is unspecified, the default behavior is to allow prominent people. This enum is not supported in Gemini API. */
|
|
892
|
+
var ProminentPeople;
|
|
893
|
+
(function (ProminentPeople) {
|
|
894
|
+
/**
|
|
895
|
+
* Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
|
|
896
|
+
*/
|
|
897
|
+
ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
|
|
898
|
+
/**
|
|
899
|
+
* Allows the model to generate images of prominent people.
|
|
900
|
+
*/
|
|
901
|
+
ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
|
|
902
|
+
/**
|
|
903
|
+
* Prevents the model from generating images of prominent people.
|
|
904
|
+
*/
|
|
905
|
+
ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
|
|
906
|
+
})(ProminentPeople || (ProminentPeople = {}));
|
|
879
907
|
/** The harm category to be blocked. */
|
|
880
908
|
var HarmCategory;
|
|
881
909
|
(function (HarmCategory) {
|
|
@@ -1194,6 +1222,42 @@ var Modality;
|
|
|
1194
1222
|
*/
|
|
1195
1223
|
Modality["AUDIO"] = "AUDIO";
|
|
1196
1224
|
})(Modality || (Modality = {}));
|
|
1225
|
+
/** The stage of the underlying model. This enum is not supported in Vertex AI. */
|
|
1226
|
+
var ModelStage;
|
|
1227
|
+
(function (ModelStage) {
|
|
1228
|
+
/**
|
|
1229
|
+
* Unspecified model stage.
|
|
1230
|
+
*/
|
|
1231
|
+
ModelStage["MODEL_STAGE_UNSPECIFIED"] = "MODEL_STAGE_UNSPECIFIED";
|
|
1232
|
+
/**
|
|
1233
|
+
* The underlying model is subject to lots of tunings.
|
|
1234
|
+
*/
|
|
1235
|
+
ModelStage["UNSTABLE_EXPERIMENTAL"] = "UNSTABLE_EXPERIMENTAL";
|
|
1236
|
+
/**
|
|
1237
|
+
* Models in this stage are for experimental purposes only.
|
|
1238
|
+
*/
|
|
1239
|
+
ModelStage["EXPERIMENTAL"] = "EXPERIMENTAL";
|
|
1240
|
+
/**
|
|
1241
|
+
* Models in this stage are more mature than experimental models.
|
|
1242
|
+
*/
|
|
1243
|
+
ModelStage["PREVIEW"] = "PREVIEW";
|
|
1244
|
+
/**
|
|
1245
|
+
* Models in this stage are considered stable and ready for production use.
|
|
1246
|
+
*/
|
|
1247
|
+
ModelStage["STABLE"] = "STABLE";
|
|
1248
|
+
/**
|
|
1249
|
+
* If the model is on this stage, it means that this model is on the path to deprecation in near future. Only existing customers can use this model.
|
|
1250
|
+
*/
|
|
1251
|
+
ModelStage["LEGACY"] = "LEGACY";
|
|
1252
|
+
/**
|
|
1253
|
+
* Models in this stage are deprecated. These models cannot be used.
|
|
1254
|
+
*/
|
|
1255
|
+
ModelStage["DEPRECATED"] = "DEPRECATED";
|
|
1256
|
+
/**
|
|
1257
|
+
* Models in this stage are retired. These models cannot be used.
|
|
1258
|
+
*/
|
|
1259
|
+
ModelStage["RETIRED"] = "RETIRED";
|
|
1260
|
+
})(ModelStage || (ModelStage = {}));
|
|
1197
1261
|
/** The media resolution to use. */
|
|
1198
1262
|
var MediaResolution;
|
|
1199
1263
|
(function (MediaResolution) {
|
|
@@ -1430,6 +1494,26 @@ var TuningTask;
|
|
|
1430
1494
|
*/
|
|
1431
1495
|
TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
|
|
1432
1496
|
})(TuningTask || (TuningTask = {}));
|
|
1497
|
+
/** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
|
|
1498
|
+
var DocumentState;
|
|
1499
|
+
(function (DocumentState) {
|
|
1500
|
+
/**
|
|
1501
|
+
* The default value. This value is used if the state is omitted.
|
|
1502
|
+
*/
|
|
1503
|
+
DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
|
|
1504
|
+
/**
|
|
1505
|
+
* Some `Chunks` of the `Document` are being processed (embedding and vector storage).
|
|
1506
|
+
*/
|
|
1507
|
+
DocumentState["STATE_PENDING"] = "STATE_PENDING";
|
|
1508
|
+
/**
|
|
1509
|
+
* All `Chunks` of the `Document` is processed and available for querying.
|
|
1510
|
+
*/
|
|
1511
|
+
DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
|
|
1512
|
+
/**
|
|
1513
|
+
* Some `Chunks` of the `Document` failed processing.
|
|
1514
|
+
*/
|
|
1515
|
+
DocumentState["STATE_FAILED"] = "STATE_FAILED";
|
|
1516
|
+
})(DocumentState || (DocumentState = {}));
|
|
1433
1517
|
/** The tokenization quality used for given media. */
|
|
1434
1518
|
var PartMediaResolutionLevel;
|
|
1435
1519
|
(function (PartMediaResolutionLevel) {
|
|
@@ -1494,42 +1578,34 @@ var ResourceScope;
|
|
|
1494
1578
|
*/
|
|
1495
1579
|
ResourceScope["COLLECTION"] = "COLLECTION";
|
|
1496
1580
|
})(ResourceScope || (ResourceScope = {}));
|
|
1497
|
-
/**
|
|
1498
|
-
var
|
|
1499
|
-
(function (
|
|
1500
|
-
FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
|
|
1501
|
-
FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
|
|
1502
|
-
FeatureSelectionPreference["BALANCED"] = "BALANCED";
|
|
1503
|
-
FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
|
|
1504
|
-
})(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
|
|
1505
|
-
/** The environment being operated. */
|
|
1506
|
-
var Environment;
|
|
1507
|
-
(function (Environment) {
|
|
1581
|
+
/** Pricing and performance service tier. */
|
|
1582
|
+
var ServiceTier;
|
|
1583
|
+
(function (ServiceTier) {
|
|
1508
1584
|
/**
|
|
1509
|
-
*
|
|
1585
|
+
* Default service tier, which is standard.
|
|
1510
1586
|
*/
|
|
1511
|
-
|
|
1587
|
+
ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
|
|
1512
1588
|
/**
|
|
1513
|
-
*
|
|
1589
|
+
* Flex service tier.
|
|
1514
1590
|
*/
|
|
1515
|
-
|
|
1516
|
-
})(Environment || (Environment = {}));
|
|
1517
|
-
/** Enum for controlling whether the model can generate images of prominent people (celebrities). */
|
|
1518
|
-
var ProminentPeople;
|
|
1519
|
-
(function (ProminentPeople) {
|
|
1591
|
+
ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
|
|
1520
1592
|
/**
|
|
1521
|
-
*
|
|
1593
|
+
* Standard service tier.
|
|
1522
1594
|
*/
|
|
1523
|
-
|
|
1595
|
+
ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
|
|
1524
1596
|
/**
|
|
1525
|
-
*
|
|
1597
|
+
* Priority service tier.
|
|
1526
1598
|
*/
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1599
|
+
ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
|
|
1600
|
+
})(ServiceTier || (ServiceTier = {}));
|
|
1601
|
+
/** Options for feature selection preference. */
|
|
1602
|
+
var FeatureSelectionPreference;
|
|
1603
|
+
(function (FeatureSelectionPreference) {
|
|
1604
|
+
FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
|
|
1605
|
+
FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
|
|
1606
|
+
FeatureSelectionPreference["BALANCED"] = "BALANCED";
|
|
1607
|
+
FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
|
|
1608
|
+
})(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
|
|
1533
1609
|
/** Enum representing the Vertex embedding API to use. */
|
|
1534
1610
|
var EmbeddingApiType;
|
|
1535
1611
|
(function (EmbeddingApiType) {
|
|
@@ -1704,14 +1780,6 @@ var TuningMethod;
|
|
|
1704
1780
|
*/
|
|
1705
1781
|
TuningMethod["DISTILLATION"] = "DISTILLATION";
|
|
1706
1782
|
})(TuningMethod || (TuningMethod = {}));
|
|
1707
|
-
/** State for the lifecycle of a Document. */
|
|
1708
|
-
var DocumentState;
|
|
1709
|
-
(function (DocumentState) {
|
|
1710
|
-
DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
|
|
1711
|
-
DocumentState["STATE_PENDING"] = "STATE_PENDING";
|
|
1712
|
-
DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
|
|
1713
|
-
DocumentState["STATE_FAILED"] = "STATE_FAILED";
|
|
1714
|
-
})(DocumentState || (DocumentState = {}));
|
|
1715
1783
|
/** State for the lifecycle of a File. */
|
|
1716
1784
|
var FileState;
|
|
1717
1785
|
(function (FileState) {
|
|
@@ -1871,6 +1939,10 @@ var TurnCoverage;
|
|
|
1871
1939
|
* The users turn includes all realtime input since the last turn, including inactivity (e.g. silence on the audio stream).
|
|
1872
1940
|
*/
|
|
1873
1941
|
TurnCoverage["TURN_INCLUDES_ALL_INPUT"] = "TURN_INCLUDES_ALL_INPUT";
|
|
1942
|
+
/**
|
|
1943
|
+
* Includes audio activity and all video since the last turn. With automatic activity detection, audio activity means speech and excludes silence.
|
|
1944
|
+
*/
|
|
1945
|
+
TurnCoverage["TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO"] = "TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO";
|
|
1874
1946
|
})(TurnCoverage || (TurnCoverage = {}));
|
|
1875
1947
|
/** Scale of the generated music. */
|
|
1876
1948
|
var Scale;
|
|
@@ -2440,7 +2512,6 @@ class GenerateVideosResponse {
|
|
|
2440
2512
|
class GenerateVideosOperation {
|
|
2441
2513
|
/**
|
|
2442
2514
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2443
|
-
* @internal
|
|
2444
2515
|
*/
|
|
2445
2516
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2446
2517
|
const operation = new GenerateVideosOperation();
|
|
@@ -2486,7 +2557,6 @@ class ImportFileResponse {
|
|
|
2486
2557
|
class ImportFileOperation {
|
|
2487
2558
|
/**
|
|
2488
2559
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2489
|
-
* @internal
|
|
2490
2560
|
*/
|
|
2491
2561
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2492
2562
|
const operation = new ImportFileOperation();
|
|
@@ -2741,7 +2811,6 @@ class UploadToFileSearchStoreResponse {
|
|
|
2741
2811
|
class UploadToFileSearchStoreOperation {
|
|
2742
2812
|
/**
|
|
2743
2813
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2744
|
-
* @internal
|
|
2745
2814
|
*/
|
|
2746
2815
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2747
2816
|
const operation = new UploadToFileSearchStoreOperation();
|
|
@@ -4394,6 +4463,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4394
4463
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
4395
4464
|
throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
|
|
4396
4465
|
}
|
|
4466
|
+
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
4467
|
+
if (parentObject !== undefined && fromServiceTier != null) {
|
|
4468
|
+
setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
|
|
4469
|
+
}
|
|
4397
4470
|
return toObject;
|
|
4398
4471
|
}
|
|
4399
4472
|
function generateContentResponseFromMldev$1(fromObject) {
|
|
@@ -4434,6 +4507,10 @@ function generateContentResponseFromMldev$1(fromObject) {
|
|
|
4434
4507
|
if (fromUsageMetadata != null) {
|
|
4435
4508
|
setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
|
|
4436
4509
|
}
|
|
4510
|
+
const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
|
|
4511
|
+
if (fromModelStatus != null) {
|
|
4512
|
+
setValueByPath(toObject, ['modelStatus'], fromModelStatus);
|
|
4513
|
+
}
|
|
4437
4514
|
return toObject;
|
|
4438
4515
|
}
|
|
4439
4516
|
function getBatchJobParametersToMldev(apiClient, fromObject) {
|
|
@@ -4721,6 +4798,10 @@ function partToMldev$4(fromObject) {
|
|
|
4721
4798
|
if (fromToolResponse != null) {
|
|
4722
4799
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
4723
4800
|
}
|
|
4801
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
4802
|
+
if (fromPartMetadata != null) {
|
|
4803
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
4804
|
+
}
|
|
4724
4805
|
return toObject;
|
|
4725
4806
|
}
|
|
4726
4807
|
function safetySettingToMldev$1(fromObject) {
|
|
@@ -6055,6 +6136,10 @@ function partToMldev$3(fromObject) {
|
|
|
6055
6136
|
if (fromToolResponse != null) {
|
|
6056
6137
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
6057
6138
|
}
|
|
6139
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
6140
|
+
if (fromPartMetadata != null) {
|
|
6141
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
6142
|
+
}
|
|
6058
6143
|
return toObject;
|
|
6059
6144
|
}
|
|
6060
6145
|
function partToVertex$2(fromObject) {
|
|
@@ -6121,6 +6206,9 @@ function partToVertex$2(fromObject) {
|
|
|
6121
6206
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
6122
6207
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
6123
6208
|
}
|
|
6209
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
6210
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
6211
|
+
}
|
|
6124
6212
|
return toObject;
|
|
6125
6213
|
}
|
|
6126
6214
|
function toolConfigToMldev$1(fromObject) {
|
|
@@ -7834,7 +7922,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
7834
7922
|
}
|
|
7835
7923
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
7836
7924
|
if (fromSpeechConfig != null) {
|
|
7837
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
7925
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
|
|
7838
7926
|
}
|
|
7839
7927
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
7840
7928
|
'stopSequences',
|
|
@@ -8055,7 +8143,7 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
8055
8143
|
}
|
|
8056
8144
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8057
8145
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8058
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
|
|
8146
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8059
8147
|
}
|
|
8060
8148
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8061
8149
|
'thinkingConfig',
|
|
@@ -8315,6 +8403,22 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
8315
8403
|
}
|
|
8316
8404
|
return toObject;
|
|
8317
8405
|
}
|
|
8406
|
+
function multiSpeakerVoiceConfigToVertex$1(fromObject) {
|
|
8407
|
+
const toObject = {};
|
|
8408
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
8409
|
+
'speakerVoiceConfigs',
|
|
8410
|
+
]);
|
|
8411
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
8412
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
8413
|
+
if (Array.isArray(transformedList)) {
|
|
8414
|
+
transformedList = transformedList.map((item) => {
|
|
8415
|
+
return speakerVoiceConfigToVertex$1(item);
|
|
8416
|
+
});
|
|
8417
|
+
}
|
|
8418
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
8419
|
+
}
|
|
8420
|
+
return toObject;
|
|
8421
|
+
}
|
|
8318
8422
|
function partToMldev$2(fromObject) {
|
|
8319
8423
|
const toObject = {};
|
|
8320
8424
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -8381,6 +8485,10 @@ function partToMldev$2(fromObject) {
|
|
|
8381
8485
|
if (fromToolResponse != null) {
|
|
8382
8486
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
8383
8487
|
}
|
|
8488
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
8489
|
+
if (fromPartMetadata != null) {
|
|
8490
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
8491
|
+
}
|
|
8384
8492
|
return toObject;
|
|
8385
8493
|
}
|
|
8386
8494
|
function partToVertex$1(fromObject) {
|
|
@@ -8447,6 +8555,23 @@ function partToVertex$1(fromObject) {
|
|
|
8447
8555
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
8448
8556
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
8449
8557
|
}
|
|
8558
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
8559
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
8560
|
+
}
|
|
8561
|
+
return toObject;
|
|
8562
|
+
}
|
|
8563
|
+
function replicatedVoiceConfigToVertex$1(fromObject) {
|
|
8564
|
+
const toObject = {};
|
|
8565
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8566
|
+
if (fromMimeType != null) {
|
|
8567
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8568
|
+
}
|
|
8569
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
8570
|
+
'voiceSampleAudio',
|
|
8571
|
+
]);
|
|
8572
|
+
if (fromVoiceSampleAudio != null) {
|
|
8573
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
8574
|
+
}
|
|
8450
8575
|
return toObject;
|
|
8451
8576
|
}
|
|
8452
8577
|
function sessionResumptionConfigToMldev$1(fromObject) {
|
|
@@ -8460,6 +8585,36 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
8460
8585
|
}
|
|
8461
8586
|
return toObject;
|
|
8462
8587
|
}
|
|
8588
|
+
function speakerVoiceConfigToVertex$1(fromObject) {
|
|
8589
|
+
const toObject = {};
|
|
8590
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
8591
|
+
if (fromSpeaker != null) {
|
|
8592
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
8593
|
+
}
|
|
8594
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
8595
|
+
if (fromVoiceConfig != null) {
|
|
8596
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
8597
|
+
}
|
|
8598
|
+
return toObject;
|
|
8599
|
+
}
|
|
8600
|
+
function speechConfigToVertex$1(fromObject) {
|
|
8601
|
+
const toObject = {};
|
|
8602
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
8603
|
+
if (fromVoiceConfig != null) {
|
|
8604
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
8605
|
+
}
|
|
8606
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
8607
|
+
if (fromLanguageCode != null) {
|
|
8608
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8609
|
+
}
|
|
8610
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
8611
|
+
'multiSpeakerVoiceConfig',
|
|
8612
|
+
]);
|
|
8613
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
8614
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
|
|
8615
|
+
}
|
|
8616
|
+
return toObject;
|
|
8617
|
+
}
|
|
8463
8618
|
function toolToMldev$2(fromObject) {
|
|
8464
8619
|
const toObject = {};
|
|
8465
8620
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
@@ -8693,6 +8848,22 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
8693
8848
|
}
|
|
8694
8849
|
return toObject;
|
|
8695
8850
|
}
|
|
8851
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
8852
|
+
const toObject = {};
|
|
8853
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
8854
|
+
'replicatedVoiceConfig',
|
|
8855
|
+
]);
|
|
8856
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
8857
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
|
|
8858
|
+
}
|
|
8859
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
8860
|
+
'prebuiltVoiceConfig',
|
|
8861
|
+
]);
|
|
8862
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
8863
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
8864
|
+
}
|
|
8865
|
+
return toObject;
|
|
8866
|
+
}
|
|
8696
8867
|
|
|
8697
8868
|
/**
|
|
8698
8869
|
* @license
|
|
@@ -9746,6 +9917,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
9746
9917
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
9747
9918
|
throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
|
|
9748
9919
|
}
|
|
9920
|
+
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
9921
|
+
if (parentObject !== undefined && fromServiceTier != null) {
|
|
9922
|
+
setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
|
|
9923
|
+
}
|
|
9749
9924
|
return toObject;
|
|
9750
9925
|
}
|
|
9751
9926
|
function generateContentConfigToVertex(apiClient, fromObject, parentObject, rootObject) {
|
|
@@ -9892,7 +10067,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
9892
10067
|
}
|
|
9893
10068
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
9894
10069
|
if (fromSpeechConfig != null) {
|
|
9895
|
-
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
10070
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
|
|
9896
10071
|
}
|
|
9897
10072
|
const fromAudioTimestamp = getValueByPath(fromObject, [
|
|
9898
10073
|
'audioTimestamp',
|
|
@@ -9920,6 +10095,9 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
9920
10095
|
if (parentObject !== undefined && fromModelArmorConfig != null) {
|
|
9921
10096
|
setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
|
|
9922
10097
|
}
|
|
10098
|
+
if (getValueByPath(fromObject, ['serviceTier']) !== undefined) {
|
|
10099
|
+
throw new Error('serviceTier parameter is not supported in Vertex AI.');
|
|
10100
|
+
}
|
|
9923
10101
|
return toObject;
|
|
9924
10102
|
}
|
|
9925
10103
|
function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
@@ -10004,6 +10182,10 @@ function generateContentResponseFromMldev(fromObject, rootObject) {
|
|
|
10004
10182
|
if (fromUsageMetadata != null) {
|
|
10005
10183
|
setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
|
|
10006
10184
|
}
|
|
10185
|
+
const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
|
|
10186
|
+
if (fromModelStatus != null) {
|
|
10187
|
+
setValueByPath(toObject, ['modelStatus'], fromModelStatus);
|
|
10188
|
+
}
|
|
10007
10189
|
return toObject;
|
|
10008
10190
|
}
|
|
10009
10191
|
function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
@@ -10389,6 +10571,9 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
10389
10571
|
if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
|
|
10390
10572
|
throw new Error('compressionQuality parameter is not supported in Gemini API.');
|
|
10391
10573
|
}
|
|
10574
|
+
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
10575
|
+
throw new Error('labels parameter is not supported in Gemini API.');
|
|
10576
|
+
}
|
|
10392
10577
|
return toObject;
|
|
10393
10578
|
}
|
|
10394
10579
|
function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
@@ -10479,6 +10664,10 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
10479
10664
|
if (parentObject !== undefined && fromCompressionQuality != null) {
|
|
10480
10665
|
setValueByPath(parentObject, ['parameters', 'compressionQuality'], fromCompressionQuality);
|
|
10481
10666
|
}
|
|
10667
|
+
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
10668
|
+
if (parentObject !== undefined && fromLabels != null) {
|
|
10669
|
+
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
10670
|
+
}
|
|
10482
10671
|
return toObject;
|
|
10483
10672
|
}
|
|
10484
10673
|
function generateVideosOperationFromMldev(fromObject, rootObject) {
|
|
@@ -10748,7 +10937,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
10748
10937
|
}
|
|
10749
10938
|
return toObject;
|
|
10750
10939
|
}
|
|
10751
|
-
function generationConfigToVertex(fromObject,
|
|
10940
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
10752
10941
|
const toObject = {};
|
|
10753
10942
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
10754
10943
|
'modelSelectionConfig',
|
|
@@ -10844,7 +11033,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
10844
11033
|
}
|
|
10845
11034
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
10846
11035
|
if (fromSpeechConfig != null) {
|
|
10847
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
11036
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
10848
11037
|
}
|
|
10849
11038
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
10850
11039
|
'stopSequences',
|
|
@@ -11301,6 +11490,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
11301
11490
|
}
|
|
11302
11491
|
return toObject;
|
|
11303
11492
|
}
|
|
11493
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
11494
|
+
const toObject = {};
|
|
11495
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
11496
|
+
'speakerVoiceConfigs',
|
|
11497
|
+
]);
|
|
11498
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
11499
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
11500
|
+
if (Array.isArray(transformedList)) {
|
|
11501
|
+
transformedList = transformedList.map((item) => {
|
|
11502
|
+
return speakerVoiceConfigToVertex(item);
|
|
11503
|
+
});
|
|
11504
|
+
}
|
|
11505
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
11506
|
+
}
|
|
11507
|
+
return toObject;
|
|
11508
|
+
}
|
|
11304
11509
|
function partToMldev$1(fromObject, rootObject) {
|
|
11305
11510
|
const toObject = {};
|
|
11306
11511
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -11367,6 +11572,10 @@ function partToMldev$1(fromObject, rootObject) {
|
|
|
11367
11572
|
if (fromToolResponse != null) {
|
|
11368
11573
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
11369
11574
|
}
|
|
11575
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
11576
|
+
if (fromPartMetadata != null) {
|
|
11577
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
11578
|
+
}
|
|
11370
11579
|
return toObject;
|
|
11371
11580
|
}
|
|
11372
11581
|
function partToVertex(fromObject, _rootObject) {
|
|
@@ -11433,6 +11642,9 @@ function partToVertex(fromObject, _rootObject) {
|
|
|
11433
11642
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
11434
11643
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
11435
11644
|
}
|
|
11645
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
11646
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
11647
|
+
}
|
|
11436
11648
|
return toObject;
|
|
11437
11649
|
}
|
|
11438
11650
|
function productImageToVertex(fromObject, rootObject) {
|
|
@@ -11603,6 +11815,20 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
11603
11815
|
}
|
|
11604
11816
|
return toObject;
|
|
11605
11817
|
}
|
|
11818
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
11819
|
+
const toObject = {};
|
|
11820
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
11821
|
+
if (fromMimeType != null) {
|
|
11822
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
11823
|
+
}
|
|
11824
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
11825
|
+
'voiceSampleAudio',
|
|
11826
|
+
]);
|
|
11827
|
+
if (fromVoiceSampleAudio != null) {
|
|
11828
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
11829
|
+
}
|
|
11830
|
+
return toObject;
|
|
11831
|
+
}
|
|
11606
11832
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
11607
11833
|
const toObject = {};
|
|
11608
11834
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -11752,6 +11978,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
11752
11978
|
}
|
|
11753
11979
|
return toObject;
|
|
11754
11980
|
}
|
|
11981
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
11982
|
+
const toObject = {};
|
|
11983
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
11984
|
+
if (fromSpeaker != null) {
|
|
11985
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
11986
|
+
}
|
|
11987
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
11988
|
+
if (fromVoiceConfig != null) {
|
|
11989
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
11990
|
+
}
|
|
11991
|
+
return toObject;
|
|
11992
|
+
}
|
|
11993
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
11994
|
+
const toObject = {};
|
|
11995
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
11996
|
+
if (fromVoiceConfig != null) {
|
|
11997
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
11998
|
+
}
|
|
11999
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
12000
|
+
if (fromLanguageCode != null) {
|
|
12001
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
12002
|
+
}
|
|
12003
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
12004
|
+
'multiSpeakerVoiceConfig',
|
|
12005
|
+
]);
|
|
12006
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
12007
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
12008
|
+
}
|
|
12009
|
+
return toObject;
|
|
12010
|
+
}
|
|
11755
12011
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
11756
12012
|
const toObject = {};
|
|
11757
12013
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -12234,6 +12490,22 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
12234
12490
|
}
|
|
12235
12491
|
return toObject;
|
|
12236
12492
|
}
|
|
12493
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
12494
|
+
const toObject = {};
|
|
12495
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
12496
|
+
'replicatedVoiceConfig',
|
|
12497
|
+
]);
|
|
12498
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
12499
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
12500
|
+
}
|
|
12501
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
12502
|
+
'prebuiltVoiceConfig',
|
|
12503
|
+
]);
|
|
12504
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
12505
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
12506
|
+
}
|
|
12507
|
+
return toObject;
|
|
12508
|
+
}
|
|
12237
12509
|
|
|
12238
12510
|
/**
|
|
12239
12511
|
* @license
|
|
@@ -12479,7 +12751,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
12479
12751
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
12480
12752
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
12481
12753
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
12482
|
-
const SDK_VERSION = '1.
|
|
12754
|
+
const SDK_VERSION = '1.47.0'; // x-release-please-version
|
|
12483
12755
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
12484
12756
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
12485
12757
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -12539,6 +12811,11 @@ class ApiClient {
|
|
|
12539
12811
|
// Vertex Express or global endpoint case.
|
|
12540
12812
|
initHttpOptions.baseUrl = 'https://aiplatform.googleapis.com/';
|
|
12541
12813
|
}
|
|
12814
|
+
else if (this.clientOptions.project &&
|
|
12815
|
+
this.clientOptions.location &&
|
|
12816
|
+
this.clientOptions.location === 'us') {
|
|
12817
|
+
initHttpOptions.baseUrl = `https://aiplatform.${this.clientOptions.location}.rep.googleapis.com/`;
|
|
12818
|
+
}
|
|
12542
12819
|
else if (this.clientOptions.project && this.clientOptions.location) {
|
|
12543
12820
|
initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;
|
|
12544
12821
|
}
|
|
@@ -16176,6 +16453,10 @@ function partToMldev(fromObject) {
|
|
|
16176
16453
|
if (fromToolResponse != null) {
|
|
16177
16454
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
16178
16455
|
}
|
|
16456
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
16457
|
+
if (fromPartMetadata != null) {
|
|
16458
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
16459
|
+
}
|
|
16179
16460
|
return toObject;
|
|
16180
16461
|
}
|
|
16181
16462
|
function sessionResumptionConfigToMldev(fromObject) {
|
|
@@ -19339,6 +19620,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19339
19620
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
|
|
19340
19621
|
}
|
|
19341
19622
|
}
|
|
19623
|
+
else if (discriminatorTuningMode === 'DISTILLATION') {
|
|
19624
|
+
const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
|
|
19625
|
+
if (parentObject !== undefined && fromTuningMode != null) {
|
|
19626
|
+
setValueByPath(parentObject, ['distillationSpec', 'tuningMode'], fromTuningMode);
|
|
19627
|
+
}
|
|
19628
|
+
}
|
|
19342
19629
|
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
19343
19630
|
'customBaseModel',
|
|
19344
19631
|
]);
|
|
@@ -19358,6 +19645,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19358
19645
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19359
19646
|
}
|
|
19360
19647
|
}
|
|
19648
|
+
else if (discriminatorBatchSize === 'DISTILLATION') {
|
|
19649
|
+
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
19650
|
+
if (parentObject !== undefined && fromBatchSize != null) {
|
|
19651
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19652
|
+
}
|
|
19653
|
+
}
|
|
19361
19654
|
let discriminatorLearningRate = getValueByPath(rootObject, [
|
|
19362
19655
|
'config',
|
|
19363
19656
|
'method',
|
|
@@ -19373,6 +19666,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19373
19666
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19374
19667
|
}
|
|
19375
19668
|
}
|
|
19669
|
+
else if (discriminatorLearningRate === 'DISTILLATION') {
|
|
19670
|
+
const fromLearningRate = getValueByPath(fromObject, [
|
|
19671
|
+
'learningRate',
|
|
19672
|
+
]);
|
|
19673
|
+
if (parentObject !== undefined && fromLearningRate != null) {
|
|
19674
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19675
|
+
}
|
|
19676
|
+
}
|
|
19376
19677
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19377
19678
|
if (parentObject !== undefined && fromLabels != null) {
|
|
19378
19679
|
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
@@ -19876,6 +20177,18 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19876
20177
|
if (fromVeoTuningSpec != null) {
|
|
19877
20178
|
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19878
20179
|
}
|
|
20180
|
+
const fromDistillationSamplingSpec = getValueByPath(fromObject, [
|
|
20181
|
+
'distillationSamplingSpec',
|
|
20182
|
+
]);
|
|
20183
|
+
if (fromDistillationSamplingSpec != null) {
|
|
20184
|
+
setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
|
|
20185
|
+
}
|
|
20186
|
+
const fromTuningJobMetadata = getValueByPath(fromObject, [
|
|
20187
|
+
'tuningJobMetadata',
|
|
20188
|
+
]);
|
|
20189
|
+
if (fromTuningJobMetadata != null) {
|
|
20190
|
+
setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
|
|
20191
|
+
}
|
|
19879
20192
|
return toObject;
|
|
19880
20193
|
}
|
|
19881
20194
|
function tuningOperationFromMldev(fromObject, _rootObject) {
|
|
@@ -20822,5 +21135,5 @@ function getApiKeyFromEnv() {
|
|
|
20822
21135
|
return envGoogleApiKey || envGeminiApiKey || undefined;
|
|
20823
21136
|
}
|
|
20824
21137
|
|
|
20825
|
-
export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
21138
|
+
export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, ModelStage, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, ServiceTier, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
20826
21139
|
//# sourceMappingURL=index.mjs.map
|