@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/web/index.mjs
CHANGED
|
@@ -674,38 +674,18 @@ var Type;
|
|
|
674
674
|
*/
|
|
675
675
|
Type["NULL"] = "NULL";
|
|
676
676
|
})(Type || (Type = {}));
|
|
677
|
-
/**
|
|
678
|
-
var
|
|
679
|
-
(function (
|
|
680
|
-
/**
|
|
681
|
-
* Defaults to unspecified.
|
|
682
|
-
*/
|
|
683
|
-
PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
684
|
-
/**
|
|
685
|
-
* Blocks Low and above confidence URL that is risky.
|
|
686
|
-
*/
|
|
687
|
-
PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
688
|
-
/**
|
|
689
|
-
* Blocks Medium and above confidence URL that is risky.
|
|
690
|
-
*/
|
|
691
|
-
PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
692
|
-
/**
|
|
693
|
-
* Blocks High and above confidence URL that is risky.
|
|
694
|
-
*/
|
|
695
|
-
PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
|
|
696
|
-
/**
|
|
697
|
-
* Blocks Higher and above confidence URL that is risky.
|
|
698
|
-
*/
|
|
699
|
-
PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
|
|
677
|
+
/** The environment being operated. */
|
|
678
|
+
var Environment;
|
|
679
|
+
(function (Environment) {
|
|
700
680
|
/**
|
|
701
|
-
*
|
|
681
|
+
* Defaults to browser.
|
|
702
682
|
*/
|
|
703
|
-
|
|
683
|
+
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
704
684
|
/**
|
|
705
|
-
*
|
|
685
|
+
* Operates in a web browser.
|
|
706
686
|
*/
|
|
707
|
-
|
|
708
|
-
})(
|
|
687
|
+
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
688
|
+
})(Environment || (Environment = {}));
|
|
709
689
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
710
690
|
var AuthType;
|
|
711
691
|
(function (AuthType) {
|
|
@@ -776,6 +756,38 @@ var ApiSpec;
|
|
|
776
756
|
*/
|
|
777
757
|
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
778
758
|
})(ApiSpec || (ApiSpec = {}));
|
|
759
|
+
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
760
|
+
var PhishBlockThreshold;
|
|
761
|
+
(function (PhishBlockThreshold) {
|
|
762
|
+
/**
|
|
763
|
+
* Defaults to unspecified.
|
|
764
|
+
*/
|
|
765
|
+
PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
766
|
+
/**
|
|
767
|
+
* Blocks Low and above confidence URL that is risky.
|
|
768
|
+
*/
|
|
769
|
+
PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
770
|
+
/**
|
|
771
|
+
* Blocks Medium and above confidence URL that is risky.
|
|
772
|
+
*/
|
|
773
|
+
PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
774
|
+
/**
|
|
775
|
+
* Blocks High and above confidence URL that is risky.
|
|
776
|
+
*/
|
|
777
|
+
PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
|
|
778
|
+
/**
|
|
779
|
+
* Blocks Higher and above confidence URL that is risky.
|
|
780
|
+
*/
|
|
781
|
+
PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
|
|
782
|
+
/**
|
|
783
|
+
* Blocks Very high and above confidence URL that is risky.
|
|
784
|
+
*/
|
|
785
|
+
PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
|
|
786
|
+
/**
|
|
787
|
+
* Blocks Extremely high confidence URL that is risky.
|
|
788
|
+
*/
|
|
789
|
+
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
790
|
+
})(PhishBlockThreshold || (PhishBlockThreshold = {}));
|
|
779
791
|
/** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
|
|
780
792
|
var Behavior;
|
|
781
793
|
(function (Behavior) {
|
|
@@ -835,6 +847,10 @@ var ThinkingLevel;
|
|
|
835
847
|
* Unspecified thinking level.
|
|
836
848
|
*/
|
|
837
849
|
ThinkingLevel["THINKING_LEVEL_UNSPECIFIED"] = "THINKING_LEVEL_UNSPECIFIED";
|
|
850
|
+
/**
|
|
851
|
+
* MINIMAL thinking level.
|
|
852
|
+
*/
|
|
853
|
+
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
838
854
|
/**
|
|
839
855
|
* Low thinking level.
|
|
840
856
|
*/
|
|
@@ -847,10 +863,6 @@ var ThinkingLevel;
|
|
|
847
863
|
* High thinking level.
|
|
848
864
|
*/
|
|
849
865
|
ThinkingLevel["HIGH"] = "HIGH";
|
|
850
|
-
/**
|
|
851
|
-
* MINIMAL thinking level.
|
|
852
|
-
*/
|
|
853
|
-
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
854
866
|
})(ThinkingLevel || (ThinkingLevel = {}));
|
|
855
867
|
/** Enum that controls the generation of people. */
|
|
856
868
|
var PersonGeneration;
|
|
@@ -868,6 +880,22 @@ var PersonGeneration;
|
|
|
868
880
|
*/
|
|
869
881
|
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
870
882
|
})(PersonGeneration || (PersonGeneration = {}));
|
|
883
|
+
/** 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. */
|
|
884
|
+
var ProminentPeople;
|
|
885
|
+
(function (ProminentPeople) {
|
|
886
|
+
/**
|
|
887
|
+
* Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
|
|
888
|
+
*/
|
|
889
|
+
ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
|
|
890
|
+
/**
|
|
891
|
+
* Allows the model to generate images of prominent people.
|
|
892
|
+
*/
|
|
893
|
+
ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
|
|
894
|
+
/**
|
|
895
|
+
* Prevents the model from generating images of prominent people.
|
|
896
|
+
*/
|
|
897
|
+
ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
|
|
898
|
+
})(ProminentPeople || (ProminentPeople = {}));
|
|
871
899
|
/** The harm category to be blocked. */
|
|
872
900
|
var HarmCategory;
|
|
873
901
|
(function (HarmCategory) {
|
|
@@ -1186,6 +1214,42 @@ var Modality;
|
|
|
1186
1214
|
*/
|
|
1187
1215
|
Modality["AUDIO"] = "AUDIO";
|
|
1188
1216
|
})(Modality || (Modality = {}));
|
|
1217
|
+
/** The stage of the underlying model. This enum is not supported in Vertex AI. */
|
|
1218
|
+
var ModelStage;
|
|
1219
|
+
(function (ModelStage) {
|
|
1220
|
+
/**
|
|
1221
|
+
* Unspecified model stage.
|
|
1222
|
+
*/
|
|
1223
|
+
ModelStage["MODEL_STAGE_UNSPECIFIED"] = "MODEL_STAGE_UNSPECIFIED";
|
|
1224
|
+
/**
|
|
1225
|
+
* The underlying model is subject to lots of tunings.
|
|
1226
|
+
*/
|
|
1227
|
+
ModelStage["UNSTABLE_EXPERIMENTAL"] = "UNSTABLE_EXPERIMENTAL";
|
|
1228
|
+
/**
|
|
1229
|
+
* Models in this stage are for experimental purposes only.
|
|
1230
|
+
*/
|
|
1231
|
+
ModelStage["EXPERIMENTAL"] = "EXPERIMENTAL";
|
|
1232
|
+
/**
|
|
1233
|
+
* Models in this stage are more mature than experimental models.
|
|
1234
|
+
*/
|
|
1235
|
+
ModelStage["PREVIEW"] = "PREVIEW";
|
|
1236
|
+
/**
|
|
1237
|
+
* Models in this stage are considered stable and ready for production use.
|
|
1238
|
+
*/
|
|
1239
|
+
ModelStage["STABLE"] = "STABLE";
|
|
1240
|
+
/**
|
|
1241
|
+
* 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.
|
|
1242
|
+
*/
|
|
1243
|
+
ModelStage["LEGACY"] = "LEGACY";
|
|
1244
|
+
/**
|
|
1245
|
+
* Models in this stage are deprecated. These models cannot be used.
|
|
1246
|
+
*/
|
|
1247
|
+
ModelStage["DEPRECATED"] = "DEPRECATED";
|
|
1248
|
+
/**
|
|
1249
|
+
* Models in this stage are retired. These models cannot be used.
|
|
1250
|
+
*/
|
|
1251
|
+
ModelStage["RETIRED"] = "RETIRED";
|
|
1252
|
+
})(ModelStage || (ModelStage = {}));
|
|
1189
1253
|
/** The media resolution to use. */
|
|
1190
1254
|
var MediaResolution;
|
|
1191
1255
|
(function (MediaResolution) {
|
|
@@ -1422,6 +1486,26 @@ var TuningTask;
|
|
|
1422
1486
|
*/
|
|
1423
1487
|
TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
|
|
1424
1488
|
})(TuningTask || (TuningTask = {}));
|
|
1489
|
+
/** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
|
|
1490
|
+
var DocumentState;
|
|
1491
|
+
(function (DocumentState) {
|
|
1492
|
+
/**
|
|
1493
|
+
* The default value. This value is used if the state is omitted.
|
|
1494
|
+
*/
|
|
1495
|
+
DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
|
|
1496
|
+
/**
|
|
1497
|
+
* Some `Chunks` of the `Document` are being processed (embedding and vector storage).
|
|
1498
|
+
*/
|
|
1499
|
+
DocumentState["STATE_PENDING"] = "STATE_PENDING";
|
|
1500
|
+
/**
|
|
1501
|
+
* All `Chunks` of the `Document` is processed and available for querying.
|
|
1502
|
+
*/
|
|
1503
|
+
DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
|
|
1504
|
+
/**
|
|
1505
|
+
* Some `Chunks` of the `Document` failed processing.
|
|
1506
|
+
*/
|
|
1507
|
+
DocumentState["STATE_FAILED"] = "STATE_FAILED";
|
|
1508
|
+
})(DocumentState || (DocumentState = {}));
|
|
1425
1509
|
/** The tokenization quality used for given media. */
|
|
1426
1510
|
var PartMediaResolutionLevel;
|
|
1427
1511
|
(function (PartMediaResolutionLevel) {
|
|
@@ -1486,42 +1570,34 @@ var ResourceScope;
|
|
|
1486
1570
|
*/
|
|
1487
1571
|
ResourceScope["COLLECTION"] = "COLLECTION";
|
|
1488
1572
|
})(ResourceScope || (ResourceScope = {}));
|
|
1489
|
-
/**
|
|
1490
|
-
var
|
|
1491
|
-
(function (
|
|
1492
|
-
FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
|
|
1493
|
-
FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
|
|
1494
|
-
FeatureSelectionPreference["BALANCED"] = "BALANCED";
|
|
1495
|
-
FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
|
|
1496
|
-
})(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
|
|
1497
|
-
/** The environment being operated. */
|
|
1498
|
-
var Environment;
|
|
1499
|
-
(function (Environment) {
|
|
1573
|
+
/** Pricing and performance service tier. */
|
|
1574
|
+
var ServiceTier;
|
|
1575
|
+
(function (ServiceTier) {
|
|
1500
1576
|
/**
|
|
1501
|
-
*
|
|
1577
|
+
* Default service tier, which is standard.
|
|
1502
1578
|
*/
|
|
1503
|
-
|
|
1579
|
+
ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
|
|
1504
1580
|
/**
|
|
1505
|
-
*
|
|
1581
|
+
* Flex service tier.
|
|
1506
1582
|
*/
|
|
1507
|
-
|
|
1508
|
-
})(Environment || (Environment = {}));
|
|
1509
|
-
/** Enum for controlling whether the model can generate images of prominent people (celebrities). */
|
|
1510
|
-
var ProminentPeople;
|
|
1511
|
-
(function (ProminentPeople) {
|
|
1583
|
+
ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
|
|
1512
1584
|
/**
|
|
1513
|
-
*
|
|
1585
|
+
* Standard service tier.
|
|
1514
1586
|
*/
|
|
1515
|
-
|
|
1587
|
+
ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
|
|
1516
1588
|
/**
|
|
1517
|
-
*
|
|
1589
|
+
* Priority service tier.
|
|
1518
1590
|
*/
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1591
|
+
ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
|
|
1592
|
+
})(ServiceTier || (ServiceTier = {}));
|
|
1593
|
+
/** Options for feature selection preference. */
|
|
1594
|
+
var FeatureSelectionPreference;
|
|
1595
|
+
(function (FeatureSelectionPreference) {
|
|
1596
|
+
FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
|
|
1597
|
+
FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
|
|
1598
|
+
FeatureSelectionPreference["BALANCED"] = "BALANCED";
|
|
1599
|
+
FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
|
|
1600
|
+
})(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
|
|
1525
1601
|
/** Enum representing the Vertex embedding API to use. */
|
|
1526
1602
|
var EmbeddingApiType;
|
|
1527
1603
|
(function (EmbeddingApiType) {
|
|
@@ -1696,14 +1772,6 @@ var TuningMethod;
|
|
|
1696
1772
|
*/
|
|
1697
1773
|
TuningMethod["DISTILLATION"] = "DISTILLATION";
|
|
1698
1774
|
})(TuningMethod || (TuningMethod = {}));
|
|
1699
|
-
/** State for the lifecycle of a Document. */
|
|
1700
|
-
var DocumentState;
|
|
1701
|
-
(function (DocumentState) {
|
|
1702
|
-
DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
|
|
1703
|
-
DocumentState["STATE_PENDING"] = "STATE_PENDING";
|
|
1704
|
-
DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
|
|
1705
|
-
DocumentState["STATE_FAILED"] = "STATE_FAILED";
|
|
1706
|
-
})(DocumentState || (DocumentState = {}));
|
|
1707
1775
|
/** State for the lifecycle of a File. */
|
|
1708
1776
|
var FileState;
|
|
1709
1777
|
(function (FileState) {
|
|
@@ -1863,6 +1931,10 @@ var TurnCoverage;
|
|
|
1863
1931
|
* The users turn includes all realtime input since the last turn, including inactivity (e.g. silence on the audio stream).
|
|
1864
1932
|
*/
|
|
1865
1933
|
TurnCoverage["TURN_INCLUDES_ALL_INPUT"] = "TURN_INCLUDES_ALL_INPUT";
|
|
1934
|
+
/**
|
|
1935
|
+
* Includes audio activity and all video since the last turn. With automatic activity detection, audio activity means speech and excludes silence.
|
|
1936
|
+
*/
|
|
1937
|
+
TurnCoverage["TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO"] = "TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO";
|
|
1866
1938
|
})(TurnCoverage || (TurnCoverage = {}));
|
|
1867
1939
|
/** Scale of the generated music. */
|
|
1868
1940
|
var Scale;
|
|
@@ -2432,7 +2504,6 @@ class GenerateVideosResponse {
|
|
|
2432
2504
|
class GenerateVideosOperation {
|
|
2433
2505
|
/**
|
|
2434
2506
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2435
|
-
* @internal
|
|
2436
2507
|
*/
|
|
2437
2508
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2438
2509
|
const operation = new GenerateVideosOperation();
|
|
@@ -2478,7 +2549,6 @@ class ImportFileResponse {
|
|
|
2478
2549
|
class ImportFileOperation {
|
|
2479
2550
|
/**
|
|
2480
2551
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2481
|
-
* @internal
|
|
2482
2552
|
*/
|
|
2483
2553
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2484
2554
|
const operation = new ImportFileOperation();
|
|
@@ -2733,7 +2803,6 @@ class UploadToFileSearchStoreResponse {
|
|
|
2733
2803
|
class UploadToFileSearchStoreOperation {
|
|
2734
2804
|
/**
|
|
2735
2805
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2736
|
-
* @internal
|
|
2737
2806
|
*/
|
|
2738
2807
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2739
2808
|
const operation = new UploadToFileSearchStoreOperation();
|
|
@@ -4386,6 +4455,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4386
4455
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
4387
4456
|
throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
|
|
4388
4457
|
}
|
|
4458
|
+
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
4459
|
+
if (parentObject !== undefined && fromServiceTier != null) {
|
|
4460
|
+
setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
|
|
4461
|
+
}
|
|
4389
4462
|
return toObject;
|
|
4390
4463
|
}
|
|
4391
4464
|
function generateContentResponseFromMldev$1(fromObject) {
|
|
@@ -4426,6 +4499,10 @@ function generateContentResponseFromMldev$1(fromObject) {
|
|
|
4426
4499
|
if (fromUsageMetadata != null) {
|
|
4427
4500
|
setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
|
|
4428
4501
|
}
|
|
4502
|
+
const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
|
|
4503
|
+
if (fromModelStatus != null) {
|
|
4504
|
+
setValueByPath(toObject, ['modelStatus'], fromModelStatus);
|
|
4505
|
+
}
|
|
4429
4506
|
return toObject;
|
|
4430
4507
|
}
|
|
4431
4508
|
function getBatchJobParametersToMldev(apiClient, fromObject) {
|
|
@@ -4713,6 +4790,10 @@ function partToMldev$4(fromObject) {
|
|
|
4713
4790
|
if (fromToolResponse != null) {
|
|
4714
4791
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
4715
4792
|
}
|
|
4793
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
4794
|
+
if (fromPartMetadata != null) {
|
|
4795
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
4796
|
+
}
|
|
4716
4797
|
return toObject;
|
|
4717
4798
|
}
|
|
4718
4799
|
function safetySettingToMldev$1(fromObject) {
|
|
@@ -6047,6 +6128,10 @@ function partToMldev$3(fromObject) {
|
|
|
6047
6128
|
if (fromToolResponse != null) {
|
|
6048
6129
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
6049
6130
|
}
|
|
6131
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
6132
|
+
if (fromPartMetadata != null) {
|
|
6133
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
6134
|
+
}
|
|
6050
6135
|
return toObject;
|
|
6051
6136
|
}
|
|
6052
6137
|
function partToVertex$2(fromObject) {
|
|
@@ -6113,6 +6198,9 @@ function partToVertex$2(fromObject) {
|
|
|
6113
6198
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
6114
6199
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
6115
6200
|
}
|
|
6201
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
6202
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
6203
|
+
}
|
|
6116
6204
|
return toObject;
|
|
6117
6205
|
}
|
|
6118
6206
|
function toolConfigToMldev$1(fromObject) {
|
|
@@ -7826,7 +7914,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
7826
7914
|
}
|
|
7827
7915
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
7828
7916
|
if (fromSpeechConfig != null) {
|
|
7829
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
7917
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
|
|
7830
7918
|
}
|
|
7831
7919
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
7832
7920
|
'stopSequences',
|
|
@@ -8047,7 +8135,7 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
8047
8135
|
}
|
|
8048
8136
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8049
8137
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8050
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
|
|
8138
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8051
8139
|
}
|
|
8052
8140
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8053
8141
|
'thinkingConfig',
|
|
@@ -8307,6 +8395,22 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
8307
8395
|
}
|
|
8308
8396
|
return toObject;
|
|
8309
8397
|
}
|
|
8398
|
+
function multiSpeakerVoiceConfigToVertex$1(fromObject) {
|
|
8399
|
+
const toObject = {};
|
|
8400
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
8401
|
+
'speakerVoiceConfigs',
|
|
8402
|
+
]);
|
|
8403
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
8404
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
8405
|
+
if (Array.isArray(transformedList)) {
|
|
8406
|
+
transformedList = transformedList.map((item) => {
|
|
8407
|
+
return speakerVoiceConfigToVertex$1(item);
|
|
8408
|
+
});
|
|
8409
|
+
}
|
|
8410
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
8411
|
+
}
|
|
8412
|
+
return toObject;
|
|
8413
|
+
}
|
|
8310
8414
|
function partToMldev$2(fromObject) {
|
|
8311
8415
|
const toObject = {};
|
|
8312
8416
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -8373,6 +8477,10 @@ function partToMldev$2(fromObject) {
|
|
|
8373
8477
|
if (fromToolResponse != null) {
|
|
8374
8478
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
8375
8479
|
}
|
|
8480
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
8481
|
+
if (fromPartMetadata != null) {
|
|
8482
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
8483
|
+
}
|
|
8376
8484
|
return toObject;
|
|
8377
8485
|
}
|
|
8378
8486
|
function partToVertex$1(fromObject) {
|
|
@@ -8439,6 +8547,23 @@ function partToVertex$1(fromObject) {
|
|
|
8439
8547
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
8440
8548
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
8441
8549
|
}
|
|
8550
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
8551
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
8552
|
+
}
|
|
8553
|
+
return toObject;
|
|
8554
|
+
}
|
|
8555
|
+
function replicatedVoiceConfigToVertex$1(fromObject) {
|
|
8556
|
+
const toObject = {};
|
|
8557
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8558
|
+
if (fromMimeType != null) {
|
|
8559
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8560
|
+
}
|
|
8561
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
8562
|
+
'voiceSampleAudio',
|
|
8563
|
+
]);
|
|
8564
|
+
if (fromVoiceSampleAudio != null) {
|
|
8565
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
8566
|
+
}
|
|
8442
8567
|
return toObject;
|
|
8443
8568
|
}
|
|
8444
8569
|
function sessionResumptionConfigToMldev$1(fromObject) {
|
|
@@ -8452,6 +8577,36 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
8452
8577
|
}
|
|
8453
8578
|
return toObject;
|
|
8454
8579
|
}
|
|
8580
|
+
function speakerVoiceConfigToVertex$1(fromObject) {
|
|
8581
|
+
const toObject = {};
|
|
8582
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
8583
|
+
if (fromSpeaker != null) {
|
|
8584
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
8585
|
+
}
|
|
8586
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
8587
|
+
if (fromVoiceConfig != null) {
|
|
8588
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
8589
|
+
}
|
|
8590
|
+
return toObject;
|
|
8591
|
+
}
|
|
8592
|
+
function speechConfigToVertex$1(fromObject) {
|
|
8593
|
+
const toObject = {};
|
|
8594
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
8595
|
+
if (fromVoiceConfig != null) {
|
|
8596
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
8597
|
+
}
|
|
8598
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
8599
|
+
if (fromLanguageCode != null) {
|
|
8600
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8601
|
+
}
|
|
8602
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
8603
|
+
'multiSpeakerVoiceConfig',
|
|
8604
|
+
]);
|
|
8605
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
8606
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
|
|
8607
|
+
}
|
|
8608
|
+
return toObject;
|
|
8609
|
+
}
|
|
8455
8610
|
function toolToMldev$2(fromObject) {
|
|
8456
8611
|
const toObject = {};
|
|
8457
8612
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
@@ -8685,6 +8840,22 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
8685
8840
|
}
|
|
8686
8841
|
return toObject;
|
|
8687
8842
|
}
|
|
8843
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
8844
|
+
const toObject = {};
|
|
8845
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
8846
|
+
'replicatedVoiceConfig',
|
|
8847
|
+
]);
|
|
8848
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
8849
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
|
|
8850
|
+
}
|
|
8851
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
8852
|
+
'prebuiltVoiceConfig',
|
|
8853
|
+
]);
|
|
8854
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
8855
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
8856
|
+
}
|
|
8857
|
+
return toObject;
|
|
8858
|
+
}
|
|
8688
8859
|
|
|
8689
8860
|
/**
|
|
8690
8861
|
* @license
|
|
@@ -9738,6 +9909,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
9738
9909
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
9739
9910
|
throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
|
|
9740
9911
|
}
|
|
9912
|
+
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
9913
|
+
if (parentObject !== undefined && fromServiceTier != null) {
|
|
9914
|
+
setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
|
|
9915
|
+
}
|
|
9741
9916
|
return toObject;
|
|
9742
9917
|
}
|
|
9743
9918
|
function generateContentConfigToVertex(apiClient, fromObject, parentObject, rootObject) {
|
|
@@ -9884,7 +10059,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
9884
10059
|
}
|
|
9885
10060
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
9886
10061
|
if (fromSpeechConfig != null) {
|
|
9887
|
-
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
10062
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
|
|
9888
10063
|
}
|
|
9889
10064
|
const fromAudioTimestamp = getValueByPath(fromObject, [
|
|
9890
10065
|
'audioTimestamp',
|
|
@@ -9912,6 +10087,9 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
9912
10087
|
if (parentObject !== undefined && fromModelArmorConfig != null) {
|
|
9913
10088
|
setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
|
|
9914
10089
|
}
|
|
10090
|
+
if (getValueByPath(fromObject, ['serviceTier']) !== undefined) {
|
|
10091
|
+
throw new Error('serviceTier parameter is not supported in Vertex AI.');
|
|
10092
|
+
}
|
|
9915
10093
|
return toObject;
|
|
9916
10094
|
}
|
|
9917
10095
|
function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
@@ -9996,6 +10174,10 @@ function generateContentResponseFromMldev(fromObject, rootObject) {
|
|
|
9996
10174
|
if (fromUsageMetadata != null) {
|
|
9997
10175
|
setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
|
|
9998
10176
|
}
|
|
10177
|
+
const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
|
|
10178
|
+
if (fromModelStatus != null) {
|
|
10179
|
+
setValueByPath(toObject, ['modelStatus'], fromModelStatus);
|
|
10180
|
+
}
|
|
9999
10181
|
return toObject;
|
|
10000
10182
|
}
|
|
10001
10183
|
function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
@@ -10381,6 +10563,9 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
10381
10563
|
if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
|
|
10382
10564
|
throw new Error('compressionQuality parameter is not supported in Gemini API.');
|
|
10383
10565
|
}
|
|
10566
|
+
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
10567
|
+
throw new Error('labels parameter is not supported in Gemini API.');
|
|
10568
|
+
}
|
|
10384
10569
|
return toObject;
|
|
10385
10570
|
}
|
|
10386
10571
|
function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
@@ -10471,6 +10656,10 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
10471
10656
|
if (parentObject !== undefined && fromCompressionQuality != null) {
|
|
10472
10657
|
setValueByPath(parentObject, ['parameters', 'compressionQuality'], fromCompressionQuality);
|
|
10473
10658
|
}
|
|
10659
|
+
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
10660
|
+
if (parentObject !== undefined && fromLabels != null) {
|
|
10661
|
+
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
10662
|
+
}
|
|
10474
10663
|
return toObject;
|
|
10475
10664
|
}
|
|
10476
10665
|
function generateVideosOperationFromMldev(fromObject, rootObject) {
|
|
@@ -10740,7 +10929,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
10740
10929
|
}
|
|
10741
10930
|
return toObject;
|
|
10742
10931
|
}
|
|
10743
|
-
function generationConfigToVertex(fromObject,
|
|
10932
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
10744
10933
|
const toObject = {};
|
|
10745
10934
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
10746
10935
|
'modelSelectionConfig',
|
|
@@ -10836,7 +11025,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
10836
11025
|
}
|
|
10837
11026
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
10838
11027
|
if (fromSpeechConfig != null) {
|
|
10839
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
11028
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
10840
11029
|
}
|
|
10841
11030
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
10842
11031
|
'stopSequences',
|
|
@@ -11293,6 +11482,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
11293
11482
|
}
|
|
11294
11483
|
return toObject;
|
|
11295
11484
|
}
|
|
11485
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
11486
|
+
const toObject = {};
|
|
11487
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
11488
|
+
'speakerVoiceConfigs',
|
|
11489
|
+
]);
|
|
11490
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
11491
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
11492
|
+
if (Array.isArray(transformedList)) {
|
|
11493
|
+
transformedList = transformedList.map((item) => {
|
|
11494
|
+
return speakerVoiceConfigToVertex(item);
|
|
11495
|
+
});
|
|
11496
|
+
}
|
|
11497
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
11498
|
+
}
|
|
11499
|
+
return toObject;
|
|
11500
|
+
}
|
|
11296
11501
|
function partToMldev$1(fromObject, rootObject) {
|
|
11297
11502
|
const toObject = {};
|
|
11298
11503
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -11359,6 +11564,10 @@ function partToMldev$1(fromObject, rootObject) {
|
|
|
11359
11564
|
if (fromToolResponse != null) {
|
|
11360
11565
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
11361
11566
|
}
|
|
11567
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
11568
|
+
if (fromPartMetadata != null) {
|
|
11569
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
11570
|
+
}
|
|
11362
11571
|
return toObject;
|
|
11363
11572
|
}
|
|
11364
11573
|
function partToVertex(fromObject, _rootObject) {
|
|
@@ -11425,6 +11634,9 @@ function partToVertex(fromObject, _rootObject) {
|
|
|
11425
11634
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
11426
11635
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
11427
11636
|
}
|
|
11637
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
11638
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
11639
|
+
}
|
|
11428
11640
|
return toObject;
|
|
11429
11641
|
}
|
|
11430
11642
|
function productImageToVertex(fromObject, rootObject) {
|
|
@@ -11595,6 +11807,20 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
11595
11807
|
}
|
|
11596
11808
|
return toObject;
|
|
11597
11809
|
}
|
|
11810
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
11811
|
+
const toObject = {};
|
|
11812
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
11813
|
+
if (fromMimeType != null) {
|
|
11814
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
11815
|
+
}
|
|
11816
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
11817
|
+
'voiceSampleAudio',
|
|
11818
|
+
]);
|
|
11819
|
+
if (fromVoiceSampleAudio != null) {
|
|
11820
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
11821
|
+
}
|
|
11822
|
+
return toObject;
|
|
11823
|
+
}
|
|
11598
11824
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
11599
11825
|
const toObject = {};
|
|
11600
11826
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -11744,6 +11970,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
11744
11970
|
}
|
|
11745
11971
|
return toObject;
|
|
11746
11972
|
}
|
|
11973
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
11974
|
+
const toObject = {};
|
|
11975
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
11976
|
+
if (fromSpeaker != null) {
|
|
11977
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
11978
|
+
}
|
|
11979
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
11980
|
+
if (fromVoiceConfig != null) {
|
|
11981
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
11982
|
+
}
|
|
11983
|
+
return toObject;
|
|
11984
|
+
}
|
|
11985
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
11986
|
+
const toObject = {};
|
|
11987
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
11988
|
+
if (fromVoiceConfig != null) {
|
|
11989
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
11990
|
+
}
|
|
11991
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
11992
|
+
if (fromLanguageCode != null) {
|
|
11993
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
11994
|
+
}
|
|
11995
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
11996
|
+
'multiSpeakerVoiceConfig',
|
|
11997
|
+
]);
|
|
11998
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
11999
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
12000
|
+
}
|
|
12001
|
+
return toObject;
|
|
12002
|
+
}
|
|
11747
12003
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
11748
12004
|
const toObject = {};
|
|
11749
12005
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -12226,6 +12482,22 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
12226
12482
|
}
|
|
12227
12483
|
return toObject;
|
|
12228
12484
|
}
|
|
12485
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
12486
|
+
const toObject = {};
|
|
12487
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
12488
|
+
'replicatedVoiceConfig',
|
|
12489
|
+
]);
|
|
12490
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
12491
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
12492
|
+
}
|
|
12493
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
12494
|
+
'prebuiltVoiceConfig',
|
|
12495
|
+
]);
|
|
12496
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
12497
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
12498
|
+
}
|
|
12499
|
+
return toObject;
|
|
12500
|
+
}
|
|
12229
12501
|
|
|
12230
12502
|
/**
|
|
12231
12503
|
* @license
|
|
@@ -12471,7 +12743,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
12471
12743
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
12472
12744
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
12473
12745
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
12474
|
-
const SDK_VERSION = '1.
|
|
12746
|
+
const SDK_VERSION = '1.47.0'; // x-release-please-version
|
|
12475
12747
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
12476
12748
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
12477
12749
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -12531,6 +12803,11 @@ class ApiClient {
|
|
|
12531
12803
|
// Vertex Express or global endpoint case.
|
|
12532
12804
|
initHttpOptions.baseUrl = 'https://aiplatform.googleapis.com/';
|
|
12533
12805
|
}
|
|
12806
|
+
else if (this.clientOptions.project &&
|
|
12807
|
+
this.clientOptions.location &&
|
|
12808
|
+
this.clientOptions.location === 'us') {
|
|
12809
|
+
initHttpOptions.baseUrl = `https://aiplatform.${this.clientOptions.location}.rep.googleapis.com/`;
|
|
12810
|
+
}
|
|
12534
12811
|
else if (this.clientOptions.project && this.clientOptions.location) {
|
|
12535
12812
|
initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;
|
|
12536
12813
|
}
|
|
@@ -16168,6 +16445,10 @@ function partToMldev(fromObject) {
|
|
|
16168
16445
|
if (fromToolResponse != null) {
|
|
16169
16446
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
16170
16447
|
}
|
|
16448
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
16449
|
+
if (fromPartMetadata != null) {
|
|
16450
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
16451
|
+
}
|
|
16171
16452
|
return toObject;
|
|
16172
16453
|
}
|
|
16173
16454
|
function sessionResumptionConfigToMldev(fromObject) {
|
|
@@ -19152,6 +19433,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19152
19433
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
|
|
19153
19434
|
}
|
|
19154
19435
|
}
|
|
19436
|
+
else if (discriminatorTuningMode === 'DISTILLATION') {
|
|
19437
|
+
const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
|
|
19438
|
+
if (parentObject !== undefined && fromTuningMode != null) {
|
|
19439
|
+
setValueByPath(parentObject, ['distillationSpec', 'tuningMode'], fromTuningMode);
|
|
19440
|
+
}
|
|
19441
|
+
}
|
|
19155
19442
|
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
19156
19443
|
'customBaseModel',
|
|
19157
19444
|
]);
|
|
@@ -19171,6 +19458,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19171
19458
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19172
19459
|
}
|
|
19173
19460
|
}
|
|
19461
|
+
else if (discriminatorBatchSize === 'DISTILLATION') {
|
|
19462
|
+
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
19463
|
+
if (parentObject !== undefined && fromBatchSize != null) {
|
|
19464
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19465
|
+
}
|
|
19466
|
+
}
|
|
19174
19467
|
let discriminatorLearningRate = getValueByPath(rootObject, [
|
|
19175
19468
|
'config',
|
|
19176
19469
|
'method',
|
|
@@ -19186,6 +19479,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19186
19479
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19187
19480
|
}
|
|
19188
19481
|
}
|
|
19482
|
+
else if (discriminatorLearningRate === 'DISTILLATION') {
|
|
19483
|
+
const fromLearningRate = getValueByPath(fromObject, [
|
|
19484
|
+
'learningRate',
|
|
19485
|
+
]);
|
|
19486
|
+
if (parentObject !== undefined && fromLearningRate != null) {
|
|
19487
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19488
|
+
}
|
|
19489
|
+
}
|
|
19189
19490
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19190
19491
|
if (parentObject !== undefined && fromLabels != null) {
|
|
19191
19492
|
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
@@ -19689,6 +19990,18 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19689
19990
|
if (fromVeoTuningSpec != null) {
|
|
19690
19991
|
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19691
19992
|
}
|
|
19993
|
+
const fromDistillationSamplingSpec = getValueByPath(fromObject, [
|
|
19994
|
+
'distillationSamplingSpec',
|
|
19995
|
+
]);
|
|
19996
|
+
if (fromDistillationSamplingSpec != null) {
|
|
19997
|
+
setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
|
|
19998
|
+
}
|
|
19999
|
+
const fromTuningJobMetadata = getValueByPath(fromObject, [
|
|
20000
|
+
'tuningJobMetadata',
|
|
20001
|
+
]);
|
|
20002
|
+
if (fromTuningJobMetadata != null) {
|
|
20003
|
+
setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
|
|
20004
|
+
}
|
|
19692
20005
|
return toObject;
|
|
19693
20006
|
}
|
|
19694
20007
|
function tuningOperationFromMldev(fromObject, _rootObject) {
|
|
@@ -20407,5 +20720,5 @@ class GoogleGenAI {
|
|
|
20407
20720
|
}
|
|
20408
20721
|
}
|
|
20409
20722
|
|
|
20410
|
-
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 };
|
|
20723
|
+
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 };
|
|
20411
20724
|
//# sourceMappingURL=index.mjs.map
|