@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/node/index.mjs
CHANGED
|
@@ -712,6 +712,10 @@ var FinishReason;
|
|
|
712
712
|
* The tool call generated by the model is invalid.
|
|
713
713
|
*/
|
|
714
714
|
FinishReason["UNEXPECTED_TOOL_CALL"] = "UNEXPECTED_TOOL_CALL";
|
|
715
|
+
/**
|
|
716
|
+
* Image generation stopped because the generated images have prohibited content.
|
|
717
|
+
*/
|
|
718
|
+
FinishReason["IMAGE_PROHIBITED_CONTENT"] = "IMAGE_PROHIBITED_CONTENT";
|
|
715
719
|
})(FinishReason || (FinishReason = {}));
|
|
716
720
|
/** Output only. Harm probability levels in the content. */
|
|
717
721
|
var HarmProbability;
|
|
@@ -945,6 +949,22 @@ var AdapterSize;
|
|
|
945
949
|
*/
|
|
946
950
|
AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
|
|
947
951
|
})(AdapterSize || (AdapterSize = {}));
|
|
952
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
953
|
+
var TuningTask;
|
|
954
|
+
(function (TuningTask) {
|
|
955
|
+
/**
|
|
956
|
+
* Default value. This value is unused.
|
|
957
|
+
*/
|
|
958
|
+
TuningTask["TUNING_TASK_UNSPECIFIED"] = "TUNING_TASK_UNSPECIFIED";
|
|
959
|
+
/**
|
|
960
|
+
* Tuning task for image to video.
|
|
961
|
+
*/
|
|
962
|
+
TuningTask["TUNING_TASK_I2V"] = "TUNING_TASK_I2V";
|
|
963
|
+
/**
|
|
964
|
+
* Tuning task for text to video.
|
|
965
|
+
*/
|
|
966
|
+
TuningTask["TUNING_TASK_T2V"] = "TUNING_TASK_T2V";
|
|
967
|
+
})(TuningTask || (TuningTask = {}));
|
|
948
968
|
/** Options for feature selection preference. */
|
|
949
969
|
var FeatureSelectionPreference;
|
|
950
970
|
(function (FeatureSelectionPreference) {
|
|
@@ -3312,6 +3332,20 @@ function citationMetadataFromMldev$1(fromObject) {
|
|
|
3312
3332
|
}
|
|
3313
3333
|
return toObject;
|
|
3314
3334
|
}
|
|
3335
|
+
function computerUseToMldev$4(fromObject) {
|
|
3336
|
+
const toObject = {};
|
|
3337
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
3338
|
+
if (fromEnvironment != null) {
|
|
3339
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
3340
|
+
}
|
|
3341
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
3342
|
+
'excludedPredefinedFunctions',
|
|
3343
|
+
]);
|
|
3344
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
3345
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
3346
|
+
}
|
|
3347
|
+
return toObject;
|
|
3348
|
+
}
|
|
3315
3349
|
function contentEmbeddingFromMldev$1(fromObject) {
|
|
3316
3350
|
const toObject = {};
|
|
3317
3351
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -3814,7 +3848,11 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
3814
3848
|
'thinkingConfig',
|
|
3815
3849
|
]);
|
|
3816
3850
|
if (fromThinkingConfig != null) {
|
|
3817
|
-
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$
|
|
3851
|
+
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$3(fromThinkingConfig));
|
|
3852
|
+
}
|
|
3853
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
3854
|
+
if (fromImageConfig != null) {
|
|
3855
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToMldev$1(fromImageConfig));
|
|
3818
3856
|
}
|
|
3819
3857
|
return toObject;
|
|
3820
3858
|
}
|
|
@@ -3897,6 +3935,14 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
3897
3935
|
}
|
|
3898
3936
|
return toObject;
|
|
3899
3937
|
}
|
|
3938
|
+
function imageConfigToMldev$1(fromObject) {
|
|
3939
|
+
const toObject = {};
|
|
3940
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
3941
|
+
if (fromAspectRatio != null) {
|
|
3942
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
3943
|
+
}
|
|
3944
|
+
return toObject;
|
|
3945
|
+
}
|
|
3900
3946
|
function inlinedEmbedContentResponseFromMldev(fromObject) {
|
|
3901
3947
|
const toObject = {};
|
|
3902
3948
|
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
@@ -4399,7 +4445,7 @@ function speechConfigToMldev$3(fromObject) {
|
|
|
4399
4445
|
}
|
|
4400
4446
|
return toObject;
|
|
4401
4447
|
}
|
|
4402
|
-
function thinkingConfigToMldev$
|
|
4448
|
+
function thinkingConfigToMldev$3(fromObject) {
|
|
4403
4449
|
const toObject = {};
|
|
4404
4450
|
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
4405
4451
|
'includeThoughts',
|
|
@@ -4415,20 +4461,6 @@ function thinkingConfigToMldev$1(fromObject) {
|
|
|
4415
4461
|
}
|
|
4416
4462
|
return toObject;
|
|
4417
4463
|
}
|
|
4418
|
-
function toolComputerUseToMldev$4(fromObject) {
|
|
4419
|
-
const toObject = {};
|
|
4420
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
4421
|
-
if (fromEnvironment != null) {
|
|
4422
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
4423
|
-
}
|
|
4424
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
4425
|
-
'excludedPredefinedFunctions',
|
|
4426
|
-
]);
|
|
4427
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
4428
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
4429
|
-
}
|
|
4430
|
-
return toObject;
|
|
4431
|
-
}
|
|
4432
4464
|
function toolConfigToMldev$2(fromObject) {
|
|
4433
4465
|
const toObject = {};
|
|
4434
4466
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -4484,7 +4516,7 @@ function toolToMldev$4(fromObject) {
|
|
|
4484
4516
|
}
|
|
4485
4517
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
4486
4518
|
if (fromComputerUse != null) {
|
|
4487
|
-
setValueByPath(toObject, ['computerUse'],
|
|
4519
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$4(fromComputerUse));
|
|
4488
4520
|
}
|
|
4489
4521
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
4490
4522
|
'codeExecution',
|
|
@@ -5482,6 +5514,34 @@ function cachedContentFromVertex(fromObject) {
|
|
|
5482
5514
|
}
|
|
5483
5515
|
return toObject;
|
|
5484
5516
|
}
|
|
5517
|
+
function computerUseToMldev$3(fromObject) {
|
|
5518
|
+
const toObject = {};
|
|
5519
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
5520
|
+
if (fromEnvironment != null) {
|
|
5521
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
5522
|
+
}
|
|
5523
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
5524
|
+
'excludedPredefinedFunctions',
|
|
5525
|
+
]);
|
|
5526
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
5527
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
5528
|
+
}
|
|
5529
|
+
return toObject;
|
|
5530
|
+
}
|
|
5531
|
+
function computerUseToVertex$2(fromObject) {
|
|
5532
|
+
const toObject = {};
|
|
5533
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
5534
|
+
if (fromEnvironment != null) {
|
|
5535
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
5536
|
+
}
|
|
5537
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
5538
|
+
'excludedPredefinedFunctions',
|
|
5539
|
+
]);
|
|
5540
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
5541
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
5542
|
+
}
|
|
5543
|
+
return toObject;
|
|
5544
|
+
}
|
|
5485
5545
|
function contentToMldev$3(fromObject) {
|
|
5486
5546
|
const toObject = {};
|
|
5487
5547
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -6226,34 +6286,6 @@ function retrievalConfigToVertex$1(fromObject) {
|
|
|
6226
6286
|
}
|
|
6227
6287
|
return toObject;
|
|
6228
6288
|
}
|
|
6229
|
-
function toolComputerUseToMldev$3(fromObject) {
|
|
6230
|
-
const toObject = {};
|
|
6231
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6232
|
-
if (fromEnvironment != null) {
|
|
6233
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6234
|
-
}
|
|
6235
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6236
|
-
'excludedPredefinedFunctions',
|
|
6237
|
-
]);
|
|
6238
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
6239
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6240
|
-
}
|
|
6241
|
-
return toObject;
|
|
6242
|
-
}
|
|
6243
|
-
function toolComputerUseToVertex$2(fromObject) {
|
|
6244
|
-
const toObject = {};
|
|
6245
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6246
|
-
if (fromEnvironment != null) {
|
|
6247
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6248
|
-
}
|
|
6249
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6250
|
-
'excludedPredefinedFunctions',
|
|
6251
|
-
]);
|
|
6252
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
6253
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6254
|
-
}
|
|
6255
|
-
return toObject;
|
|
6256
|
-
}
|
|
6257
6289
|
function toolConfigToMldev$1(fromObject) {
|
|
6258
6290
|
const toObject = {};
|
|
6259
6291
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -6325,7 +6357,7 @@ function toolToMldev$3(fromObject) {
|
|
|
6325
6357
|
}
|
|
6326
6358
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6327
6359
|
if (fromComputerUse != null) {
|
|
6328
|
-
setValueByPath(toObject, ['computerUse'],
|
|
6360
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$3(fromComputerUse));
|
|
6329
6361
|
}
|
|
6330
6362
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6331
6363
|
'codeExecution',
|
|
@@ -6379,7 +6411,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6379
6411
|
}
|
|
6380
6412
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6381
6413
|
if (fromComputerUse != null) {
|
|
6382
|
-
setValueByPath(toObject, ['computerUse'],
|
|
6414
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
|
|
6383
6415
|
}
|
|
6384
6416
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6385
6417
|
'codeExecution',
|
|
@@ -8006,6 +8038,34 @@ function blobToVertex$1(fromObject) {
|
|
|
8006
8038
|
}
|
|
8007
8039
|
return toObject;
|
|
8008
8040
|
}
|
|
8041
|
+
function computerUseToMldev$2(fromObject) {
|
|
8042
|
+
const toObject = {};
|
|
8043
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8044
|
+
if (fromEnvironment != null) {
|
|
8045
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8046
|
+
}
|
|
8047
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8048
|
+
'excludedPredefinedFunctions',
|
|
8049
|
+
]);
|
|
8050
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8051
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8052
|
+
}
|
|
8053
|
+
return toObject;
|
|
8054
|
+
}
|
|
8055
|
+
function computerUseToVertex$1(fromObject) {
|
|
8056
|
+
const toObject = {};
|
|
8057
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8058
|
+
if (fromEnvironment != null) {
|
|
8059
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8060
|
+
}
|
|
8061
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8062
|
+
'excludedPredefinedFunctions',
|
|
8063
|
+
]);
|
|
8064
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8065
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8066
|
+
}
|
|
8067
|
+
return toObject;
|
|
8068
|
+
}
|
|
8009
8069
|
function contentFromMldev$1(fromObject) {
|
|
8010
8070
|
const toObject = {};
|
|
8011
8071
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -8469,6 +8529,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
8469
8529
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8470
8530
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev$2(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8471
8531
|
}
|
|
8532
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8533
|
+
'thinkingConfig',
|
|
8534
|
+
]);
|
|
8535
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
8536
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToMldev$2(fromThinkingConfig));
|
|
8537
|
+
}
|
|
8472
8538
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8473
8539
|
'enableAffectiveDialog',
|
|
8474
8540
|
]);
|
|
@@ -8573,6 +8639,12 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
8573
8639
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8574
8640
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8575
8641
|
}
|
|
8642
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8643
|
+
'thinkingConfig',
|
|
8644
|
+
]);
|
|
8645
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
8646
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToVertex$1(fromThinkingConfig));
|
|
8647
|
+
}
|
|
8576
8648
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8577
8649
|
'enableAffectiveDialog',
|
|
8578
8650
|
]);
|
|
@@ -9735,31 +9807,35 @@ function speechConfigToVertex$1(fromObject) {
|
|
|
9735
9807
|
}
|
|
9736
9808
|
return toObject;
|
|
9737
9809
|
}
|
|
9738
|
-
function
|
|
9810
|
+
function thinkingConfigToMldev$2(fromObject) {
|
|
9739
9811
|
const toObject = {};
|
|
9740
|
-
const
|
|
9741
|
-
|
|
9742
|
-
|
|
9812
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
9813
|
+
'includeThoughts',
|
|
9814
|
+
]);
|
|
9815
|
+
if (fromIncludeThoughts != null) {
|
|
9816
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
9743
9817
|
}
|
|
9744
|
-
const
|
|
9745
|
-
'
|
|
9818
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
9819
|
+
'thinkingBudget',
|
|
9746
9820
|
]);
|
|
9747
|
-
if (
|
|
9748
|
-
setValueByPath(toObject, ['
|
|
9821
|
+
if (fromThinkingBudget != null) {
|
|
9822
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
9749
9823
|
}
|
|
9750
9824
|
return toObject;
|
|
9751
9825
|
}
|
|
9752
|
-
function
|
|
9826
|
+
function thinkingConfigToVertex$1(fromObject) {
|
|
9753
9827
|
const toObject = {};
|
|
9754
|
-
const
|
|
9755
|
-
|
|
9756
|
-
|
|
9828
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
9829
|
+
'includeThoughts',
|
|
9830
|
+
]);
|
|
9831
|
+
if (fromIncludeThoughts != null) {
|
|
9832
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
9757
9833
|
}
|
|
9758
|
-
const
|
|
9759
|
-
'
|
|
9834
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
9835
|
+
'thinkingBudget',
|
|
9760
9836
|
]);
|
|
9761
|
-
if (
|
|
9762
|
-
setValueByPath(toObject, ['
|
|
9837
|
+
if (fromThinkingBudget != null) {
|
|
9838
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
9763
9839
|
}
|
|
9764
9840
|
return toObject;
|
|
9765
9841
|
}
|
|
@@ -9802,7 +9878,7 @@ function toolToMldev$2(fromObject) {
|
|
|
9802
9878
|
}
|
|
9803
9879
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
9804
9880
|
if (fromComputerUse != null) {
|
|
9805
|
-
setValueByPath(toObject, ['computerUse'],
|
|
9881
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$2(fromComputerUse));
|
|
9806
9882
|
}
|
|
9807
9883
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
9808
9884
|
'codeExecution',
|
|
@@ -9856,7 +9932,7 @@ function toolToVertex$1(fromObject) {
|
|
|
9856
9932
|
}
|
|
9857
9933
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
9858
9934
|
if (fromComputerUse != null) {
|
|
9859
|
-
setValueByPath(toObject, ['computerUse'],
|
|
9935
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
|
|
9860
9936
|
}
|
|
9861
9937
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
9862
9938
|
'codeExecution',
|
|
@@ -10493,6 +10569,34 @@ function computeTokensResponseFromVertex(fromObject) {
|
|
|
10493
10569
|
}
|
|
10494
10570
|
return toObject;
|
|
10495
10571
|
}
|
|
10572
|
+
function computerUseToMldev$1(fromObject) {
|
|
10573
|
+
const toObject = {};
|
|
10574
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
10575
|
+
if (fromEnvironment != null) {
|
|
10576
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
10577
|
+
}
|
|
10578
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
10579
|
+
'excludedPredefinedFunctions',
|
|
10580
|
+
]);
|
|
10581
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
10582
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
10583
|
+
}
|
|
10584
|
+
return toObject;
|
|
10585
|
+
}
|
|
10586
|
+
function computerUseToVertex(fromObject) {
|
|
10587
|
+
const toObject = {};
|
|
10588
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
10589
|
+
if (fromEnvironment != null) {
|
|
10590
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
10591
|
+
}
|
|
10592
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
10593
|
+
'excludedPredefinedFunctions',
|
|
10594
|
+
]);
|
|
10595
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
10596
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
10597
|
+
}
|
|
10598
|
+
return toObject;
|
|
10599
|
+
}
|
|
10496
10600
|
function contentEmbeddingFromMldev(fromObject) {
|
|
10497
10601
|
const toObject = {};
|
|
10498
10602
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -11483,7 +11587,11 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
11483
11587
|
'thinkingConfig',
|
|
11484
11588
|
]);
|
|
11485
11589
|
if (fromThinkingConfig != null) {
|
|
11486
|
-
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(fromThinkingConfig));
|
|
11590
|
+
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$1(fromThinkingConfig));
|
|
11591
|
+
}
|
|
11592
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
11593
|
+
if (fromImageConfig != null) {
|
|
11594
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToMldev(fromImageConfig));
|
|
11487
11595
|
}
|
|
11488
11596
|
return toObject;
|
|
11489
11597
|
}
|
|
@@ -11645,6 +11753,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
11645
11753
|
if (fromThinkingConfig != null) {
|
|
11646
11754
|
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(fromThinkingConfig));
|
|
11647
11755
|
}
|
|
11756
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
11757
|
+
if (fromImageConfig != null) {
|
|
11758
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToVertex(fromImageConfig));
|
|
11759
|
+
}
|
|
11648
11760
|
return toObject;
|
|
11649
11761
|
}
|
|
11650
11762
|
function generateContentParametersToMldev(apiClient, fromObject) {
|
|
@@ -12527,6 +12639,22 @@ function googleSearchToVertex(fromObject) {
|
|
|
12527
12639
|
}
|
|
12528
12640
|
return toObject;
|
|
12529
12641
|
}
|
|
12642
|
+
function imageConfigToMldev(fromObject) {
|
|
12643
|
+
const toObject = {};
|
|
12644
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
12645
|
+
if (fromAspectRatio != null) {
|
|
12646
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
12647
|
+
}
|
|
12648
|
+
return toObject;
|
|
12649
|
+
}
|
|
12650
|
+
function imageConfigToVertex(fromObject) {
|
|
12651
|
+
const toObject = {};
|
|
12652
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
12653
|
+
if (fromAspectRatio != null) {
|
|
12654
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
12655
|
+
}
|
|
12656
|
+
return toObject;
|
|
12657
|
+
}
|
|
12530
12658
|
function imageFromMldev(fromObject) {
|
|
12531
12659
|
const toObject = {};
|
|
12532
12660
|
const fromImageBytes = getValueByPath(fromObject, [
|
|
@@ -13732,7 +13860,7 @@ function subjectReferenceConfigToVertex(fromObject) {
|
|
|
13732
13860
|
}
|
|
13733
13861
|
return toObject;
|
|
13734
13862
|
}
|
|
13735
|
-
function thinkingConfigToMldev(fromObject) {
|
|
13863
|
+
function thinkingConfigToMldev$1(fromObject) {
|
|
13736
13864
|
const toObject = {};
|
|
13737
13865
|
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
13738
13866
|
'includeThoughts',
|
|
@@ -13764,34 +13892,6 @@ function thinkingConfigToVertex(fromObject) {
|
|
|
13764
13892
|
}
|
|
13765
13893
|
return toObject;
|
|
13766
13894
|
}
|
|
13767
|
-
function toolComputerUseToMldev$1(fromObject) {
|
|
13768
|
-
const toObject = {};
|
|
13769
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
13770
|
-
if (fromEnvironment != null) {
|
|
13771
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
13772
|
-
}
|
|
13773
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
13774
|
-
'excludedPredefinedFunctions',
|
|
13775
|
-
]);
|
|
13776
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
13777
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
13778
|
-
}
|
|
13779
|
-
return toObject;
|
|
13780
|
-
}
|
|
13781
|
-
function toolComputerUseToVertex(fromObject) {
|
|
13782
|
-
const toObject = {};
|
|
13783
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
13784
|
-
if (fromEnvironment != null) {
|
|
13785
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
13786
|
-
}
|
|
13787
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
13788
|
-
'excludedPredefinedFunctions',
|
|
13789
|
-
]);
|
|
13790
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
13791
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
13792
|
-
}
|
|
13793
|
-
return toObject;
|
|
13794
|
-
}
|
|
13795
13895
|
function toolConfigToMldev(fromObject) {
|
|
13796
13896
|
const toObject = {};
|
|
13797
13897
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -13863,7 +13963,7 @@ function toolToMldev$1(fromObject) {
|
|
|
13863
13963
|
}
|
|
13864
13964
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
13865
13965
|
if (fromComputerUse != null) {
|
|
13866
|
-
setValueByPath(toObject, ['computerUse'],
|
|
13966
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$1(fromComputerUse));
|
|
13867
13967
|
}
|
|
13868
13968
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
13869
13969
|
'codeExecution',
|
|
@@ -13917,7 +14017,7 @@ function toolToVertex(fromObject) {
|
|
|
13917
14017
|
}
|
|
13918
14018
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
13919
14019
|
if (fromComputerUse != null) {
|
|
13920
|
-
setValueByPath(toObject, ['computerUse'],
|
|
14020
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
|
|
13921
14021
|
}
|
|
13922
14022
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
13923
14023
|
'codeExecution',
|
|
@@ -14351,7 +14451,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
14351
14451
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
14352
14452
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
14353
14453
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
14354
|
-
const SDK_VERSION = '1.
|
|
14454
|
+
const SDK_VERSION = '1.22.0'; // x-release-please-version
|
|
14355
14455
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
14356
14456
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
14357
14457
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -17540,6 +17640,20 @@ function blobToMldev(fromObject) {
|
|
|
17540
17640
|
}
|
|
17541
17641
|
return toObject;
|
|
17542
17642
|
}
|
|
17643
|
+
function computerUseToMldev(fromObject) {
|
|
17644
|
+
const toObject = {};
|
|
17645
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
17646
|
+
if (fromEnvironment != null) {
|
|
17647
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
17648
|
+
}
|
|
17649
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
17650
|
+
'excludedPredefinedFunctions',
|
|
17651
|
+
]);
|
|
17652
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
17653
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
17654
|
+
}
|
|
17655
|
+
return toObject;
|
|
17656
|
+
}
|
|
17543
17657
|
function contentToMldev(fromObject) {
|
|
17544
17658
|
const toObject = {};
|
|
17545
17659
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -17774,6 +17888,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
17774
17888
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
17775
17889
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev(tLiveSpeechConfig(fromSpeechConfig)));
|
|
17776
17890
|
}
|
|
17891
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
17892
|
+
'thinkingConfig',
|
|
17893
|
+
]);
|
|
17894
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
17895
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToMldev(fromThinkingConfig));
|
|
17896
|
+
}
|
|
17777
17897
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
17778
17898
|
'enableAffectiveDialog',
|
|
17779
17899
|
]);
|
|
@@ -18001,17 +18121,19 @@ function speechConfigToMldev(fromObject) {
|
|
|
18001
18121
|
}
|
|
18002
18122
|
return toObject;
|
|
18003
18123
|
}
|
|
18004
|
-
function
|
|
18124
|
+
function thinkingConfigToMldev(fromObject) {
|
|
18005
18125
|
const toObject = {};
|
|
18006
|
-
const
|
|
18007
|
-
|
|
18008
|
-
|
|
18126
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
18127
|
+
'includeThoughts',
|
|
18128
|
+
]);
|
|
18129
|
+
if (fromIncludeThoughts != null) {
|
|
18130
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
18009
18131
|
}
|
|
18010
|
-
const
|
|
18011
|
-
'
|
|
18132
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
18133
|
+
'thinkingBudget',
|
|
18012
18134
|
]);
|
|
18013
|
-
if (
|
|
18014
|
-
setValueByPath(toObject, ['
|
|
18135
|
+
if (fromThinkingBudget != null) {
|
|
18136
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
18015
18137
|
}
|
|
18016
18138
|
return toObject;
|
|
18017
18139
|
}
|
|
@@ -18054,7 +18176,7 @@ function toolToMldev(fromObject) {
|
|
|
18054
18176
|
}
|
|
18055
18177
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
18056
18178
|
if (fromComputerUse != null) {
|
|
18057
|
-
setValueByPath(toObject, ['computerUse'],
|
|
18179
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev(fromComputerUse));
|
|
18058
18180
|
}
|
|
18059
18181
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
18060
18182
|
'codeExecution',
|
|
@@ -19011,6 +19133,12 @@ function tuningJobFromMldev(fromObject) {
|
|
|
19011
19133
|
if (fromTunedModelDisplayName != null) {
|
|
19012
19134
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19013
19135
|
}
|
|
19136
|
+
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19137
|
+
'veoTuningSpec',
|
|
19138
|
+
]);
|
|
19139
|
+
if (fromVeoTuningSpec != null) {
|
|
19140
|
+
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19141
|
+
}
|
|
19014
19142
|
return toObject;
|
|
19015
19143
|
}
|
|
19016
19144
|
function tuningJobFromVertex(fromObject) {
|
|
@@ -19125,6 +19253,12 @@ function tuningJobFromVertex(fromObject) {
|
|
|
19125
19253
|
if (fromTunedModelDisplayName != null) {
|
|
19126
19254
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19127
19255
|
}
|
|
19256
|
+
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19257
|
+
'veoTuningSpec',
|
|
19258
|
+
]);
|
|
19259
|
+
if (fromVeoTuningSpec != null) {
|
|
19260
|
+
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19261
|
+
}
|
|
19128
19262
|
return toObject;
|
|
19129
19263
|
}
|
|
19130
19264
|
function tuningOperationFromMldev(fromObject) {
|
|
@@ -19911,5 +20045,5 @@ function getApiKeyFromEnv() {
|
|
|
19911
20045
|
return envGoogleApiKey || envGeminiApiKey || undefined;
|
|
19912
20046
|
}
|
|
19913
20047
|
|
|
19914
|
-
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 };
|
|
20048
|
+
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 };
|
|
19915
20049
|
//# sourceMappingURL=index.mjs.map
|