@google/genai 1.21.0 → 1.22.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 +76 -15
- package/dist/index.cjs +241 -107
- package/dist/index.mjs +242 -108
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +241 -107
- package/dist/node/index.mjs +242 -108
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +76 -15
- package/dist/web/index.mjs +242 -108
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +76 -15
- package/package.json +1 -1
package/dist/web/index.mjs
CHANGED
|
@@ -706,6 +706,10 @@ var FinishReason;
|
|
|
706
706
|
* The tool call generated by the model is invalid.
|
|
707
707
|
*/
|
|
708
708
|
FinishReason["UNEXPECTED_TOOL_CALL"] = "UNEXPECTED_TOOL_CALL";
|
|
709
|
+
/**
|
|
710
|
+
* Image generation stopped because the generated images have prohibited content.
|
|
711
|
+
*/
|
|
712
|
+
FinishReason["IMAGE_PROHIBITED_CONTENT"] = "IMAGE_PROHIBITED_CONTENT";
|
|
709
713
|
})(FinishReason || (FinishReason = {}));
|
|
710
714
|
/** Output only. Harm probability levels in the content. */
|
|
711
715
|
var HarmProbability;
|
|
@@ -939,6 +943,22 @@ var AdapterSize;
|
|
|
939
943
|
*/
|
|
940
944
|
AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
|
|
941
945
|
})(AdapterSize || (AdapterSize = {}));
|
|
946
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
947
|
+
var TuningTask;
|
|
948
|
+
(function (TuningTask) {
|
|
949
|
+
/**
|
|
950
|
+
* Default value. This value is unused.
|
|
951
|
+
*/
|
|
952
|
+
TuningTask["TUNING_TASK_UNSPECIFIED"] = "TUNING_TASK_UNSPECIFIED";
|
|
953
|
+
/**
|
|
954
|
+
* Tuning task for image to video.
|
|
955
|
+
*/
|
|
956
|
+
TuningTask["TUNING_TASK_I2V"] = "TUNING_TASK_I2V";
|
|
957
|
+
/**
|
|
958
|
+
* Tuning task for text to video.
|
|
959
|
+
*/
|
|
960
|
+
TuningTask["TUNING_TASK_T2V"] = "TUNING_TASK_T2V";
|
|
961
|
+
})(TuningTask || (TuningTask = {}));
|
|
942
962
|
/** Options for feature selection preference. */
|
|
943
963
|
var FeatureSelectionPreference;
|
|
944
964
|
(function (FeatureSelectionPreference) {
|
|
@@ -3306,6 +3326,20 @@ function citationMetadataFromMldev$1(fromObject) {
|
|
|
3306
3326
|
}
|
|
3307
3327
|
return toObject;
|
|
3308
3328
|
}
|
|
3329
|
+
function computerUseToMldev$4(fromObject) {
|
|
3330
|
+
const toObject = {};
|
|
3331
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
3332
|
+
if (fromEnvironment != null) {
|
|
3333
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
3334
|
+
}
|
|
3335
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
3336
|
+
'excludedPredefinedFunctions',
|
|
3337
|
+
]);
|
|
3338
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
3339
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
3340
|
+
}
|
|
3341
|
+
return toObject;
|
|
3342
|
+
}
|
|
3309
3343
|
function contentEmbeddingFromMldev$1(fromObject) {
|
|
3310
3344
|
const toObject = {};
|
|
3311
3345
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -3808,7 +3842,11 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
3808
3842
|
'thinkingConfig',
|
|
3809
3843
|
]);
|
|
3810
3844
|
if (fromThinkingConfig != null) {
|
|
3811
|
-
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$
|
|
3845
|
+
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$3(fromThinkingConfig));
|
|
3846
|
+
}
|
|
3847
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
3848
|
+
if (fromImageConfig != null) {
|
|
3849
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToMldev$1(fromImageConfig));
|
|
3812
3850
|
}
|
|
3813
3851
|
return toObject;
|
|
3814
3852
|
}
|
|
@@ -3891,6 +3929,14 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
3891
3929
|
}
|
|
3892
3930
|
return toObject;
|
|
3893
3931
|
}
|
|
3932
|
+
function imageConfigToMldev$1(fromObject) {
|
|
3933
|
+
const toObject = {};
|
|
3934
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
3935
|
+
if (fromAspectRatio != null) {
|
|
3936
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
3937
|
+
}
|
|
3938
|
+
return toObject;
|
|
3939
|
+
}
|
|
3894
3940
|
function inlinedEmbedContentResponseFromMldev(fromObject) {
|
|
3895
3941
|
const toObject = {};
|
|
3896
3942
|
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
@@ -4393,7 +4439,7 @@ function speechConfigToMldev$3(fromObject) {
|
|
|
4393
4439
|
}
|
|
4394
4440
|
return toObject;
|
|
4395
4441
|
}
|
|
4396
|
-
function thinkingConfigToMldev$
|
|
4442
|
+
function thinkingConfigToMldev$3(fromObject) {
|
|
4397
4443
|
const toObject = {};
|
|
4398
4444
|
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
4399
4445
|
'includeThoughts',
|
|
@@ -4409,20 +4455,6 @@ function thinkingConfigToMldev$1(fromObject) {
|
|
|
4409
4455
|
}
|
|
4410
4456
|
return toObject;
|
|
4411
4457
|
}
|
|
4412
|
-
function toolComputerUseToMldev$4(fromObject) {
|
|
4413
|
-
const toObject = {};
|
|
4414
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
4415
|
-
if (fromEnvironment != null) {
|
|
4416
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
4417
|
-
}
|
|
4418
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
4419
|
-
'excludedPredefinedFunctions',
|
|
4420
|
-
]);
|
|
4421
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
4422
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
4423
|
-
}
|
|
4424
|
-
return toObject;
|
|
4425
|
-
}
|
|
4426
4458
|
function toolConfigToMldev$2(fromObject) {
|
|
4427
4459
|
const toObject = {};
|
|
4428
4460
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -4478,7 +4510,7 @@ function toolToMldev$4(fromObject) {
|
|
|
4478
4510
|
}
|
|
4479
4511
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
4480
4512
|
if (fromComputerUse != null) {
|
|
4481
|
-
setValueByPath(toObject, ['computerUse'],
|
|
4513
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$4(fromComputerUse));
|
|
4482
4514
|
}
|
|
4483
4515
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
4484
4516
|
'codeExecution',
|
|
@@ -5476,6 +5508,34 @@ function cachedContentFromVertex(fromObject) {
|
|
|
5476
5508
|
}
|
|
5477
5509
|
return toObject;
|
|
5478
5510
|
}
|
|
5511
|
+
function computerUseToMldev$3(fromObject) {
|
|
5512
|
+
const toObject = {};
|
|
5513
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
5514
|
+
if (fromEnvironment != null) {
|
|
5515
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
5516
|
+
}
|
|
5517
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
5518
|
+
'excludedPredefinedFunctions',
|
|
5519
|
+
]);
|
|
5520
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
5521
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
5522
|
+
}
|
|
5523
|
+
return toObject;
|
|
5524
|
+
}
|
|
5525
|
+
function computerUseToVertex$2(fromObject) {
|
|
5526
|
+
const toObject = {};
|
|
5527
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
5528
|
+
if (fromEnvironment != null) {
|
|
5529
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
5530
|
+
}
|
|
5531
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
5532
|
+
'excludedPredefinedFunctions',
|
|
5533
|
+
]);
|
|
5534
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
5535
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
5536
|
+
}
|
|
5537
|
+
return toObject;
|
|
5538
|
+
}
|
|
5479
5539
|
function contentToMldev$3(fromObject) {
|
|
5480
5540
|
const toObject = {};
|
|
5481
5541
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -6220,34 +6280,6 @@ function retrievalConfigToVertex$1(fromObject) {
|
|
|
6220
6280
|
}
|
|
6221
6281
|
return toObject;
|
|
6222
6282
|
}
|
|
6223
|
-
function toolComputerUseToMldev$3(fromObject) {
|
|
6224
|
-
const toObject = {};
|
|
6225
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6226
|
-
if (fromEnvironment != null) {
|
|
6227
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6228
|
-
}
|
|
6229
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6230
|
-
'excludedPredefinedFunctions',
|
|
6231
|
-
]);
|
|
6232
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
6233
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6234
|
-
}
|
|
6235
|
-
return toObject;
|
|
6236
|
-
}
|
|
6237
|
-
function toolComputerUseToVertex$2(fromObject) {
|
|
6238
|
-
const toObject = {};
|
|
6239
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6240
|
-
if (fromEnvironment != null) {
|
|
6241
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6242
|
-
}
|
|
6243
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6244
|
-
'excludedPredefinedFunctions',
|
|
6245
|
-
]);
|
|
6246
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
6247
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6248
|
-
}
|
|
6249
|
-
return toObject;
|
|
6250
|
-
}
|
|
6251
6283
|
function toolConfigToMldev$1(fromObject) {
|
|
6252
6284
|
const toObject = {};
|
|
6253
6285
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -6319,7 +6351,7 @@ function toolToMldev$3(fromObject) {
|
|
|
6319
6351
|
}
|
|
6320
6352
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6321
6353
|
if (fromComputerUse != null) {
|
|
6322
|
-
setValueByPath(toObject, ['computerUse'],
|
|
6354
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$3(fromComputerUse));
|
|
6323
6355
|
}
|
|
6324
6356
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6325
6357
|
'codeExecution',
|
|
@@ -6373,7 +6405,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6373
6405
|
}
|
|
6374
6406
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6375
6407
|
if (fromComputerUse != null) {
|
|
6376
|
-
setValueByPath(toObject, ['computerUse'],
|
|
6408
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
|
|
6377
6409
|
}
|
|
6378
6410
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6379
6411
|
'codeExecution',
|
|
@@ -8000,6 +8032,34 @@ function blobToVertex$1(fromObject) {
|
|
|
8000
8032
|
}
|
|
8001
8033
|
return toObject;
|
|
8002
8034
|
}
|
|
8035
|
+
function computerUseToMldev$2(fromObject) {
|
|
8036
|
+
const toObject = {};
|
|
8037
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8038
|
+
if (fromEnvironment != null) {
|
|
8039
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8040
|
+
}
|
|
8041
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8042
|
+
'excludedPredefinedFunctions',
|
|
8043
|
+
]);
|
|
8044
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8045
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8046
|
+
}
|
|
8047
|
+
return toObject;
|
|
8048
|
+
}
|
|
8049
|
+
function computerUseToVertex$1(fromObject) {
|
|
8050
|
+
const toObject = {};
|
|
8051
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8052
|
+
if (fromEnvironment != null) {
|
|
8053
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8054
|
+
}
|
|
8055
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8056
|
+
'excludedPredefinedFunctions',
|
|
8057
|
+
]);
|
|
8058
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8059
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8060
|
+
}
|
|
8061
|
+
return toObject;
|
|
8062
|
+
}
|
|
8003
8063
|
function contentFromMldev$1(fromObject) {
|
|
8004
8064
|
const toObject = {};
|
|
8005
8065
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -8463,6 +8523,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
8463
8523
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8464
8524
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev$2(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8465
8525
|
}
|
|
8526
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8527
|
+
'thinkingConfig',
|
|
8528
|
+
]);
|
|
8529
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
8530
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToMldev$2(fromThinkingConfig));
|
|
8531
|
+
}
|
|
8466
8532
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8467
8533
|
'enableAffectiveDialog',
|
|
8468
8534
|
]);
|
|
@@ -8567,6 +8633,12 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
8567
8633
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8568
8634
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8569
8635
|
}
|
|
8636
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8637
|
+
'thinkingConfig',
|
|
8638
|
+
]);
|
|
8639
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
8640
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToVertex$1(fromThinkingConfig));
|
|
8641
|
+
}
|
|
8570
8642
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8571
8643
|
'enableAffectiveDialog',
|
|
8572
8644
|
]);
|
|
@@ -9729,31 +9801,35 @@ function speechConfigToVertex$1(fromObject) {
|
|
|
9729
9801
|
}
|
|
9730
9802
|
return toObject;
|
|
9731
9803
|
}
|
|
9732
|
-
function
|
|
9804
|
+
function thinkingConfigToMldev$2(fromObject) {
|
|
9733
9805
|
const toObject = {};
|
|
9734
|
-
const
|
|
9735
|
-
|
|
9736
|
-
|
|
9806
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
9807
|
+
'includeThoughts',
|
|
9808
|
+
]);
|
|
9809
|
+
if (fromIncludeThoughts != null) {
|
|
9810
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
9737
9811
|
}
|
|
9738
|
-
const
|
|
9739
|
-
'
|
|
9812
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
9813
|
+
'thinkingBudget',
|
|
9740
9814
|
]);
|
|
9741
|
-
if (
|
|
9742
|
-
setValueByPath(toObject, ['
|
|
9815
|
+
if (fromThinkingBudget != null) {
|
|
9816
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
9743
9817
|
}
|
|
9744
9818
|
return toObject;
|
|
9745
9819
|
}
|
|
9746
|
-
function
|
|
9820
|
+
function thinkingConfigToVertex$1(fromObject) {
|
|
9747
9821
|
const toObject = {};
|
|
9748
|
-
const
|
|
9749
|
-
|
|
9750
|
-
|
|
9822
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
9823
|
+
'includeThoughts',
|
|
9824
|
+
]);
|
|
9825
|
+
if (fromIncludeThoughts != null) {
|
|
9826
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
9751
9827
|
}
|
|
9752
|
-
const
|
|
9753
|
-
'
|
|
9828
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
9829
|
+
'thinkingBudget',
|
|
9754
9830
|
]);
|
|
9755
|
-
if (
|
|
9756
|
-
setValueByPath(toObject, ['
|
|
9831
|
+
if (fromThinkingBudget != null) {
|
|
9832
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
9757
9833
|
}
|
|
9758
9834
|
return toObject;
|
|
9759
9835
|
}
|
|
@@ -9796,7 +9872,7 @@ function toolToMldev$2(fromObject) {
|
|
|
9796
9872
|
}
|
|
9797
9873
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
9798
9874
|
if (fromComputerUse != null) {
|
|
9799
|
-
setValueByPath(toObject, ['computerUse'],
|
|
9875
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$2(fromComputerUse));
|
|
9800
9876
|
}
|
|
9801
9877
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
9802
9878
|
'codeExecution',
|
|
@@ -9850,7 +9926,7 @@ function toolToVertex$1(fromObject) {
|
|
|
9850
9926
|
}
|
|
9851
9927
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
9852
9928
|
if (fromComputerUse != null) {
|
|
9853
|
-
setValueByPath(toObject, ['computerUse'],
|
|
9929
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
|
|
9854
9930
|
}
|
|
9855
9931
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
9856
9932
|
'codeExecution',
|
|
@@ -10487,6 +10563,34 @@ function computeTokensResponseFromVertex(fromObject) {
|
|
|
10487
10563
|
}
|
|
10488
10564
|
return toObject;
|
|
10489
10565
|
}
|
|
10566
|
+
function computerUseToMldev$1(fromObject) {
|
|
10567
|
+
const toObject = {};
|
|
10568
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
10569
|
+
if (fromEnvironment != null) {
|
|
10570
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
10571
|
+
}
|
|
10572
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
10573
|
+
'excludedPredefinedFunctions',
|
|
10574
|
+
]);
|
|
10575
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
10576
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
10577
|
+
}
|
|
10578
|
+
return toObject;
|
|
10579
|
+
}
|
|
10580
|
+
function computerUseToVertex(fromObject) {
|
|
10581
|
+
const toObject = {};
|
|
10582
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
10583
|
+
if (fromEnvironment != null) {
|
|
10584
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
10585
|
+
}
|
|
10586
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
10587
|
+
'excludedPredefinedFunctions',
|
|
10588
|
+
]);
|
|
10589
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
10590
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
10591
|
+
}
|
|
10592
|
+
return toObject;
|
|
10593
|
+
}
|
|
10490
10594
|
function contentEmbeddingFromMldev(fromObject) {
|
|
10491
10595
|
const toObject = {};
|
|
10492
10596
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -11477,7 +11581,11 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
11477
11581
|
'thinkingConfig',
|
|
11478
11582
|
]);
|
|
11479
11583
|
if (fromThinkingConfig != null) {
|
|
11480
|
-
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(fromThinkingConfig));
|
|
11584
|
+
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$1(fromThinkingConfig));
|
|
11585
|
+
}
|
|
11586
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
11587
|
+
if (fromImageConfig != null) {
|
|
11588
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToMldev(fromImageConfig));
|
|
11481
11589
|
}
|
|
11482
11590
|
return toObject;
|
|
11483
11591
|
}
|
|
@@ -11639,6 +11747,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
11639
11747
|
if (fromThinkingConfig != null) {
|
|
11640
11748
|
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(fromThinkingConfig));
|
|
11641
11749
|
}
|
|
11750
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
11751
|
+
if (fromImageConfig != null) {
|
|
11752
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToVertex(fromImageConfig));
|
|
11753
|
+
}
|
|
11642
11754
|
return toObject;
|
|
11643
11755
|
}
|
|
11644
11756
|
function generateContentParametersToMldev(apiClient, fromObject) {
|
|
@@ -12521,6 +12633,22 @@ function googleSearchToVertex(fromObject) {
|
|
|
12521
12633
|
}
|
|
12522
12634
|
return toObject;
|
|
12523
12635
|
}
|
|
12636
|
+
function imageConfigToMldev(fromObject) {
|
|
12637
|
+
const toObject = {};
|
|
12638
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
12639
|
+
if (fromAspectRatio != null) {
|
|
12640
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
12641
|
+
}
|
|
12642
|
+
return toObject;
|
|
12643
|
+
}
|
|
12644
|
+
function imageConfigToVertex(fromObject) {
|
|
12645
|
+
const toObject = {};
|
|
12646
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
12647
|
+
if (fromAspectRatio != null) {
|
|
12648
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
12649
|
+
}
|
|
12650
|
+
return toObject;
|
|
12651
|
+
}
|
|
12524
12652
|
function imageFromMldev(fromObject) {
|
|
12525
12653
|
const toObject = {};
|
|
12526
12654
|
const fromImageBytes = getValueByPath(fromObject, [
|
|
@@ -13726,7 +13854,7 @@ function subjectReferenceConfigToVertex(fromObject) {
|
|
|
13726
13854
|
}
|
|
13727
13855
|
return toObject;
|
|
13728
13856
|
}
|
|
13729
|
-
function thinkingConfigToMldev(fromObject) {
|
|
13857
|
+
function thinkingConfigToMldev$1(fromObject) {
|
|
13730
13858
|
const toObject = {};
|
|
13731
13859
|
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
13732
13860
|
'includeThoughts',
|
|
@@ -13758,34 +13886,6 @@ function thinkingConfigToVertex(fromObject) {
|
|
|
13758
13886
|
}
|
|
13759
13887
|
return toObject;
|
|
13760
13888
|
}
|
|
13761
|
-
function toolComputerUseToMldev$1(fromObject) {
|
|
13762
|
-
const toObject = {};
|
|
13763
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
13764
|
-
if (fromEnvironment != null) {
|
|
13765
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
13766
|
-
}
|
|
13767
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
13768
|
-
'excludedPredefinedFunctions',
|
|
13769
|
-
]);
|
|
13770
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
13771
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
13772
|
-
}
|
|
13773
|
-
return toObject;
|
|
13774
|
-
}
|
|
13775
|
-
function toolComputerUseToVertex(fromObject) {
|
|
13776
|
-
const toObject = {};
|
|
13777
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
13778
|
-
if (fromEnvironment != null) {
|
|
13779
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
13780
|
-
}
|
|
13781
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
13782
|
-
'excludedPredefinedFunctions',
|
|
13783
|
-
]);
|
|
13784
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
13785
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
13786
|
-
}
|
|
13787
|
-
return toObject;
|
|
13788
|
-
}
|
|
13789
13889
|
function toolConfigToMldev(fromObject) {
|
|
13790
13890
|
const toObject = {};
|
|
13791
13891
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -13857,7 +13957,7 @@ function toolToMldev$1(fromObject) {
|
|
|
13857
13957
|
}
|
|
13858
13958
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
13859
13959
|
if (fromComputerUse != null) {
|
|
13860
|
-
setValueByPath(toObject, ['computerUse'],
|
|
13960
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$1(fromComputerUse));
|
|
13861
13961
|
}
|
|
13862
13962
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
13863
13963
|
'codeExecution',
|
|
@@ -13911,7 +14011,7 @@ function toolToVertex(fromObject) {
|
|
|
13911
14011
|
}
|
|
13912
14012
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
13913
14013
|
if (fromComputerUse != null) {
|
|
13914
|
-
setValueByPath(toObject, ['computerUse'],
|
|
14014
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
|
|
13915
14015
|
}
|
|
13916
14016
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
13917
14017
|
'codeExecution',
|
|
@@ -14345,7 +14445,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
14345
14445
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
14346
14446
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
14347
14447
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
14348
|
-
const SDK_VERSION = '1.
|
|
14448
|
+
const SDK_VERSION = '1.22.0'; // x-release-please-version
|
|
14349
14449
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
14350
14450
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
14351
14451
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -17534,6 +17634,20 @@ function blobToMldev(fromObject) {
|
|
|
17534
17634
|
}
|
|
17535
17635
|
return toObject;
|
|
17536
17636
|
}
|
|
17637
|
+
function computerUseToMldev(fromObject) {
|
|
17638
|
+
const toObject = {};
|
|
17639
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
17640
|
+
if (fromEnvironment != null) {
|
|
17641
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
17642
|
+
}
|
|
17643
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
17644
|
+
'excludedPredefinedFunctions',
|
|
17645
|
+
]);
|
|
17646
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
17647
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
17648
|
+
}
|
|
17649
|
+
return toObject;
|
|
17650
|
+
}
|
|
17537
17651
|
function contentToMldev(fromObject) {
|
|
17538
17652
|
const toObject = {};
|
|
17539
17653
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -17768,6 +17882,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
17768
17882
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
17769
17883
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev(tLiveSpeechConfig(fromSpeechConfig)));
|
|
17770
17884
|
}
|
|
17885
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
17886
|
+
'thinkingConfig',
|
|
17887
|
+
]);
|
|
17888
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
17889
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToMldev(fromThinkingConfig));
|
|
17890
|
+
}
|
|
17771
17891
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
17772
17892
|
'enableAffectiveDialog',
|
|
17773
17893
|
]);
|
|
@@ -17995,17 +18115,19 @@ function speechConfigToMldev(fromObject) {
|
|
|
17995
18115
|
}
|
|
17996
18116
|
return toObject;
|
|
17997
18117
|
}
|
|
17998
|
-
function
|
|
18118
|
+
function thinkingConfigToMldev(fromObject) {
|
|
17999
18119
|
const toObject = {};
|
|
18000
|
-
const
|
|
18001
|
-
|
|
18002
|
-
|
|
18120
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
18121
|
+
'includeThoughts',
|
|
18122
|
+
]);
|
|
18123
|
+
if (fromIncludeThoughts != null) {
|
|
18124
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
18003
18125
|
}
|
|
18004
|
-
const
|
|
18005
|
-
'
|
|
18126
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
18127
|
+
'thinkingBudget',
|
|
18006
18128
|
]);
|
|
18007
|
-
if (
|
|
18008
|
-
setValueByPath(toObject, ['
|
|
18129
|
+
if (fromThinkingBudget != null) {
|
|
18130
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
18009
18131
|
}
|
|
18010
18132
|
return toObject;
|
|
18011
18133
|
}
|
|
@@ -18048,7 +18170,7 @@ function toolToMldev(fromObject) {
|
|
|
18048
18170
|
}
|
|
18049
18171
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
18050
18172
|
if (fromComputerUse != null) {
|
|
18051
|
-
setValueByPath(toObject, ['computerUse'],
|
|
18173
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev(fromComputerUse));
|
|
18052
18174
|
}
|
|
18053
18175
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
18054
18176
|
'codeExecution',
|
|
@@ -18831,6 +18953,12 @@ function tuningJobFromMldev(fromObject) {
|
|
|
18831
18953
|
if (fromTunedModelDisplayName != null) {
|
|
18832
18954
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
18833
18955
|
}
|
|
18956
|
+
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
18957
|
+
'veoTuningSpec',
|
|
18958
|
+
]);
|
|
18959
|
+
if (fromVeoTuningSpec != null) {
|
|
18960
|
+
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
18961
|
+
}
|
|
18834
18962
|
return toObject;
|
|
18835
18963
|
}
|
|
18836
18964
|
function tuningJobFromVertex(fromObject) {
|
|
@@ -18945,6 +19073,12 @@ function tuningJobFromVertex(fromObject) {
|
|
|
18945
19073
|
if (fromTunedModelDisplayName != null) {
|
|
18946
19074
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
18947
19075
|
}
|
|
19076
|
+
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19077
|
+
'veoTuningSpec',
|
|
19078
|
+
]);
|
|
19079
|
+
if (fromVeoTuningSpec != null) {
|
|
19080
|
+
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19081
|
+
}
|
|
18948
19082
|
return toObject;
|
|
18949
19083
|
}
|
|
18950
19084
|
function tuningOperationFromMldev(fromObject) {
|
|
@@ -19573,5 +19707,5 @@ class GoogleGenAI {
|
|
|
19573
19707
|
}
|
|
19574
19708
|
}
|
|
19575
19709
|
|
|
19576
|
-
export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PersonGeneration, RawReferenceImage, RecontextImageResponse, ReplayResponse, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, Tokens, TrafficType, TuningMode, TurnCompleteReason, TurnCoverage, Type, UpscaleImageResponse, UrlRetrievalStatus, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
19710
|
+
export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PersonGeneration, RawReferenceImage, RecontextImageResponse, ReplayResponse, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, Tokens, TrafficType, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UpscaleImageResponse, UrlRetrievalStatus, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
19577
19711
|
//# sourceMappingURL=index.mjs.map
|