@google/genai 2.1.0 → 2.3.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/README.md +4 -1
- package/dist/genai.d.ts +54 -30
- package/dist/index.cjs +260 -193
- package/dist/index.mjs +260 -193
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +260 -193
- package/dist/node/index.mjs +260 -193
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +54 -30
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +1 -1
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +14 -0
- package/dist/vertex_internal/index.js +1 -1
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +260 -193
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +54 -30
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3739,23 +3739,23 @@ function authConfigToMldev$4(fromObject) {
|
|
|
3739
3739
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
3740
3740
|
}
|
|
3741
3741
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
3742
|
-
throw new Error('apiKeyConfig parameter is
|
|
3742
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3743
3743
|
}
|
|
3744
3744
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
3745
|
-
throw new Error('authType parameter is
|
|
3745
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3746
3746
|
}
|
|
3747
3747
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
3748
3748
|
undefined) {
|
|
3749
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
3749
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3750
3750
|
}
|
|
3751
3751
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
3752
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
3752
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3753
3753
|
}
|
|
3754
3754
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
3755
|
-
throw new Error('oauthConfig parameter is
|
|
3755
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3756
3756
|
}
|
|
3757
3757
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
3758
|
-
throw new Error('oidcConfig parameter is
|
|
3758
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3759
3759
|
}
|
|
3760
3760
|
return toObject;
|
|
3761
3761
|
}
|
|
@@ -3836,14 +3836,14 @@ function batchJobDestinationToVertex(fromObject) {
|
|
|
3836
3836
|
setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryUri);
|
|
3837
3837
|
}
|
|
3838
3838
|
if (getValueByPath(fromObject, ['fileName']) !== undefined) {
|
|
3839
|
-
throw new Error('fileName parameter is
|
|
3839
|
+
throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
3840
3840
|
}
|
|
3841
3841
|
if (getValueByPath(fromObject, ['inlinedResponses']) !== undefined) {
|
|
3842
|
-
throw new Error('inlinedResponses parameter is
|
|
3842
|
+
throw new Error('inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
3843
3843
|
}
|
|
3844
3844
|
if (getValueByPath(fromObject, ['inlinedEmbedContentResponses']) !==
|
|
3845
3845
|
undefined) {
|
|
3846
|
-
throw new Error('inlinedEmbedContentResponses parameter is
|
|
3846
|
+
throw new Error('inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
3847
3847
|
}
|
|
3848
3848
|
const fromVertexDataset = getValueByPath(fromObject, [
|
|
3849
3849
|
'vertexDataset',
|
|
@@ -3988,13 +3988,13 @@ function batchJobSourceFromVertex(fromObject) {
|
|
|
3988
3988
|
function batchJobSourceToMldev(apiClient, fromObject) {
|
|
3989
3989
|
const toObject = {};
|
|
3990
3990
|
if (getValueByPath(fromObject, ['format']) !== undefined) {
|
|
3991
|
-
throw new Error('format parameter is
|
|
3991
|
+
throw new Error('format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3992
3992
|
}
|
|
3993
3993
|
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
3994
|
-
throw new Error('gcsUri parameter is
|
|
3994
|
+
throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3995
3995
|
}
|
|
3996
3996
|
if (getValueByPath(fromObject, ['bigqueryUri']) !== undefined) {
|
|
3997
|
-
throw new Error('bigqueryUri parameter is
|
|
3997
|
+
throw new Error('bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3998
3998
|
}
|
|
3999
3999
|
const fromFileName = getValueByPath(fromObject, ['fileName']);
|
|
4000
4000
|
if (fromFileName != null) {
|
|
@@ -4013,7 +4013,7 @@ function batchJobSourceToMldev(apiClient, fromObject) {
|
|
|
4013
4013
|
setValueByPath(toObject, ['requests', 'requests'], transformedList);
|
|
4014
4014
|
}
|
|
4015
4015
|
if (getValueByPath(fromObject, ['vertexDatasetName']) !== undefined) {
|
|
4016
|
-
throw new Error('vertexDatasetName parameter is
|
|
4016
|
+
throw new Error('vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4017
4017
|
}
|
|
4018
4018
|
return toObject;
|
|
4019
4019
|
}
|
|
@@ -4032,10 +4032,10 @@ function batchJobSourceToVertex(fromObject) {
|
|
|
4032
4032
|
setValueByPath(toObject, ['bigquerySource', 'inputUri'], fromBigqueryUri);
|
|
4033
4033
|
}
|
|
4034
4034
|
if (getValueByPath(fromObject, ['fileName']) !== undefined) {
|
|
4035
|
-
throw new Error('fileName parameter is
|
|
4035
|
+
throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
4036
4036
|
}
|
|
4037
4037
|
if (getValueByPath(fromObject, ['inlinedRequests']) !== undefined) {
|
|
4038
|
-
throw new Error('inlinedRequests parameter is
|
|
4038
|
+
throw new Error('inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
4039
4039
|
}
|
|
4040
4040
|
const fromVertexDatasetName = getValueByPath(fromObject, [
|
|
4041
4041
|
'vertexDatasetName',
|
|
@@ -4052,7 +4052,7 @@ function blobToMldev$4(fromObject) {
|
|
|
4052
4052
|
setValueByPath(toObject, ['data'], fromData);
|
|
4053
4053
|
}
|
|
4054
4054
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
4055
|
-
throw new Error('displayName parameter is
|
|
4055
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4056
4056
|
}
|
|
4057
4057
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
4058
4058
|
if (fromMimeType != null) {
|
|
@@ -4175,7 +4175,7 @@ function createBatchJobConfigToMldev(fromObject, parentObject) {
|
|
|
4175
4175
|
setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
|
|
4176
4176
|
}
|
|
4177
4177
|
if (getValueByPath(fromObject, ['dest']) !== undefined) {
|
|
4178
|
-
throw new Error('dest parameter is
|
|
4178
|
+
throw new Error('dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4179
4179
|
}
|
|
4180
4180
|
const fromWebhookConfig = getValueByPath(fromObject, [
|
|
4181
4181
|
'webhookConfig',
|
|
@@ -4196,7 +4196,7 @@ function createBatchJobConfigToVertex(fromObject, parentObject) {
|
|
|
4196
4196
|
setValueByPath(parentObject, ['outputConfig'], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
|
|
4197
4197
|
}
|
|
4198
4198
|
if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
|
|
4199
|
-
throw new Error('webhookConfig parameter is
|
|
4199
|
+
throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
4200
4200
|
}
|
|
4201
4201
|
return toObject;
|
|
4202
4202
|
}
|
|
@@ -4352,16 +4352,16 @@ function embedContentConfigToMldev$1(fromObject, parentObject) {
|
|
|
4352
4352
|
setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
|
|
4353
4353
|
}
|
|
4354
4354
|
if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
|
|
4355
|
-
throw new Error('mimeType parameter is
|
|
4355
|
+
throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4356
4356
|
}
|
|
4357
4357
|
if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
|
|
4358
|
-
throw new Error('autoTruncate parameter is
|
|
4358
|
+
throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4359
4359
|
}
|
|
4360
4360
|
if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
|
|
4361
|
-
throw new Error('documentOcr parameter is
|
|
4361
|
+
throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4362
4362
|
}
|
|
4363
4363
|
if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
|
|
4364
|
-
throw new Error('audioTrackExtraction parameter is
|
|
4364
|
+
throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4365
4365
|
}
|
|
4366
4366
|
return toObject;
|
|
4367
4367
|
}
|
|
@@ -4382,7 +4382,7 @@ function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
|
|
|
4382
4382
|
function fileDataToMldev$4(fromObject) {
|
|
4383
4383
|
const toObject = {};
|
|
4384
4384
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
4385
|
-
throw new Error('displayName parameter is
|
|
4385
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4386
4386
|
}
|
|
4387
4387
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
4388
4388
|
if (fromFileUri != null) {
|
|
@@ -4409,10 +4409,10 @@ function functionCallToMldev$4(fromObject) {
|
|
|
4409
4409
|
setValueByPath(toObject, ['name'], fromName);
|
|
4410
4410
|
}
|
|
4411
4411
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
4412
|
-
throw new Error('partialArgs parameter is
|
|
4412
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4413
4413
|
}
|
|
4414
4414
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
4415
|
-
throw new Error('willContinue parameter is
|
|
4415
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4416
4416
|
}
|
|
4417
4417
|
return toObject;
|
|
4418
4418
|
}
|
|
@@ -4430,7 +4430,7 @@ function functionCallingConfigToMldev$2(fromObject) {
|
|
|
4430
4430
|
}
|
|
4431
4431
|
if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
|
|
4432
4432
|
undefined) {
|
|
4433
|
-
throw new Error('streamFunctionCallArguments parameter is
|
|
4433
|
+
throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4434
4434
|
}
|
|
4435
4435
|
return toObject;
|
|
4436
4436
|
}
|
|
@@ -4517,10 +4517,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4517
4517
|
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
4518
4518
|
}
|
|
4519
4519
|
if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
|
|
4520
|
-
throw new Error('routingConfig parameter is
|
|
4520
|
+
throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4521
4521
|
}
|
|
4522
4522
|
if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
|
|
4523
|
-
throw new Error('modelSelectionConfig parameter is
|
|
4523
|
+
throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4524
4524
|
}
|
|
4525
4525
|
const fromSafetySettings = getValueByPath(fromObject, [
|
|
4526
4526
|
'safetySettings',
|
|
@@ -4549,7 +4549,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4549
4549
|
setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$2(fromToolConfig));
|
|
4550
4550
|
}
|
|
4551
4551
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
4552
|
-
throw new Error('labels parameter is
|
|
4552
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4553
4553
|
}
|
|
4554
4554
|
const fromCachedContent = getValueByPath(fromObject, [
|
|
4555
4555
|
'cachedContent',
|
|
@@ -4574,7 +4574,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4574
4574
|
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
4575
4575
|
}
|
|
4576
4576
|
if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
|
|
4577
|
-
throw new Error('audioTimestamp parameter is
|
|
4577
|
+
throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4578
4578
|
}
|
|
4579
4579
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
4580
4580
|
'thinkingConfig',
|
|
@@ -4593,7 +4593,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4593
4593
|
setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
|
|
4594
4594
|
}
|
|
4595
4595
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
4596
|
-
throw new Error('modelArmorConfig parameter is
|
|
4596
|
+
throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4597
4597
|
}
|
|
4598
4598
|
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
4599
4599
|
if (parentObject !== undefined && fromServiceTier != null) {
|
|
@@ -4680,10 +4680,10 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
4680
4680
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
4681
4681
|
}
|
|
4682
4682
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
4683
|
-
throw new Error('blockingConfidence parameter is
|
|
4683
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4684
4684
|
}
|
|
4685
4685
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4686
|
-
throw new Error('excludeDomains parameter is
|
|
4686
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4687
4687
|
}
|
|
4688
4688
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
4689
4689
|
'timeRangeFilter',
|
|
@@ -4704,20 +4704,20 @@ function imageConfigToMldev$1(fromObject) {
|
|
|
4704
4704
|
setValueByPath(toObject, ['imageSize'], fromImageSize);
|
|
4705
4705
|
}
|
|
4706
4706
|
if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
|
|
4707
|
-
throw new Error('personGeneration parameter is
|
|
4707
|
+
throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4708
4708
|
}
|
|
4709
4709
|
if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
|
|
4710
|
-
throw new Error('prominentPeople parameter is
|
|
4710
|
+
throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4711
4711
|
}
|
|
4712
4712
|
if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
|
|
4713
|
-
throw new Error('outputMimeType parameter is
|
|
4713
|
+
throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4714
4714
|
}
|
|
4715
4715
|
if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
|
|
4716
4716
|
undefined) {
|
|
4717
|
-
throw new Error('outputCompressionQuality parameter is
|
|
4717
|
+
throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4718
4718
|
}
|
|
4719
4719
|
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
4720
|
-
throw new Error('imageOutputOptions parameter is
|
|
4720
|
+
throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4721
4721
|
}
|
|
4722
4722
|
return toObject;
|
|
4723
4723
|
}
|
|
@@ -4774,7 +4774,7 @@ function listBatchJobsConfigToMldev(fromObject, parentObject) {
|
|
|
4774
4774
|
setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
|
|
4775
4775
|
}
|
|
4776
4776
|
if (getValueByPath(fromObject, ['filter']) !== undefined) {
|
|
4777
|
-
throw new Error('filter parameter is
|
|
4777
|
+
throw new Error('filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4778
4778
|
}
|
|
4779
4779
|
return toObject;
|
|
4780
4780
|
}
|
|
@@ -4943,7 +4943,7 @@ function safetySettingToMldev$3(fromObject) {
|
|
|
4943
4943
|
setValueByPath(toObject, ['category'], fromCategory);
|
|
4944
4944
|
}
|
|
4945
4945
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
4946
|
-
throw new Error('method parameter is
|
|
4946
|
+
throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4947
4947
|
}
|
|
4948
4948
|
const fromThreshold = getValueByPath(fromObject, ['threshold']);
|
|
4949
4949
|
if (fromThreshold != null) {
|
|
@@ -4974,7 +4974,7 @@ function toolConfigToMldev$2(fromObject) {
|
|
|
4974
4974
|
function toolToMldev$4(fromObject) {
|
|
4975
4975
|
const toObject = {};
|
|
4976
4976
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
4977
|
-
throw new Error('retrieval parameter is
|
|
4977
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4978
4978
|
}
|
|
4979
4979
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
4980
4980
|
if (fromComputerUse != null) {
|
|
@@ -4999,7 +4999,7 @@ function toolToMldev$4(fromObject) {
|
|
|
4999
4999
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
5000
5000
|
}
|
|
5001
5001
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
5002
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
5002
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5003
5003
|
}
|
|
5004
5004
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
5005
5005
|
'functionDeclarations',
|
|
@@ -5020,7 +5020,7 @@ function toolToMldev$4(fromObject) {
|
|
|
5020
5020
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5021
5021
|
}
|
|
5022
5022
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
5023
|
-
throw new Error('parallelAiSearch parameter is
|
|
5023
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5024
5024
|
}
|
|
5025
5025
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5026
5026
|
if (fromUrlContext != null) {
|
|
@@ -5767,23 +5767,23 @@ function authConfigToMldev$3(fromObject) {
|
|
|
5767
5767
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
5768
5768
|
}
|
|
5769
5769
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
5770
|
-
throw new Error('apiKeyConfig parameter is
|
|
5770
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5771
5771
|
}
|
|
5772
5772
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
5773
|
-
throw new Error('authType parameter is
|
|
5773
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5774
5774
|
}
|
|
5775
5775
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
5776
5776
|
undefined) {
|
|
5777
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
5777
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5778
5778
|
}
|
|
5779
5779
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
5780
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
5780
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5781
5781
|
}
|
|
5782
5782
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
5783
|
-
throw new Error('oauthConfig parameter is
|
|
5783
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5784
5784
|
}
|
|
5785
5785
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
5786
|
-
throw new Error('oidcConfig parameter is
|
|
5786
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5787
5787
|
}
|
|
5788
5788
|
return toObject;
|
|
5789
5789
|
}
|
|
@@ -5794,7 +5794,7 @@ function blobToMldev$3(fromObject) {
|
|
|
5794
5794
|
setValueByPath(toObject, ['data'], fromData);
|
|
5795
5795
|
}
|
|
5796
5796
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5797
|
-
throw new Error('displayName parameter is
|
|
5797
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5798
5798
|
}
|
|
5799
5799
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
5800
5800
|
if (fromMimeType != null) {
|
|
@@ -5883,7 +5883,7 @@ function createCachedContentConfigToMldev(fromObject, parentObject) {
|
|
|
5883
5883
|
setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$1(fromToolConfig));
|
|
5884
5884
|
}
|
|
5885
5885
|
if (getValueByPath(fromObject, ['kmsKeyName']) !== undefined) {
|
|
5886
|
-
throw new Error('kmsKeyName parameter is
|
|
5886
|
+
throw new Error('kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5887
5887
|
}
|
|
5888
5888
|
return toObject;
|
|
5889
5889
|
}
|
|
@@ -6000,7 +6000,7 @@ function deleteCachedContentResponseFromVertex(fromObject) {
|
|
|
6000
6000
|
function fileDataToMldev$3(fromObject) {
|
|
6001
6001
|
const toObject = {};
|
|
6002
6002
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
6003
|
-
throw new Error('displayName parameter is
|
|
6003
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6004
6004
|
}
|
|
6005
6005
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6006
6006
|
if (fromFileUri != null) {
|
|
@@ -6027,10 +6027,10 @@ function functionCallToMldev$3(fromObject) {
|
|
|
6027
6027
|
setValueByPath(toObject, ['name'], fromName);
|
|
6028
6028
|
}
|
|
6029
6029
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
6030
|
-
throw new Error('partialArgs parameter is
|
|
6030
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6031
6031
|
}
|
|
6032
6032
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
6033
|
-
throw new Error('willContinue parameter is
|
|
6033
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6034
6034
|
}
|
|
6035
6035
|
return toObject;
|
|
6036
6036
|
}
|
|
@@ -6048,7 +6048,7 @@ function functionCallingConfigToMldev$1(fromObject) {
|
|
|
6048
6048
|
}
|
|
6049
6049
|
if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
|
|
6050
6050
|
undefined) {
|
|
6051
|
-
throw new Error('streamFunctionCallArguments parameter is
|
|
6051
|
+
throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6052
6052
|
}
|
|
6053
6053
|
return toObject;
|
|
6054
6054
|
}
|
|
@@ -6087,10 +6087,10 @@ function googleSearchToMldev$3(fromObject) {
|
|
|
6087
6087
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
6088
6088
|
}
|
|
6089
6089
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
6090
|
-
throw new Error('blockingConfidence parameter is
|
|
6090
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6091
6091
|
}
|
|
6092
6092
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
6093
|
-
throw new Error('excludeDomains parameter is
|
|
6093
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6094
6094
|
}
|
|
6095
6095
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
6096
6096
|
'timeRangeFilter',
|
|
@@ -6327,13 +6327,13 @@ function partToVertex$2(fromObject) {
|
|
|
6327
6327
|
setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
|
|
6328
6328
|
}
|
|
6329
6329
|
if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
|
|
6330
|
-
throw new Error('toolCall parameter is
|
|
6330
|
+
throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6331
6331
|
}
|
|
6332
6332
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
6333
|
-
throw new Error('toolResponse parameter is
|
|
6333
|
+
throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6334
6334
|
}
|
|
6335
6335
|
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
6336
|
-
throw new Error('partMetadata parameter is
|
|
6336
|
+
throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6337
6337
|
}
|
|
6338
6338
|
return toObject;
|
|
6339
6339
|
}
|
|
@@ -6373,14 +6373,14 @@ function toolConfigToVertex$1(fromObject) {
|
|
|
6373
6373
|
}
|
|
6374
6374
|
if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
|
|
6375
6375
|
undefined) {
|
|
6376
|
-
throw new Error('includeServerSideToolInvocations parameter is
|
|
6376
|
+
throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6377
6377
|
}
|
|
6378
6378
|
return toObject;
|
|
6379
6379
|
}
|
|
6380
6380
|
function toolToMldev$3(fromObject) {
|
|
6381
6381
|
const toObject = {};
|
|
6382
6382
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
6383
|
-
throw new Error('retrieval parameter is
|
|
6383
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6384
6384
|
}
|
|
6385
6385
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6386
6386
|
if (fromComputerUse != null) {
|
|
@@ -6405,7 +6405,7 @@ function toolToMldev$3(fromObject) {
|
|
|
6405
6405
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
6406
6406
|
}
|
|
6407
6407
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
6408
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
6408
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6409
6409
|
}
|
|
6410
6410
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
6411
6411
|
'functionDeclarations',
|
|
@@ -6426,7 +6426,7 @@ function toolToMldev$3(fromObject) {
|
|
|
6426
6426
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
6427
6427
|
}
|
|
6428
6428
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
6429
|
-
throw new Error('parallelAiSearch parameter is
|
|
6429
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6430
6430
|
}
|
|
6431
6431
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
6432
6432
|
if (fromUrlContext != null) {
|
|
@@ -6455,7 +6455,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6455
6455
|
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
6456
6456
|
}
|
|
6457
6457
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
6458
|
-
throw new Error('fileSearch parameter is
|
|
6458
|
+
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6459
6459
|
}
|
|
6460
6460
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
6461
6461
|
if (fromGoogleSearch != null) {
|
|
@@ -6506,7 +6506,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6506
6506
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
6507
6507
|
}
|
|
6508
6508
|
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
6509
|
-
throw new Error('mcpServers parameter is
|
|
6509
|
+
throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6510
6510
|
}
|
|
6511
6511
|
return toObject;
|
|
6512
6512
|
}
|
|
@@ -7596,7 +7596,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
7596
7596
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
7597
7597
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
7598
7598
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
7599
|
-
const SDK_VERSION = '2.
|
|
7599
|
+
const SDK_VERSION = '2.3.0'; // x-release-please-version
|
|
7600
7600
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
7601
7601
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
7602
7602
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -10693,10 +10693,14 @@ class BaseInteractions extends APIResource {
|
|
|
10693
10693
|
});
|
|
10694
10694
|
const isStreaming = (_a = params.stream) !== null && _a !== void 0 ? _a : false;
|
|
10695
10695
|
const promise = this._client.post(path `/${api_version}/interactions`, Object.assign(Object.assign(Object.assign({ body }, options), { stream: isStreaming }), (needsLegacyLyriaShim && isStreaming ? { __streamClass: LegacyLyriaStream } : {})));
|
|
10696
|
-
if (
|
|
10697
|
-
return promise
|
|
10696
|
+
if (isStreaming) {
|
|
10697
|
+
return promise;
|
|
10698
10698
|
}
|
|
10699
|
-
|
|
10699
|
+
let nonStreaming = promise;
|
|
10700
|
+
if (needsLegacyLyriaShim) {
|
|
10701
|
+
nonStreaming = nonStreaming._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
|
|
10702
|
+
}
|
|
10703
|
+
return nonStreaming._thenUnwrap(addOutputProperties);
|
|
10700
10704
|
}
|
|
10701
10705
|
/**
|
|
10702
10706
|
* Deletes the interaction by id.
|
|
@@ -10725,17 +10729,64 @@ class BaseInteractions extends APIResource {
|
|
|
10725
10729
|
*/
|
|
10726
10730
|
cancel(id, params = {}, options) {
|
|
10727
10731
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
10728
|
-
return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options);
|
|
10732
|
+
return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options)._thenUnwrap(addOutputProperties);
|
|
10729
10733
|
}
|
|
10730
10734
|
get(id, params = {}, options) {
|
|
10731
10735
|
var _a;
|
|
10732
10736
|
const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
|
|
10733
|
-
|
|
10737
|
+
const response = this._client.get(path `/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a = params === null || params === void 0 ? void 0 : params.stream) !== null && _a !== void 0 ? _a : false }));
|
|
10738
|
+
if (params === null || params === void 0 ? void 0 : params.stream) {
|
|
10739
|
+
return response;
|
|
10740
|
+
}
|
|
10741
|
+
return response._thenUnwrap(addOutputProperties);
|
|
10734
10742
|
}
|
|
10735
10743
|
}
|
|
10736
10744
|
BaseInteractions._key = Object.freeze(['interactions']);
|
|
10737
10745
|
class Interactions extends BaseInteractions {
|
|
10738
10746
|
}
|
|
10747
|
+
function addOutputProperties(interaction) {
|
|
10748
|
+
var _a, _b;
|
|
10749
|
+
const steps = (_a = interaction.steps) !== null && _a !== void 0 ? _a : [];
|
|
10750
|
+
let firstTrailing = steps.length;
|
|
10751
|
+
while (firstTrailing > 0 && steps[firstTrailing - 1].type === 'model_output') {
|
|
10752
|
+
firstTrailing--;
|
|
10753
|
+
}
|
|
10754
|
+
const modelSteps = steps.slice(firstTrailing);
|
|
10755
|
+
const output = modelSteps.flatMap((step) => { var _a; return (_a = step.content) !== null && _a !== void 0 ? _a : []; });
|
|
10756
|
+
const textParts = [];
|
|
10757
|
+
for (let i = output.length - 1; i >= 0; i--) {
|
|
10758
|
+
const content = output[i];
|
|
10759
|
+
if (content.type !== 'text')
|
|
10760
|
+
break;
|
|
10761
|
+
textParts.push((_b = content.text) !== null && _b !== void 0 ? _b : '');
|
|
10762
|
+
}
|
|
10763
|
+
const output_text = textParts.reverse().join('');
|
|
10764
|
+
let output_image;
|
|
10765
|
+
let output_audio;
|
|
10766
|
+
let output_video;
|
|
10767
|
+
for (let i = steps.length - 1; i >= 0; i--) {
|
|
10768
|
+
const step = steps[i];
|
|
10769
|
+
const anyStep = step;
|
|
10770
|
+
if (anyStep.type === 'user_input') {
|
|
10771
|
+
break;
|
|
10772
|
+
}
|
|
10773
|
+
if (anyStep.type === 'model_output' && anyStep.content) {
|
|
10774
|
+
for (let j = anyStep.content.length - 1; j >= 0; j--) {
|
|
10775
|
+
const content = anyStep.content[j];
|
|
10776
|
+
if (content.type === 'image' && !output_image) {
|
|
10777
|
+
output_image = content;
|
|
10778
|
+
}
|
|
10779
|
+
if (content.type === 'audio' && !output_audio) {
|
|
10780
|
+
output_audio = content;
|
|
10781
|
+
}
|
|
10782
|
+
if (content.type === 'video' && !output_video) {
|
|
10783
|
+
output_video = content;
|
|
10784
|
+
}
|
|
10785
|
+
}
|
|
10786
|
+
}
|
|
10787
|
+
}
|
|
10788
|
+
return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, interaction), (output_text && { output_text })), (output_image && { output_image })), (output_audio && { output_audio })), (output_video && { output_video }));
|
|
10789
|
+
}
|
|
10739
10790
|
|
|
10740
10791
|
/**
|
|
10741
10792
|
* @license
|
|
@@ -11479,7 +11530,7 @@ GeminiNextGenAPIClient.Webhooks = Webhooks;
|
|
|
11479
11530
|
function audioTranscriptionConfigToMldev$1(fromObject) {
|
|
11480
11531
|
const toObject = {};
|
|
11481
11532
|
if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
|
|
11482
|
-
throw new Error('languageCodes parameter is
|
|
11533
|
+
throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11483
11534
|
}
|
|
11484
11535
|
return toObject;
|
|
11485
11536
|
}
|
|
@@ -11490,23 +11541,23 @@ function authConfigToMldev$2(fromObject) {
|
|
|
11490
11541
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
11491
11542
|
}
|
|
11492
11543
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
11493
|
-
throw new Error('apiKeyConfig parameter is
|
|
11544
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11494
11545
|
}
|
|
11495
11546
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
11496
|
-
throw new Error('authType parameter is
|
|
11547
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11497
11548
|
}
|
|
11498
11549
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
11499
11550
|
undefined) {
|
|
11500
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
11551
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11501
11552
|
}
|
|
11502
11553
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
11503
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
11554
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11504
11555
|
}
|
|
11505
11556
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
11506
|
-
throw new Error('oauthConfig parameter is
|
|
11557
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11507
11558
|
}
|
|
11508
11559
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
11509
|
-
throw new Error('oidcConfig parameter is
|
|
11560
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11510
11561
|
}
|
|
11511
11562
|
return toObject;
|
|
11512
11563
|
}
|
|
@@ -11517,7 +11568,7 @@ function blobToMldev$2(fromObject) {
|
|
|
11517
11568
|
setValueByPath(toObject, ['data'], fromData);
|
|
11518
11569
|
}
|
|
11519
11570
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
11520
|
-
throw new Error('displayName parameter is
|
|
11571
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11521
11572
|
}
|
|
11522
11573
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
11523
11574
|
if (fromMimeType != null) {
|
|
@@ -11564,7 +11615,7 @@ function contentToVertex$1(fromObject) {
|
|
|
11564
11615
|
function fileDataToMldev$2(fromObject) {
|
|
11565
11616
|
const toObject = {};
|
|
11566
11617
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
11567
|
-
throw new Error('displayName parameter is
|
|
11618
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11568
11619
|
}
|
|
11569
11620
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
11570
11621
|
if (fromFileUri != null) {
|
|
@@ -11591,10 +11642,10 @@ function functionCallToMldev$2(fromObject) {
|
|
|
11591
11642
|
setValueByPath(toObject, ['name'], fromName);
|
|
11592
11643
|
}
|
|
11593
11644
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
11594
|
-
throw new Error('partialArgs parameter is
|
|
11645
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11595
11646
|
}
|
|
11596
11647
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
11597
|
-
throw new Error('willContinue parameter is
|
|
11648
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11598
11649
|
}
|
|
11599
11650
|
return toObject;
|
|
11600
11651
|
}
|
|
@@ -11722,7 +11773,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
11722
11773
|
}
|
|
11723
11774
|
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
11724
11775
|
undefined) {
|
|
11725
|
-
throw new Error('enableEnhancedCivicAnswers parameter is
|
|
11776
|
+
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
11726
11777
|
}
|
|
11727
11778
|
return toObject;
|
|
11728
11779
|
}
|
|
@@ -11745,10 +11796,10 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
11745
11796
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
11746
11797
|
}
|
|
11747
11798
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
11748
|
-
throw new Error('blockingConfidence parameter is
|
|
11799
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11749
11800
|
}
|
|
11750
11801
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
11751
|
-
throw new Error('excludeDomains parameter is
|
|
11802
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11752
11803
|
}
|
|
11753
11804
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
11754
11805
|
'timeRangeFilter',
|
|
@@ -11867,7 +11918,7 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
11867
11918
|
setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
|
|
11868
11919
|
}
|
|
11869
11920
|
if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
|
|
11870
|
-
throw new Error('explicitVadSignal parameter is
|
|
11921
|
+
throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11871
11922
|
}
|
|
11872
11923
|
const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
|
|
11873
11924
|
if (parentObject !== undefined && fromAvatarConfig != null) {
|
|
@@ -11885,6 +11936,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
11885
11936
|
}
|
|
11886
11937
|
setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
|
|
11887
11938
|
}
|
|
11939
|
+
const fromStreamTranslationConfig = getValueByPath(fromObject, [
|
|
11940
|
+
'streamTranslationConfig',
|
|
11941
|
+
]);
|
|
11942
|
+
if (parentObject !== undefined && fromStreamTranslationConfig != null) {
|
|
11943
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
|
|
11944
|
+
}
|
|
11888
11945
|
return toObject;
|
|
11889
11946
|
}
|
|
11890
11947
|
function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
@@ -12017,6 +12074,9 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
12017
12074
|
}
|
|
12018
12075
|
setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
|
|
12019
12076
|
}
|
|
12077
|
+
if (getValueByPath(fromObject, ['streamTranslationConfig']) !== undefined) {
|
|
12078
|
+
throw new Error('streamTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12079
|
+
}
|
|
12020
12080
|
return toObject;
|
|
12021
12081
|
}
|
|
12022
12082
|
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
@@ -12338,13 +12398,13 @@ function partToVertex$1(fromObject) {
|
|
|
12338
12398
|
setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
|
|
12339
12399
|
}
|
|
12340
12400
|
if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
|
|
12341
|
-
throw new Error('toolCall parameter is
|
|
12401
|
+
throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12342
12402
|
}
|
|
12343
12403
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
12344
|
-
throw new Error('toolResponse parameter is
|
|
12404
|
+
throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12345
12405
|
}
|
|
12346
12406
|
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
12347
|
-
throw new Error('partMetadata parameter is
|
|
12407
|
+
throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12348
12408
|
}
|
|
12349
12409
|
return toObject;
|
|
12350
12410
|
}
|
|
@@ -12355,7 +12415,7 @@ function safetySettingToMldev$2(fromObject) {
|
|
|
12355
12415
|
setValueByPath(toObject, ['category'], fromCategory);
|
|
12356
12416
|
}
|
|
12357
12417
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
12358
|
-
throw new Error('method parameter is
|
|
12418
|
+
throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12359
12419
|
}
|
|
12360
12420
|
const fromThreshold = getValueByPath(fromObject, ['threshold']);
|
|
12361
12421
|
if (fromThreshold != null) {
|
|
@@ -12370,14 +12430,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
12370
12430
|
setValueByPath(toObject, ['handle'], fromHandle);
|
|
12371
12431
|
}
|
|
12372
12432
|
if (getValueByPath(fromObject, ['transparent']) !== undefined) {
|
|
12373
|
-
throw new Error('transparent parameter is
|
|
12433
|
+
throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12374
12434
|
}
|
|
12375
12435
|
return toObject;
|
|
12376
12436
|
}
|
|
12377
12437
|
function toolToMldev$2(fromObject) {
|
|
12378
12438
|
const toObject = {};
|
|
12379
12439
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
12380
|
-
throw new Error('retrieval parameter is
|
|
12440
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12381
12441
|
}
|
|
12382
12442
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
12383
12443
|
if (fromComputerUse != null) {
|
|
@@ -12402,7 +12462,7 @@ function toolToMldev$2(fromObject) {
|
|
|
12402
12462
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
12403
12463
|
}
|
|
12404
12464
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
12405
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
12465
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12406
12466
|
}
|
|
12407
12467
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
12408
12468
|
'functionDeclarations',
|
|
@@ -12423,7 +12483,7 @@ function toolToMldev$2(fromObject) {
|
|
|
12423
12483
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
12424
12484
|
}
|
|
12425
12485
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
12426
|
-
throw new Error('parallelAiSearch parameter is
|
|
12486
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12427
12487
|
}
|
|
12428
12488
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
12429
12489
|
if (fromUrlContext != null) {
|
|
@@ -12452,7 +12512,7 @@ function toolToVertex$1(fromObject) {
|
|
|
12452
12512
|
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
12453
12513
|
}
|
|
12454
12514
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
12455
|
-
throw new Error('fileSearch parameter is
|
|
12515
|
+
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12456
12516
|
}
|
|
12457
12517
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
12458
12518
|
if (fromGoogleSearch != null) {
|
|
@@ -12503,7 +12563,7 @@ function toolToVertex$1(fromObject) {
|
|
|
12503
12563
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
12504
12564
|
}
|
|
12505
12565
|
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
12506
|
-
throw new Error('mcpServers parameter is
|
|
12566
|
+
throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12507
12567
|
}
|
|
12508
12568
|
return toObject;
|
|
12509
12569
|
}
|
|
@@ -12620,23 +12680,23 @@ function authConfigToMldev$1(fromObject, _rootObject) {
|
|
|
12620
12680
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
12621
12681
|
}
|
|
12622
12682
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
12623
|
-
throw new Error('apiKeyConfig parameter is
|
|
12683
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12624
12684
|
}
|
|
12625
12685
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
12626
|
-
throw new Error('authType parameter is
|
|
12686
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12627
12687
|
}
|
|
12628
12688
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
12629
12689
|
undefined) {
|
|
12630
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
12690
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12631
12691
|
}
|
|
12632
12692
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
12633
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
12693
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12634
12694
|
}
|
|
12635
12695
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
12636
|
-
throw new Error('oauthConfig parameter is
|
|
12696
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12637
12697
|
}
|
|
12638
12698
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
12639
|
-
throw new Error('oidcConfig parameter is
|
|
12699
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12640
12700
|
}
|
|
12641
12701
|
return toObject;
|
|
12642
12702
|
}
|
|
@@ -12647,7 +12707,7 @@ function blobToMldev$1(fromObject, _rootObject) {
|
|
|
12647
12707
|
setValueByPath(toObject, ['data'], fromData);
|
|
12648
12708
|
}
|
|
12649
12709
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
12650
|
-
throw new Error('displayName parameter is
|
|
12710
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12651
12711
|
}
|
|
12652
12712
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
12653
12713
|
if (fromMimeType != null) {
|
|
@@ -12844,13 +12904,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
|
|
|
12844
12904
|
function countTokensConfigToMldev(fromObject, _rootObject) {
|
|
12845
12905
|
const toObject = {};
|
|
12846
12906
|
if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
|
|
12847
|
-
throw new Error('systemInstruction parameter is
|
|
12907
|
+
throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12848
12908
|
}
|
|
12849
12909
|
if (getValueByPath(fromObject, ['tools']) !== undefined) {
|
|
12850
|
-
throw new Error('tools parameter is
|
|
12910
|
+
throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12851
12911
|
}
|
|
12852
12912
|
if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
|
|
12853
|
-
throw new Error('generationConfig parameter is
|
|
12913
|
+
throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12854
12914
|
}
|
|
12855
12915
|
return toObject;
|
|
12856
12916
|
}
|
|
@@ -13151,16 +13211,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
13151
13211
|
setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
|
|
13152
13212
|
}
|
|
13153
13213
|
if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
|
|
13154
|
-
throw new Error('mimeType parameter is
|
|
13214
|
+
throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13155
13215
|
}
|
|
13156
13216
|
if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
|
|
13157
|
-
throw new Error('autoTruncate parameter is
|
|
13217
|
+
throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13158
13218
|
}
|
|
13159
13219
|
if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
|
|
13160
|
-
throw new Error('documentOcr parameter is
|
|
13220
|
+
throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13161
13221
|
}
|
|
13162
13222
|
if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
|
|
13163
|
-
throw new Error('audioTrackExtraction parameter is
|
|
13223
|
+
throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13164
13224
|
}
|
|
13165
13225
|
return toObject;
|
|
13166
13226
|
}
|
|
@@ -13444,7 +13504,7 @@ function endpointFromVertex(fromObject, _rootObject) {
|
|
|
13444
13504
|
function fileDataToMldev$1(fromObject, _rootObject) {
|
|
13445
13505
|
const toObject = {};
|
|
13446
13506
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
13447
|
-
throw new Error('displayName parameter is
|
|
13507
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13448
13508
|
}
|
|
13449
13509
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
13450
13510
|
if (fromFileUri != null) {
|
|
@@ -13471,10 +13531,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
|
|
|
13471
13531
|
setValueByPath(toObject, ['name'], fromName);
|
|
13472
13532
|
}
|
|
13473
13533
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
13474
|
-
throw new Error('partialArgs parameter is
|
|
13534
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13475
13535
|
}
|
|
13476
13536
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
13477
|
-
throw new Error('willContinue parameter is
|
|
13537
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13478
13538
|
}
|
|
13479
13539
|
return toObject;
|
|
13480
13540
|
}
|
|
@@ -13492,7 +13552,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
|
|
|
13492
13552
|
}
|
|
13493
13553
|
if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
|
|
13494
13554
|
undefined) {
|
|
13495
|
-
throw new Error('streamFunctionCallArguments parameter is
|
|
13555
|
+
throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13496
13556
|
}
|
|
13497
13557
|
return toObject;
|
|
13498
13558
|
}
|
|
@@ -13579,10 +13639,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13579
13639
|
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
13580
13640
|
}
|
|
13581
13641
|
if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
|
|
13582
|
-
throw new Error('routingConfig parameter is
|
|
13642
|
+
throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13583
13643
|
}
|
|
13584
13644
|
if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
|
|
13585
|
-
throw new Error('modelSelectionConfig parameter is
|
|
13645
|
+
throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13586
13646
|
}
|
|
13587
13647
|
const fromSafetySettings = getValueByPath(fromObject, [
|
|
13588
13648
|
'safetySettings',
|
|
@@ -13611,7 +13671,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13611
13671
|
setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
|
|
13612
13672
|
}
|
|
13613
13673
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
13614
|
-
throw new Error('labels parameter is
|
|
13674
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13615
13675
|
}
|
|
13616
13676
|
const fromCachedContent = getValueByPath(fromObject, [
|
|
13617
13677
|
'cachedContent',
|
|
@@ -13636,7 +13696,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13636
13696
|
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
13637
13697
|
}
|
|
13638
13698
|
if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
|
|
13639
|
-
throw new Error('audioTimestamp parameter is
|
|
13699
|
+
throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13640
13700
|
}
|
|
13641
13701
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
13642
13702
|
'thinkingConfig',
|
|
@@ -13655,7 +13715,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13655
13715
|
setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
|
|
13656
13716
|
}
|
|
13657
13717
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
13658
|
-
throw new Error('modelArmorConfig parameter is
|
|
13718
|
+
throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13659
13719
|
}
|
|
13660
13720
|
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
13661
13721
|
if (parentObject !== undefined && fromServiceTier != null) {
|
|
@@ -13827,7 +13887,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
13827
13887
|
}
|
|
13828
13888
|
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
13829
13889
|
undefined) {
|
|
13830
|
-
throw new Error('enableEnhancedCivicAnswers parameter is
|
|
13890
|
+
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
13831
13891
|
}
|
|
13832
13892
|
const fromModelArmorConfig = getValueByPath(fromObject, [
|
|
13833
13893
|
'modelArmorConfig',
|
|
@@ -13976,10 +14036,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
|
13976
14036
|
function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
13977
14037
|
const toObject = {};
|
|
13978
14038
|
if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
|
|
13979
|
-
throw new Error('outputGcsUri parameter is
|
|
14039
|
+
throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13980
14040
|
}
|
|
13981
14041
|
if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) {
|
|
13982
|
-
throw new Error('negativePrompt parameter is
|
|
14042
|
+
throw new Error('negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13983
14043
|
}
|
|
13984
14044
|
const fromNumberOfImages = getValueByPath(fromObject, [
|
|
13985
14045
|
'numberOfImages',
|
|
@@ -13998,7 +14058,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
13998
14058
|
setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
|
|
13999
14059
|
}
|
|
14000
14060
|
if (getValueByPath(fromObject, ['seed']) !== undefined) {
|
|
14001
|
-
throw new Error('seed parameter is
|
|
14061
|
+
throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14002
14062
|
}
|
|
14003
14063
|
const fromSafetyFilterLevel = getValueByPath(fromObject, [
|
|
14004
14064
|
'safetyFilterLevel',
|
|
@@ -14041,17 +14101,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
14041
14101
|
setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
14042
14102
|
}
|
|
14043
14103
|
if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
|
|
14044
|
-
throw new Error('addWatermark parameter is
|
|
14104
|
+
throw new Error('addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14045
14105
|
}
|
|
14046
14106
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
14047
|
-
throw new Error('labels parameter is
|
|
14107
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14048
14108
|
}
|
|
14049
14109
|
const fromImageSize = getValueByPath(fromObject, ['imageSize']);
|
|
14050
14110
|
if (parentObject !== undefined && fromImageSize != null) {
|
|
14051
14111
|
setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
|
|
14052
14112
|
}
|
|
14053
14113
|
if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
|
|
14054
|
-
throw new Error('enhancePrompt parameter is
|
|
14114
|
+
throw new Error('enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14055
14115
|
}
|
|
14056
14116
|
return toObject;
|
|
14057
14117
|
}
|
|
@@ -14244,10 +14304,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14244
14304
|
setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
|
|
14245
14305
|
}
|
|
14246
14306
|
if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
|
|
14247
|
-
throw new Error('outputGcsUri parameter is
|
|
14307
|
+
throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14248
14308
|
}
|
|
14249
14309
|
if (getValueByPath(fromObject, ['fps']) !== undefined) {
|
|
14250
|
-
throw new Error('fps parameter is
|
|
14310
|
+
throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14251
14311
|
}
|
|
14252
14312
|
const fromDurationSeconds = getValueByPath(fromObject, [
|
|
14253
14313
|
'durationSeconds',
|
|
@@ -14256,7 +14316,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14256
14316
|
setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
|
|
14257
14317
|
}
|
|
14258
14318
|
if (getValueByPath(fromObject, ['seed']) !== undefined) {
|
|
14259
|
-
throw new Error('seed parameter is
|
|
14319
|
+
throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14260
14320
|
}
|
|
14261
14321
|
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
14262
14322
|
if (parentObject !== undefined && fromAspectRatio != null) {
|
|
@@ -14273,7 +14333,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14273
14333
|
setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
|
|
14274
14334
|
}
|
|
14275
14335
|
if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
|
|
14276
|
-
throw new Error('pubsubTopic parameter is
|
|
14336
|
+
throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14277
14337
|
}
|
|
14278
14338
|
const fromNegativePrompt = getValueByPath(fromObject, [
|
|
14279
14339
|
'negativePrompt',
|
|
@@ -14288,7 +14348,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14288
14348
|
setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
|
|
14289
14349
|
}
|
|
14290
14350
|
if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
|
|
14291
|
-
throw new Error('generateAudio parameter is
|
|
14351
|
+
throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14292
14352
|
}
|
|
14293
14353
|
const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
|
|
14294
14354
|
if (parentObject !== undefined && fromLastFrame != null) {
|
|
@@ -14307,13 +14367,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14307
14367
|
setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
|
|
14308
14368
|
}
|
|
14309
14369
|
if (getValueByPath(fromObject, ['mask']) !== undefined) {
|
|
14310
|
-
throw new Error('mask parameter is
|
|
14370
|
+
throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14311
14371
|
}
|
|
14312
14372
|
if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
|
|
14313
|
-
throw new Error('compressionQuality parameter is
|
|
14373
|
+
throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14314
14374
|
}
|
|
14315
14375
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
14316
|
-
throw new Error('labels parameter is
|
|
14376
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14317
14377
|
}
|
|
14318
14378
|
const fromWebhookConfig = getValueByPath(fromObject, [
|
|
14319
14379
|
'webhookConfig',
|
|
@@ -14322,7 +14382,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14322
14382
|
setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
|
|
14323
14383
|
}
|
|
14324
14384
|
if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
|
|
14325
|
-
throw new Error('resizeMode parameter is
|
|
14385
|
+
throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14326
14386
|
}
|
|
14327
14387
|
return toObject;
|
|
14328
14388
|
}
|
|
@@ -14419,7 +14479,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
14419
14479
|
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
14420
14480
|
}
|
|
14421
14481
|
if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
|
|
14422
|
-
throw new Error('webhookConfig parameter is
|
|
14482
|
+
throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
14423
14483
|
}
|
|
14424
14484
|
const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
|
|
14425
14485
|
if (parentObject !== undefined && fromResizeMode != null) {
|
|
@@ -14818,7 +14878,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
14818
14878
|
}
|
|
14819
14879
|
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
14820
14880
|
undefined) {
|
|
14821
|
-
throw new Error('enableEnhancedCivicAnswers parameter is
|
|
14881
|
+
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
14822
14882
|
}
|
|
14823
14883
|
return toObject;
|
|
14824
14884
|
}
|
|
@@ -14857,10 +14917,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
|
14857
14917
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
14858
14918
|
}
|
|
14859
14919
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
14860
|
-
throw new Error('blockingConfidence parameter is
|
|
14920
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14861
14921
|
}
|
|
14862
14922
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
14863
|
-
throw new Error('excludeDomains parameter is
|
|
14923
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14864
14924
|
}
|
|
14865
14925
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
14866
14926
|
'timeRangeFilter',
|
|
@@ -14881,20 +14941,20 @@ function imageConfigToMldev(fromObject, _rootObject) {
|
|
|
14881
14941
|
setValueByPath(toObject, ['imageSize'], fromImageSize);
|
|
14882
14942
|
}
|
|
14883
14943
|
if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
|
|
14884
|
-
throw new Error('personGeneration parameter is
|
|
14944
|
+
throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14885
14945
|
}
|
|
14886
14946
|
if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
|
|
14887
|
-
throw new Error('prominentPeople parameter is
|
|
14947
|
+
throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14888
14948
|
}
|
|
14889
14949
|
if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
|
|
14890
|
-
throw new Error('outputMimeType parameter is
|
|
14950
|
+
throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14891
14951
|
}
|
|
14892
14952
|
if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
|
|
14893
14953
|
undefined) {
|
|
14894
|
-
throw new Error('outputCompressionQuality parameter is
|
|
14954
|
+
throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14895
14955
|
}
|
|
14896
14956
|
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
14897
|
-
throw new Error('imageOutputOptions parameter is
|
|
14957
|
+
throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14898
14958
|
}
|
|
14899
14959
|
return toObject;
|
|
14900
14960
|
}
|
|
@@ -14975,7 +15035,7 @@ function imageFromVertex(fromObject, _rootObject) {
|
|
|
14975
15035
|
function imageToMldev(fromObject, _rootObject) {
|
|
14976
15036
|
const toObject = {};
|
|
14977
15037
|
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
14978
|
-
throw new Error('gcsUri parameter is
|
|
15038
|
+
throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14979
15039
|
}
|
|
14980
15040
|
const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
|
|
14981
15041
|
if (fromImageBytes != null) {
|
|
@@ -15378,13 +15438,13 @@ function partToVertex(fromObject, _rootObject) {
|
|
|
15378
15438
|
setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
|
|
15379
15439
|
}
|
|
15380
15440
|
if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
|
|
15381
|
-
throw new Error('toolCall parameter is
|
|
15441
|
+
throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15382
15442
|
}
|
|
15383
15443
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
15384
|
-
throw new Error('toolResponse parameter is
|
|
15444
|
+
throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15385
15445
|
}
|
|
15386
15446
|
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
15387
|
-
throw new Error('partMetadata parameter is
|
|
15447
|
+
throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15388
15448
|
}
|
|
15389
15449
|
return toObject;
|
|
15390
15450
|
}
|
|
@@ -15607,7 +15667,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
|
|
|
15607
15667
|
setValueByPath(toObject, ['category'], fromCategory);
|
|
15608
15668
|
}
|
|
15609
15669
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
15610
|
-
throw new Error('method parameter is
|
|
15670
|
+
throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15611
15671
|
}
|
|
15612
15672
|
const fromThreshold = getValueByPath(fromObject, ['threshold']);
|
|
15613
15673
|
if (fromThreshold != null) {
|
|
@@ -15741,14 +15801,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
|
|
|
15741
15801
|
}
|
|
15742
15802
|
if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
|
|
15743
15803
|
undefined) {
|
|
15744
|
-
throw new Error('includeServerSideToolInvocations parameter is
|
|
15804
|
+
throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15745
15805
|
}
|
|
15746
15806
|
return toObject;
|
|
15747
15807
|
}
|
|
15748
15808
|
function toolToMldev$1(fromObject, rootObject) {
|
|
15749
15809
|
const toObject = {};
|
|
15750
15810
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
15751
|
-
throw new Error('retrieval parameter is
|
|
15811
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15752
15812
|
}
|
|
15753
15813
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
15754
15814
|
if (fromComputerUse != null) {
|
|
@@ -15773,7 +15833,7 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
15773
15833
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
15774
15834
|
}
|
|
15775
15835
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
15776
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
15836
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15777
15837
|
}
|
|
15778
15838
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
15779
15839
|
'functionDeclarations',
|
|
@@ -15794,7 +15854,7 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
15794
15854
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
15795
15855
|
}
|
|
15796
15856
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
15797
|
-
throw new Error('parallelAiSearch parameter is
|
|
15857
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15798
15858
|
}
|
|
15799
15859
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
15800
15860
|
if (fromUrlContext != null) {
|
|
@@ -15823,7 +15883,7 @@ function toolToVertex(fromObject, _rootObject) {
|
|
|
15823
15883
|
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
15824
15884
|
}
|
|
15825
15885
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
15826
|
-
throw new Error('fileSearch parameter is
|
|
15886
|
+
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15827
15887
|
}
|
|
15828
15888
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
15829
15889
|
if (fromGoogleSearch != null) {
|
|
@@ -15874,7 +15934,7 @@ function toolToVertex(fromObject, _rootObject) {
|
|
|
15874
15934
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
15875
15935
|
}
|
|
15876
15936
|
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
15877
|
-
throw new Error('mcpServers parameter is
|
|
15937
|
+
throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15878
15938
|
}
|
|
15879
15939
|
return toObject;
|
|
15880
15940
|
}
|
|
@@ -17391,7 +17451,7 @@ class Models extends BaseModule {
|
|
|
17391
17451
|
if (this.apiClient.isVertexAI()) {
|
|
17392
17452
|
if (!actualParams.config.queryBase) {
|
|
17393
17453
|
if ((_a = actualParams.config) === null || _a === void 0 ? void 0 : _a.filter) {
|
|
17394
|
-
throw new Error('Filtering tuned models list
|
|
17454
|
+
throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
17395
17455
|
}
|
|
17396
17456
|
else {
|
|
17397
17457
|
actualParams.config.filter = 'labels.tune-type:*';
|
|
@@ -18847,7 +18907,7 @@ class Operations extends BaseModule {
|
|
|
18847
18907
|
function audioTranscriptionConfigToMldev(fromObject) {
|
|
18848
18908
|
const toObject = {};
|
|
18849
18909
|
if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
|
|
18850
|
-
throw new Error('languageCodes parameter is
|
|
18910
|
+
throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18851
18911
|
}
|
|
18852
18912
|
return toObject;
|
|
18853
18913
|
}
|
|
@@ -18858,23 +18918,23 @@ function authConfigToMldev(fromObject) {
|
|
|
18858
18918
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
18859
18919
|
}
|
|
18860
18920
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
18861
|
-
throw new Error('apiKeyConfig parameter is
|
|
18921
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18862
18922
|
}
|
|
18863
18923
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
18864
|
-
throw new Error('authType parameter is
|
|
18924
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18865
18925
|
}
|
|
18866
18926
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
18867
18927
|
undefined) {
|
|
18868
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
18928
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18869
18929
|
}
|
|
18870
18930
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
18871
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
18931
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18872
18932
|
}
|
|
18873
18933
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
18874
|
-
throw new Error('oauthConfig parameter is
|
|
18934
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18875
18935
|
}
|
|
18876
18936
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
18877
|
-
throw new Error('oidcConfig parameter is
|
|
18937
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18878
18938
|
}
|
|
18879
18939
|
return toObject;
|
|
18880
18940
|
}
|
|
@@ -18885,7 +18945,7 @@ function blobToMldev(fromObject) {
|
|
|
18885
18945
|
setValueByPath(toObject, ['data'], fromData);
|
|
18886
18946
|
}
|
|
18887
18947
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
18888
|
-
throw new Error('displayName parameter is
|
|
18948
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18889
18949
|
}
|
|
18890
18950
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
18891
18951
|
if (fromMimeType != null) {
|
|
@@ -18952,7 +19012,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
|
|
|
18952
19012
|
function fileDataToMldev(fromObject) {
|
|
18953
19013
|
const toObject = {};
|
|
18954
19014
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
18955
|
-
throw new Error('displayName parameter is
|
|
19015
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18956
19016
|
}
|
|
18957
19017
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
18958
19018
|
if (fromFileUri != null) {
|
|
@@ -18979,10 +19039,10 @@ function functionCallToMldev(fromObject) {
|
|
|
18979
19039
|
setValueByPath(toObject, ['name'], fromName);
|
|
18980
19040
|
}
|
|
18981
19041
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
18982
|
-
throw new Error('partialArgs parameter is
|
|
19042
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18983
19043
|
}
|
|
18984
19044
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
18985
|
-
throw new Error('willContinue parameter is
|
|
19045
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18986
19046
|
}
|
|
18987
19047
|
return toObject;
|
|
18988
19048
|
}
|
|
@@ -19005,10 +19065,10 @@ function googleSearchToMldev(fromObject) {
|
|
|
19005
19065
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
19006
19066
|
}
|
|
19007
19067
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
19008
|
-
throw new Error('blockingConfidence parameter is
|
|
19068
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19009
19069
|
}
|
|
19010
19070
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
19011
|
-
throw new Error('excludeDomains parameter is
|
|
19071
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19012
19072
|
}
|
|
19013
19073
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
19014
19074
|
'timeRangeFilter',
|
|
@@ -19127,7 +19187,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
19127
19187
|
setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
|
|
19128
19188
|
}
|
|
19129
19189
|
if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
|
|
19130
|
-
throw new Error('explicitVadSignal parameter is
|
|
19190
|
+
throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19131
19191
|
}
|
|
19132
19192
|
const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
|
|
19133
19193
|
if (parentObject !== undefined && fromAvatarConfig != null) {
|
|
@@ -19145,6 +19205,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
19145
19205
|
}
|
|
19146
19206
|
setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
|
|
19147
19207
|
}
|
|
19208
|
+
const fromStreamTranslationConfig = getValueByPath(fromObject, [
|
|
19209
|
+
'streamTranslationConfig',
|
|
19210
|
+
]);
|
|
19211
|
+
if (parentObject !== undefined && fromStreamTranslationConfig != null) {
|
|
19212
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
|
|
19213
|
+
}
|
|
19148
19214
|
return toObject;
|
|
19149
19215
|
}
|
|
19150
19216
|
function liveConnectConstraintsToMldev(apiClient, fromObject) {
|
|
@@ -19238,7 +19304,7 @@ function safetySettingToMldev(fromObject) {
|
|
|
19238
19304
|
setValueByPath(toObject, ['category'], fromCategory);
|
|
19239
19305
|
}
|
|
19240
19306
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
19241
|
-
throw new Error('method parameter is
|
|
19307
|
+
throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19242
19308
|
}
|
|
19243
19309
|
const fromThreshold = getValueByPath(fromObject, ['threshold']);
|
|
19244
19310
|
if (fromThreshold != null) {
|
|
@@ -19253,14 +19319,14 @@ function sessionResumptionConfigToMldev(fromObject) {
|
|
|
19253
19319
|
setValueByPath(toObject, ['handle'], fromHandle);
|
|
19254
19320
|
}
|
|
19255
19321
|
if (getValueByPath(fromObject, ['transparent']) !== undefined) {
|
|
19256
|
-
throw new Error('transparent parameter is
|
|
19322
|
+
throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19257
19323
|
}
|
|
19258
19324
|
return toObject;
|
|
19259
19325
|
}
|
|
19260
19326
|
function toolToMldev(fromObject) {
|
|
19261
19327
|
const toObject = {};
|
|
19262
19328
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
19263
|
-
throw new Error('retrieval parameter is
|
|
19329
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19264
19330
|
}
|
|
19265
19331
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
19266
19332
|
if (fromComputerUse != null) {
|
|
@@ -19285,7 +19351,7 @@ function toolToMldev(fromObject) {
|
|
|
19285
19351
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
19286
19352
|
}
|
|
19287
19353
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
19288
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
19354
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19289
19355
|
}
|
|
19290
19356
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
19291
19357
|
'functionDeclarations',
|
|
@@ -19306,7 +19372,7 @@ function toolToMldev(fromObject) {
|
|
|
19306
19372
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
19307
19373
|
}
|
|
19308
19374
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
19309
|
-
throw new Error('parallelAiSearch parameter is
|
|
19375
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19310
19376
|
}
|
|
19311
19377
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
19312
19378
|
if (fromUrlContext != null) {
|
|
@@ -19640,7 +19706,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
|
|
|
19640
19706
|
function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
19641
19707
|
const toObject = {};
|
|
19642
19708
|
if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
|
|
19643
|
-
throw new Error('validationDataset parameter is
|
|
19709
|
+
throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19644
19710
|
}
|
|
19645
19711
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
19646
19712
|
'tunedModelDisplayName',
|
|
@@ -19649,7 +19715,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
19649
19715
|
setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
|
|
19650
19716
|
}
|
|
19651
19717
|
if (getValueByPath(fromObject, ['description']) !== undefined) {
|
|
19652
|
-
throw new Error('description parameter is
|
|
19718
|
+
throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19653
19719
|
}
|
|
19654
19720
|
const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
|
|
19655
19721
|
if (parentObject !== undefined && fromEpochCount != null) {
|
|
@@ -19663,20 +19729,20 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
19663
19729
|
}
|
|
19664
19730
|
if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
|
|
19665
19731
|
undefined) {
|
|
19666
|
-
throw new Error('exportLastCheckpointOnly parameter is
|
|
19732
|
+
throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19667
19733
|
}
|
|
19668
19734
|
if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
|
|
19669
19735
|
undefined) {
|
|
19670
|
-
throw new Error('preTunedModelCheckpointId parameter is
|
|
19736
|
+
throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19671
19737
|
}
|
|
19672
19738
|
if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
|
|
19673
|
-
throw new Error('adapterSize parameter is
|
|
19739
|
+
throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19674
19740
|
}
|
|
19675
19741
|
if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
|
|
19676
|
-
throw new Error('tuningMode parameter is
|
|
19742
|
+
throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19677
19743
|
}
|
|
19678
19744
|
if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
|
|
19679
|
-
throw new Error('customBaseModel parameter is
|
|
19745
|
+
throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19680
19746
|
}
|
|
19681
19747
|
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
19682
19748
|
if (parentObject !== undefined && fromBatchSize != null) {
|
|
@@ -19687,25 +19753,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
19687
19753
|
setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
|
|
19688
19754
|
}
|
|
19689
19755
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
19690
|
-
throw new Error('labels parameter is
|
|
19756
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19691
19757
|
}
|
|
19692
19758
|
if (getValueByPath(fromObject, ['beta']) !== undefined) {
|
|
19693
|
-
throw new Error('beta parameter is
|
|
19759
|
+
throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19694
19760
|
}
|
|
19695
19761
|
if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
|
|
19696
|
-
throw new Error('baseTeacherModel parameter is
|
|
19762
|
+
throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19697
19763
|
}
|
|
19698
19764
|
if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
|
|
19699
|
-
throw new Error('tunedTeacherModelSource parameter is
|
|
19765
|
+
throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19700
19766
|
}
|
|
19701
19767
|
if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
|
|
19702
|
-
throw new Error('sftLossWeightMultiplier parameter is
|
|
19768
|
+
throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19703
19769
|
}
|
|
19704
19770
|
if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
|
|
19705
|
-
throw new Error('outputUri parameter is
|
|
19771
|
+
throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19706
19772
|
}
|
|
19707
19773
|
if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
|
|
19708
|
-
throw new Error('encryptionSpec parameter is
|
|
19774
|
+
throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19709
19775
|
}
|
|
19710
19776
|
return toObject;
|
|
19711
19777
|
}
|
|
@@ -20099,10 +20165,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
|
|
|
20099
20165
|
function tuningDatasetToMldev(fromObject, _rootObject) {
|
|
20100
20166
|
const toObject = {};
|
|
20101
20167
|
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
20102
|
-
throw new Error('gcsUri parameter is
|
|
20168
|
+
throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
20103
20169
|
}
|
|
20104
20170
|
if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
|
|
20105
|
-
throw new Error('vertexDatasetResource parameter is
|
|
20171
|
+
throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
20106
20172
|
}
|
|
20107
20173
|
const fromExamples = getValueByPath(fromObject, ['examples']);
|
|
20108
20174
|
if (fromExamples != null) {
|
|
@@ -20175,7 +20241,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
|
|
|
20175
20241
|
}
|
|
20176
20242
|
}
|
|
20177
20243
|
if (getValueByPath(fromObject, ['examples']) !== undefined) {
|
|
20178
|
-
throw new Error('examples parameter is
|
|
20244
|
+
throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
20179
20245
|
}
|
|
20180
20246
|
return toObject;
|
|
20181
20247
|
}
|
|
@@ -20876,6 +20942,7 @@ class GoogleGenAI {
|
|
|
20876
20942
|
if (this._interactions !== undefined) {
|
|
20877
20943
|
return this._interactions;
|
|
20878
20944
|
}
|
|
20945
|
+
console.warn('GoogleGenAI.interactions: Interactions usage is experimental and may change in future versions.');
|
|
20879
20946
|
this._interactions = this.getNextGenClient().interactions;
|
|
20880
20947
|
return this._interactions;
|
|
20881
20948
|
}
|