@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/index.mjs
CHANGED
|
@@ -676,6 +676,10 @@ var FinishReason;
|
|
|
676
676
|
* The tool call generated by the model is invalid.
|
|
677
677
|
*/
|
|
678
678
|
FinishReason["UNEXPECTED_TOOL_CALL"] = "UNEXPECTED_TOOL_CALL";
|
|
679
|
+
/**
|
|
680
|
+
* Image generation stopped because the generated images have prohibited content.
|
|
681
|
+
*/
|
|
682
|
+
FinishReason["IMAGE_PROHIBITED_CONTENT"] = "IMAGE_PROHIBITED_CONTENT";
|
|
679
683
|
})(FinishReason || (FinishReason = {}));
|
|
680
684
|
/** Output only. Harm probability levels in the content. */
|
|
681
685
|
var HarmProbability;
|
|
@@ -909,6 +913,22 @@ var AdapterSize;
|
|
|
909
913
|
*/
|
|
910
914
|
AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
|
|
911
915
|
})(AdapterSize || (AdapterSize = {}));
|
|
916
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
917
|
+
var TuningTask;
|
|
918
|
+
(function (TuningTask) {
|
|
919
|
+
/**
|
|
920
|
+
* Default value. This value is unused.
|
|
921
|
+
*/
|
|
922
|
+
TuningTask["TUNING_TASK_UNSPECIFIED"] = "TUNING_TASK_UNSPECIFIED";
|
|
923
|
+
/**
|
|
924
|
+
* Tuning task for image to video.
|
|
925
|
+
*/
|
|
926
|
+
TuningTask["TUNING_TASK_I2V"] = "TUNING_TASK_I2V";
|
|
927
|
+
/**
|
|
928
|
+
* Tuning task for text to video.
|
|
929
|
+
*/
|
|
930
|
+
TuningTask["TUNING_TASK_T2V"] = "TUNING_TASK_T2V";
|
|
931
|
+
})(TuningTask || (TuningTask = {}));
|
|
912
932
|
/** Options for feature selection preference. */
|
|
913
933
|
var FeatureSelectionPreference;
|
|
914
934
|
(function (FeatureSelectionPreference) {
|
|
@@ -3276,6 +3296,20 @@ function citationMetadataFromMldev$1(fromObject) {
|
|
|
3276
3296
|
}
|
|
3277
3297
|
return toObject;
|
|
3278
3298
|
}
|
|
3299
|
+
function computerUseToMldev$4(fromObject) {
|
|
3300
|
+
const toObject = {};
|
|
3301
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
3302
|
+
if (fromEnvironment != null) {
|
|
3303
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
3304
|
+
}
|
|
3305
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
3306
|
+
'excludedPredefinedFunctions',
|
|
3307
|
+
]);
|
|
3308
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
3309
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
3310
|
+
}
|
|
3311
|
+
return toObject;
|
|
3312
|
+
}
|
|
3279
3313
|
function contentEmbeddingFromMldev$1(fromObject) {
|
|
3280
3314
|
const toObject = {};
|
|
3281
3315
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -3778,7 +3812,11 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
3778
3812
|
'thinkingConfig',
|
|
3779
3813
|
]);
|
|
3780
3814
|
if (fromThinkingConfig != null) {
|
|
3781
|
-
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$
|
|
3815
|
+
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$3(fromThinkingConfig));
|
|
3816
|
+
}
|
|
3817
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
3818
|
+
if (fromImageConfig != null) {
|
|
3819
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToMldev$1(fromImageConfig));
|
|
3782
3820
|
}
|
|
3783
3821
|
return toObject;
|
|
3784
3822
|
}
|
|
@@ -3861,6 +3899,14 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
3861
3899
|
}
|
|
3862
3900
|
return toObject;
|
|
3863
3901
|
}
|
|
3902
|
+
function imageConfigToMldev$1(fromObject) {
|
|
3903
|
+
const toObject = {};
|
|
3904
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
3905
|
+
if (fromAspectRatio != null) {
|
|
3906
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
3907
|
+
}
|
|
3908
|
+
return toObject;
|
|
3909
|
+
}
|
|
3864
3910
|
function inlinedEmbedContentResponseFromMldev(fromObject) {
|
|
3865
3911
|
const toObject = {};
|
|
3866
3912
|
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
@@ -4363,7 +4409,7 @@ function speechConfigToMldev$3(fromObject) {
|
|
|
4363
4409
|
}
|
|
4364
4410
|
return toObject;
|
|
4365
4411
|
}
|
|
4366
|
-
function thinkingConfigToMldev$
|
|
4412
|
+
function thinkingConfigToMldev$3(fromObject) {
|
|
4367
4413
|
const toObject = {};
|
|
4368
4414
|
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
4369
4415
|
'includeThoughts',
|
|
@@ -4379,20 +4425,6 @@ function thinkingConfigToMldev$1(fromObject) {
|
|
|
4379
4425
|
}
|
|
4380
4426
|
return toObject;
|
|
4381
4427
|
}
|
|
4382
|
-
function toolComputerUseToMldev$4(fromObject) {
|
|
4383
|
-
const toObject = {};
|
|
4384
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
4385
|
-
if (fromEnvironment != null) {
|
|
4386
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
4387
|
-
}
|
|
4388
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
4389
|
-
'excludedPredefinedFunctions',
|
|
4390
|
-
]);
|
|
4391
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
4392
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
4393
|
-
}
|
|
4394
|
-
return toObject;
|
|
4395
|
-
}
|
|
4396
4428
|
function toolConfigToMldev$2(fromObject) {
|
|
4397
4429
|
const toObject = {};
|
|
4398
4430
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -4448,7 +4480,7 @@ function toolToMldev$4(fromObject) {
|
|
|
4448
4480
|
}
|
|
4449
4481
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
4450
4482
|
if (fromComputerUse != null) {
|
|
4451
|
-
setValueByPath(toObject, ['computerUse'],
|
|
4483
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$4(fromComputerUse));
|
|
4452
4484
|
}
|
|
4453
4485
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
4454
4486
|
'codeExecution',
|
|
@@ -5446,6 +5478,34 @@ function cachedContentFromVertex(fromObject) {
|
|
|
5446
5478
|
}
|
|
5447
5479
|
return toObject;
|
|
5448
5480
|
}
|
|
5481
|
+
function computerUseToMldev$3(fromObject) {
|
|
5482
|
+
const toObject = {};
|
|
5483
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
5484
|
+
if (fromEnvironment != null) {
|
|
5485
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
5486
|
+
}
|
|
5487
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
5488
|
+
'excludedPredefinedFunctions',
|
|
5489
|
+
]);
|
|
5490
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
5491
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
5492
|
+
}
|
|
5493
|
+
return toObject;
|
|
5494
|
+
}
|
|
5495
|
+
function computerUseToVertex$2(fromObject) {
|
|
5496
|
+
const toObject = {};
|
|
5497
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
5498
|
+
if (fromEnvironment != null) {
|
|
5499
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
5500
|
+
}
|
|
5501
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
5502
|
+
'excludedPredefinedFunctions',
|
|
5503
|
+
]);
|
|
5504
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
5505
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
5506
|
+
}
|
|
5507
|
+
return toObject;
|
|
5508
|
+
}
|
|
5449
5509
|
function contentToMldev$3(fromObject) {
|
|
5450
5510
|
const toObject = {};
|
|
5451
5511
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -6190,34 +6250,6 @@ function retrievalConfigToVertex$1(fromObject) {
|
|
|
6190
6250
|
}
|
|
6191
6251
|
return toObject;
|
|
6192
6252
|
}
|
|
6193
|
-
function toolComputerUseToMldev$3(fromObject) {
|
|
6194
|
-
const toObject = {};
|
|
6195
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6196
|
-
if (fromEnvironment != null) {
|
|
6197
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6198
|
-
}
|
|
6199
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6200
|
-
'excludedPredefinedFunctions',
|
|
6201
|
-
]);
|
|
6202
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
6203
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6204
|
-
}
|
|
6205
|
-
return toObject;
|
|
6206
|
-
}
|
|
6207
|
-
function toolComputerUseToVertex$2(fromObject) {
|
|
6208
|
-
const toObject = {};
|
|
6209
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6210
|
-
if (fromEnvironment != null) {
|
|
6211
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6212
|
-
}
|
|
6213
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6214
|
-
'excludedPredefinedFunctions',
|
|
6215
|
-
]);
|
|
6216
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
6217
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6218
|
-
}
|
|
6219
|
-
return toObject;
|
|
6220
|
-
}
|
|
6221
6253
|
function toolConfigToMldev$1(fromObject) {
|
|
6222
6254
|
const toObject = {};
|
|
6223
6255
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -6289,7 +6321,7 @@ function toolToMldev$3(fromObject) {
|
|
|
6289
6321
|
}
|
|
6290
6322
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6291
6323
|
if (fromComputerUse != null) {
|
|
6292
|
-
setValueByPath(toObject, ['computerUse'],
|
|
6324
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$3(fromComputerUse));
|
|
6293
6325
|
}
|
|
6294
6326
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6295
6327
|
'codeExecution',
|
|
@@ -6343,7 +6375,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6343
6375
|
}
|
|
6344
6376
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6345
6377
|
if (fromComputerUse != null) {
|
|
6346
|
-
setValueByPath(toObject, ['computerUse'],
|
|
6378
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
|
|
6347
6379
|
}
|
|
6348
6380
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6349
6381
|
'codeExecution',
|
|
@@ -7233,7 +7265,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
7233
7265
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
7234
7266
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
7235
7267
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
7236
|
-
const SDK_VERSION = '1.
|
|
7268
|
+
const SDK_VERSION = '1.22.0'; // x-release-please-version
|
|
7237
7269
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
7238
7270
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
7239
7271
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -8667,6 +8699,34 @@ function blobToVertex$1(fromObject) {
|
|
|
8667
8699
|
}
|
|
8668
8700
|
return toObject;
|
|
8669
8701
|
}
|
|
8702
|
+
function computerUseToMldev$2(fromObject) {
|
|
8703
|
+
const toObject = {};
|
|
8704
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8705
|
+
if (fromEnvironment != null) {
|
|
8706
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8707
|
+
}
|
|
8708
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8709
|
+
'excludedPredefinedFunctions',
|
|
8710
|
+
]);
|
|
8711
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8712
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8713
|
+
}
|
|
8714
|
+
return toObject;
|
|
8715
|
+
}
|
|
8716
|
+
function computerUseToVertex$1(fromObject) {
|
|
8717
|
+
const toObject = {};
|
|
8718
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8719
|
+
if (fromEnvironment != null) {
|
|
8720
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8721
|
+
}
|
|
8722
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8723
|
+
'excludedPredefinedFunctions',
|
|
8724
|
+
]);
|
|
8725
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8726
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8727
|
+
}
|
|
8728
|
+
return toObject;
|
|
8729
|
+
}
|
|
8670
8730
|
function contentFromMldev$1(fromObject) {
|
|
8671
8731
|
const toObject = {};
|
|
8672
8732
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -9130,6 +9190,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
9130
9190
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
9131
9191
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev$2(tLiveSpeechConfig(fromSpeechConfig)));
|
|
9132
9192
|
}
|
|
9193
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
9194
|
+
'thinkingConfig',
|
|
9195
|
+
]);
|
|
9196
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
9197
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToMldev$2(fromThinkingConfig));
|
|
9198
|
+
}
|
|
9133
9199
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
9134
9200
|
'enableAffectiveDialog',
|
|
9135
9201
|
]);
|
|
@@ -9234,6 +9300,12 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
9234
9300
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
9235
9301
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
9236
9302
|
}
|
|
9303
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
9304
|
+
'thinkingConfig',
|
|
9305
|
+
]);
|
|
9306
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
9307
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToVertex$1(fromThinkingConfig));
|
|
9308
|
+
}
|
|
9237
9309
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
9238
9310
|
'enableAffectiveDialog',
|
|
9239
9311
|
]);
|
|
@@ -10396,31 +10468,35 @@ function speechConfigToVertex$1(fromObject) {
|
|
|
10396
10468
|
}
|
|
10397
10469
|
return toObject;
|
|
10398
10470
|
}
|
|
10399
|
-
function
|
|
10471
|
+
function thinkingConfigToMldev$2(fromObject) {
|
|
10400
10472
|
const toObject = {};
|
|
10401
|
-
const
|
|
10402
|
-
|
|
10403
|
-
|
|
10473
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
10474
|
+
'includeThoughts',
|
|
10475
|
+
]);
|
|
10476
|
+
if (fromIncludeThoughts != null) {
|
|
10477
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
10404
10478
|
}
|
|
10405
|
-
const
|
|
10406
|
-
'
|
|
10479
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
10480
|
+
'thinkingBudget',
|
|
10407
10481
|
]);
|
|
10408
|
-
if (
|
|
10409
|
-
setValueByPath(toObject, ['
|
|
10482
|
+
if (fromThinkingBudget != null) {
|
|
10483
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
10410
10484
|
}
|
|
10411
10485
|
return toObject;
|
|
10412
10486
|
}
|
|
10413
|
-
function
|
|
10487
|
+
function thinkingConfigToVertex$1(fromObject) {
|
|
10414
10488
|
const toObject = {};
|
|
10415
|
-
const
|
|
10416
|
-
|
|
10417
|
-
|
|
10489
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
10490
|
+
'includeThoughts',
|
|
10491
|
+
]);
|
|
10492
|
+
if (fromIncludeThoughts != null) {
|
|
10493
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
10418
10494
|
}
|
|
10419
|
-
const
|
|
10420
|
-
'
|
|
10495
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
10496
|
+
'thinkingBudget',
|
|
10421
10497
|
]);
|
|
10422
|
-
if (
|
|
10423
|
-
setValueByPath(toObject, ['
|
|
10498
|
+
if (fromThinkingBudget != null) {
|
|
10499
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
10424
10500
|
}
|
|
10425
10501
|
return toObject;
|
|
10426
10502
|
}
|
|
@@ -10463,7 +10539,7 @@ function toolToMldev$2(fromObject) {
|
|
|
10463
10539
|
}
|
|
10464
10540
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
10465
10541
|
if (fromComputerUse != null) {
|
|
10466
|
-
setValueByPath(toObject, ['computerUse'],
|
|
10542
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$2(fromComputerUse));
|
|
10467
10543
|
}
|
|
10468
10544
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
10469
10545
|
'codeExecution',
|
|
@@ -10517,7 +10593,7 @@ function toolToVertex$1(fromObject) {
|
|
|
10517
10593
|
}
|
|
10518
10594
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
10519
10595
|
if (fromComputerUse != null) {
|
|
10520
|
-
setValueByPath(toObject, ['computerUse'],
|
|
10596
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
|
|
10521
10597
|
}
|
|
10522
10598
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
10523
10599
|
'codeExecution',
|
|
@@ -11154,6 +11230,34 @@ function computeTokensResponseFromVertex(fromObject) {
|
|
|
11154
11230
|
}
|
|
11155
11231
|
return toObject;
|
|
11156
11232
|
}
|
|
11233
|
+
function computerUseToMldev$1(fromObject) {
|
|
11234
|
+
const toObject = {};
|
|
11235
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
11236
|
+
if (fromEnvironment != null) {
|
|
11237
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
11238
|
+
}
|
|
11239
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
11240
|
+
'excludedPredefinedFunctions',
|
|
11241
|
+
]);
|
|
11242
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
11243
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
11244
|
+
}
|
|
11245
|
+
return toObject;
|
|
11246
|
+
}
|
|
11247
|
+
function computerUseToVertex(fromObject) {
|
|
11248
|
+
const toObject = {};
|
|
11249
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
11250
|
+
if (fromEnvironment != null) {
|
|
11251
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
11252
|
+
}
|
|
11253
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
11254
|
+
'excludedPredefinedFunctions',
|
|
11255
|
+
]);
|
|
11256
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
11257
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
11258
|
+
}
|
|
11259
|
+
return toObject;
|
|
11260
|
+
}
|
|
11157
11261
|
function contentEmbeddingFromMldev(fromObject) {
|
|
11158
11262
|
const toObject = {};
|
|
11159
11263
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -12144,7 +12248,11 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
12144
12248
|
'thinkingConfig',
|
|
12145
12249
|
]);
|
|
12146
12250
|
if (fromThinkingConfig != null) {
|
|
12147
|
-
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev(fromThinkingConfig));
|
|
12251
|
+
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToMldev$1(fromThinkingConfig));
|
|
12252
|
+
}
|
|
12253
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
12254
|
+
if (fromImageConfig != null) {
|
|
12255
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToMldev(fromImageConfig));
|
|
12148
12256
|
}
|
|
12149
12257
|
return toObject;
|
|
12150
12258
|
}
|
|
@@ -12306,6 +12414,10 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
12306
12414
|
if (fromThinkingConfig != null) {
|
|
12307
12415
|
setValueByPath(toObject, ['thinkingConfig'], thinkingConfigToVertex(fromThinkingConfig));
|
|
12308
12416
|
}
|
|
12417
|
+
const fromImageConfig = getValueByPath(fromObject, ['imageConfig']);
|
|
12418
|
+
if (fromImageConfig != null) {
|
|
12419
|
+
setValueByPath(toObject, ['imageConfig'], imageConfigToVertex(fromImageConfig));
|
|
12420
|
+
}
|
|
12309
12421
|
return toObject;
|
|
12310
12422
|
}
|
|
12311
12423
|
function generateContentParametersToMldev(apiClient, fromObject) {
|
|
@@ -13188,6 +13300,22 @@ function googleSearchToVertex(fromObject) {
|
|
|
13188
13300
|
}
|
|
13189
13301
|
return toObject;
|
|
13190
13302
|
}
|
|
13303
|
+
function imageConfigToMldev(fromObject) {
|
|
13304
|
+
const toObject = {};
|
|
13305
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
13306
|
+
if (fromAspectRatio != null) {
|
|
13307
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
13308
|
+
}
|
|
13309
|
+
return toObject;
|
|
13310
|
+
}
|
|
13311
|
+
function imageConfigToVertex(fromObject) {
|
|
13312
|
+
const toObject = {};
|
|
13313
|
+
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
13314
|
+
if (fromAspectRatio != null) {
|
|
13315
|
+
setValueByPath(toObject, ['aspectRatio'], fromAspectRatio);
|
|
13316
|
+
}
|
|
13317
|
+
return toObject;
|
|
13318
|
+
}
|
|
13191
13319
|
function imageFromMldev(fromObject) {
|
|
13192
13320
|
const toObject = {};
|
|
13193
13321
|
const fromImageBytes = getValueByPath(fromObject, [
|
|
@@ -14393,7 +14521,7 @@ function subjectReferenceConfigToVertex(fromObject) {
|
|
|
14393
14521
|
}
|
|
14394
14522
|
return toObject;
|
|
14395
14523
|
}
|
|
14396
|
-
function thinkingConfigToMldev(fromObject) {
|
|
14524
|
+
function thinkingConfigToMldev$1(fromObject) {
|
|
14397
14525
|
const toObject = {};
|
|
14398
14526
|
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
14399
14527
|
'includeThoughts',
|
|
@@ -14425,34 +14553,6 @@ function thinkingConfigToVertex(fromObject) {
|
|
|
14425
14553
|
}
|
|
14426
14554
|
return toObject;
|
|
14427
14555
|
}
|
|
14428
|
-
function toolComputerUseToMldev$1(fromObject) {
|
|
14429
|
-
const toObject = {};
|
|
14430
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
14431
|
-
if (fromEnvironment != null) {
|
|
14432
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
14433
|
-
}
|
|
14434
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
14435
|
-
'excludedPredefinedFunctions',
|
|
14436
|
-
]);
|
|
14437
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
14438
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
14439
|
-
}
|
|
14440
|
-
return toObject;
|
|
14441
|
-
}
|
|
14442
|
-
function toolComputerUseToVertex(fromObject) {
|
|
14443
|
-
const toObject = {};
|
|
14444
|
-
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
14445
|
-
if (fromEnvironment != null) {
|
|
14446
|
-
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
14447
|
-
}
|
|
14448
|
-
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
14449
|
-
'excludedPredefinedFunctions',
|
|
14450
|
-
]);
|
|
14451
|
-
if (fromExcludedPredefinedFunctions != null) {
|
|
14452
|
-
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
14453
|
-
}
|
|
14454
|
-
return toObject;
|
|
14455
|
-
}
|
|
14456
14556
|
function toolConfigToMldev(fromObject) {
|
|
14457
14557
|
const toObject = {};
|
|
14458
14558
|
const fromFunctionCallingConfig = getValueByPath(fromObject, [
|
|
@@ -14524,7 +14624,7 @@ function toolToMldev$1(fromObject) {
|
|
|
14524
14624
|
}
|
|
14525
14625
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
14526
14626
|
if (fromComputerUse != null) {
|
|
14527
|
-
setValueByPath(toObject, ['computerUse'],
|
|
14627
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev$1(fromComputerUse));
|
|
14528
14628
|
}
|
|
14529
14629
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
14530
14630
|
'codeExecution',
|
|
@@ -14578,7 +14678,7 @@ function toolToVertex(fromObject) {
|
|
|
14578
14678
|
}
|
|
14579
14679
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
14580
14680
|
if (fromComputerUse != null) {
|
|
14581
|
-
setValueByPath(toObject, ['computerUse'],
|
|
14681
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
|
|
14582
14682
|
}
|
|
14583
14683
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
14584
14684
|
'codeExecution',
|
|
@@ -17627,6 +17727,20 @@ function blobToMldev(fromObject) {
|
|
|
17627
17727
|
}
|
|
17628
17728
|
return toObject;
|
|
17629
17729
|
}
|
|
17730
|
+
function computerUseToMldev(fromObject) {
|
|
17731
|
+
const toObject = {};
|
|
17732
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
17733
|
+
if (fromEnvironment != null) {
|
|
17734
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
17735
|
+
}
|
|
17736
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
17737
|
+
'excludedPredefinedFunctions',
|
|
17738
|
+
]);
|
|
17739
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
17740
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
17741
|
+
}
|
|
17742
|
+
return toObject;
|
|
17743
|
+
}
|
|
17630
17744
|
function contentToMldev(fromObject) {
|
|
17631
17745
|
const toObject = {};
|
|
17632
17746
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -17861,6 +17975,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
17861
17975
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
17862
17976
|
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev(tLiveSpeechConfig(fromSpeechConfig)));
|
|
17863
17977
|
}
|
|
17978
|
+
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
17979
|
+
'thinkingConfig',
|
|
17980
|
+
]);
|
|
17981
|
+
if (parentObject !== undefined && fromThinkingConfig != null) {
|
|
17982
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'thinkingConfig'], thinkingConfigToMldev(fromThinkingConfig));
|
|
17983
|
+
}
|
|
17864
17984
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
17865
17985
|
'enableAffectiveDialog',
|
|
17866
17986
|
]);
|
|
@@ -18088,17 +18208,19 @@ function speechConfigToMldev(fromObject) {
|
|
|
18088
18208
|
}
|
|
18089
18209
|
return toObject;
|
|
18090
18210
|
}
|
|
18091
|
-
function
|
|
18211
|
+
function thinkingConfigToMldev(fromObject) {
|
|
18092
18212
|
const toObject = {};
|
|
18093
|
-
const
|
|
18094
|
-
|
|
18095
|
-
|
|
18213
|
+
const fromIncludeThoughts = getValueByPath(fromObject, [
|
|
18214
|
+
'includeThoughts',
|
|
18215
|
+
]);
|
|
18216
|
+
if (fromIncludeThoughts != null) {
|
|
18217
|
+
setValueByPath(toObject, ['includeThoughts'], fromIncludeThoughts);
|
|
18096
18218
|
}
|
|
18097
|
-
const
|
|
18098
|
-
'
|
|
18219
|
+
const fromThinkingBudget = getValueByPath(fromObject, [
|
|
18220
|
+
'thinkingBudget',
|
|
18099
18221
|
]);
|
|
18100
|
-
if (
|
|
18101
|
-
setValueByPath(toObject, ['
|
|
18222
|
+
if (fromThinkingBudget != null) {
|
|
18223
|
+
setValueByPath(toObject, ['thinkingBudget'], fromThinkingBudget);
|
|
18102
18224
|
}
|
|
18103
18225
|
return toObject;
|
|
18104
18226
|
}
|
|
@@ -18141,7 +18263,7 @@ function toolToMldev(fromObject) {
|
|
|
18141
18263
|
}
|
|
18142
18264
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
18143
18265
|
if (fromComputerUse != null) {
|
|
18144
|
-
setValueByPath(toObject, ['computerUse'],
|
|
18266
|
+
setValueByPath(toObject, ['computerUse'], computerUseToMldev(fromComputerUse));
|
|
18145
18267
|
}
|
|
18146
18268
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
18147
18269
|
'codeExecution',
|
|
@@ -18924,6 +19046,12 @@ function tuningJobFromMldev(fromObject) {
|
|
|
18924
19046
|
if (fromTunedModelDisplayName != null) {
|
|
18925
19047
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
18926
19048
|
}
|
|
19049
|
+
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19050
|
+
'veoTuningSpec',
|
|
19051
|
+
]);
|
|
19052
|
+
if (fromVeoTuningSpec != null) {
|
|
19053
|
+
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19054
|
+
}
|
|
18927
19055
|
return toObject;
|
|
18928
19056
|
}
|
|
18929
19057
|
function tuningJobFromVertex(fromObject) {
|
|
@@ -19038,6 +19166,12 @@ function tuningJobFromVertex(fromObject) {
|
|
|
19038
19166
|
if (fromTunedModelDisplayName != null) {
|
|
19039
19167
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19040
19168
|
}
|
|
19169
|
+
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19170
|
+
'veoTuningSpec',
|
|
19171
|
+
]);
|
|
19172
|
+
if (fromVeoTuningSpec != null) {
|
|
19173
|
+
setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
|
|
19174
|
+
}
|
|
19041
19175
|
return toObject;
|
|
19042
19176
|
}
|
|
19043
19177
|
function tuningOperationFromMldev(fromObject) {
|
|
@@ -19513,5 +19647,5 @@ class GoogleGenAI {
|
|
|
19513
19647
|
}
|
|
19514
19648
|
}
|
|
19515
19649
|
|
|
19516
|
-
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 };
|
|
19650
|
+
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 };
|
|
19517
19651
|
//# sourceMappingURL=index.mjs.map
|