@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/index.mjs
CHANGED
|
@@ -644,38 +644,18 @@ var Type;
|
|
|
644
644
|
*/
|
|
645
645
|
Type["NULL"] = "NULL";
|
|
646
646
|
})(Type || (Type = {}));
|
|
647
|
-
/**
|
|
648
|
-
var
|
|
649
|
-
(function (
|
|
650
|
-
/**
|
|
651
|
-
* Defaults to unspecified.
|
|
652
|
-
*/
|
|
653
|
-
PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
654
|
-
/**
|
|
655
|
-
* Blocks Low and above confidence URL that is risky.
|
|
656
|
-
*/
|
|
657
|
-
PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
658
|
-
/**
|
|
659
|
-
* Blocks Medium and above confidence URL that is risky.
|
|
660
|
-
*/
|
|
661
|
-
PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
662
|
-
/**
|
|
663
|
-
* Blocks High and above confidence URL that is risky.
|
|
664
|
-
*/
|
|
665
|
-
PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
|
|
666
|
-
/**
|
|
667
|
-
* Blocks Higher and above confidence URL that is risky.
|
|
668
|
-
*/
|
|
669
|
-
PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
|
|
647
|
+
/** The environment being operated. */
|
|
648
|
+
var Environment;
|
|
649
|
+
(function (Environment) {
|
|
670
650
|
/**
|
|
671
|
-
*
|
|
651
|
+
* Defaults to browser.
|
|
672
652
|
*/
|
|
673
|
-
|
|
653
|
+
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
674
654
|
/**
|
|
675
|
-
*
|
|
655
|
+
* Operates in a web browser.
|
|
676
656
|
*/
|
|
677
|
-
|
|
678
|
-
})(
|
|
657
|
+
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
658
|
+
})(Environment || (Environment = {}));
|
|
679
659
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
680
660
|
var AuthType;
|
|
681
661
|
(function (AuthType) {
|
|
@@ -746,6 +726,38 @@ var ApiSpec;
|
|
|
746
726
|
*/
|
|
747
727
|
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
748
728
|
})(ApiSpec || (ApiSpec = {}));
|
|
729
|
+
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
730
|
+
var PhishBlockThreshold;
|
|
731
|
+
(function (PhishBlockThreshold) {
|
|
732
|
+
/**
|
|
733
|
+
* Defaults to unspecified.
|
|
734
|
+
*/
|
|
735
|
+
PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
736
|
+
/**
|
|
737
|
+
* Blocks Low and above confidence URL that is risky.
|
|
738
|
+
*/
|
|
739
|
+
PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
740
|
+
/**
|
|
741
|
+
* Blocks Medium and above confidence URL that is risky.
|
|
742
|
+
*/
|
|
743
|
+
PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
744
|
+
/**
|
|
745
|
+
* Blocks High and above confidence URL that is risky.
|
|
746
|
+
*/
|
|
747
|
+
PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
|
|
748
|
+
/**
|
|
749
|
+
* Blocks Higher and above confidence URL that is risky.
|
|
750
|
+
*/
|
|
751
|
+
PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
|
|
752
|
+
/**
|
|
753
|
+
* Blocks Very high and above confidence URL that is risky.
|
|
754
|
+
*/
|
|
755
|
+
PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
|
|
756
|
+
/**
|
|
757
|
+
* Blocks Extremely high confidence URL that is risky.
|
|
758
|
+
*/
|
|
759
|
+
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
760
|
+
})(PhishBlockThreshold || (PhishBlockThreshold = {}));
|
|
749
761
|
/** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
|
|
750
762
|
var Behavior;
|
|
751
763
|
(function (Behavior) {
|
|
@@ -805,6 +817,10 @@ var ThinkingLevel;
|
|
|
805
817
|
* Unspecified thinking level.
|
|
806
818
|
*/
|
|
807
819
|
ThinkingLevel["THINKING_LEVEL_UNSPECIFIED"] = "THINKING_LEVEL_UNSPECIFIED";
|
|
820
|
+
/**
|
|
821
|
+
* MINIMAL thinking level.
|
|
822
|
+
*/
|
|
823
|
+
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
808
824
|
/**
|
|
809
825
|
* Low thinking level.
|
|
810
826
|
*/
|
|
@@ -817,10 +833,6 @@ var ThinkingLevel;
|
|
|
817
833
|
* High thinking level.
|
|
818
834
|
*/
|
|
819
835
|
ThinkingLevel["HIGH"] = "HIGH";
|
|
820
|
-
/**
|
|
821
|
-
* MINIMAL thinking level.
|
|
822
|
-
*/
|
|
823
|
-
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
824
836
|
})(ThinkingLevel || (ThinkingLevel = {}));
|
|
825
837
|
/** Enum that controls the generation of people. */
|
|
826
838
|
var PersonGeneration;
|
|
@@ -838,6 +850,22 @@ var PersonGeneration;
|
|
|
838
850
|
*/
|
|
839
851
|
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
840
852
|
})(PersonGeneration || (PersonGeneration = {}));
|
|
853
|
+
/** 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. */
|
|
854
|
+
var ProminentPeople;
|
|
855
|
+
(function (ProminentPeople) {
|
|
856
|
+
/**
|
|
857
|
+
* Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
|
|
858
|
+
*/
|
|
859
|
+
ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
|
|
860
|
+
/**
|
|
861
|
+
* Allows the model to generate images of prominent people.
|
|
862
|
+
*/
|
|
863
|
+
ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
|
|
864
|
+
/**
|
|
865
|
+
* Prevents the model from generating images of prominent people.
|
|
866
|
+
*/
|
|
867
|
+
ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
|
|
868
|
+
})(ProminentPeople || (ProminentPeople = {}));
|
|
841
869
|
/** The harm category to be blocked. */
|
|
842
870
|
var HarmCategory;
|
|
843
871
|
(function (HarmCategory) {
|
|
@@ -1156,6 +1184,42 @@ var Modality;
|
|
|
1156
1184
|
*/
|
|
1157
1185
|
Modality["AUDIO"] = "AUDIO";
|
|
1158
1186
|
})(Modality || (Modality = {}));
|
|
1187
|
+
/** The stage of the underlying model. This enum is not supported in Vertex AI. */
|
|
1188
|
+
var ModelStage;
|
|
1189
|
+
(function (ModelStage) {
|
|
1190
|
+
/**
|
|
1191
|
+
* Unspecified model stage.
|
|
1192
|
+
*/
|
|
1193
|
+
ModelStage["MODEL_STAGE_UNSPECIFIED"] = "MODEL_STAGE_UNSPECIFIED";
|
|
1194
|
+
/**
|
|
1195
|
+
* The underlying model is subject to lots of tunings.
|
|
1196
|
+
*/
|
|
1197
|
+
ModelStage["UNSTABLE_EXPERIMENTAL"] = "UNSTABLE_EXPERIMENTAL";
|
|
1198
|
+
/**
|
|
1199
|
+
* Models in this stage are for experimental purposes only.
|
|
1200
|
+
*/
|
|
1201
|
+
ModelStage["EXPERIMENTAL"] = "EXPERIMENTAL";
|
|
1202
|
+
/**
|
|
1203
|
+
* Models in this stage are more mature than experimental models.
|
|
1204
|
+
*/
|
|
1205
|
+
ModelStage["PREVIEW"] = "PREVIEW";
|
|
1206
|
+
/**
|
|
1207
|
+
* Models in this stage are considered stable and ready for production use.
|
|
1208
|
+
*/
|
|
1209
|
+
ModelStage["STABLE"] = "STABLE";
|
|
1210
|
+
/**
|
|
1211
|
+
* 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.
|
|
1212
|
+
*/
|
|
1213
|
+
ModelStage["LEGACY"] = "LEGACY";
|
|
1214
|
+
/**
|
|
1215
|
+
* Models in this stage are deprecated. These models cannot be used.
|
|
1216
|
+
*/
|
|
1217
|
+
ModelStage["DEPRECATED"] = "DEPRECATED";
|
|
1218
|
+
/**
|
|
1219
|
+
* Models in this stage are retired. These models cannot be used.
|
|
1220
|
+
*/
|
|
1221
|
+
ModelStage["RETIRED"] = "RETIRED";
|
|
1222
|
+
})(ModelStage || (ModelStage = {}));
|
|
1159
1223
|
/** The media resolution to use. */
|
|
1160
1224
|
var MediaResolution;
|
|
1161
1225
|
(function (MediaResolution) {
|
|
@@ -1392,6 +1456,26 @@ var TuningTask;
|
|
|
1392
1456
|
*/
|
|
1393
1457
|
TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
|
|
1394
1458
|
})(TuningTask || (TuningTask = {}));
|
|
1459
|
+
/** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
|
|
1460
|
+
var DocumentState;
|
|
1461
|
+
(function (DocumentState) {
|
|
1462
|
+
/**
|
|
1463
|
+
* The default value. This value is used if the state is omitted.
|
|
1464
|
+
*/
|
|
1465
|
+
DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
|
|
1466
|
+
/**
|
|
1467
|
+
* Some `Chunks` of the `Document` are being processed (embedding and vector storage).
|
|
1468
|
+
*/
|
|
1469
|
+
DocumentState["STATE_PENDING"] = "STATE_PENDING";
|
|
1470
|
+
/**
|
|
1471
|
+
* All `Chunks` of the `Document` is processed and available for querying.
|
|
1472
|
+
*/
|
|
1473
|
+
DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
|
|
1474
|
+
/**
|
|
1475
|
+
* Some `Chunks` of the `Document` failed processing.
|
|
1476
|
+
*/
|
|
1477
|
+
DocumentState["STATE_FAILED"] = "STATE_FAILED";
|
|
1478
|
+
})(DocumentState || (DocumentState = {}));
|
|
1395
1479
|
/** The tokenization quality used for given media. */
|
|
1396
1480
|
var PartMediaResolutionLevel;
|
|
1397
1481
|
(function (PartMediaResolutionLevel) {
|
|
@@ -1456,42 +1540,34 @@ var ResourceScope;
|
|
|
1456
1540
|
*/
|
|
1457
1541
|
ResourceScope["COLLECTION"] = "COLLECTION";
|
|
1458
1542
|
})(ResourceScope || (ResourceScope = {}));
|
|
1459
|
-
/**
|
|
1460
|
-
var
|
|
1461
|
-
(function (
|
|
1462
|
-
FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
|
|
1463
|
-
FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
|
|
1464
|
-
FeatureSelectionPreference["BALANCED"] = "BALANCED";
|
|
1465
|
-
FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
|
|
1466
|
-
})(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
|
|
1467
|
-
/** The environment being operated. */
|
|
1468
|
-
var Environment;
|
|
1469
|
-
(function (Environment) {
|
|
1543
|
+
/** Pricing and performance service tier. */
|
|
1544
|
+
var ServiceTier;
|
|
1545
|
+
(function (ServiceTier) {
|
|
1470
1546
|
/**
|
|
1471
|
-
*
|
|
1547
|
+
* Default service tier, which is standard.
|
|
1472
1548
|
*/
|
|
1473
|
-
|
|
1549
|
+
ServiceTier["SERVICE_TIER_UNSPECIFIED"] = "SERVICE_TIER_UNSPECIFIED";
|
|
1474
1550
|
/**
|
|
1475
|
-
*
|
|
1551
|
+
* Flex service tier.
|
|
1476
1552
|
*/
|
|
1477
|
-
|
|
1478
|
-
})(Environment || (Environment = {}));
|
|
1479
|
-
/** Enum for controlling whether the model can generate images of prominent people (celebrities). */
|
|
1480
|
-
var ProminentPeople;
|
|
1481
|
-
(function (ProminentPeople) {
|
|
1553
|
+
ServiceTier["SERVICE_TIER_FLEX"] = "SERVICE_TIER_FLEX";
|
|
1482
1554
|
/**
|
|
1483
|
-
*
|
|
1555
|
+
* Standard service tier.
|
|
1484
1556
|
*/
|
|
1485
|
-
|
|
1557
|
+
ServiceTier["SERVICE_TIER_STANDARD"] = "SERVICE_TIER_STANDARD";
|
|
1486
1558
|
/**
|
|
1487
|
-
*
|
|
1559
|
+
* Priority service tier.
|
|
1488
1560
|
*/
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1561
|
+
ServiceTier["SERVICE_TIER_PRIORITY"] = "SERVICE_TIER_PRIORITY";
|
|
1562
|
+
})(ServiceTier || (ServiceTier = {}));
|
|
1563
|
+
/** Options for feature selection preference. */
|
|
1564
|
+
var FeatureSelectionPreference;
|
|
1565
|
+
(function (FeatureSelectionPreference) {
|
|
1566
|
+
FeatureSelectionPreference["FEATURE_SELECTION_PREFERENCE_UNSPECIFIED"] = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED";
|
|
1567
|
+
FeatureSelectionPreference["PRIORITIZE_QUALITY"] = "PRIORITIZE_QUALITY";
|
|
1568
|
+
FeatureSelectionPreference["BALANCED"] = "BALANCED";
|
|
1569
|
+
FeatureSelectionPreference["PRIORITIZE_COST"] = "PRIORITIZE_COST";
|
|
1570
|
+
})(FeatureSelectionPreference || (FeatureSelectionPreference = {}));
|
|
1495
1571
|
/** Enum representing the Vertex embedding API to use. */
|
|
1496
1572
|
var EmbeddingApiType;
|
|
1497
1573
|
(function (EmbeddingApiType) {
|
|
@@ -1666,14 +1742,6 @@ var TuningMethod;
|
|
|
1666
1742
|
*/
|
|
1667
1743
|
TuningMethod["DISTILLATION"] = "DISTILLATION";
|
|
1668
1744
|
})(TuningMethod || (TuningMethod = {}));
|
|
1669
|
-
/** State for the lifecycle of a Document. */
|
|
1670
|
-
var DocumentState;
|
|
1671
|
-
(function (DocumentState) {
|
|
1672
|
-
DocumentState["STATE_UNSPECIFIED"] = "STATE_UNSPECIFIED";
|
|
1673
|
-
DocumentState["STATE_PENDING"] = "STATE_PENDING";
|
|
1674
|
-
DocumentState["STATE_ACTIVE"] = "STATE_ACTIVE";
|
|
1675
|
-
DocumentState["STATE_FAILED"] = "STATE_FAILED";
|
|
1676
|
-
})(DocumentState || (DocumentState = {}));
|
|
1677
1745
|
/** State for the lifecycle of a File. */
|
|
1678
1746
|
var FileState;
|
|
1679
1747
|
(function (FileState) {
|
|
@@ -1833,6 +1901,10 @@ var TurnCoverage;
|
|
|
1833
1901
|
* The users turn includes all realtime input since the last turn, including inactivity (e.g. silence on the audio stream).
|
|
1834
1902
|
*/
|
|
1835
1903
|
TurnCoverage["TURN_INCLUDES_ALL_INPUT"] = "TURN_INCLUDES_ALL_INPUT";
|
|
1904
|
+
/**
|
|
1905
|
+
* Includes audio activity and all video since the last turn. With automatic activity detection, audio activity means speech and excludes silence.
|
|
1906
|
+
*/
|
|
1907
|
+
TurnCoverage["TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO"] = "TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO";
|
|
1836
1908
|
})(TurnCoverage || (TurnCoverage = {}));
|
|
1837
1909
|
/** Scale of the generated music. */
|
|
1838
1910
|
var Scale;
|
|
@@ -2402,7 +2474,6 @@ class GenerateVideosResponse {
|
|
|
2402
2474
|
class GenerateVideosOperation {
|
|
2403
2475
|
/**
|
|
2404
2476
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2405
|
-
* @internal
|
|
2406
2477
|
*/
|
|
2407
2478
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2408
2479
|
const operation = new GenerateVideosOperation();
|
|
@@ -2448,7 +2519,6 @@ class ImportFileResponse {
|
|
|
2448
2519
|
class ImportFileOperation {
|
|
2449
2520
|
/**
|
|
2450
2521
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2451
|
-
* @internal
|
|
2452
2522
|
*/
|
|
2453
2523
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2454
2524
|
const operation = new ImportFileOperation();
|
|
@@ -2703,7 +2773,6 @@ class UploadToFileSearchStoreResponse {
|
|
|
2703
2773
|
class UploadToFileSearchStoreOperation {
|
|
2704
2774
|
/**
|
|
2705
2775
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
2706
|
-
* @internal
|
|
2707
2776
|
*/
|
|
2708
2777
|
_fromAPIResponse({ apiResponse, _isVertexAI, }) {
|
|
2709
2778
|
const operation = new UploadToFileSearchStoreOperation();
|
|
@@ -4356,6 +4425,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4356
4425
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
4357
4426
|
throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
|
|
4358
4427
|
}
|
|
4428
|
+
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
4429
|
+
if (parentObject !== undefined && fromServiceTier != null) {
|
|
4430
|
+
setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
|
|
4431
|
+
}
|
|
4359
4432
|
return toObject;
|
|
4360
4433
|
}
|
|
4361
4434
|
function generateContentResponseFromMldev$1(fromObject) {
|
|
@@ -4396,6 +4469,10 @@ function generateContentResponseFromMldev$1(fromObject) {
|
|
|
4396
4469
|
if (fromUsageMetadata != null) {
|
|
4397
4470
|
setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
|
|
4398
4471
|
}
|
|
4472
|
+
const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
|
|
4473
|
+
if (fromModelStatus != null) {
|
|
4474
|
+
setValueByPath(toObject, ['modelStatus'], fromModelStatus);
|
|
4475
|
+
}
|
|
4399
4476
|
return toObject;
|
|
4400
4477
|
}
|
|
4401
4478
|
function getBatchJobParametersToMldev(apiClient, fromObject) {
|
|
@@ -4683,6 +4760,10 @@ function partToMldev$4(fromObject) {
|
|
|
4683
4760
|
if (fromToolResponse != null) {
|
|
4684
4761
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
4685
4762
|
}
|
|
4763
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
4764
|
+
if (fromPartMetadata != null) {
|
|
4765
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
4766
|
+
}
|
|
4686
4767
|
return toObject;
|
|
4687
4768
|
}
|
|
4688
4769
|
function safetySettingToMldev$1(fromObject) {
|
|
@@ -6017,6 +6098,10 @@ function partToMldev$3(fromObject) {
|
|
|
6017
6098
|
if (fromToolResponse != null) {
|
|
6018
6099
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
6019
6100
|
}
|
|
6101
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
6102
|
+
if (fromPartMetadata != null) {
|
|
6103
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
6104
|
+
}
|
|
6020
6105
|
return toObject;
|
|
6021
6106
|
}
|
|
6022
6107
|
function partToVertex$2(fromObject) {
|
|
@@ -6083,6 +6168,9 @@ function partToVertex$2(fromObject) {
|
|
|
6083
6168
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
6084
6169
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
6085
6170
|
}
|
|
6171
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
6172
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
6173
|
+
}
|
|
6086
6174
|
return toObject;
|
|
6087
6175
|
}
|
|
6088
6176
|
function toolConfigToMldev$1(fromObject) {
|
|
@@ -7339,7 +7427,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
7339
7427
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
7340
7428
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
7341
7429
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
7342
|
-
const SDK_VERSION = '1.
|
|
7430
|
+
const SDK_VERSION = '1.47.0'; // x-release-please-version
|
|
7343
7431
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
7344
7432
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
7345
7433
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -7399,6 +7487,11 @@ class ApiClient {
|
|
|
7399
7487
|
// Vertex Express or global endpoint case.
|
|
7400
7488
|
initHttpOptions.baseUrl = 'https://aiplatform.googleapis.com/';
|
|
7401
7489
|
}
|
|
7490
|
+
else if (this.clientOptions.project &&
|
|
7491
|
+
this.clientOptions.location &&
|
|
7492
|
+
this.clientOptions.location === 'us') {
|
|
7493
|
+
initHttpOptions.baseUrl = `https://aiplatform.${this.clientOptions.location}.rep.googleapis.com/`;
|
|
7494
|
+
}
|
|
7402
7495
|
else if (this.clientOptions.project && this.clientOptions.location) {
|
|
7403
7496
|
initHttpOptions.baseUrl = `https://${this.clientOptions.location}-aiplatform.googleapis.com/`;
|
|
7404
7497
|
}
|
|
@@ -11207,7 +11300,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
11207
11300
|
}
|
|
11208
11301
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
11209
11302
|
if (fromSpeechConfig != null) {
|
|
11210
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
11303
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
|
|
11211
11304
|
}
|
|
11212
11305
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
11213
11306
|
'stopSequences',
|
|
@@ -11428,7 +11521,7 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
11428
11521
|
}
|
|
11429
11522
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
11430
11523
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
11431
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
|
|
11524
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
11432
11525
|
}
|
|
11433
11526
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
11434
11527
|
'thinkingConfig',
|
|
@@ -11688,6 +11781,22 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
11688
11781
|
}
|
|
11689
11782
|
return toObject;
|
|
11690
11783
|
}
|
|
11784
|
+
function multiSpeakerVoiceConfigToVertex$1(fromObject) {
|
|
11785
|
+
const toObject = {};
|
|
11786
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
11787
|
+
'speakerVoiceConfigs',
|
|
11788
|
+
]);
|
|
11789
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
11790
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
11791
|
+
if (Array.isArray(transformedList)) {
|
|
11792
|
+
transformedList = transformedList.map((item) => {
|
|
11793
|
+
return speakerVoiceConfigToVertex$1(item);
|
|
11794
|
+
});
|
|
11795
|
+
}
|
|
11796
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
11797
|
+
}
|
|
11798
|
+
return toObject;
|
|
11799
|
+
}
|
|
11691
11800
|
function partToMldev$2(fromObject) {
|
|
11692
11801
|
const toObject = {};
|
|
11693
11802
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -11754,6 +11863,10 @@ function partToMldev$2(fromObject) {
|
|
|
11754
11863
|
if (fromToolResponse != null) {
|
|
11755
11864
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
11756
11865
|
}
|
|
11866
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
11867
|
+
if (fromPartMetadata != null) {
|
|
11868
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
11869
|
+
}
|
|
11757
11870
|
return toObject;
|
|
11758
11871
|
}
|
|
11759
11872
|
function partToVertex$1(fromObject) {
|
|
@@ -11820,6 +11933,23 @@ function partToVertex$1(fromObject) {
|
|
|
11820
11933
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
11821
11934
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
11822
11935
|
}
|
|
11936
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
11937
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
11938
|
+
}
|
|
11939
|
+
return toObject;
|
|
11940
|
+
}
|
|
11941
|
+
function replicatedVoiceConfigToVertex$1(fromObject) {
|
|
11942
|
+
const toObject = {};
|
|
11943
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
11944
|
+
if (fromMimeType != null) {
|
|
11945
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
11946
|
+
}
|
|
11947
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
11948
|
+
'voiceSampleAudio',
|
|
11949
|
+
]);
|
|
11950
|
+
if (fromVoiceSampleAudio != null) {
|
|
11951
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
11952
|
+
}
|
|
11823
11953
|
return toObject;
|
|
11824
11954
|
}
|
|
11825
11955
|
function sessionResumptionConfigToMldev$1(fromObject) {
|
|
@@ -11833,6 +11963,36 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
11833
11963
|
}
|
|
11834
11964
|
return toObject;
|
|
11835
11965
|
}
|
|
11966
|
+
function speakerVoiceConfigToVertex$1(fromObject) {
|
|
11967
|
+
const toObject = {};
|
|
11968
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
11969
|
+
if (fromSpeaker != null) {
|
|
11970
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
11971
|
+
}
|
|
11972
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
11973
|
+
if (fromVoiceConfig != null) {
|
|
11974
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
11975
|
+
}
|
|
11976
|
+
return toObject;
|
|
11977
|
+
}
|
|
11978
|
+
function speechConfigToVertex$1(fromObject) {
|
|
11979
|
+
const toObject = {};
|
|
11980
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
11981
|
+
if (fromVoiceConfig != null) {
|
|
11982
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
11983
|
+
}
|
|
11984
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
11985
|
+
if (fromLanguageCode != null) {
|
|
11986
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
11987
|
+
}
|
|
11988
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
11989
|
+
'multiSpeakerVoiceConfig',
|
|
11990
|
+
]);
|
|
11991
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
11992
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
|
|
11993
|
+
}
|
|
11994
|
+
return toObject;
|
|
11995
|
+
}
|
|
11836
11996
|
function toolToMldev$2(fromObject) {
|
|
11837
11997
|
const toObject = {};
|
|
11838
11998
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
@@ -12066,6 +12226,22 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
12066
12226
|
}
|
|
12067
12227
|
return toObject;
|
|
12068
12228
|
}
|
|
12229
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
12230
|
+
const toObject = {};
|
|
12231
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
12232
|
+
'replicatedVoiceConfig',
|
|
12233
|
+
]);
|
|
12234
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
12235
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
|
|
12236
|
+
}
|
|
12237
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
12238
|
+
'prebuiltVoiceConfig',
|
|
12239
|
+
]);
|
|
12240
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
12241
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
12242
|
+
}
|
|
12243
|
+
return toObject;
|
|
12244
|
+
}
|
|
12069
12245
|
|
|
12070
12246
|
/**
|
|
12071
12247
|
* @license
|
|
@@ -13119,6 +13295,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13119
13295
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
13120
13296
|
throw new Error('modelArmorConfig parameter is not supported in Gemini API.');
|
|
13121
13297
|
}
|
|
13298
|
+
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
13299
|
+
if (parentObject !== undefined && fromServiceTier != null) {
|
|
13300
|
+
setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
|
|
13301
|
+
}
|
|
13122
13302
|
return toObject;
|
|
13123
13303
|
}
|
|
13124
13304
|
function generateContentConfigToVertex(apiClient, fromObject, parentObject, rootObject) {
|
|
@@ -13265,7 +13445,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
13265
13445
|
}
|
|
13266
13446
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
13267
13447
|
if (fromSpeechConfig != null) {
|
|
13268
|
-
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
13448
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
|
|
13269
13449
|
}
|
|
13270
13450
|
const fromAudioTimestamp = getValueByPath(fromObject, [
|
|
13271
13451
|
'audioTimestamp',
|
|
@@ -13293,6 +13473,9 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
13293
13473
|
if (parentObject !== undefined && fromModelArmorConfig != null) {
|
|
13294
13474
|
setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
|
|
13295
13475
|
}
|
|
13476
|
+
if (getValueByPath(fromObject, ['serviceTier']) !== undefined) {
|
|
13477
|
+
throw new Error('serviceTier parameter is not supported in Vertex AI.');
|
|
13478
|
+
}
|
|
13296
13479
|
return toObject;
|
|
13297
13480
|
}
|
|
13298
13481
|
function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
@@ -13377,6 +13560,10 @@ function generateContentResponseFromMldev(fromObject, rootObject) {
|
|
|
13377
13560
|
if (fromUsageMetadata != null) {
|
|
13378
13561
|
setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
|
|
13379
13562
|
}
|
|
13563
|
+
const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
|
|
13564
|
+
if (fromModelStatus != null) {
|
|
13565
|
+
setValueByPath(toObject, ['modelStatus'], fromModelStatus);
|
|
13566
|
+
}
|
|
13380
13567
|
return toObject;
|
|
13381
13568
|
}
|
|
13382
13569
|
function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
@@ -13762,6 +13949,9 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
13762
13949
|
if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
|
|
13763
13950
|
throw new Error('compressionQuality parameter is not supported in Gemini API.');
|
|
13764
13951
|
}
|
|
13952
|
+
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
13953
|
+
throw new Error('labels parameter is not supported in Gemini API.');
|
|
13954
|
+
}
|
|
13765
13955
|
return toObject;
|
|
13766
13956
|
}
|
|
13767
13957
|
function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
@@ -13852,6 +14042,10 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
13852
14042
|
if (parentObject !== undefined && fromCompressionQuality != null) {
|
|
13853
14043
|
setValueByPath(parentObject, ['parameters', 'compressionQuality'], fromCompressionQuality);
|
|
13854
14044
|
}
|
|
14045
|
+
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
14046
|
+
if (parentObject !== undefined && fromLabels != null) {
|
|
14047
|
+
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
14048
|
+
}
|
|
13855
14049
|
return toObject;
|
|
13856
14050
|
}
|
|
13857
14051
|
function generateVideosOperationFromMldev(fromObject, rootObject) {
|
|
@@ -14121,7 +14315,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
14121
14315
|
}
|
|
14122
14316
|
return toObject;
|
|
14123
14317
|
}
|
|
14124
|
-
function generationConfigToVertex(fromObject,
|
|
14318
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
14125
14319
|
const toObject = {};
|
|
14126
14320
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
14127
14321
|
'modelSelectionConfig',
|
|
@@ -14217,7 +14411,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
14217
14411
|
}
|
|
14218
14412
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
14219
14413
|
if (fromSpeechConfig != null) {
|
|
14220
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
14414
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
14221
14415
|
}
|
|
14222
14416
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
14223
14417
|
'stopSequences',
|
|
@@ -14674,6 +14868,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
14674
14868
|
}
|
|
14675
14869
|
return toObject;
|
|
14676
14870
|
}
|
|
14871
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
14872
|
+
const toObject = {};
|
|
14873
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
14874
|
+
'speakerVoiceConfigs',
|
|
14875
|
+
]);
|
|
14876
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
14877
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
14878
|
+
if (Array.isArray(transformedList)) {
|
|
14879
|
+
transformedList = transformedList.map((item) => {
|
|
14880
|
+
return speakerVoiceConfigToVertex(item);
|
|
14881
|
+
});
|
|
14882
|
+
}
|
|
14883
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
14884
|
+
}
|
|
14885
|
+
return toObject;
|
|
14886
|
+
}
|
|
14677
14887
|
function partToMldev$1(fromObject, rootObject) {
|
|
14678
14888
|
const toObject = {};
|
|
14679
14889
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -14740,6 +14950,10 @@ function partToMldev$1(fromObject, rootObject) {
|
|
|
14740
14950
|
if (fromToolResponse != null) {
|
|
14741
14951
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
14742
14952
|
}
|
|
14953
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
14954
|
+
if (fromPartMetadata != null) {
|
|
14955
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
14956
|
+
}
|
|
14743
14957
|
return toObject;
|
|
14744
14958
|
}
|
|
14745
14959
|
function partToVertex(fromObject, _rootObject) {
|
|
@@ -14806,6 +15020,9 @@ function partToVertex(fromObject, _rootObject) {
|
|
|
14806
15020
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
14807
15021
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
14808
15022
|
}
|
|
15023
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
15024
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
15025
|
+
}
|
|
14809
15026
|
return toObject;
|
|
14810
15027
|
}
|
|
14811
15028
|
function productImageToVertex(fromObject, rootObject) {
|
|
@@ -14976,6 +15193,20 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
14976
15193
|
}
|
|
14977
15194
|
return toObject;
|
|
14978
15195
|
}
|
|
15196
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
15197
|
+
const toObject = {};
|
|
15198
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
15199
|
+
if (fromMimeType != null) {
|
|
15200
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
15201
|
+
}
|
|
15202
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
15203
|
+
'voiceSampleAudio',
|
|
15204
|
+
]);
|
|
15205
|
+
if (fromVoiceSampleAudio != null) {
|
|
15206
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
15207
|
+
}
|
|
15208
|
+
return toObject;
|
|
15209
|
+
}
|
|
14979
15210
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
14980
15211
|
const toObject = {};
|
|
14981
15212
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -15125,6 +15356,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
15125
15356
|
}
|
|
15126
15357
|
return toObject;
|
|
15127
15358
|
}
|
|
15359
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
15360
|
+
const toObject = {};
|
|
15361
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
15362
|
+
if (fromSpeaker != null) {
|
|
15363
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
15364
|
+
}
|
|
15365
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
15366
|
+
if (fromVoiceConfig != null) {
|
|
15367
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
15368
|
+
}
|
|
15369
|
+
return toObject;
|
|
15370
|
+
}
|
|
15371
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
15372
|
+
const toObject = {};
|
|
15373
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
15374
|
+
if (fromVoiceConfig != null) {
|
|
15375
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
15376
|
+
}
|
|
15377
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
15378
|
+
if (fromLanguageCode != null) {
|
|
15379
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
15380
|
+
}
|
|
15381
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
15382
|
+
'multiSpeakerVoiceConfig',
|
|
15383
|
+
]);
|
|
15384
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
15385
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
15386
|
+
}
|
|
15387
|
+
return toObject;
|
|
15388
|
+
}
|
|
15128
15389
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
15129
15390
|
const toObject = {};
|
|
15130
15391
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -15607,6 +15868,22 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
15607
15868
|
}
|
|
15608
15869
|
return toObject;
|
|
15609
15870
|
}
|
|
15871
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
15872
|
+
const toObject = {};
|
|
15873
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
15874
|
+
'replicatedVoiceConfig',
|
|
15875
|
+
]);
|
|
15876
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
15877
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
15878
|
+
}
|
|
15879
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
15880
|
+
'prebuiltVoiceConfig',
|
|
15881
|
+
]);
|
|
15882
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
15883
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
15884
|
+
}
|
|
15885
|
+
return toObject;
|
|
15886
|
+
}
|
|
15610
15887
|
|
|
15611
15888
|
/**
|
|
15612
15889
|
* @license
|
|
@@ -18639,6 +18916,10 @@ function partToMldev(fromObject) {
|
|
|
18639
18916
|
if (fromToolResponse != null) {
|
|
18640
18917
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
18641
18918
|
}
|
|
18919
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
18920
|
+
if (fromPartMetadata != null) {
|
|
18921
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
18922
|
+
}
|
|
18642
18923
|
return toObject;
|
|
18643
18924
|
}
|
|
18644
18925
|
function sessionResumptionConfigToMldev(fromObject) {
|
|
@@ -19273,6 +19554,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19273
19554
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
|
|
19274
19555
|
}
|
|
19275
19556
|
}
|
|
19557
|
+
else if (discriminatorTuningMode === 'DISTILLATION') {
|
|
19558
|
+
const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
|
|
19559
|
+
if (parentObject !== undefined && fromTuningMode != null) {
|
|
19560
|
+
setValueByPath(parentObject, ['distillationSpec', 'tuningMode'], fromTuningMode);
|
|
19561
|
+
}
|
|
19562
|
+
}
|
|
19276
19563
|
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
19277
19564
|
'customBaseModel',
|
|
19278
19565
|
]);
|
|
@@ -19292,6 +19579,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19292
19579
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19293
19580
|
}
|
|
19294
19581
|
}
|
|
19582
|
+
else if (discriminatorBatchSize === 'DISTILLATION') {
|
|
19583
|
+
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
19584
|
+
if (parentObject !== undefined && fromBatchSize != null) {
|
|
19585
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19586
|
+
}
|
|
19587
|
+
}
|
|
19295
19588
|
let discriminatorLearningRate = getValueByPath(rootObject, [
|
|
19296
19589
|
'config',
|
|
19297
19590
|
'method',
|
|
@@ -19307,6 +19600,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19307
19600
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19308
19601
|
}
|
|
19309
19602
|
}
|
|
19603
|
+
else if (discriminatorLearningRate === 'DISTILLATION') {
|
|
19604
|
+
const fromLearningRate = getValueByPath(fromObject, [
|
|
19605
|
+
'learningRate',
|
|
19606
|
+
]);
|
|
19607
|
+
if (parentObject !== undefined && fromLearningRate != null) {
|
|
19608
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19609
|
+
}
|
|
19610
|
+
}
|
|
19310
19611
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19311
19612
|
if (parentObject !== undefined && fromLabels != null) {
|
|
19312
19613
|
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
@@ -19810,6 +20111,18 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19810
20111
|
if (fromVeoTuningSpec != null) {
|
|
19811
20112
|
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19812
20113
|
}
|
|
20114
|
+
const fromDistillationSamplingSpec = getValueByPath(fromObject, [
|
|
20115
|
+
'distillationSamplingSpec',
|
|
20116
|
+
]);
|
|
20117
|
+
if (fromDistillationSamplingSpec != null) {
|
|
20118
|
+
setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
|
|
20119
|
+
}
|
|
20120
|
+
const fromTuningJobMetadata = getValueByPath(fromObject, [
|
|
20121
|
+
'tuningJobMetadata',
|
|
20122
|
+
]);
|
|
20123
|
+
if (fromTuningJobMetadata != null) {
|
|
20124
|
+
setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
|
|
20125
|
+
}
|
|
19813
20126
|
return toObject;
|
|
19814
20127
|
}
|
|
19815
20128
|
function tuningOperationFromMldev(fromObject, _rootObject) {
|
|
@@ -20352,5 +20665,5 @@ class GoogleGenAI {
|
|
|
20352
20665
|
}
|
|
20353
20666
|
}
|
|
20354
20667
|
|
|
20355
|
-
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 };
|
|
20668
|
+
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 };
|
|
20356
20669
|
//# sourceMappingURL=index.mjs.map
|