@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.cjs
CHANGED
|
@@ -734,6 +734,10 @@ exports.FinishReason = void 0;
|
|
|
734
734
|
* The tool call generated by the model is invalid.
|
|
735
735
|
*/
|
|
736
736
|
FinishReason["UNEXPECTED_TOOL_CALL"] = "UNEXPECTED_TOOL_CALL";
|
|
737
|
+
/**
|
|
738
|
+
* Image generation stopped because the generated images have prohibited content.
|
|
739
|
+
*/
|
|
740
|
+
FinishReason["IMAGE_PROHIBITED_CONTENT"] = "IMAGE_PROHIBITED_CONTENT";
|
|
737
741
|
})(exports.FinishReason || (exports.FinishReason = {}));
|
|
738
742
|
/** Output only. Harm probability levels in the content. */
|
|
739
743
|
exports.HarmProbability = void 0;
|
|
@@ -967,6 +971,22 @@ exports.AdapterSize = void 0;
|
|
|
967
971
|
*/
|
|
968
972
|
AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
|
|
969
973
|
})(exports.AdapterSize || (exports.AdapterSize = {}));
|
|
974
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
975
|
+
exports.TuningTask = void 0;
|
|
976
|
+
(function (TuningTask) {
|
|
977
|
+
/**
|
|
978
|
+
* Default value. This value is unused.
|
|
979
|
+
*/
|
|
980
|
+
TuningTask["TUNING_TASK_UNSPECIFIED"] = "TUNING_TASK_UNSPECIFIED";
|
|
981
|
+
/**
|
|
982
|
+
* Tuning task for image to video.
|
|
983
|
+
*/
|
|
984
|
+
TuningTask["TUNING_TASK_I2V"] = "TUNING_TASK_I2V";
|
|
985
|
+
/**
|
|
986
|
+
* Tuning task for text to video.
|
|
987
|
+
*/
|
|
988
|
+
TuningTask["TUNING_TASK_T2V"] = "TUNING_TASK_T2V";
|
|
989
|
+
})(exports.TuningTask || (exports.TuningTask = {}));
|
|
970
990
|
/** Options for feature selection preference. */
|
|
971
991
|
exports.FeatureSelectionPreference = void 0;
|
|
972
992
|
(function (FeatureSelectionPreference) {
|
|
@@ -3334,6 +3354,20 @@ function citationMetadataFromMldev$1(fromObject) {
|
|
|
3334
3354
|
}
|
|
3335
3355
|
return toObject;
|
|
3336
3356
|
}
|
|
3357
|
+
function computerUseToMldev$4(fromObject) {
|
|
3358
|
+
const toObject = {};
|
|
3359
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
3360
|
+
if (fromEnvironment != null) {
|
|
3361
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
3362
|
+
}
|
|
3363
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
3364
|
+
'excludedPredefinedFunctions',
|
|
3365
|
+
]);
|
|
3366
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
3367
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
3368
|
+
}
|
|
3369
|
+
return toObject;
|
|
3370
|
+
}
|
|
3337
3371
|
function contentEmbeddingFromMldev$1(fromObject) {
|
|
3338
3372
|
const toObject = {};
|
|
3339
3373
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -3836,7 +3870,11 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
3836
3870
|
'thinkingConfig',
|
|
3837
3871
|
]);
|
|
3838
3872
|
if (fromThinkingConfig != null) {
|
|
3839
|
-
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$
|
|
3873
|
+
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$3(fromThinkingConfig));
|
|
3874
|
+
}
|
|
3875
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
3876
|
+
if (fromImageConfig != null) {
|
|
3877
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToMldev$1(fromImageConfig));
|
|
3840
3878
|
}
|
|
3841
3879
|
return toObject;
|
|
3842
3880
|
}
|
|
@@ -3919,6 +3957,14 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
3919
3957
|
}
|
|
3920
3958
|
return toObject;
|
|
3921
3959
|
}
|
|
3960
|
+
function imageConfigToMldev$1(fromObject) {
|
|
3961
|
+
const toObject = {};
|
|
3962
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
3963
|
+
if (fromAspectRatio != null) {
|
|
3964
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
3965
|
+
}
|
|
3966
|
+
return toObject;
|
|
3967
|
+
}
|
|
3922
3968
|
function inlinedEmbedContentResponseFromMldev(fromObject) {
|
|
3923
3969
|
const toObject = {};
|
|
3924
3970
|
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
@@ -4421,7 +4467,7 @@ function speechConfigToMldev$3(fromObject) {
|
|
|
4421
4467
|
}
|
|
4422
4468
|
return toObject;
|
|
4423
4469
|
}
|
|
4424
|
-
function thinkingConfigToMldev$
|
|
4470
|
+
function thinkingConfigToMldev$3(fromObject) {
|
|
4425
4471
|
const toObject = {};
|
|
4426
4472
|
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
4427
4473
|
'includeThoughts',
|
|
@@ -4437,20 +4483,6 @@ function thinkingConfigToMldev$1(fromObject) {
|
|
|
4437
4483
|
}
|
|
4438
4484
|
return toObject;
|
|
4439
4485
|
}
|
|
4440
|
-
function toolComputerUseToMldev$4(fromObject) {
|
|
4441
|
-
const toObject = {};
|
|
4442
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
4443
|
-
if (fromEnvironment != null) {
|
|
4444
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
4445
|
-
}
|
|
4446
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
4447
|
-
'excludedPredefinedFunctions',
|
|
4448
|
-
]);
|
|
4449
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
4450
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
4451
|
-
}
|
|
4452
|
-
return toObject;
|
|
4453
|
-
}
|
|
4454
4486
|
function toolConfigToMldev$2(fromObject) {
|
|
4455
4487
|
const toObject = {};
|
|
4456
4488
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -4506,7 +4538,7 @@ function toolToMldev$4(fromObject) {
|
|
|
4506
4538
|
}
|
|
4507
4539
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
4508
4540
|
if (fromComputerUse != null) {
|
|
4509
|
-
setValueByPath(toObject, ['computerUse'],
|
|
4541
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$4(fromComputerUse));
|
|
4510
4542
|
}
|
|
4511
4543
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
4512
4544
|
'codeExecution',
|
|
@@ -5504,6 +5536,34 @@ function cachedContentFromVertex(fromObject) {
|
|
|
5504
5536
|
}
|
|
5505
5537
|
return toObject;
|
|
5506
5538
|
}
|
|
5539
|
+
function computerUseToMldev$3(fromObject) {
|
|
5540
|
+
const toObject = {};
|
|
5541
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
5542
|
+
if (fromEnvironment != null) {
|
|
5543
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
5544
|
+
}
|
|
5545
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
5546
|
+
'excludedPredefinedFunctions',
|
|
5547
|
+
]);
|
|
5548
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
5549
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
5550
|
+
}
|
|
5551
|
+
return toObject;
|
|
5552
|
+
}
|
|
5553
|
+
function computerUseToVertex$2(fromObject) {
|
|
5554
|
+
const toObject = {};
|
|
5555
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
5556
|
+
if (fromEnvironment != null) {
|
|
5557
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
5558
|
+
}
|
|
5559
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
5560
|
+
'excludedPredefinedFunctions',
|
|
5561
|
+
]);
|
|
5562
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
5563
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
5564
|
+
}
|
|
5565
|
+
return toObject;
|
|
5566
|
+
}
|
|
5507
5567
|
function contentToMldev$3(fromObject) {
|
|
5508
5568
|
const toObject = {};
|
|
5509
5569
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -6248,34 +6308,6 @@ function retrievalConfigToVertex$1(fromObject) {
|
|
|
6248
6308
|
}
|
|
6249
6309
|
return toObject;
|
|
6250
6310
|
}
|
|
6251
|
-
function toolComputerUseToMldev$3(fromObject) {
|
|
6252
|
-
const toObject = {};
|
|
6253
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6254
|
-
if (fromEnvironment != null) {
|
|
6255
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6256
|
-
}
|
|
6257
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6258
|
-
'excludedPredefinedFunctions',
|
|
6259
|
-
]);
|
|
6260
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
6261
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6262
|
-
}
|
|
6263
|
-
return toObject;
|
|
6264
|
-
}
|
|
6265
|
-
function toolComputerUseToVertex$2(fromObject) {
|
|
6266
|
-
const toObject = {};
|
|
6267
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6268
|
-
if (fromEnvironment != null) {
|
|
6269
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6270
|
-
}
|
|
6271
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6272
|
-
'excludedPredefinedFunctions',
|
|
6273
|
-
]);
|
|
6274
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
6275
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6276
|
-
}
|
|
6277
|
-
return toObject;
|
|
6278
|
-
}
|
|
6279
6311
|
function toolConfigToMldev$1(fromObject) {
|
|
6280
6312
|
const toObject = {};
|
|
6281
6313
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -6347,7 +6379,7 @@ function toolToMldev$3(fromObject) {
|
|
|
6347
6379
|
}
|
|
6348
6380
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6349
6381
|
if (fromComputerUse != null) {
|
|
6350
|
-
setValueByPath(toObject, ['computerUse'],
|
|
6382
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$3(fromComputerUse));
|
|
6351
6383
|
}
|
|
6352
6384
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6353
6385
|
'codeExecution',
|
|
@@ -6401,7 +6433,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6401
6433
|
}
|
|
6402
6434
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6403
6435
|
if (fromComputerUse != null) {
|
|
6404
|
-
setValueByPath(toObject, ['computerUse'],
|
|
6436
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
|
|
6405
6437
|
}
|
|
6406
6438
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6407
6439
|
'codeExecution',
|
|
@@ -8028,6 +8060,34 @@ function blobToVertex$1(fromObject) {
|
|
|
8028
8060
|
}
|
|
8029
8061
|
return toObject;
|
|
8030
8062
|
}
|
|
8063
|
+
function computerUseToMldev$2(fromObject) {
|
|
8064
|
+
const toObject = {};
|
|
8065
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8066
|
+
if (fromEnvironment != null) {
|
|
8067
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8068
|
+
}
|
|
8069
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8070
|
+
'excludedPredefinedFunctions',
|
|
8071
|
+
]);
|
|
8072
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8073
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8074
|
+
}
|
|
8075
|
+
return toObject;
|
|
8076
|
+
}
|
|
8077
|
+
function computerUseToVertex$1(fromObject) {
|
|
8078
|
+
const toObject = {};
|
|
8079
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8080
|
+
if (fromEnvironment != null) {
|
|
8081
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8082
|
+
}
|
|
8083
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8084
|
+
'excludedPredefinedFunctions',
|
|
8085
|
+
]);
|
|
8086
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8087
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8088
|
+
}
|
|
8089
|
+
return toObject;
|
|
8090
|
+
}
|
|
8031
8091
|
function contentFromMldev$1(fromObject) {
|
|
8032
8092
|
const toObject = {};
|
|
8033
8093
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -8491,6 +8551,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
8491
8551
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8492
8552
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev$2(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8493
8553
|
}
|
|
8554
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8555
|
+
'thinkingConfig',
|
|
8556
|
+
]);
|
|
8557
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
8558
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToMldev$2(fromThinkingConfig));
|
|
8559
|
+
}
|
|
8494
8560
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8495
8561
|
'enableAffectiveDialog',
|
|
8496
8562
|
]);
|
|
@@ -8595,6 +8661,12 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
8595
8661
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8596
8662
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8597
8663
|
}
|
|
8664
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8665
|
+
'thinkingConfig',
|
|
8666
|
+
]);
|
|
8667
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
8668
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToVertex$1(fromThinkingConfig));
|
|
8669
|
+
}
|
|
8598
8670
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8599
8671
|
'enableAffectiveDialog',
|
|
8600
8672
|
]);
|
|
@@ -9757,31 +9829,35 @@ function speechConfigToVertex$1(fromObject) {
|
|
|
9757
9829
|
}
|
|
9758
9830
|
return toObject;
|
|
9759
9831
|
}
|
|
9760
|
-
function
|
|
9832
|
+
function thinkingConfigToMldev$2(fromObject) {
|
|
9761
9833
|
const toObject = {};
|
|
9762
|
-
const
|
|
9763
|
-
|
|
9764
|
-
|
|
9834
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
9835
|
+
'includeThoughts',
|
|
9836
|
+
]);
|
|
9837
|
+
if (fromIncludeThoughts != null) {
|
|
9838
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
9765
9839
|
}
|
|
9766
|
-
const
|
|
9767
|
-
'
|
|
9840
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
9841
|
+
'thinkingBudget',
|
|
9768
9842
|
]);
|
|
9769
|
-
if (
|
|
9770
|
-
setValueByPath(toObject, ['
|
|
9843
|
+
if (fromThinkingBudget != null) {
|
|
9844
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
9771
9845
|
}
|
|
9772
9846
|
return toObject;
|
|
9773
9847
|
}
|
|
9774
|
-
function
|
|
9848
|
+
function thinkingConfigToVertex$1(fromObject) {
|
|
9775
9849
|
const toObject = {};
|
|
9776
|
-
const
|
|
9777
|
-
|
|
9778
|
-
|
|
9850
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
9851
|
+
'includeThoughts',
|
|
9852
|
+
]);
|
|
9853
|
+
if (fromIncludeThoughts != null) {
|
|
9854
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
9779
9855
|
}
|
|
9780
|
-
const
|
|
9781
|
-
'
|
|
9856
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
9857
|
+
'thinkingBudget',
|
|
9782
9858
|
]);
|
|
9783
|
-
if (
|
|
9784
|
-
setValueByPath(toObject, ['
|
|
9859
|
+
if (fromThinkingBudget != null) {
|
|
9860
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
9785
9861
|
}
|
|
9786
9862
|
return toObject;
|
|
9787
9863
|
}
|
|
@@ -9824,7 +9900,7 @@ function toolToMldev$2(fromObject) {
|
|
|
9824
9900
|
}
|
|
9825
9901
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
9826
9902
|
if (fromComputerUse != null) {
|
|
9827
|
-
setValueByPath(toObject, ['computerUse'],
|
|
9903
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$2(fromComputerUse));
|
|
9828
9904
|
}
|
|
9829
9905
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
9830
9906
|
'codeExecution',
|
|
@@ -9878,7 +9954,7 @@ function toolToVertex$1(fromObject) {
|
|
|
9878
9954
|
}
|
|
9879
9955
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
9880
9956
|
if (fromComputerUse != null) {
|
|
9881
|
-
setValueByPath(toObject, ['computerUse'],
|
|
9957
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
|
|
9882
9958
|
}
|
|
9883
9959
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
9884
9960
|
'codeExecution',
|
|
@@ -10515,6 +10591,34 @@ function computeTokensResponseFromVertex(fromObject) {
|
|
|
10515
10591
|
}
|
|
10516
10592
|
return toObject;
|
|
10517
10593
|
}
|
|
10594
|
+
function computerUseToMldev$1(fromObject) {
|
|
10595
|
+
const toObject = {};
|
|
10596
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
10597
|
+
if (fromEnvironment != null) {
|
|
10598
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
10599
|
+
}
|
|
10600
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
10601
|
+
'excludedPredefinedFunctions',
|
|
10602
|
+
]);
|
|
10603
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
10604
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
10605
|
+
}
|
|
10606
|
+
return toObject;
|
|
10607
|
+
}
|
|
10608
|
+
function computerUseToVertex(fromObject) {
|
|
10609
|
+
const toObject = {};
|
|
10610
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
10611
|
+
if (fromEnvironment != null) {
|
|
10612
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
10613
|
+
}
|
|
10614
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
10615
|
+
'excludedPredefinedFunctions',
|
|
10616
|
+
]);
|
|
10617
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
10618
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
10619
|
+
}
|
|
10620
|
+
return toObject;
|
|
10621
|
+
}
|
|
10518
10622
|
function contentEmbeddingFromMldev(fromObject) {
|
|
10519
10623
|
const toObject = {};
|
|
10520
10624
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -11505,7 +11609,11 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
11505
11609
|
'thinkingConfig',
|
|
11506
11610
|
]);
|
|
11507
11611
|
if (fromThinkingConfig != null) {
|
|
11508
|
-
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(fromThinkingConfig));
|
|
11612
|
+
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$1(fromThinkingConfig));
|
|
11613
|
+
}
|
|
11614
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
11615
|
+
if (fromImageConfig != null) {
|
|
11616
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToMldev(fromImageConfig));
|
|
11509
11617
|
}
|
|
11510
11618
|
return toObject;
|
|
11511
11619
|
}
|
|
@@ -11667,6 +11775,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
11667
11775
|
if (fromThinkingConfig != null) {
|
|
11668
11776
|
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(fromThinkingConfig));
|
|
11669
11777
|
}
|
|
11778
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
11779
|
+
if (fromImageConfig != null) {
|
|
11780
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToVertex(fromImageConfig));
|
|
11781
|
+
}
|
|
11670
11782
|
return toObject;
|
|
11671
11783
|
}
|
|
11672
11784
|
function generateContentParametersToMldev(apiClient, fromObject) {
|
|
@@ -12549,6 +12661,22 @@ function googleSearchToVertex(fromObject) {
|
|
|
12549
12661
|
}
|
|
12550
12662
|
return toObject;
|
|
12551
12663
|
}
|
|
12664
|
+
function imageConfigToMldev(fromObject) {
|
|
12665
|
+
const toObject = {};
|
|
12666
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
12667
|
+
if (fromAspectRatio != null) {
|
|
12668
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
12669
|
+
}
|
|
12670
|
+
return toObject;
|
|
12671
|
+
}
|
|
12672
|
+
function imageConfigToVertex(fromObject) {
|
|
12673
|
+
const toObject = {};
|
|
12674
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
12675
|
+
if (fromAspectRatio != null) {
|
|
12676
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
12677
|
+
}
|
|
12678
|
+
return toObject;
|
|
12679
|
+
}
|
|
12552
12680
|
function imageFromMldev(fromObject) {
|
|
12553
12681
|
const toObject = {};
|
|
12554
12682
|
const fromImageBytes = getValueByPath(fromObject, [
|
|
@@ -13754,7 +13882,7 @@ function subjectReferenceConfigToVertex(fromObject) {
|
|
|
13754
13882
|
}
|
|
13755
13883
|
return toObject;
|
|
13756
13884
|
}
|
|
13757
|
-
function thinkingConfigToMldev(fromObject) {
|
|
13885
|
+
function thinkingConfigToMldev$1(fromObject) {
|
|
13758
13886
|
const toObject = {};
|
|
13759
13887
|
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
13760
13888
|
'includeThoughts',
|
|
@@ -13786,34 +13914,6 @@ function thinkingConfigToVertex(fromObject) {
|
|
|
13786
13914
|
}
|
|
13787
13915
|
return toObject;
|
|
13788
13916
|
}
|
|
13789
|
-
function toolComputerUseToMldev$1(fromObject) {
|
|
13790
|
-
const toObject = {};
|
|
13791
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
13792
|
-
if (fromEnvironment != null) {
|
|
13793
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
13794
|
-
}
|
|
13795
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
13796
|
-
'excludedPredefinedFunctions',
|
|
13797
|
-
]);
|
|
13798
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
13799
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
13800
|
-
}
|
|
13801
|
-
return toObject;
|
|
13802
|
-
}
|
|
13803
|
-
function toolComputerUseToVertex(fromObject) {
|
|
13804
|
-
const toObject = {};
|
|
13805
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
13806
|
-
if (fromEnvironment != null) {
|
|
13807
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
13808
|
-
}
|
|
13809
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
13810
|
-
'excludedPredefinedFunctions',
|
|
13811
|
-
]);
|
|
13812
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
13813
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
13814
|
-
}
|
|
13815
|
-
return toObject;
|
|
13816
|
-
}
|
|
13817
13917
|
function toolConfigToMldev(fromObject) {
|
|
13818
13918
|
const toObject = {};
|
|
13819
13919
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -13885,7 +13985,7 @@ function toolToMldev$1(fromObject) {
|
|
|
13885
13985
|
}
|
|
13886
13986
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
13887
13987
|
if (fromComputerUse != null) {
|
|
13888
|
-
setValueByPath(toObject, ['computerUse'],
|
|
13988
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$1(fromComputerUse));
|
|
13889
13989
|
}
|
|
13890
13990
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
13891
13991
|
'codeExecution',
|
|
@@ -13939,7 +14039,7 @@ function toolToVertex(fromObject) {
|
|
|
13939
14039
|
}
|
|
13940
14040
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
13941
14041
|
if (fromComputerUse != null) {
|
|
13942
|
-
setValueByPath(toObject, ['computerUse'],
|
|
14042
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
|
|
13943
14043
|
}
|
|
13944
14044
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
13945
14045
|
'codeExecution',
|
|
@@ -14373,7 +14473,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
14373
14473
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
14374
14474
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
14375
14475
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
14376
|
-
const SDK_VERSION = '1.
|
|
14476
|
+
const SDK_VERSION = '1.22.0'; // x-release-please-version
|
|
14377
14477
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
14378
14478
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
14379
14479
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -17562,6 +17662,20 @@ function blobToMldev(fromObject) {
|
|
|
17562
17662
|
}
|
|
17563
17663
|
return toObject;
|
|
17564
17664
|
}
|
|
17665
|
+
function computerUseToMldev(fromObject) {
|
|
17666
|
+
const toObject = {};
|
|
17667
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
17668
|
+
if (fromEnvironment != null) {
|
|
17669
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
17670
|
+
}
|
|
17671
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
17672
|
+
'excludedPredefinedFunctions',
|
|
17673
|
+
]);
|
|
17674
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
17675
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
17676
|
+
}
|
|
17677
|
+
return toObject;
|
|
17678
|
+
}
|
|
17565
17679
|
function contentToMldev(fromObject) {
|
|
17566
17680
|
const toObject = {};
|
|
17567
17681
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -17796,6 +17910,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
17796
17910
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
17797
17911
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev(tLiveSpeechConfig(fromSpeechConfig)));
|
|
17798
17912
|
}
|
|
17913
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
17914
|
+
'thinkingConfig',
|
|
17915
|
+
]);
|
|
17916
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
17917
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToMldev(fromThinkingConfig));
|
|
17918
|
+
}
|
|
17799
17919
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
17800
17920
|
'enableAffectiveDialog',
|
|
17801
17921
|
]);
|
|
@@ -18023,17 +18143,19 @@ function speechConfigToMldev(fromObject) {
|
|
|
18023
18143
|
}
|
|
18024
18144
|
return toObject;
|
|
18025
18145
|
}
|
|
18026
|
-
function
|
|
18146
|
+
function thinkingConfigToMldev(fromObject) {
|
|
18027
18147
|
const toObject = {};
|
|
18028
|
-
const
|
|
18029
|
-
|
|
18030
|
-
|
|
18148
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
18149
|
+
'includeThoughts',
|
|
18150
|
+
]);
|
|
18151
|
+
if (fromIncludeThoughts != null) {
|
|
18152
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
18031
18153
|
}
|
|
18032
|
-
const
|
|
18033
|
-
'
|
|
18154
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
18155
|
+
'thinkingBudget',
|
|
18034
18156
|
]);
|
|
18035
|
-
if (
|
|
18036
|
-
setValueByPath(toObject, ['
|
|
18157
|
+
if (fromThinkingBudget != null) {
|
|
18158
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
18037
18159
|
}
|
|
18038
18160
|
return toObject;
|
|
18039
18161
|
}
|
|
@@ -18076,7 +18198,7 @@ function toolToMldev(fromObject) {
|
|
|
18076
18198
|
}
|
|
18077
18199
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
18078
18200
|
if (fromComputerUse != null) {
|
|
18079
|
-
setValueByPath(toObject, ['computerUse'],
|
|
18201
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev(fromComputerUse));
|
|
18080
18202
|
}
|
|
18081
18203
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
18082
18204
|
'codeExecution',
|
|
@@ -19033,6 +19155,12 @@ function tuningJobFromMldev(fromObject) {
|
|
|
19033
19155
|
if (fromTunedModelDisplayName != null) {
|
|
19034
19156
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19035
19157
|
}
|
|
19158
|
+
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19159
|
+
'veoTuningSpec',
|
|
19160
|
+
]);
|
|
19161
|
+
if (fromVeoTuningSpec != null) {
|
|
19162
|
+
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19163
|
+
}
|
|
19036
19164
|
return toObject;
|
|
19037
19165
|
}
|
|
19038
19166
|
function tuningJobFromVertex(fromObject) {
|
|
@@ -19147,6 +19275,12 @@ function tuningJobFromVertex(fromObject) {
|
|
|
19147
19275
|
if (fromTunedModelDisplayName != null) {
|
|
19148
19276
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19149
19277
|
}
|
|
19278
|
+
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19279
|
+
'veoTuningSpec',
|
|
19280
|
+
]);
|
|
19281
|
+
if (fromVeoTuningSpec != null) {
|
|
19282
|
+
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19283
|
+
}
|
|
19150
19284
|
return toObject;
|
|
19151
19285
|
}
|
|
19152
19286
|
function tuningOperationFromMldev(fromObject) {
|