@google/genai 1.46.0 → 1.48.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 +430 -247
- package/dist/index.cjs +391 -77
- package/dist/index.mjs +392 -78
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +391 -77
- package/dist/node/index.mjs +392 -78
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +430 -247
- 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 +392 -78
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +430 -247
- 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["UNSPECIFIED"] = "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["FLEX"] = "flex";
|
|
1512
1584
|
/**
|
|
1513
|
-
*
|
|
1585
|
+
* Standard service tier.
|
|
1514
1586
|
*/
|
|
1515
|
-
|
|
1587
|
+
ServiceTier["STANDARD"] = "standard";
|
|
1516
1588
|
/**
|
|
1517
|
-
*
|
|
1589
|
+
* Priority service tier.
|
|
1518
1590
|
*/
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1591
|
+
ServiceTier["PRIORITY"] = "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,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
9912
10087
|
if (parentObject !== undefined && fromModelArmorConfig != null) {
|
|
9913
10088
|
setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
|
|
9914
10089
|
}
|
|
10090
|
+
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
10091
|
+
if (parentObject !== undefined && fromServiceTier != null) {
|
|
10092
|
+
setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
|
|
10093
|
+
}
|
|
9915
10094
|
return toObject;
|
|
9916
10095
|
}
|
|
9917
10096
|
function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
@@ -9996,6 +10175,10 @@ function generateContentResponseFromMldev(fromObject, rootObject) {
|
|
|
9996
10175
|
if (fromUsageMetadata != null) {
|
|
9997
10176
|
setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
|
|
9998
10177
|
}
|
|
10178
|
+
const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
|
|
10179
|
+
if (fromModelStatus != null) {
|
|
10180
|
+
setValueByPath(toObject, ['modelStatus'], fromModelStatus);
|
|
10181
|
+
}
|
|
9999
10182
|
return toObject;
|
|
10000
10183
|
}
|
|
10001
10184
|
function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
@@ -10381,6 +10564,9 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
10381
10564
|
if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
|
|
10382
10565
|
throw new Error('compressionQuality parameter is not supported in Gemini API.');
|
|
10383
10566
|
}
|
|
10567
|
+
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
10568
|
+
throw new Error('labels parameter is not supported in Gemini API.');
|
|
10569
|
+
}
|
|
10384
10570
|
return toObject;
|
|
10385
10571
|
}
|
|
10386
10572
|
function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
@@ -10471,6 +10657,10 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
10471
10657
|
if (parentObject !== undefined && fromCompressionQuality != null) {
|
|
10472
10658
|
setValueByPath(parentObject, ['parameters', 'compressionQuality'], fromCompressionQuality);
|
|
10473
10659
|
}
|
|
10660
|
+
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
10661
|
+
if (parentObject !== undefined && fromLabels != null) {
|
|
10662
|
+
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
10663
|
+
}
|
|
10474
10664
|
return toObject;
|
|
10475
10665
|
}
|
|
10476
10666
|
function generateVideosOperationFromMldev(fromObject, rootObject) {
|
|
@@ -10740,7 +10930,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
10740
10930
|
}
|
|
10741
10931
|
return toObject;
|
|
10742
10932
|
}
|
|
10743
|
-
function generationConfigToVertex(fromObject,
|
|
10933
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
10744
10934
|
const toObject = {};
|
|
10745
10935
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
10746
10936
|
'modelSelectionConfig',
|
|
@@ -10836,7 +11026,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
10836
11026
|
}
|
|
10837
11027
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
10838
11028
|
if (fromSpeechConfig != null) {
|
|
10839
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
11029
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
10840
11030
|
}
|
|
10841
11031
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
10842
11032
|
'stopSequences',
|
|
@@ -11293,6 +11483,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
11293
11483
|
}
|
|
11294
11484
|
return toObject;
|
|
11295
11485
|
}
|
|
11486
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
11487
|
+
const toObject = {};
|
|
11488
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
11489
|
+
'speakerVoiceConfigs',
|
|
11490
|
+
]);
|
|
11491
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
11492
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
11493
|
+
if (Array.isArray(transformedList)) {
|
|
11494
|
+
transformedList = transformedList.map((item) => {
|
|
11495
|
+
return speakerVoiceConfigToVertex(item);
|
|
11496
|
+
});
|
|
11497
|
+
}
|
|
11498
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
11499
|
+
}
|
|
11500
|
+
return toObject;
|
|
11501
|
+
}
|
|
11296
11502
|
function partToMldev$1(fromObject, rootObject) {
|
|
11297
11503
|
const toObject = {};
|
|
11298
11504
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -11359,6 +11565,10 @@ function partToMldev$1(fromObject, rootObject) {
|
|
|
11359
11565
|
if (fromToolResponse != null) {
|
|
11360
11566
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
11361
11567
|
}
|
|
11568
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
11569
|
+
if (fromPartMetadata != null) {
|
|
11570
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
11571
|
+
}
|
|
11362
11572
|
return toObject;
|
|
11363
11573
|
}
|
|
11364
11574
|
function partToVertex(fromObject, _rootObject) {
|
|
@@ -11425,6 +11635,9 @@ function partToVertex(fromObject, _rootObject) {
|
|
|
11425
11635
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
11426
11636
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
11427
11637
|
}
|
|
11638
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
11639
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
11640
|
+
}
|
|
11428
11641
|
return toObject;
|
|
11429
11642
|
}
|
|
11430
11643
|
function productImageToVertex(fromObject, rootObject) {
|
|
@@ -11595,6 +11808,20 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
11595
11808
|
}
|
|
11596
11809
|
return toObject;
|
|
11597
11810
|
}
|
|
11811
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
11812
|
+
const toObject = {};
|
|
11813
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
11814
|
+
if (fromMimeType != null) {
|
|
11815
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
11816
|
+
}
|
|
11817
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
11818
|
+
'voiceSampleAudio',
|
|
11819
|
+
]);
|
|
11820
|
+
if (fromVoiceSampleAudio != null) {
|
|
11821
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
11822
|
+
}
|
|
11823
|
+
return toObject;
|
|
11824
|
+
}
|
|
11598
11825
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
11599
11826
|
const toObject = {};
|
|
11600
11827
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -11744,6 +11971,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
11744
11971
|
}
|
|
11745
11972
|
return toObject;
|
|
11746
11973
|
}
|
|
11974
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
11975
|
+
const toObject = {};
|
|
11976
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
11977
|
+
if (fromSpeaker != null) {
|
|
11978
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
11979
|
+
}
|
|
11980
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
11981
|
+
if (fromVoiceConfig != null) {
|
|
11982
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
11983
|
+
}
|
|
11984
|
+
return toObject;
|
|
11985
|
+
}
|
|
11986
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
11987
|
+
const toObject = {};
|
|
11988
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
11989
|
+
if (fromVoiceConfig != null) {
|
|
11990
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
11991
|
+
}
|
|
11992
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
11993
|
+
if (fromLanguageCode != null) {
|
|
11994
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
11995
|
+
}
|
|
11996
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
11997
|
+
'multiSpeakerVoiceConfig',
|
|
11998
|
+
]);
|
|
11999
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
12000
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
12001
|
+
}
|
|
12002
|
+
return toObject;
|
|
12003
|
+
}
|
|
11747
12004
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
11748
12005
|
const toObject = {};
|
|
11749
12006
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -12226,6 +12483,22 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
12226
12483
|
}
|
|
12227
12484
|
return toObject;
|
|
12228
12485
|
}
|
|
12486
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
12487
|
+
const toObject = {};
|
|
12488
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
12489
|
+
'replicatedVoiceConfig',
|
|
12490
|
+
]);
|
|
12491
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
12492
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
12493
|
+
}
|
|
12494
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
12495
|
+
'prebuiltVoiceConfig',
|
|
12496
|
+
]);
|
|
12497
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
12498
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
12499
|
+
}
|
|
12500
|
+
return toObject;
|
|
12501
|
+
}
|
|
12229
12502
|
|
|
12230
12503
|
/**
|
|
12231
12504
|
* @license
|
|
@@ -12471,7 +12744,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
12471
12744
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
12472
12745
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
12473
12746
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
12474
|
-
const SDK_VERSION = '1.
|
|
12747
|
+
const SDK_VERSION = '1.48.0'; // x-release-please-version
|
|
12475
12748
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
12476
12749
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
12477
12750
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -12531,6 +12804,11 @@ class ApiClient {
|
|
|
12531
12804
|
// Vertex Express or global endpoint case.
|
|
12532
12805
|
initHttpOptions.baseUrl = 'https://aiplatform.googleapis.com/';
|
|
12533
12806
|
}
|
|
12807
|
+
else if (this.clientOptions.project &&
|
|
12808
|
+
this.clientOptions.location &&
|
|
12809
|
+
this.clientOptions.location === 'us') {
|
|
12810
|
+
initHttpOptions.baseUrl = `https://aiplatform.${this.clientOptions.location}.rep.googleapis.com/`;
|
|
12811
|
+
}
|
|
12534
12812
|
else if (this.clientOptions.project && this.clientOptions.location) {
|
|
12535
12813
|
initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;
|
|
12536
12814
|
}
|
|
@@ -16168,6 +16446,10 @@ function partToMldev(fromObject) {
|
|
|
16168
16446
|
if (fromToolResponse != null) {
|
|
16169
16447
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
16170
16448
|
}
|
|
16449
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
16450
|
+
if (fromPartMetadata != null) {
|
|
16451
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
16452
|
+
}
|
|
16171
16453
|
return toObject;
|
|
16172
16454
|
}
|
|
16173
16455
|
function sessionResumptionConfigToMldev(fromObject) {
|
|
@@ -19152,6 +19434,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19152
19434
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
|
|
19153
19435
|
}
|
|
19154
19436
|
}
|
|
19437
|
+
else if (discriminatorTuningMode === 'DISTILLATION') {
|
|
19438
|
+
const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
|
|
19439
|
+
if (parentObject !== undefined && fromTuningMode != null) {
|
|
19440
|
+
setValueByPath(parentObject, ['distillationSpec', 'tuningMode'], fromTuningMode);
|
|
19441
|
+
}
|
|
19442
|
+
}
|
|
19155
19443
|
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
19156
19444
|
'customBaseModel',
|
|
19157
19445
|
]);
|
|
@@ -19171,6 +19459,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19171
19459
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19172
19460
|
}
|
|
19173
19461
|
}
|
|
19462
|
+
else if (discriminatorBatchSize === 'DISTILLATION') {
|
|
19463
|
+
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
19464
|
+
if (parentObject !== undefined && fromBatchSize != null) {
|
|
19465
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19466
|
+
}
|
|
19467
|
+
}
|
|
19174
19468
|
let discriminatorLearningRate = getValueByPath(rootObject, [
|
|
19175
19469
|
'config',
|
|
19176
19470
|
'method',
|
|
@@ -19186,6 +19480,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19186
19480
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19187
19481
|
}
|
|
19188
19482
|
}
|
|
19483
|
+
else if (discriminatorLearningRate === 'DISTILLATION') {
|
|
19484
|
+
const fromLearningRate = getValueByPath(fromObject, [
|
|
19485
|
+
'learningRate',
|
|
19486
|
+
]);
|
|
19487
|
+
if (parentObject !== undefined && fromLearningRate != null) {
|
|
19488
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19489
|
+
}
|
|
19490
|
+
}
|
|
19189
19491
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19190
19492
|
if (parentObject !== undefined && fromLabels != null) {
|
|
19191
19493
|
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
@@ -19689,6 +19991,18 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19689
19991
|
if (fromVeoTuningSpec != null) {
|
|
19690
19992
|
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19691
19993
|
}
|
|
19994
|
+
const fromDistillationSamplingSpec = getValueByPath(fromObject, [
|
|
19995
|
+
'distillationSamplingSpec',
|
|
19996
|
+
]);
|
|
19997
|
+
if (fromDistillationSamplingSpec != null) {
|
|
19998
|
+
setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
|
|
19999
|
+
}
|
|
20000
|
+
const fromTuningJobMetadata = getValueByPath(fromObject, [
|
|
20001
|
+
'tuningJobMetadata',
|
|
20002
|
+
]);
|
|
20003
|
+
if (fromTuningJobMetadata != null) {
|
|
20004
|
+
setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
|
|
20005
|
+
}
|
|
19692
20006
|
return toObject;
|
|
19693
20007
|
}
|
|
19694
20008
|
function tuningOperationFromMldev(fromObject, _rootObject) {
|
|
@@ -20407,5 +20721,5 @@ class GoogleGenAI {
|
|
|
20407
20721
|
}
|
|
20408
20722
|
}
|
|
20409
20723
|
|
|
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 };
|
|
20724
|
+
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
20725
|
//# sourceMappingURL=index.mjs.map
|