@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.mjs
CHANGED
|
@@ -3737,23 +3737,23 @@ function authConfigToMldev$4(fromObject) {
|
|
|
3737
3737
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
3738
3738
|
}
|
|
3739
3739
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
3740
|
-
throw new Error('apiKeyConfig parameter is
|
|
3740
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3741
3741
|
}
|
|
3742
3742
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
3743
|
-
throw new Error('authType parameter is
|
|
3743
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3744
3744
|
}
|
|
3745
3745
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
3746
3746
|
undefined) {
|
|
3747
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
3747
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3748
3748
|
}
|
|
3749
3749
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
3750
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
3750
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3751
3751
|
}
|
|
3752
3752
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
3753
|
-
throw new Error('oauthConfig parameter is
|
|
3753
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3754
3754
|
}
|
|
3755
3755
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
3756
|
-
throw new Error('oidcConfig parameter is
|
|
3756
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3757
3757
|
}
|
|
3758
3758
|
return toObject;
|
|
3759
3759
|
}
|
|
@@ -3834,14 +3834,14 @@ function batchJobDestinationToVertex(fromObject) {
|
|
|
3834
3834
|
setValueByPath(toObject, ['bigqueryDestination', 'outputUri'], fromBigqueryUri);
|
|
3835
3835
|
}
|
|
3836
3836
|
if (getValueByPath(fromObject, ['fileName']) !== undefined) {
|
|
3837
|
-
throw new Error('fileName parameter is
|
|
3837
|
+
throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
3838
3838
|
}
|
|
3839
3839
|
if (getValueByPath(fromObject, ['inlinedResponses']) !== undefined) {
|
|
3840
|
-
throw new Error('inlinedResponses parameter is
|
|
3840
|
+
throw new Error('inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
3841
3841
|
}
|
|
3842
3842
|
if (getValueByPath(fromObject, ['inlinedEmbedContentResponses']) !==
|
|
3843
3843
|
undefined) {
|
|
3844
|
-
throw new Error('inlinedEmbedContentResponses parameter is
|
|
3844
|
+
throw new Error('inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
3845
3845
|
}
|
|
3846
3846
|
const fromVertexDataset = getValueByPath(fromObject, [
|
|
3847
3847
|
'vertexDataset',
|
|
@@ -3986,13 +3986,13 @@ function batchJobSourceFromVertex(fromObject) {
|
|
|
3986
3986
|
function batchJobSourceToMldev(apiClient, fromObject) {
|
|
3987
3987
|
const toObject = {};
|
|
3988
3988
|
if (getValueByPath(fromObject, ['format']) !== undefined) {
|
|
3989
|
-
throw new Error('format parameter is
|
|
3989
|
+
throw new Error('format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3990
3990
|
}
|
|
3991
3991
|
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
3992
|
-
throw new Error('gcsUri parameter is
|
|
3992
|
+
throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3993
3993
|
}
|
|
3994
3994
|
if (getValueByPath(fromObject, ['bigqueryUri']) !== undefined) {
|
|
3995
|
-
throw new Error('bigqueryUri parameter is
|
|
3995
|
+
throw new Error('bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
3996
3996
|
}
|
|
3997
3997
|
const fromFileName = getValueByPath(fromObject, ['fileName']);
|
|
3998
3998
|
if (fromFileName != null) {
|
|
@@ -4011,7 +4011,7 @@ function batchJobSourceToMldev(apiClient, fromObject) {
|
|
|
4011
4011
|
setValueByPath(toObject, ['requests', 'requests'], transformedList);
|
|
4012
4012
|
}
|
|
4013
4013
|
if (getValueByPath(fromObject, ['vertexDatasetName']) !== undefined) {
|
|
4014
|
-
throw new Error('vertexDatasetName parameter is
|
|
4014
|
+
throw new Error('vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4015
4015
|
}
|
|
4016
4016
|
return toObject;
|
|
4017
4017
|
}
|
|
@@ -4030,10 +4030,10 @@ function batchJobSourceToVertex(fromObject) {
|
|
|
4030
4030
|
setValueByPath(toObject, ['bigquerySource', 'inputUri'], fromBigqueryUri);
|
|
4031
4031
|
}
|
|
4032
4032
|
if (getValueByPath(fromObject, ['fileName']) !== undefined) {
|
|
4033
|
-
throw new Error('fileName parameter is
|
|
4033
|
+
throw new Error('fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
4034
4034
|
}
|
|
4035
4035
|
if (getValueByPath(fromObject, ['inlinedRequests']) !== undefined) {
|
|
4036
|
-
throw new Error('inlinedRequests parameter is
|
|
4036
|
+
throw new Error('inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
4037
4037
|
}
|
|
4038
4038
|
const fromVertexDatasetName = getValueByPath(fromObject, [
|
|
4039
4039
|
'vertexDatasetName',
|
|
@@ -4050,7 +4050,7 @@ function blobToMldev$4(fromObject) {
|
|
|
4050
4050
|
setValueByPath(toObject, ['data'], fromData);
|
|
4051
4051
|
}
|
|
4052
4052
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
4053
|
-
throw new Error('displayName parameter is
|
|
4053
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4054
4054
|
}
|
|
4055
4055
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
4056
4056
|
if (fromMimeType != null) {
|
|
@@ -4173,7 +4173,7 @@ function createBatchJobConfigToMldev(fromObject, parentObject) {
|
|
|
4173
4173
|
setValueByPath(parentObject, ['batch', 'displayName'], fromDisplayName);
|
|
4174
4174
|
}
|
|
4175
4175
|
if (getValueByPath(fromObject, ['dest']) !== undefined) {
|
|
4176
|
-
throw new Error('dest parameter is
|
|
4176
|
+
throw new Error('dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4177
4177
|
}
|
|
4178
4178
|
const fromWebhookConfig = getValueByPath(fromObject, [
|
|
4179
4179
|
'webhookConfig',
|
|
@@ -4194,7 +4194,7 @@ function createBatchJobConfigToVertex(fromObject, parentObject) {
|
|
|
4194
4194
|
setValueByPath(parentObject, ['outputConfig'], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
|
|
4195
4195
|
}
|
|
4196
4196
|
if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
|
|
4197
|
-
throw new Error('webhookConfig parameter is
|
|
4197
|
+
throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
4198
4198
|
}
|
|
4199
4199
|
return toObject;
|
|
4200
4200
|
}
|
|
@@ -4350,16 +4350,16 @@ function embedContentConfigToMldev$1(fromObject, parentObject) {
|
|
|
4350
4350
|
setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
|
|
4351
4351
|
}
|
|
4352
4352
|
if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
|
|
4353
|
-
throw new Error('mimeType parameter is
|
|
4353
|
+
throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4354
4354
|
}
|
|
4355
4355
|
if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
|
|
4356
|
-
throw new Error('autoTruncate parameter is
|
|
4356
|
+
throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4357
4357
|
}
|
|
4358
4358
|
if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
|
|
4359
|
-
throw new Error('documentOcr parameter is
|
|
4359
|
+
throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4360
4360
|
}
|
|
4361
4361
|
if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
|
|
4362
|
-
throw new Error('audioTrackExtraction parameter is
|
|
4362
|
+
throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4363
4363
|
}
|
|
4364
4364
|
return toObject;
|
|
4365
4365
|
}
|
|
@@ -4380,7 +4380,7 @@ function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
|
|
|
4380
4380
|
function fileDataToMldev$4(fromObject) {
|
|
4381
4381
|
const toObject = {};
|
|
4382
4382
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
4383
|
-
throw new Error('displayName parameter is
|
|
4383
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4384
4384
|
}
|
|
4385
4385
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
4386
4386
|
if (fromFileUri != null) {
|
|
@@ -4407,10 +4407,10 @@ function functionCallToMldev$4(fromObject) {
|
|
|
4407
4407
|
setValueByPath(toObject, ['name'], fromName);
|
|
4408
4408
|
}
|
|
4409
4409
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
4410
|
-
throw new Error('partialArgs parameter is
|
|
4410
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4411
4411
|
}
|
|
4412
4412
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
4413
|
-
throw new Error('willContinue parameter is
|
|
4413
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4414
4414
|
}
|
|
4415
4415
|
return toObject;
|
|
4416
4416
|
}
|
|
@@ -4428,7 +4428,7 @@ function functionCallingConfigToMldev$2(fromObject) {
|
|
|
4428
4428
|
}
|
|
4429
4429
|
if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
|
|
4430
4430
|
undefined) {
|
|
4431
|
-
throw new Error('streamFunctionCallArguments parameter is
|
|
4431
|
+
throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4432
4432
|
}
|
|
4433
4433
|
return toObject;
|
|
4434
4434
|
}
|
|
@@ -4515,10 +4515,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4515
4515
|
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
4516
4516
|
}
|
|
4517
4517
|
if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
|
|
4518
|
-
throw new Error('routingConfig parameter is
|
|
4518
|
+
throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4519
4519
|
}
|
|
4520
4520
|
if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
|
|
4521
|
-
throw new Error('modelSelectionConfig parameter is
|
|
4521
|
+
throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4522
4522
|
}
|
|
4523
4523
|
const fromSafetySettings = getValueByPath(fromObject, [
|
|
4524
4524
|
'safetySettings',
|
|
@@ -4547,7 +4547,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4547
4547
|
setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$2(fromToolConfig));
|
|
4548
4548
|
}
|
|
4549
4549
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
4550
|
-
throw new Error('labels parameter is
|
|
4550
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4551
4551
|
}
|
|
4552
4552
|
const fromCachedContent = getValueByPath(fromObject, [
|
|
4553
4553
|
'cachedContent',
|
|
@@ -4572,7 +4572,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4572
4572
|
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
4573
4573
|
}
|
|
4574
4574
|
if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
|
|
4575
|
-
throw new Error('audioTimestamp parameter is
|
|
4575
|
+
throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4576
4576
|
}
|
|
4577
4577
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
4578
4578
|
'thinkingConfig',
|
|
@@ -4591,7 +4591,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
4591
4591
|
setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
|
|
4592
4592
|
}
|
|
4593
4593
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
4594
|
-
throw new Error('modelArmorConfig parameter is
|
|
4594
|
+
throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4595
4595
|
}
|
|
4596
4596
|
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
4597
4597
|
if (parentObject !== undefined && fromServiceTier != null) {
|
|
@@ -4678,10 +4678,10 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
4678
4678
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
4679
4679
|
}
|
|
4680
4680
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
4681
|
-
throw new Error('blockingConfidence parameter is
|
|
4681
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4682
4682
|
}
|
|
4683
4683
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4684
|
-
throw new Error('excludeDomains parameter is
|
|
4684
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4685
4685
|
}
|
|
4686
4686
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
4687
4687
|
'timeRangeFilter',
|
|
@@ -4702,20 +4702,20 @@ function imageConfigToMldev$1(fromObject) {
|
|
|
4702
4702
|
setValueByPath(toObject, ['imageSize'], fromImageSize);
|
|
4703
4703
|
}
|
|
4704
4704
|
if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
|
|
4705
|
-
throw new Error('personGeneration parameter is
|
|
4705
|
+
throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4706
4706
|
}
|
|
4707
4707
|
if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
|
|
4708
|
-
throw new Error('prominentPeople parameter is
|
|
4708
|
+
throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4709
4709
|
}
|
|
4710
4710
|
if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
|
|
4711
|
-
throw new Error('outputMimeType parameter is
|
|
4711
|
+
throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4712
4712
|
}
|
|
4713
4713
|
if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
|
|
4714
4714
|
undefined) {
|
|
4715
|
-
throw new Error('outputCompressionQuality parameter is
|
|
4715
|
+
throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4716
4716
|
}
|
|
4717
4717
|
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
4718
|
-
throw new Error('imageOutputOptions parameter is
|
|
4718
|
+
throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4719
4719
|
}
|
|
4720
4720
|
return toObject;
|
|
4721
4721
|
}
|
|
@@ -4772,7 +4772,7 @@ function listBatchJobsConfigToMldev(fromObject, parentObject) {
|
|
|
4772
4772
|
setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
|
|
4773
4773
|
}
|
|
4774
4774
|
if (getValueByPath(fromObject, ['filter']) !== undefined) {
|
|
4775
|
-
throw new Error('filter parameter is
|
|
4775
|
+
throw new Error('filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4776
4776
|
}
|
|
4777
4777
|
return toObject;
|
|
4778
4778
|
}
|
|
@@ -4941,7 +4941,7 @@ function safetySettingToMldev$3(fromObject) {
|
|
|
4941
4941
|
setValueByPath(toObject, ['category'], fromCategory);
|
|
4942
4942
|
}
|
|
4943
4943
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
4944
|
-
throw new Error('method parameter is
|
|
4944
|
+
throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4945
4945
|
}
|
|
4946
4946
|
const fromThreshold = getValueByPath(fromObject, ['threshold']);
|
|
4947
4947
|
if (fromThreshold != null) {
|
|
@@ -4972,7 +4972,7 @@ function toolConfigToMldev$2(fromObject) {
|
|
|
4972
4972
|
function toolToMldev$4(fromObject) {
|
|
4973
4973
|
const toObject = {};
|
|
4974
4974
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
4975
|
-
throw new Error('retrieval parameter is
|
|
4975
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
4976
4976
|
}
|
|
4977
4977
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
4978
4978
|
if (fromComputerUse != null) {
|
|
@@ -4997,7 +4997,7 @@ function toolToMldev$4(fromObject) {
|
|
|
4997
4997
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
4998
4998
|
}
|
|
4999
4999
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
5000
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
5000
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5001
5001
|
}
|
|
5002
5002
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
5003
5003
|
'functionDeclarations',
|
|
@@ -5018,7 +5018,7 @@ function toolToMldev$4(fromObject) {
|
|
|
5018
5018
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5019
5019
|
}
|
|
5020
5020
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
5021
|
-
throw new Error('parallelAiSearch parameter is
|
|
5021
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5022
5022
|
}
|
|
5023
5023
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5024
5024
|
if (fromUrlContext != null) {
|
|
@@ -5765,23 +5765,23 @@ function authConfigToMldev$3(fromObject) {
|
|
|
5765
5765
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
5766
5766
|
}
|
|
5767
5767
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
5768
|
-
throw new Error('apiKeyConfig parameter is
|
|
5768
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5769
5769
|
}
|
|
5770
5770
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
5771
|
-
throw new Error('authType parameter is
|
|
5771
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5772
5772
|
}
|
|
5773
5773
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
5774
5774
|
undefined) {
|
|
5775
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
5775
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5776
5776
|
}
|
|
5777
5777
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
5778
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
5778
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5779
5779
|
}
|
|
5780
5780
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
5781
|
-
throw new Error('oauthConfig parameter is
|
|
5781
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5782
5782
|
}
|
|
5783
5783
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
5784
|
-
throw new Error('oidcConfig parameter is
|
|
5784
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5785
5785
|
}
|
|
5786
5786
|
return toObject;
|
|
5787
5787
|
}
|
|
@@ -5792,7 +5792,7 @@ function blobToMldev$3(fromObject) {
|
|
|
5792
5792
|
setValueByPath(toObject, ['data'], fromData);
|
|
5793
5793
|
}
|
|
5794
5794
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5795
|
-
throw new Error('displayName parameter is
|
|
5795
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5796
5796
|
}
|
|
5797
5797
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
5798
5798
|
if (fromMimeType != null) {
|
|
@@ -5881,7 +5881,7 @@ function createCachedContentConfigToMldev(fromObject, parentObject) {
|
|
|
5881
5881
|
setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev$1(fromToolConfig));
|
|
5882
5882
|
}
|
|
5883
5883
|
if (getValueByPath(fromObject, ['kmsKeyName']) !== undefined) {
|
|
5884
|
-
throw new Error('kmsKeyName parameter is
|
|
5884
|
+
throw new Error('kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5885
5885
|
}
|
|
5886
5886
|
return toObject;
|
|
5887
5887
|
}
|
|
@@ -5998,7 +5998,7 @@ function deleteCachedContentResponseFromVertex(fromObject) {
|
|
|
5998
5998
|
function fileDataToMldev$3(fromObject) {
|
|
5999
5999
|
const toObject = {};
|
|
6000
6000
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
6001
|
-
throw new Error('displayName parameter is
|
|
6001
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6002
6002
|
}
|
|
6003
6003
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6004
6004
|
if (fromFileUri != null) {
|
|
@@ -6025,10 +6025,10 @@ function functionCallToMldev$3(fromObject) {
|
|
|
6025
6025
|
setValueByPath(toObject, ['name'], fromName);
|
|
6026
6026
|
}
|
|
6027
6027
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
6028
|
-
throw new Error('partialArgs parameter is
|
|
6028
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6029
6029
|
}
|
|
6030
6030
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
6031
|
-
throw new Error('willContinue parameter is
|
|
6031
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6032
6032
|
}
|
|
6033
6033
|
return toObject;
|
|
6034
6034
|
}
|
|
@@ -6046,7 +6046,7 @@ function functionCallingConfigToMldev$1(fromObject) {
|
|
|
6046
6046
|
}
|
|
6047
6047
|
if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
|
|
6048
6048
|
undefined) {
|
|
6049
|
-
throw new Error('streamFunctionCallArguments parameter is
|
|
6049
|
+
throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6050
6050
|
}
|
|
6051
6051
|
return toObject;
|
|
6052
6052
|
}
|
|
@@ -6085,10 +6085,10 @@ function googleSearchToMldev$3(fromObject) {
|
|
|
6085
6085
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
6086
6086
|
}
|
|
6087
6087
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
6088
|
-
throw new Error('blockingConfidence parameter is
|
|
6088
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6089
6089
|
}
|
|
6090
6090
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
6091
|
-
throw new Error('excludeDomains parameter is
|
|
6091
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6092
6092
|
}
|
|
6093
6093
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
6094
6094
|
'timeRangeFilter',
|
|
@@ -6325,13 +6325,13 @@ function partToVertex$2(fromObject) {
|
|
|
6325
6325
|
setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
|
|
6326
6326
|
}
|
|
6327
6327
|
if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
|
|
6328
|
-
throw new Error('toolCall parameter is
|
|
6328
|
+
throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6329
6329
|
}
|
|
6330
6330
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
6331
|
-
throw new Error('toolResponse parameter is
|
|
6331
|
+
throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6332
6332
|
}
|
|
6333
6333
|
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
6334
|
-
throw new Error('partMetadata parameter is
|
|
6334
|
+
throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6335
6335
|
}
|
|
6336
6336
|
return toObject;
|
|
6337
6337
|
}
|
|
@@ -6371,14 +6371,14 @@ function toolConfigToVertex$1(fromObject) {
|
|
|
6371
6371
|
}
|
|
6372
6372
|
if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
|
|
6373
6373
|
undefined) {
|
|
6374
|
-
throw new Error('includeServerSideToolInvocations parameter is
|
|
6374
|
+
throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6375
6375
|
}
|
|
6376
6376
|
return toObject;
|
|
6377
6377
|
}
|
|
6378
6378
|
function toolToMldev$3(fromObject) {
|
|
6379
6379
|
const toObject = {};
|
|
6380
6380
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
6381
|
-
throw new Error('retrieval parameter is
|
|
6381
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6382
6382
|
}
|
|
6383
6383
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6384
6384
|
if (fromComputerUse != null) {
|
|
@@ -6403,7 +6403,7 @@ function toolToMldev$3(fromObject) {
|
|
|
6403
6403
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
6404
6404
|
}
|
|
6405
6405
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
6406
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
6406
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6407
6407
|
}
|
|
6408
6408
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
6409
6409
|
'functionDeclarations',
|
|
@@ -6424,7 +6424,7 @@ function toolToMldev$3(fromObject) {
|
|
|
6424
6424
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
6425
6425
|
}
|
|
6426
6426
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
6427
|
-
throw new Error('parallelAiSearch parameter is
|
|
6427
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6428
6428
|
}
|
|
6429
6429
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
6430
6430
|
if (fromUrlContext != null) {
|
|
@@ -6453,7 +6453,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6453
6453
|
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
6454
6454
|
}
|
|
6455
6455
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
6456
|
-
throw new Error('fileSearch parameter is
|
|
6456
|
+
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6457
6457
|
}
|
|
6458
6458
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
6459
6459
|
if (fromGoogleSearch != null) {
|
|
@@ -6504,7 +6504,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6504
6504
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
6505
6505
|
}
|
|
6506
6506
|
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
6507
|
-
throw new Error('mcpServers parameter is
|
|
6507
|
+
throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6508
6508
|
}
|
|
6509
6509
|
return toObject;
|
|
6510
6510
|
}
|
|
@@ -7594,7 +7594,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
7594
7594
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
7595
7595
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
7596
7596
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
7597
|
-
const SDK_VERSION = '2.
|
|
7597
|
+
const SDK_VERSION = '2.3.0'; // x-release-please-version
|
|
7598
7598
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
7599
7599
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
7600
7600
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -10691,10 +10691,14 @@ class BaseInteractions extends APIResource {
|
|
|
10691
10691
|
});
|
|
10692
10692
|
const isStreaming = (_a = params.stream) !== null && _a !== void 0 ? _a : false;
|
|
10693
10693
|
const promise = this._client.post(path `/${api_version}/interactions`, Object.assign(Object.assign(Object.assign({ body }, options), { stream: isStreaming }), (needsLegacyLyriaShim && isStreaming ? { __streamClass: LegacyLyriaStream } : {})));
|
|
10694
|
-
if (
|
|
10695
|
-
return promise
|
|
10694
|
+
if (isStreaming) {
|
|
10695
|
+
return promise;
|
|
10696
10696
|
}
|
|
10697
|
-
|
|
10697
|
+
let nonStreaming = promise;
|
|
10698
|
+
if (needsLegacyLyriaShim) {
|
|
10699
|
+
nonStreaming = nonStreaming._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
|
|
10700
|
+
}
|
|
10701
|
+
return nonStreaming._thenUnwrap(addOutputProperties);
|
|
10698
10702
|
}
|
|
10699
10703
|
/**
|
|
10700
10704
|
* Deletes the interaction by id.
|
|
@@ -10723,17 +10727,64 @@ class BaseInteractions extends APIResource {
|
|
|
10723
10727
|
*/
|
|
10724
10728
|
cancel(id, params = {}, options) {
|
|
10725
10729
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
10726
|
-
return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options);
|
|
10730
|
+
return this._client.post(path `/${api_version}/interactions/${id}/cancel`, options)._thenUnwrap(addOutputProperties);
|
|
10727
10731
|
}
|
|
10728
10732
|
get(id, params = {}, options) {
|
|
10729
10733
|
var _a;
|
|
10730
10734
|
const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
|
|
10731
|
-
|
|
10735
|
+
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 }));
|
|
10736
|
+
if (params === null || params === void 0 ? void 0 : params.stream) {
|
|
10737
|
+
return response;
|
|
10738
|
+
}
|
|
10739
|
+
return response._thenUnwrap(addOutputProperties);
|
|
10732
10740
|
}
|
|
10733
10741
|
}
|
|
10734
10742
|
BaseInteractions._key = Object.freeze(['interactions']);
|
|
10735
10743
|
class Interactions extends BaseInteractions {
|
|
10736
10744
|
}
|
|
10745
|
+
function addOutputProperties(interaction) {
|
|
10746
|
+
var _a, _b;
|
|
10747
|
+
const steps = (_a = interaction.steps) !== null && _a !== void 0 ? _a : [];
|
|
10748
|
+
let firstTrailing = steps.length;
|
|
10749
|
+
while (firstTrailing > 0 && steps[firstTrailing - 1].type === 'model_output') {
|
|
10750
|
+
firstTrailing--;
|
|
10751
|
+
}
|
|
10752
|
+
const modelSteps = steps.slice(firstTrailing);
|
|
10753
|
+
const output = modelSteps.flatMap((step) => { var _a; return (_a = step.content) !== null && _a !== void 0 ? _a : []; });
|
|
10754
|
+
const textParts = [];
|
|
10755
|
+
for (let i = output.length - 1; i >= 0; i--) {
|
|
10756
|
+
const content = output[i];
|
|
10757
|
+
if (content.type !== 'text')
|
|
10758
|
+
break;
|
|
10759
|
+
textParts.push((_b = content.text) !== null && _b !== void 0 ? _b : '');
|
|
10760
|
+
}
|
|
10761
|
+
const output_text = textParts.reverse().join('');
|
|
10762
|
+
let output_image;
|
|
10763
|
+
let output_audio;
|
|
10764
|
+
let output_video;
|
|
10765
|
+
for (let i = steps.length - 1; i >= 0; i--) {
|
|
10766
|
+
const step = steps[i];
|
|
10767
|
+
const anyStep = step;
|
|
10768
|
+
if (anyStep.type === 'user_input') {
|
|
10769
|
+
break;
|
|
10770
|
+
}
|
|
10771
|
+
if (anyStep.type === 'model_output' && anyStep.content) {
|
|
10772
|
+
for (let j = anyStep.content.length - 1; j >= 0; j--) {
|
|
10773
|
+
const content = anyStep.content[j];
|
|
10774
|
+
if (content.type === 'image' && !output_image) {
|
|
10775
|
+
output_image = content;
|
|
10776
|
+
}
|
|
10777
|
+
if (content.type === 'audio' && !output_audio) {
|
|
10778
|
+
output_audio = content;
|
|
10779
|
+
}
|
|
10780
|
+
if (content.type === 'video' && !output_video) {
|
|
10781
|
+
output_video = content;
|
|
10782
|
+
}
|
|
10783
|
+
}
|
|
10784
|
+
}
|
|
10785
|
+
}
|
|
10786
|
+
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 }));
|
|
10787
|
+
}
|
|
10737
10788
|
|
|
10738
10789
|
/**
|
|
10739
10790
|
* @license
|
|
@@ -11477,7 +11528,7 @@ GeminiNextGenAPIClient.Webhooks = Webhooks;
|
|
|
11477
11528
|
function audioTranscriptionConfigToMldev$1(fromObject) {
|
|
11478
11529
|
const toObject = {};
|
|
11479
11530
|
if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
|
|
11480
|
-
throw new Error('languageCodes parameter is
|
|
11531
|
+
throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11481
11532
|
}
|
|
11482
11533
|
return toObject;
|
|
11483
11534
|
}
|
|
@@ -11488,23 +11539,23 @@ function authConfigToMldev$2(fromObject) {
|
|
|
11488
11539
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
11489
11540
|
}
|
|
11490
11541
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
11491
|
-
throw new Error('apiKeyConfig parameter is
|
|
11542
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11492
11543
|
}
|
|
11493
11544
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
11494
|
-
throw new Error('authType parameter is
|
|
11545
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11495
11546
|
}
|
|
11496
11547
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
11497
11548
|
undefined) {
|
|
11498
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
11549
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11499
11550
|
}
|
|
11500
11551
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
11501
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
11552
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11502
11553
|
}
|
|
11503
11554
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
11504
|
-
throw new Error('oauthConfig parameter is
|
|
11555
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11505
11556
|
}
|
|
11506
11557
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
11507
|
-
throw new Error('oidcConfig parameter is
|
|
11558
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11508
11559
|
}
|
|
11509
11560
|
return toObject;
|
|
11510
11561
|
}
|
|
@@ -11515,7 +11566,7 @@ function blobToMldev$2(fromObject) {
|
|
|
11515
11566
|
setValueByPath(toObject, ['data'], fromData);
|
|
11516
11567
|
}
|
|
11517
11568
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
11518
|
-
throw new Error('displayName parameter is
|
|
11569
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11519
11570
|
}
|
|
11520
11571
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
11521
11572
|
if (fromMimeType != null) {
|
|
@@ -11562,7 +11613,7 @@ function contentToVertex$1(fromObject) {
|
|
|
11562
11613
|
function fileDataToMldev$2(fromObject) {
|
|
11563
11614
|
const toObject = {};
|
|
11564
11615
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
11565
|
-
throw new Error('displayName parameter is
|
|
11616
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11566
11617
|
}
|
|
11567
11618
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
11568
11619
|
if (fromFileUri != null) {
|
|
@@ -11589,10 +11640,10 @@ function functionCallToMldev$2(fromObject) {
|
|
|
11589
11640
|
setValueByPath(toObject, ['name'], fromName);
|
|
11590
11641
|
}
|
|
11591
11642
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
11592
|
-
throw new Error('partialArgs parameter is
|
|
11643
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11593
11644
|
}
|
|
11594
11645
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
11595
|
-
throw new Error('willContinue parameter is
|
|
11646
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11596
11647
|
}
|
|
11597
11648
|
return toObject;
|
|
11598
11649
|
}
|
|
@@ -11720,7 +11771,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
11720
11771
|
}
|
|
11721
11772
|
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
11722
11773
|
undefined) {
|
|
11723
|
-
throw new Error('enableEnhancedCivicAnswers parameter is
|
|
11774
|
+
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
11724
11775
|
}
|
|
11725
11776
|
return toObject;
|
|
11726
11777
|
}
|
|
@@ -11743,10 +11794,10 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
11743
11794
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
11744
11795
|
}
|
|
11745
11796
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
11746
|
-
throw new Error('blockingConfidence parameter is
|
|
11797
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11747
11798
|
}
|
|
11748
11799
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
11749
|
-
throw new Error('excludeDomains parameter is
|
|
11800
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11750
11801
|
}
|
|
11751
11802
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
11752
11803
|
'timeRangeFilter',
|
|
@@ -11865,7 +11916,7 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
11865
11916
|
setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
|
|
11866
11917
|
}
|
|
11867
11918
|
if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
|
|
11868
|
-
throw new Error('explicitVadSignal parameter is
|
|
11919
|
+
throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
11869
11920
|
}
|
|
11870
11921
|
const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
|
|
11871
11922
|
if (parentObject !== undefined && fromAvatarConfig != null) {
|
|
@@ -11883,6 +11934,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
11883
11934
|
}
|
|
11884
11935
|
setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
|
|
11885
11936
|
}
|
|
11937
|
+
const fromStreamTranslationConfig = getValueByPath(fromObject, [
|
|
11938
|
+
'streamTranslationConfig',
|
|
11939
|
+
]);
|
|
11940
|
+
if (parentObject !== undefined && fromStreamTranslationConfig != null) {
|
|
11941
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
|
|
11942
|
+
}
|
|
11886
11943
|
return toObject;
|
|
11887
11944
|
}
|
|
11888
11945
|
function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
@@ -12015,6 +12072,9 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
12015
12072
|
}
|
|
12016
12073
|
setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
|
|
12017
12074
|
}
|
|
12075
|
+
if (getValueByPath(fromObject, ['streamTranslationConfig']) !== undefined) {
|
|
12076
|
+
throw new Error('streamTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12077
|
+
}
|
|
12018
12078
|
return toObject;
|
|
12019
12079
|
}
|
|
12020
12080
|
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
@@ -12336,13 +12396,13 @@ function partToVertex$1(fromObject) {
|
|
|
12336
12396
|
setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
|
|
12337
12397
|
}
|
|
12338
12398
|
if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
|
|
12339
|
-
throw new Error('toolCall parameter is
|
|
12399
|
+
throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12340
12400
|
}
|
|
12341
12401
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
12342
|
-
throw new Error('toolResponse parameter is
|
|
12402
|
+
throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12343
12403
|
}
|
|
12344
12404
|
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
12345
|
-
throw new Error('partMetadata parameter is
|
|
12405
|
+
throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12346
12406
|
}
|
|
12347
12407
|
return toObject;
|
|
12348
12408
|
}
|
|
@@ -12353,7 +12413,7 @@ function safetySettingToMldev$2(fromObject) {
|
|
|
12353
12413
|
setValueByPath(toObject, ['category'], fromCategory);
|
|
12354
12414
|
}
|
|
12355
12415
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
12356
|
-
throw new Error('method parameter is
|
|
12416
|
+
throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12357
12417
|
}
|
|
12358
12418
|
const fromThreshold = getValueByPath(fromObject, ['threshold']);
|
|
12359
12419
|
if (fromThreshold != null) {
|
|
@@ -12368,14 +12428,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
12368
12428
|
setValueByPath(toObject, ['handle'], fromHandle);
|
|
12369
12429
|
}
|
|
12370
12430
|
if (getValueByPath(fromObject, ['transparent']) !== undefined) {
|
|
12371
|
-
throw new Error('transparent parameter is
|
|
12431
|
+
throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12372
12432
|
}
|
|
12373
12433
|
return toObject;
|
|
12374
12434
|
}
|
|
12375
12435
|
function toolToMldev$2(fromObject) {
|
|
12376
12436
|
const toObject = {};
|
|
12377
12437
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
12378
|
-
throw new Error('retrieval parameter is
|
|
12438
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12379
12439
|
}
|
|
12380
12440
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
12381
12441
|
if (fromComputerUse != null) {
|
|
@@ -12400,7 +12460,7 @@ function toolToMldev$2(fromObject) {
|
|
|
12400
12460
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
12401
12461
|
}
|
|
12402
12462
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
12403
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
12463
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12404
12464
|
}
|
|
12405
12465
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
12406
12466
|
'functionDeclarations',
|
|
@@ -12421,7 +12481,7 @@ function toolToMldev$2(fromObject) {
|
|
|
12421
12481
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
12422
12482
|
}
|
|
12423
12483
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
12424
|
-
throw new Error('parallelAiSearch parameter is
|
|
12484
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12425
12485
|
}
|
|
12426
12486
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
12427
12487
|
if (fromUrlContext != null) {
|
|
@@ -12450,7 +12510,7 @@ function toolToVertex$1(fromObject) {
|
|
|
12450
12510
|
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
12451
12511
|
}
|
|
12452
12512
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
12453
|
-
throw new Error('fileSearch parameter is
|
|
12513
|
+
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12454
12514
|
}
|
|
12455
12515
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
12456
12516
|
if (fromGoogleSearch != null) {
|
|
@@ -12501,7 +12561,7 @@ function toolToVertex$1(fromObject) {
|
|
|
12501
12561
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
12502
12562
|
}
|
|
12503
12563
|
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
12504
|
-
throw new Error('mcpServers parameter is
|
|
12564
|
+
throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12505
12565
|
}
|
|
12506
12566
|
return toObject;
|
|
12507
12567
|
}
|
|
@@ -12618,23 +12678,23 @@ function authConfigToMldev$1(fromObject, _rootObject) {
|
|
|
12618
12678
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
12619
12679
|
}
|
|
12620
12680
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
12621
|
-
throw new Error('apiKeyConfig parameter is
|
|
12681
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12622
12682
|
}
|
|
12623
12683
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
12624
|
-
throw new Error('authType parameter is
|
|
12684
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12625
12685
|
}
|
|
12626
12686
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
12627
12687
|
undefined) {
|
|
12628
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
12688
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12629
12689
|
}
|
|
12630
12690
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
12631
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
12691
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12632
12692
|
}
|
|
12633
12693
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
12634
|
-
throw new Error('oauthConfig parameter is
|
|
12694
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12635
12695
|
}
|
|
12636
12696
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
12637
|
-
throw new Error('oidcConfig parameter is
|
|
12697
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12638
12698
|
}
|
|
12639
12699
|
return toObject;
|
|
12640
12700
|
}
|
|
@@ -12645,7 +12705,7 @@ function blobToMldev$1(fromObject, _rootObject) {
|
|
|
12645
12705
|
setValueByPath(toObject, ['data'], fromData);
|
|
12646
12706
|
}
|
|
12647
12707
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
12648
|
-
throw new Error('displayName parameter is
|
|
12708
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12649
12709
|
}
|
|
12650
12710
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
12651
12711
|
if (fromMimeType != null) {
|
|
@@ -12842,13 +12902,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
|
|
|
12842
12902
|
function countTokensConfigToMldev(fromObject, _rootObject) {
|
|
12843
12903
|
const toObject = {};
|
|
12844
12904
|
if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
|
|
12845
|
-
throw new Error('systemInstruction parameter is
|
|
12905
|
+
throw new Error('systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12846
12906
|
}
|
|
12847
12907
|
if (getValueByPath(fromObject, ['tools']) !== undefined) {
|
|
12848
|
-
throw new Error('tools parameter is
|
|
12908
|
+
throw new Error('tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12849
12909
|
}
|
|
12850
12910
|
if (getValueByPath(fromObject, ['generationConfig']) !== undefined) {
|
|
12851
|
-
throw new Error('generationConfig parameter is
|
|
12911
|
+
throw new Error('generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12852
12912
|
}
|
|
12853
12913
|
return toObject;
|
|
12854
12914
|
}
|
|
@@ -13149,16 +13209,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
13149
13209
|
setValueByPath(parentObject, ['requests[]', 'outputDimensionality'], fromOutputDimensionality);
|
|
13150
13210
|
}
|
|
13151
13211
|
if (getValueByPath(fromObject, ['mimeType']) !== undefined) {
|
|
13152
|
-
throw new Error('mimeType parameter is
|
|
13212
|
+
throw new Error('mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13153
13213
|
}
|
|
13154
13214
|
if (getValueByPath(fromObject, ['autoTruncate']) !== undefined) {
|
|
13155
|
-
throw new Error('autoTruncate parameter is
|
|
13215
|
+
throw new Error('autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13156
13216
|
}
|
|
13157
13217
|
if (getValueByPath(fromObject, ['documentOcr']) !== undefined) {
|
|
13158
|
-
throw new Error('documentOcr parameter is
|
|
13218
|
+
throw new Error('documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13159
13219
|
}
|
|
13160
13220
|
if (getValueByPath(fromObject, ['audioTrackExtraction']) !== undefined) {
|
|
13161
|
-
throw new Error('audioTrackExtraction parameter is
|
|
13221
|
+
throw new Error('audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13162
13222
|
}
|
|
13163
13223
|
return toObject;
|
|
13164
13224
|
}
|
|
@@ -13442,7 +13502,7 @@ function endpointFromVertex(fromObject, _rootObject) {
|
|
|
13442
13502
|
function fileDataToMldev$1(fromObject, _rootObject) {
|
|
13443
13503
|
const toObject = {};
|
|
13444
13504
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
13445
|
-
throw new Error('displayName parameter is
|
|
13505
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13446
13506
|
}
|
|
13447
13507
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
13448
13508
|
if (fromFileUri != null) {
|
|
@@ -13469,10 +13529,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
|
|
|
13469
13529
|
setValueByPath(toObject, ['name'], fromName);
|
|
13470
13530
|
}
|
|
13471
13531
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
13472
|
-
throw new Error('partialArgs parameter is
|
|
13532
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13473
13533
|
}
|
|
13474
13534
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
13475
|
-
throw new Error('willContinue parameter is
|
|
13535
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13476
13536
|
}
|
|
13477
13537
|
return toObject;
|
|
13478
13538
|
}
|
|
@@ -13490,7 +13550,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
|
|
|
13490
13550
|
}
|
|
13491
13551
|
if (getValueByPath(fromObject, ['streamFunctionCallArguments']) !==
|
|
13492
13552
|
undefined) {
|
|
13493
|
-
throw new Error('streamFunctionCallArguments parameter is
|
|
13553
|
+
throw new Error('streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13494
13554
|
}
|
|
13495
13555
|
return toObject;
|
|
13496
13556
|
}
|
|
@@ -13577,10 +13637,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13577
13637
|
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
13578
13638
|
}
|
|
13579
13639
|
if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
|
|
13580
|
-
throw new Error('routingConfig parameter is
|
|
13640
|
+
throw new Error('routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13581
13641
|
}
|
|
13582
13642
|
if (getValueByPath(fromObject, ['modelSelectionConfig']) !== undefined) {
|
|
13583
|
-
throw new Error('modelSelectionConfig parameter is
|
|
13643
|
+
throw new Error('modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13584
13644
|
}
|
|
13585
13645
|
const fromSafetySettings = getValueByPath(fromObject, [
|
|
13586
13646
|
'safetySettings',
|
|
@@ -13609,7 +13669,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13609
13669
|
setValueByPath(parentObject, ['toolConfig'], toolConfigToMldev(fromToolConfig));
|
|
13610
13670
|
}
|
|
13611
13671
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
13612
|
-
throw new Error('labels parameter is
|
|
13672
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13613
13673
|
}
|
|
13614
13674
|
const fromCachedContent = getValueByPath(fromObject, [
|
|
13615
13675
|
'cachedContent',
|
|
@@ -13634,7 +13694,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13634
13694
|
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
13635
13695
|
}
|
|
13636
13696
|
if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
|
|
13637
|
-
throw new Error('audioTimestamp parameter is
|
|
13697
|
+
throw new Error('audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13638
13698
|
}
|
|
13639
13699
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
13640
13700
|
'thinkingConfig',
|
|
@@ -13653,7 +13713,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
13653
13713
|
setValueByPath(toObject, ['enableEnhancedCivicAnswers'], fromEnableEnhancedCivicAnswers);
|
|
13654
13714
|
}
|
|
13655
13715
|
if (getValueByPath(fromObject, ['modelArmorConfig']) !== undefined) {
|
|
13656
|
-
throw new Error('modelArmorConfig parameter is
|
|
13716
|
+
throw new Error('modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13657
13717
|
}
|
|
13658
13718
|
const fromServiceTier = getValueByPath(fromObject, ['serviceTier']);
|
|
13659
13719
|
if (parentObject !== undefined && fromServiceTier != null) {
|
|
@@ -13825,7 +13885,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
13825
13885
|
}
|
|
13826
13886
|
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
13827
13887
|
undefined) {
|
|
13828
|
-
throw new Error('enableEnhancedCivicAnswers parameter is
|
|
13888
|
+
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
13829
13889
|
}
|
|
13830
13890
|
const fromModelArmorConfig = getValueByPath(fromObject, [
|
|
13831
13891
|
'modelArmorConfig',
|
|
@@ -13974,10 +14034,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
|
13974
14034
|
function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
13975
14035
|
const toObject = {};
|
|
13976
14036
|
if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
|
|
13977
|
-
throw new Error('outputGcsUri parameter is
|
|
14037
|
+
throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13978
14038
|
}
|
|
13979
14039
|
if (getValueByPath(fromObject, ['negativePrompt']) !== undefined) {
|
|
13980
|
-
throw new Error('negativePrompt parameter is
|
|
14040
|
+
throw new Error('negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
13981
14041
|
}
|
|
13982
14042
|
const fromNumberOfImages = getValueByPath(fromObject, [
|
|
13983
14043
|
'numberOfImages',
|
|
@@ -13996,7 +14056,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
13996
14056
|
setValueByPath(parentObject, ['parameters', 'guidanceScale'], fromGuidanceScale);
|
|
13997
14057
|
}
|
|
13998
14058
|
if (getValueByPath(fromObject, ['seed']) !== undefined) {
|
|
13999
|
-
throw new Error('seed parameter is
|
|
14059
|
+
throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14000
14060
|
}
|
|
14001
14061
|
const fromSafetyFilterLevel = getValueByPath(fromObject, [
|
|
14002
14062
|
'safetyFilterLevel',
|
|
@@ -14039,17 +14099,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
14039
14099
|
setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
14040
14100
|
}
|
|
14041
14101
|
if (getValueByPath(fromObject, ['addWatermark']) !== undefined) {
|
|
14042
|
-
throw new Error('addWatermark parameter is
|
|
14102
|
+
throw new Error('addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14043
14103
|
}
|
|
14044
14104
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
14045
|
-
throw new Error('labels parameter is
|
|
14105
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14046
14106
|
}
|
|
14047
14107
|
const fromImageSize = getValueByPath(fromObject, ['imageSize']);
|
|
14048
14108
|
if (parentObject !== undefined && fromImageSize != null) {
|
|
14049
14109
|
setValueByPath(parentObject, ['parameters', 'sampleImageSize'], fromImageSize);
|
|
14050
14110
|
}
|
|
14051
14111
|
if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
|
|
14052
|
-
throw new Error('enhancePrompt parameter is
|
|
14112
|
+
throw new Error('enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14053
14113
|
}
|
|
14054
14114
|
return toObject;
|
|
14055
14115
|
}
|
|
@@ -14242,10 +14302,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14242
14302
|
setValueByPath(parentObject, ['parameters', 'sampleCount'], fromNumberOfVideos);
|
|
14243
14303
|
}
|
|
14244
14304
|
if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
|
|
14245
|
-
throw new Error('outputGcsUri parameter is
|
|
14305
|
+
throw new Error('outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14246
14306
|
}
|
|
14247
14307
|
if (getValueByPath(fromObject, ['fps']) !== undefined) {
|
|
14248
|
-
throw new Error('fps parameter is
|
|
14308
|
+
throw new Error('fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14249
14309
|
}
|
|
14250
14310
|
const fromDurationSeconds = getValueByPath(fromObject, [
|
|
14251
14311
|
'durationSeconds',
|
|
@@ -14254,7 +14314,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14254
14314
|
setValueByPath(parentObject, ['parameters', 'durationSeconds'], fromDurationSeconds);
|
|
14255
14315
|
}
|
|
14256
14316
|
if (getValueByPath(fromObject, ['seed']) !== undefined) {
|
|
14257
|
-
throw new Error('seed parameter is
|
|
14317
|
+
throw new Error('seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14258
14318
|
}
|
|
14259
14319
|
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
14260
14320
|
if (parentObject !== undefined && fromAspectRatio != null) {
|
|
@@ -14271,7 +14331,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14271
14331
|
setValueByPath(parentObject, ['parameters', 'personGeneration'], fromPersonGeneration);
|
|
14272
14332
|
}
|
|
14273
14333
|
if (getValueByPath(fromObject, ['pubsubTopic']) !== undefined) {
|
|
14274
|
-
throw new Error('pubsubTopic parameter is
|
|
14334
|
+
throw new Error('pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14275
14335
|
}
|
|
14276
14336
|
const fromNegativePrompt = getValueByPath(fromObject, [
|
|
14277
14337
|
'negativePrompt',
|
|
@@ -14286,7 +14346,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14286
14346
|
setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
|
|
14287
14347
|
}
|
|
14288
14348
|
if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
|
|
14289
|
-
throw new Error('generateAudio parameter is
|
|
14349
|
+
throw new Error('generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14290
14350
|
}
|
|
14291
14351
|
const fromLastFrame = getValueByPath(fromObject, ['lastFrame']);
|
|
14292
14352
|
if (parentObject !== undefined && fromLastFrame != null) {
|
|
@@ -14305,13 +14365,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14305
14365
|
setValueByPath(parentObject, ['instances[0]', 'referenceImages'], transformedList);
|
|
14306
14366
|
}
|
|
14307
14367
|
if (getValueByPath(fromObject, ['mask']) !== undefined) {
|
|
14308
|
-
throw new Error('mask parameter is
|
|
14368
|
+
throw new Error('mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14309
14369
|
}
|
|
14310
14370
|
if (getValueByPath(fromObject, ['compressionQuality']) !== undefined) {
|
|
14311
|
-
throw new Error('compressionQuality parameter is
|
|
14371
|
+
throw new Error('compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14312
14372
|
}
|
|
14313
14373
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
14314
|
-
throw new Error('labels parameter is
|
|
14374
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14315
14375
|
}
|
|
14316
14376
|
const fromWebhookConfig = getValueByPath(fromObject, [
|
|
14317
14377
|
'webhookConfig',
|
|
@@ -14320,7 +14380,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
14320
14380
|
setValueByPath(parentObject, ['webhookConfig'], fromWebhookConfig);
|
|
14321
14381
|
}
|
|
14322
14382
|
if (getValueByPath(fromObject, ['resizeMode']) !== undefined) {
|
|
14323
|
-
throw new Error('resizeMode parameter is
|
|
14383
|
+
throw new Error('resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14324
14384
|
}
|
|
14325
14385
|
return toObject;
|
|
14326
14386
|
}
|
|
@@ -14417,7 +14477,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
14417
14477
|
setValueByPath(parentObject, ['labels'], fromLabels);
|
|
14418
14478
|
}
|
|
14419
14479
|
if (getValueByPath(fromObject, ['webhookConfig']) !== undefined) {
|
|
14420
|
-
throw new Error('webhookConfig parameter is
|
|
14480
|
+
throw new Error('webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
14421
14481
|
}
|
|
14422
14482
|
const fromResizeMode = getValueByPath(fromObject, ['resizeMode']);
|
|
14423
14483
|
if (parentObject !== undefined && fromResizeMode != null) {
|
|
@@ -14816,7 +14876,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
14816
14876
|
}
|
|
14817
14877
|
if (getValueByPath(fromObject, ['enableEnhancedCivicAnswers']) !==
|
|
14818
14878
|
undefined) {
|
|
14819
|
-
throw new Error('enableEnhancedCivicAnswers parameter is
|
|
14879
|
+
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
14820
14880
|
}
|
|
14821
14881
|
return toObject;
|
|
14822
14882
|
}
|
|
@@ -14855,10 +14915,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
|
14855
14915
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
14856
14916
|
}
|
|
14857
14917
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
14858
|
-
throw new Error('blockingConfidence parameter is
|
|
14918
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14859
14919
|
}
|
|
14860
14920
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
14861
|
-
throw new Error('excludeDomains parameter is
|
|
14921
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14862
14922
|
}
|
|
14863
14923
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
14864
14924
|
'timeRangeFilter',
|
|
@@ -14879,20 +14939,20 @@ function imageConfigToMldev(fromObject, _rootObject) {
|
|
|
14879
14939
|
setValueByPath(toObject, ['imageSize'], fromImageSize);
|
|
14880
14940
|
}
|
|
14881
14941
|
if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
|
|
14882
|
-
throw new Error('personGeneration parameter is
|
|
14942
|
+
throw new Error('personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14883
14943
|
}
|
|
14884
14944
|
if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
|
|
14885
|
-
throw new Error('prominentPeople parameter is
|
|
14945
|
+
throw new Error('prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14886
14946
|
}
|
|
14887
14947
|
if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
|
|
14888
|
-
throw new Error('outputMimeType parameter is
|
|
14948
|
+
throw new Error('outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14889
14949
|
}
|
|
14890
14950
|
if (getValueByPath(fromObject, ['outputCompressionQuality']) !==
|
|
14891
14951
|
undefined) {
|
|
14892
|
-
throw new Error('outputCompressionQuality parameter is
|
|
14952
|
+
throw new Error('outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14893
14953
|
}
|
|
14894
14954
|
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
14895
|
-
throw new Error('imageOutputOptions parameter is
|
|
14955
|
+
throw new Error('imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14896
14956
|
}
|
|
14897
14957
|
return toObject;
|
|
14898
14958
|
}
|
|
@@ -14973,7 +15033,7 @@ function imageFromVertex(fromObject, _rootObject) {
|
|
|
14973
15033
|
function imageToMldev(fromObject, _rootObject) {
|
|
14974
15034
|
const toObject = {};
|
|
14975
15035
|
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
14976
|
-
throw new Error('gcsUri parameter is
|
|
15036
|
+
throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
14977
15037
|
}
|
|
14978
15038
|
const fromImageBytes = getValueByPath(fromObject, ['imageBytes']);
|
|
14979
15039
|
if (fromImageBytes != null) {
|
|
@@ -15376,13 +15436,13 @@ function partToVertex(fromObject, _rootObject) {
|
|
|
15376
15436
|
setValueByPath(toObject, ['videoMetadata'], fromVideoMetadata);
|
|
15377
15437
|
}
|
|
15378
15438
|
if (getValueByPath(fromObject, ['toolCall']) !== undefined) {
|
|
15379
|
-
throw new Error('toolCall parameter is
|
|
15439
|
+
throw new Error('toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15380
15440
|
}
|
|
15381
15441
|
if (getValueByPath(fromObject, ['toolResponse']) !== undefined) {
|
|
15382
|
-
throw new Error('toolResponse parameter is
|
|
15442
|
+
throw new Error('toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15383
15443
|
}
|
|
15384
15444
|
if (getValueByPath(fromObject, ['partMetadata']) !== undefined) {
|
|
15385
|
-
throw new Error('partMetadata parameter is
|
|
15445
|
+
throw new Error('partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15386
15446
|
}
|
|
15387
15447
|
return toObject;
|
|
15388
15448
|
}
|
|
@@ -15605,7 +15665,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
|
|
|
15605
15665
|
setValueByPath(toObject, ['category'], fromCategory);
|
|
15606
15666
|
}
|
|
15607
15667
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
15608
|
-
throw new Error('method parameter is
|
|
15668
|
+
throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15609
15669
|
}
|
|
15610
15670
|
const fromThreshold = getValueByPath(fromObject, ['threshold']);
|
|
15611
15671
|
if (fromThreshold != null) {
|
|
@@ -15739,14 +15799,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
|
|
|
15739
15799
|
}
|
|
15740
15800
|
if (getValueByPath(fromObject, ['includeServerSideToolInvocations']) !==
|
|
15741
15801
|
undefined) {
|
|
15742
|
-
throw new Error('includeServerSideToolInvocations parameter is
|
|
15802
|
+
throw new Error('includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15743
15803
|
}
|
|
15744
15804
|
return toObject;
|
|
15745
15805
|
}
|
|
15746
15806
|
function toolToMldev$1(fromObject, rootObject) {
|
|
15747
15807
|
const toObject = {};
|
|
15748
15808
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
15749
|
-
throw new Error('retrieval parameter is
|
|
15809
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15750
15810
|
}
|
|
15751
15811
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
15752
15812
|
if (fromComputerUse != null) {
|
|
@@ -15771,7 +15831,7 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
15771
15831
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
15772
15832
|
}
|
|
15773
15833
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
15774
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
15834
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15775
15835
|
}
|
|
15776
15836
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
15777
15837
|
'functionDeclarations',
|
|
@@ -15792,7 +15852,7 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
15792
15852
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
15793
15853
|
}
|
|
15794
15854
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
15795
|
-
throw new Error('parallelAiSearch parameter is
|
|
15855
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15796
15856
|
}
|
|
15797
15857
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
15798
15858
|
if (fromUrlContext != null) {
|
|
@@ -15821,7 +15881,7 @@ function toolToVertex(fromObject, _rootObject) {
|
|
|
15821
15881
|
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
15822
15882
|
}
|
|
15823
15883
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
15824
|
-
throw new Error('fileSearch parameter is
|
|
15884
|
+
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15825
15885
|
}
|
|
15826
15886
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
15827
15887
|
if (fromGoogleSearch != null) {
|
|
@@ -15872,7 +15932,7 @@ function toolToVertex(fromObject, _rootObject) {
|
|
|
15872
15932
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
15873
15933
|
}
|
|
15874
15934
|
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
15875
|
-
throw new Error('mcpServers parameter is
|
|
15935
|
+
throw new Error('mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15876
15936
|
}
|
|
15877
15937
|
return toObject;
|
|
15878
15938
|
}
|
|
@@ -17389,7 +17449,7 @@ class Models extends BaseModule {
|
|
|
17389
17449
|
if (this.apiClient.isVertexAI()) {
|
|
17390
17450
|
if (!actualParams.config.queryBase) {
|
|
17391
17451
|
if ((_a = actualParams.config) === null || _a === void 0 ? void 0 : _a.filter) {
|
|
17392
|
-
throw new Error('Filtering tuned models list
|
|
17452
|
+
throw new Error('Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
17393
17453
|
}
|
|
17394
17454
|
else {
|
|
17395
17455
|
actualParams.config.filter = 'labels.tune-type:*';
|
|
@@ -18845,7 +18905,7 @@ class Operations extends BaseModule {
|
|
|
18845
18905
|
function audioTranscriptionConfigToMldev(fromObject) {
|
|
18846
18906
|
const toObject = {};
|
|
18847
18907
|
if (getValueByPath(fromObject, ['languageCodes']) !== undefined) {
|
|
18848
|
-
throw new Error('languageCodes parameter is
|
|
18908
|
+
throw new Error('languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18849
18909
|
}
|
|
18850
18910
|
return toObject;
|
|
18851
18911
|
}
|
|
@@ -18856,23 +18916,23 @@ function authConfigToMldev(fromObject) {
|
|
|
18856
18916
|
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
18857
18917
|
}
|
|
18858
18918
|
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
18859
|
-
throw new Error('apiKeyConfig parameter is
|
|
18919
|
+
throw new Error('apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18860
18920
|
}
|
|
18861
18921
|
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
18862
|
-
throw new Error('authType parameter is
|
|
18922
|
+
throw new Error('authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18863
18923
|
}
|
|
18864
18924
|
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
18865
18925
|
undefined) {
|
|
18866
|
-
throw new Error('googleServiceAccountConfig parameter is
|
|
18926
|
+
throw new Error('googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18867
18927
|
}
|
|
18868
18928
|
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
18869
|
-
throw new Error('httpBasicAuthConfig parameter is
|
|
18929
|
+
throw new Error('httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18870
18930
|
}
|
|
18871
18931
|
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
18872
|
-
throw new Error('oauthConfig parameter is
|
|
18932
|
+
throw new Error('oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18873
18933
|
}
|
|
18874
18934
|
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
18875
|
-
throw new Error('oidcConfig parameter is
|
|
18935
|
+
throw new Error('oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18876
18936
|
}
|
|
18877
18937
|
return toObject;
|
|
18878
18938
|
}
|
|
@@ -18883,7 +18943,7 @@ function blobToMldev(fromObject) {
|
|
|
18883
18943
|
setValueByPath(toObject, ['data'], fromData);
|
|
18884
18944
|
}
|
|
18885
18945
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
18886
|
-
throw new Error('displayName parameter is
|
|
18946
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18887
18947
|
}
|
|
18888
18948
|
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
18889
18949
|
if (fromMimeType != null) {
|
|
@@ -18950,7 +19010,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
|
|
|
18950
19010
|
function fileDataToMldev(fromObject) {
|
|
18951
19011
|
const toObject = {};
|
|
18952
19012
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
18953
|
-
throw new Error('displayName parameter is
|
|
19013
|
+
throw new Error('displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18954
19014
|
}
|
|
18955
19015
|
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
18956
19016
|
if (fromFileUri != null) {
|
|
@@ -18977,10 +19037,10 @@ function functionCallToMldev(fromObject) {
|
|
|
18977
19037
|
setValueByPath(toObject, ['name'], fromName);
|
|
18978
19038
|
}
|
|
18979
19039
|
if (getValueByPath(fromObject, ['partialArgs']) !== undefined) {
|
|
18980
|
-
throw new Error('partialArgs parameter is
|
|
19040
|
+
throw new Error('partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18981
19041
|
}
|
|
18982
19042
|
if (getValueByPath(fromObject, ['willContinue']) !== undefined) {
|
|
18983
|
-
throw new Error('willContinue parameter is
|
|
19043
|
+
throw new Error('willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18984
19044
|
}
|
|
18985
19045
|
return toObject;
|
|
18986
19046
|
}
|
|
@@ -19003,10 +19063,10 @@ function googleSearchToMldev(fromObject) {
|
|
|
19003
19063
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
19004
19064
|
}
|
|
19005
19065
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
19006
|
-
throw new Error('blockingConfidence parameter is
|
|
19066
|
+
throw new Error('blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19007
19067
|
}
|
|
19008
19068
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
19009
|
-
throw new Error('excludeDomains parameter is
|
|
19069
|
+
throw new Error('excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19010
19070
|
}
|
|
19011
19071
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
19012
19072
|
'timeRangeFilter',
|
|
@@ -19125,7 +19185,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
19125
19185
|
setValueByPath(parentObject, ['setup', 'proactivity'], fromProactivity);
|
|
19126
19186
|
}
|
|
19127
19187
|
if (getValueByPath(fromObject, ['explicitVadSignal']) !== undefined) {
|
|
19128
|
-
throw new Error('explicitVadSignal parameter is
|
|
19188
|
+
throw new Error('explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19129
19189
|
}
|
|
19130
19190
|
const fromAvatarConfig = getValueByPath(fromObject, ['avatarConfig']);
|
|
19131
19191
|
if (parentObject !== undefined && fromAvatarConfig != null) {
|
|
@@ -19143,6 +19203,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
19143
19203
|
}
|
|
19144
19204
|
setValueByPath(parentObject, ['setup', 'safetySettings'], transformedList);
|
|
19145
19205
|
}
|
|
19206
|
+
const fromStreamTranslationConfig = getValueByPath(fromObject, [
|
|
19207
|
+
'streamTranslationConfig',
|
|
19208
|
+
]);
|
|
19209
|
+
if (parentObject !== undefined && fromStreamTranslationConfig != null) {
|
|
19210
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'streamTranslationConfig'], fromStreamTranslationConfig);
|
|
19211
|
+
}
|
|
19146
19212
|
return toObject;
|
|
19147
19213
|
}
|
|
19148
19214
|
function liveConnectConstraintsToMldev(apiClient, fromObject) {
|
|
@@ -19236,7 +19302,7 @@ function safetySettingToMldev(fromObject) {
|
|
|
19236
19302
|
setValueByPath(toObject, ['category'], fromCategory);
|
|
19237
19303
|
}
|
|
19238
19304
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
19239
|
-
throw new Error('method parameter is
|
|
19305
|
+
throw new Error('method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19240
19306
|
}
|
|
19241
19307
|
const fromThreshold = getValueByPath(fromObject, ['threshold']);
|
|
19242
19308
|
if (fromThreshold != null) {
|
|
@@ -19251,14 +19317,14 @@ function sessionResumptionConfigToMldev(fromObject) {
|
|
|
19251
19317
|
setValueByPath(toObject, ['handle'], fromHandle);
|
|
19252
19318
|
}
|
|
19253
19319
|
if (getValueByPath(fromObject, ['transparent']) !== undefined) {
|
|
19254
|
-
throw new Error('transparent parameter is
|
|
19320
|
+
throw new Error('transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19255
19321
|
}
|
|
19256
19322
|
return toObject;
|
|
19257
19323
|
}
|
|
19258
19324
|
function toolToMldev(fromObject) {
|
|
19259
19325
|
const toObject = {};
|
|
19260
19326
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
19261
|
-
throw new Error('retrieval parameter is
|
|
19327
|
+
throw new Error('retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19262
19328
|
}
|
|
19263
19329
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
19264
19330
|
if (fromComputerUse != null) {
|
|
@@ -19283,7 +19349,7 @@ function toolToMldev(fromObject) {
|
|
|
19283
19349
|
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
19284
19350
|
}
|
|
19285
19351
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
19286
|
-
throw new Error('enterpriseWebSearch parameter is
|
|
19352
|
+
throw new Error('enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19287
19353
|
}
|
|
19288
19354
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
19289
19355
|
'functionDeclarations',
|
|
@@ -19304,7 +19370,7 @@ function toolToMldev(fromObject) {
|
|
|
19304
19370
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
19305
19371
|
}
|
|
19306
19372
|
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
19307
|
-
throw new Error('parallelAiSearch parameter is
|
|
19373
|
+
throw new Error('parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19308
19374
|
}
|
|
19309
19375
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
19310
19376
|
if (fromUrlContext != null) {
|
|
@@ -19638,7 +19704,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
|
|
|
19638
19704
|
function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
19639
19705
|
const toObject = {};
|
|
19640
19706
|
if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
|
|
19641
|
-
throw new Error('validationDataset parameter is
|
|
19707
|
+
throw new Error('validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19642
19708
|
}
|
|
19643
19709
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
19644
19710
|
'tunedModelDisplayName',
|
|
@@ -19647,7 +19713,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
19647
19713
|
setValueByPath(parentObject, ['displayName'], fromTunedModelDisplayName);
|
|
19648
19714
|
}
|
|
19649
19715
|
if (getValueByPath(fromObject, ['description']) !== undefined) {
|
|
19650
|
-
throw new Error('description parameter is
|
|
19716
|
+
throw new Error('description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19651
19717
|
}
|
|
19652
19718
|
const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
|
|
19653
19719
|
if (parentObject !== undefined && fromEpochCount != null) {
|
|
@@ -19661,20 +19727,20 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
19661
19727
|
}
|
|
19662
19728
|
if (getValueByPath(fromObject, ['exportLastCheckpointOnly']) !==
|
|
19663
19729
|
undefined) {
|
|
19664
|
-
throw new Error('exportLastCheckpointOnly parameter is
|
|
19730
|
+
throw new Error('exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19665
19731
|
}
|
|
19666
19732
|
if (getValueByPath(fromObject, ['preTunedModelCheckpointId']) !==
|
|
19667
19733
|
undefined) {
|
|
19668
|
-
throw new Error('preTunedModelCheckpointId parameter is
|
|
19734
|
+
throw new Error('preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19669
19735
|
}
|
|
19670
19736
|
if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
|
|
19671
|
-
throw new Error('adapterSize parameter is
|
|
19737
|
+
throw new Error('adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19672
19738
|
}
|
|
19673
19739
|
if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
|
|
19674
|
-
throw new Error('tuningMode parameter is
|
|
19740
|
+
throw new Error('tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19675
19741
|
}
|
|
19676
19742
|
if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
|
|
19677
|
-
throw new Error('customBaseModel parameter is
|
|
19743
|
+
throw new Error('customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19678
19744
|
}
|
|
19679
19745
|
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
19680
19746
|
if (parentObject !== undefined && fromBatchSize != null) {
|
|
@@ -19685,25 +19751,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
19685
19751
|
setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'learningRate'], fromLearningRate);
|
|
19686
19752
|
}
|
|
19687
19753
|
if (getValueByPath(fromObject, ['labels']) !== undefined) {
|
|
19688
|
-
throw new Error('labels parameter is
|
|
19754
|
+
throw new Error('labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19689
19755
|
}
|
|
19690
19756
|
if (getValueByPath(fromObject, ['beta']) !== undefined) {
|
|
19691
|
-
throw new Error('beta parameter is
|
|
19757
|
+
throw new Error('beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19692
19758
|
}
|
|
19693
19759
|
if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
|
|
19694
|
-
throw new Error('baseTeacherModel parameter is
|
|
19760
|
+
throw new Error('baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19695
19761
|
}
|
|
19696
19762
|
if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
|
|
19697
|
-
throw new Error('tunedTeacherModelSource parameter is
|
|
19763
|
+
throw new Error('tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19698
19764
|
}
|
|
19699
19765
|
if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
|
|
19700
|
-
throw new Error('sftLossWeightMultiplier parameter is
|
|
19766
|
+
throw new Error('sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19701
19767
|
}
|
|
19702
19768
|
if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
|
|
19703
|
-
throw new Error('outputUri parameter is
|
|
19769
|
+
throw new Error('outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19704
19770
|
}
|
|
19705
19771
|
if (getValueByPath(fromObject, ['encryptionSpec']) !== undefined) {
|
|
19706
|
-
throw new Error('encryptionSpec parameter is
|
|
19772
|
+
throw new Error('encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
19707
19773
|
}
|
|
19708
19774
|
return toObject;
|
|
19709
19775
|
}
|
|
@@ -20097,10 +20163,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
|
|
|
20097
20163
|
function tuningDatasetToMldev(fromObject, _rootObject) {
|
|
20098
20164
|
const toObject = {};
|
|
20099
20165
|
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
20100
|
-
throw new Error('gcsUri parameter is
|
|
20166
|
+
throw new Error('gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
20101
20167
|
}
|
|
20102
20168
|
if (getValueByPath(fromObject, ['vertexDatasetResource']) !== undefined) {
|
|
20103
|
-
throw new Error('vertexDatasetResource parameter is
|
|
20169
|
+
throw new Error('vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
20104
20170
|
}
|
|
20105
20171
|
const fromExamples = getValueByPath(fromObject, ['examples']);
|
|
20106
20172
|
if (fromExamples != null) {
|
|
@@ -20173,7 +20239,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
|
|
|
20173
20239
|
}
|
|
20174
20240
|
}
|
|
20175
20241
|
if (getValueByPath(fromObject, ['examples']) !== undefined) {
|
|
20176
|
-
throw new Error('examples parameter is
|
|
20242
|
+
throw new Error('examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
20177
20243
|
}
|
|
20178
20244
|
return toObject;
|
|
20179
20245
|
}
|
|
@@ -20874,6 +20940,7 @@ class GoogleGenAI {
|
|
|
20874
20940
|
if (this._interactions !== undefined) {
|
|
20875
20941
|
return this._interactions;
|
|
20876
20942
|
}
|
|
20943
|
+
console.warn('GoogleGenAI.interactions: Interactions usage is experimental and may change in future versions.');
|
|
20877
20944
|
this._interactions = this.getNextGenClient().interactions;
|
|
20878
20945
|
return this._interactions;
|
|
20879
20946
|
}
|