@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/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["UNSPECIFIED"] = "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["FLEX"] = "flex";
|
|
1482
1554
|
/**
|
|
1483
|
-
*
|
|
1555
|
+
* Standard service tier.
|
|
1484
1556
|
*/
|
|
1485
|
-
|
|
1557
|
+
ServiceTier["STANDARD"] = "standard";
|
|
1486
1558
|
/**
|
|
1487
|
-
*
|
|
1559
|
+
* Priority service tier.
|
|
1488
1560
|
*/
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1561
|
+
ServiceTier["PRIORITY"] = "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.48.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,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
13293
13473
|
if (parentObject !== undefined && fromModelArmorConfig != null) {
|
|
13294
13474
|
setValueByPath(parentObject, ['modelArmorConfig'], fromModelArmorConfig);
|
|
13295
13475
|
}
|
|
13476
|
+
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
13477
|
+
if (parentObject !== undefined && fromServiceTier != null) {
|
|
13478
|
+
setValueByPath(parentObject, ['serviceTier'], fromServiceTier);
|
|
13479
|
+
}
|
|
13296
13480
|
return toObject;
|
|
13297
13481
|
}
|
|
13298
13482
|
function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
@@ -13377,6 +13561,10 @@ function generateContentResponseFromMldev(fromObject, rootObject) {
|
|
|
13377
13561
|
if (fromUsageMetadata != null) {
|
|
13378
13562
|
setValueByPath(toObject, ['usageMetadata'], fromUsageMetadata);
|
|
13379
13563
|
}
|
|
13564
|
+
const fromModelStatus = getValueByPath(fromObject, ['modelStatus']);
|
|
13565
|
+
if (fromModelStatus != null) {
|
|
13566
|
+
setValueByPath(toObject, ['modelStatus'], fromModelStatus);
|
|
13567
|
+
}
|
|
13380
13568
|
return toObject;
|
|
13381
13569
|
}
|
|
13382
13570
|
function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
@@ -13762,6 +13950,9 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
13762
13950
|
if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
|
|
13763
13951
|
throw new Error('compressionQuality parameter is not supported in Gemini API.');
|
|
13764
13952
|
}
|
|
13953
|
+
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
13954
|
+
throw new Error('labels parameter is not supported in Gemini API.');
|
|
13955
|
+
}
|
|
13765
13956
|
return toObject;
|
|
13766
13957
|
}
|
|
13767
13958
|
function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
@@ -13852,6 +14043,10 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
13852
14043
|
if (parentObject !== undefined && fromCompressionQuality != null) {
|
|
13853
14044
|
setValueByPath(parentObject, ['parameters', 'compressionQuality'], fromCompressionQuality);
|
|
13854
14045
|
}
|
|
14046
|
+
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
14047
|
+
if (parentObject !== undefined && fromLabels != null) {
|
|
14048
|
+
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
14049
|
+
}
|
|
13855
14050
|
return toObject;
|
|
13856
14051
|
}
|
|
13857
14052
|
function generateVideosOperationFromMldev(fromObject, rootObject) {
|
|
@@ -14121,7 +14316,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
14121
14316
|
}
|
|
14122
14317
|
return toObject;
|
|
14123
14318
|
}
|
|
14124
|
-
function generationConfigToVertex(fromObject,
|
|
14319
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
14125
14320
|
const toObject = {};
|
|
14126
14321
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
14127
14322
|
'modelSelectionConfig',
|
|
@@ -14217,7 +14412,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
14217
14412
|
}
|
|
14218
14413
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
14219
14414
|
if (fromSpeechConfig != null) {
|
|
14220
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
14415
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
14221
14416
|
}
|
|
14222
14417
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
14223
14418
|
'stopSequences',
|
|
@@ -14674,6 +14869,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
14674
14869
|
}
|
|
14675
14870
|
return toObject;
|
|
14676
14871
|
}
|
|
14872
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
14873
|
+
const toObject = {};
|
|
14874
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
14875
|
+
'speakerVoiceConfigs',
|
|
14876
|
+
]);
|
|
14877
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
14878
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
14879
|
+
if (Array.isArray(transformedList)) {
|
|
14880
|
+
transformedList = transformedList.map((item) => {
|
|
14881
|
+
return speakerVoiceConfigToVertex(item);
|
|
14882
|
+
});
|
|
14883
|
+
}
|
|
14884
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
14885
|
+
}
|
|
14886
|
+
return toObject;
|
|
14887
|
+
}
|
|
14677
14888
|
function partToMldev$1(fromObject, rootObject) {
|
|
14678
14889
|
const toObject = {};
|
|
14679
14890
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -14740,6 +14951,10 @@ function partToMldev$1(fromObject, rootObject) {
|
|
|
14740
14951
|
if (fromToolResponse != null) {
|
|
14741
14952
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
14742
14953
|
}
|
|
14954
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
14955
|
+
if (fromPartMetadata != null) {
|
|
14956
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
14957
|
+
}
|
|
14743
14958
|
return toObject;
|
|
14744
14959
|
}
|
|
14745
14960
|
function partToVertex(fromObject, _rootObject) {
|
|
@@ -14806,6 +15021,9 @@ function partToVertex(fromObject, _rootObject) {
|
|
|
14806
15021
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
14807
15022
|
throw new Error('toolResponse parameter is not supported in Vertex AI.');
|
|
14808
15023
|
}
|
|
15024
|
+
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
15025
|
+
throw new Error('partMetadata parameter is not supported in Vertex AI.');
|
|
15026
|
+
}
|
|
14809
15027
|
return toObject;
|
|
14810
15028
|
}
|
|
14811
15029
|
function productImageToVertex(fromObject, rootObject) {
|
|
@@ -14976,6 +15194,20 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
14976
15194
|
}
|
|
14977
15195
|
return toObject;
|
|
14978
15196
|
}
|
|
15197
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
15198
|
+
const toObject = {};
|
|
15199
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
15200
|
+
if (fromMimeType != null) {
|
|
15201
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
15202
|
+
}
|
|
15203
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
15204
|
+
'voiceSampleAudio',
|
|
15205
|
+
]);
|
|
15206
|
+
if (fromVoiceSampleAudio != null) {
|
|
15207
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
15208
|
+
}
|
|
15209
|
+
return toObject;
|
|
15210
|
+
}
|
|
14979
15211
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
14980
15212
|
const toObject = {};
|
|
14981
15213
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -15125,6 +15357,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
15125
15357
|
}
|
|
15126
15358
|
return toObject;
|
|
15127
15359
|
}
|
|
15360
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
15361
|
+
const toObject = {};
|
|
15362
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
15363
|
+
if (fromSpeaker != null) {
|
|
15364
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
15365
|
+
}
|
|
15366
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
15367
|
+
if (fromVoiceConfig != null) {
|
|
15368
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
15369
|
+
}
|
|
15370
|
+
return toObject;
|
|
15371
|
+
}
|
|
15372
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
15373
|
+
const toObject = {};
|
|
15374
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
15375
|
+
if (fromVoiceConfig != null) {
|
|
15376
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
15377
|
+
}
|
|
15378
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
15379
|
+
if (fromLanguageCode != null) {
|
|
15380
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
15381
|
+
}
|
|
15382
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
15383
|
+
'multiSpeakerVoiceConfig',
|
|
15384
|
+
]);
|
|
15385
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
15386
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
15387
|
+
}
|
|
15388
|
+
return toObject;
|
|
15389
|
+
}
|
|
15128
15390
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
15129
15391
|
const toObject = {};
|
|
15130
15392
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -15607,6 +15869,22 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
15607
15869
|
}
|
|
15608
15870
|
return toObject;
|
|
15609
15871
|
}
|
|
15872
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
15873
|
+
const toObject = {};
|
|
15874
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
15875
|
+
'replicatedVoiceConfig',
|
|
15876
|
+
]);
|
|
15877
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
15878
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
15879
|
+
}
|
|
15880
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
15881
|
+
'prebuiltVoiceConfig',
|
|
15882
|
+
]);
|
|
15883
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
15884
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
15885
|
+
}
|
|
15886
|
+
return toObject;
|
|
15887
|
+
}
|
|
15610
15888
|
|
|
15611
15889
|
/**
|
|
15612
15890
|
* @license
|
|
@@ -18639,6 +18917,10 @@ function partToMldev(fromObject) {
|
|
|
18639
18917
|
if (fromToolResponse != null) {
|
|
18640
18918
|
setValueByPath(toObject, ['toolResponse'], fromToolResponse);
|
|
18641
18919
|
}
|
|
18920
|
+
const fromPartMetadata = getValueByPath(fromObject, ['partMetadata']);
|
|
18921
|
+
if (fromPartMetadata != null) {
|
|
18922
|
+
setValueByPath(toObject, ['partMetadata'], fromPartMetadata);
|
|
18923
|
+
}
|
|
18642
18924
|
return toObject;
|
|
18643
18925
|
}
|
|
18644
18926
|
function sessionResumptionConfigToMldev(fromObject) {
|
|
@@ -19273,6 +19555,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19273
19555
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
|
|
19274
19556
|
}
|
|
19275
19557
|
}
|
|
19558
|
+
else if (discriminatorTuningMode === 'DISTILLATION') {
|
|
19559
|
+
const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
|
|
19560
|
+
if (parentObject !== undefined && fromTuningMode != null) {
|
|
19561
|
+
setValueByPath(parentObject, ['distillationSpec', 'tuningMode'], fromTuningMode);
|
|
19562
|
+
}
|
|
19563
|
+
}
|
|
19276
19564
|
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
19277
19565
|
'customBaseModel',
|
|
19278
19566
|
]);
|
|
@@ -19292,6 +19580,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19292
19580
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19293
19581
|
}
|
|
19294
19582
|
}
|
|
19583
|
+
else if (discriminatorBatchSize === 'DISTILLATION') {
|
|
19584
|
+
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
19585
|
+
if (parentObject !== undefined && fromBatchSize != null) {
|
|
19586
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
19587
|
+
}
|
|
19588
|
+
}
|
|
19295
19589
|
let discriminatorLearningRate = getValueByPath(rootObject, [
|
|
19296
19590
|
'config',
|
|
19297
19591
|
'method',
|
|
@@ -19307,6 +19601,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
19307
19601
|
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19308
19602
|
}
|
|
19309
19603
|
}
|
|
19604
|
+
else if (discriminatorLearningRate === 'DISTILLATION') {
|
|
19605
|
+
const fromLearningRate = getValueByPath(fromObject, [
|
|
19606
|
+
'learningRate',
|
|
19607
|
+
]);
|
|
19608
|
+
if (parentObject !== undefined && fromLearningRate != null) {
|
|
19609
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
19610
|
+
}
|
|
19611
|
+
}
|
|
19310
19612
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19311
19613
|
if (parentObject !== undefined && fromLabels != null) {
|
|
19312
19614
|
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
@@ -19810,6 +20112,18 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19810
20112
|
if (fromVeoTuningSpec != null) {
|
|
19811
20113
|
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19812
20114
|
}
|
|
20115
|
+
const fromDistillationSamplingSpec = getValueByPath(fromObject, [
|
|
20116
|
+
'distillationSamplingSpec',
|
|
20117
|
+
]);
|
|
20118
|
+
if (fromDistillationSamplingSpec != null) {
|
|
20119
|
+
setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
|
|
20120
|
+
}
|
|
20121
|
+
const fromTuningJobMetadata = getValueByPath(fromObject, [
|
|
20122
|
+
'tuningJobMetadata',
|
|
20123
|
+
]);
|
|
20124
|
+
if (fromTuningJobMetadata != null) {
|
|
20125
|
+
setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
|
|
20126
|
+
}
|
|
19813
20127
|
return toObject;
|
|
19814
20128
|
}
|
|
19815
20129
|
function tuningOperationFromMldev(fromObject, _rootObject) {
|
|
@@ -20352,5 +20666,5 @@ class GoogleGenAI {
|
|
|
20352
20666
|
}
|
|
20353
20667
|
}
|
|
20354
20668
|
|
|
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 };
|
|
20669
|
+
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
20670
|
//# sourceMappingURL=index.mjs.map
|