@fre4x/gemini 1.1.0-beta.3 → 1.1.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +637 -498
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -360,7 +360,7 @@ var require_extend = __commonJS({
|
|
|
360
360
|
}
|
|
361
361
|
return toStr.call(arr) === "[object Array]";
|
|
362
362
|
};
|
|
363
|
-
var
|
|
363
|
+
var isPlainObject4 = function isPlainObject5(obj) {
|
|
364
364
|
if (!obj || toStr.call(obj) !== "[object Object]") {
|
|
365
365
|
return false;
|
|
366
366
|
}
|
|
@@ -417,12 +417,12 @@ var require_extend = __commonJS({
|
|
|
417
417
|
src = getProperty(target, name);
|
|
418
418
|
copy = getProperty(options, name);
|
|
419
419
|
if (target !== copy) {
|
|
420
|
-
if (deep && copy && (
|
|
420
|
+
if (deep && copy && (isPlainObject4(copy) || (copyIsArray = isArray2(copy)))) {
|
|
421
421
|
if (copyIsArray) {
|
|
422
422
|
copyIsArray = false;
|
|
423
423
|
clone3 = src && isArray2(src) ? src : [];
|
|
424
424
|
} else {
|
|
425
|
-
clone3 = src &&
|
|
425
|
+
clone3 = src && isPlainObject4(src) ? src : {};
|
|
426
426
|
}
|
|
427
427
|
setProperty(target, { name, newValue: extend2(deep, clone3, copy) });
|
|
428
428
|
} else if (typeof copy !== "undefined") {
|
|
@@ -30966,22 +30966,22 @@ function authConfigToMldev$4(fromObject) {
|
|
|
30966
30966
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
30967
30967
|
}
|
|
30968
30968
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
30969
|
-
throw new Error("apiKeyConfig parameter is
|
|
30969
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
30970
30970
|
}
|
|
30971
30971
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
30972
|
-
throw new Error("authType parameter is
|
|
30972
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
30973
30973
|
}
|
|
30974
30974
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
30975
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
30975
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
30976
30976
|
}
|
|
30977
30977
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
30978
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
30978
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
30979
30979
|
}
|
|
30980
30980
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
30981
|
-
throw new Error("oauthConfig parameter is
|
|
30981
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
30982
30982
|
}
|
|
30983
30983
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
30984
|
-
throw new Error("oidcConfig parameter is
|
|
30984
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
30985
30985
|
}
|
|
30986
30986
|
return toObject;
|
|
30987
30987
|
}
|
|
@@ -31062,13 +31062,13 @@ function batchJobDestinationToVertex(fromObject) {
|
|
|
31062
31062
|
setValueByPath(toObject, ["bigqueryDestination", "outputUri"], fromBigqueryUri);
|
|
31063
31063
|
}
|
|
31064
31064
|
if (getValueByPath(fromObject, ["fileName"]) !== void 0) {
|
|
31065
|
-
throw new Error("fileName parameter is
|
|
31065
|
+
throw new Error("fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
31066
31066
|
}
|
|
31067
31067
|
if (getValueByPath(fromObject, ["inlinedResponses"]) !== void 0) {
|
|
31068
|
-
throw new Error("inlinedResponses parameter is
|
|
31068
|
+
throw new Error("inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
31069
31069
|
}
|
|
31070
31070
|
if (getValueByPath(fromObject, ["inlinedEmbedContentResponses"]) !== void 0) {
|
|
31071
|
-
throw new Error("inlinedEmbedContentResponses parameter is
|
|
31071
|
+
throw new Error("inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
31072
31072
|
}
|
|
31073
31073
|
const fromVertexDataset = getValueByPath(fromObject, [
|
|
31074
31074
|
"vertexDataset"
|
|
@@ -31213,13 +31213,13 @@ function batchJobSourceFromVertex(fromObject) {
|
|
|
31213
31213
|
function batchJobSourceToMldev(apiClient, fromObject) {
|
|
31214
31214
|
const toObject = {};
|
|
31215
31215
|
if (getValueByPath(fromObject, ["format"]) !== void 0) {
|
|
31216
|
-
throw new Error("format parameter is
|
|
31216
|
+
throw new Error("format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31217
31217
|
}
|
|
31218
31218
|
if (getValueByPath(fromObject, ["gcsUri"]) !== void 0) {
|
|
31219
|
-
throw new Error("gcsUri parameter is
|
|
31219
|
+
throw new Error("gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31220
31220
|
}
|
|
31221
31221
|
if (getValueByPath(fromObject, ["bigqueryUri"]) !== void 0) {
|
|
31222
|
-
throw new Error("bigqueryUri parameter is
|
|
31222
|
+
throw new Error("bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31223
31223
|
}
|
|
31224
31224
|
const fromFileName = getValueByPath(fromObject, ["fileName"]);
|
|
31225
31225
|
if (fromFileName != null) {
|
|
@@ -31238,7 +31238,7 @@ function batchJobSourceToMldev(apiClient, fromObject) {
|
|
|
31238
31238
|
setValueByPath(toObject, ["requests", "requests"], transformedList);
|
|
31239
31239
|
}
|
|
31240
31240
|
if (getValueByPath(fromObject, ["vertexDatasetName"]) !== void 0) {
|
|
31241
|
-
throw new Error("vertexDatasetName parameter is
|
|
31241
|
+
throw new Error("vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31242
31242
|
}
|
|
31243
31243
|
return toObject;
|
|
31244
31244
|
}
|
|
@@ -31257,10 +31257,10 @@ function batchJobSourceToVertex(fromObject) {
|
|
|
31257
31257
|
setValueByPath(toObject, ["bigquerySource", "inputUri"], fromBigqueryUri);
|
|
31258
31258
|
}
|
|
31259
31259
|
if (getValueByPath(fromObject, ["fileName"]) !== void 0) {
|
|
31260
|
-
throw new Error("fileName parameter is
|
|
31260
|
+
throw new Error("fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
31261
31261
|
}
|
|
31262
31262
|
if (getValueByPath(fromObject, ["inlinedRequests"]) !== void 0) {
|
|
31263
|
-
throw new Error("inlinedRequests parameter is
|
|
31263
|
+
throw new Error("inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
31264
31264
|
}
|
|
31265
31265
|
const fromVertexDatasetName = getValueByPath(fromObject, [
|
|
31266
31266
|
"vertexDatasetName"
|
|
@@ -31277,7 +31277,7 @@ function blobToMldev$4(fromObject) {
|
|
|
31277
31277
|
setValueByPath(toObject, ["data"], fromData);
|
|
31278
31278
|
}
|
|
31279
31279
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
31280
|
-
throw new Error("displayName parameter is
|
|
31280
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31281
31281
|
}
|
|
31282
31282
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
31283
31283
|
if (fromMimeType != null) {
|
|
@@ -31400,7 +31400,7 @@ function createBatchJobConfigToMldev(fromObject, parentObject) {
|
|
|
31400
31400
|
setValueByPath(parentObject, ["batch", "displayName"], fromDisplayName);
|
|
31401
31401
|
}
|
|
31402
31402
|
if (getValueByPath(fromObject, ["dest"]) !== void 0) {
|
|
31403
|
-
throw new Error("dest parameter is
|
|
31403
|
+
throw new Error("dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31404
31404
|
}
|
|
31405
31405
|
const fromWebhookConfig = getValueByPath(fromObject, [
|
|
31406
31406
|
"webhookConfig"
|
|
@@ -31421,7 +31421,7 @@ function createBatchJobConfigToVertex(fromObject, parentObject) {
|
|
|
31421
31421
|
setValueByPath(parentObject, ["outputConfig"], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
|
|
31422
31422
|
}
|
|
31423
31423
|
if (getValueByPath(fromObject, ["webhookConfig"]) !== void 0) {
|
|
31424
|
-
throw new Error("webhookConfig parameter is
|
|
31424
|
+
throw new Error("webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
31425
31425
|
}
|
|
31426
31426
|
return toObject;
|
|
31427
31427
|
}
|
|
@@ -31577,16 +31577,16 @@ function embedContentConfigToMldev$1(fromObject, parentObject) {
|
|
|
31577
31577
|
setValueByPath(parentObject, ["requests[]", "outputDimensionality"], fromOutputDimensionality);
|
|
31578
31578
|
}
|
|
31579
31579
|
if (getValueByPath(fromObject, ["mimeType"]) !== void 0) {
|
|
31580
|
-
throw new Error("mimeType parameter is
|
|
31580
|
+
throw new Error("mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31581
31581
|
}
|
|
31582
31582
|
if (getValueByPath(fromObject, ["autoTruncate"]) !== void 0) {
|
|
31583
|
-
throw new Error("autoTruncate parameter is
|
|
31583
|
+
throw new Error("autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31584
31584
|
}
|
|
31585
31585
|
if (getValueByPath(fromObject, ["documentOcr"]) !== void 0) {
|
|
31586
|
-
throw new Error("documentOcr parameter is
|
|
31586
|
+
throw new Error("documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31587
31587
|
}
|
|
31588
31588
|
if (getValueByPath(fromObject, ["audioTrackExtraction"]) !== void 0) {
|
|
31589
|
-
throw new Error("audioTrackExtraction parameter is
|
|
31589
|
+
throw new Error("audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31590
31590
|
}
|
|
31591
31591
|
return toObject;
|
|
31592
31592
|
}
|
|
@@ -31607,7 +31607,7 @@ function embeddingsBatchJobSourceToMldev(apiClient, fromObject) {
|
|
|
31607
31607
|
function fileDataToMldev$4(fromObject) {
|
|
31608
31608
|
const toObject = {};
|
|
31609
31609
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
31610
|
-
throw new Error("displayName parameter is
|
|
31610
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31611
31611
|
}
|
|
31612
31612
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
31613
31613
|
if (fromFileUri != null) {
|
|
@@ -31634,10 +31634,10 @@ function functionCallToMldev$4(fromObject) {
|
|
|
31634
31634
|
setValueByPath(toObject, ["name"], fromName);
|
|
31635
31635
|
}
|
|
31636
31636
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
31637
|
-
throw new Error("partialArgs parameter is
|
|
31637
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31638
31638
|
}
|
|
31639
31639
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
31640
|
-
throw new Error("willContinue parameter is
|
|
31640
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31641
31641
|
}
|
|
31642
31642
|
return toObject;
|
|
31643
31643
|
}
|
|
@@ -31654,7 +31654,7 @@ function functionCallingConfigToMldev$2(fromObject) {
|
|
|
31654
31654
|
setValueByPath(toObject, ["mode"], fromMode);
|
|
31655
31655
|
}
|
|
31656
31656
|
if (getValueByPath(fromObject, ["streamFunctionCallArguments"]) !== void 0) {
|
|
31657
|
-
throw new Error("streamFunctionCallArguments parameter is
|
|
31657
|
+
throw new Error("streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31658
31658
|
}
|
|
31659
31659
|
return toObject;
|
|
31660
31660
|
}
|
|
@@ -31741,10 +31741,10 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
31741
31741
|
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
31742
31742
|
}
|
|
31743
31743
|
if (getValueByPath(fromObject, ["routingConfig"]) !== void 0) {
|
|
31744
|
-
throw new Error("routingConfig parameter is
|
|
31744
|
+
throw new Error("routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31745
31745
|
}
|
|
31746
31746
|
if (getValueByPath(fromObject, ["modelSelectionConfig"]) !== void 0) {
|
|
31747
|
-
throw new Error("modelSelectionConfig parameter is
|
|
31747
|
+
throw new Error("modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31748
31748
|
}
|
|
31749
31749
|
const fromSafetySettings = getValueByPath(fromObject, [
|
|
31750
31750
|
"safetySettings"
|
|
@@ -31773,7 +31773,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
31773
31773
|
setValueByPath(parentObject, ["toolConfig"], toolConfigToMldev$2(fromToolConfig));
|
|
31774
31774
|
}
|
|
31775
31775
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
31776
|
-
throw new Error("labels parameter is
|
|
31776
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31777
31777
|
}
|
|
31778
31778
|
const fromCachedContent = getValueByPath(fromObject, [
|
|
31779
31779
|
"cachedContent"
|
|
@@ -31798,7 +31798,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
31798
31798
|
setValueByPath(toObject, ["speechConfig"], tSpeechConfig(fromSpeechConfig));
|
|
31799
31799
|
}
|
|
31800
31800
|
if (getValueByPath(fromObject, ["audioTimestamp"]) !== void 0) {
|
|
31801
|
-
throw new Error("audioTimestamp parameter is
|
|
31801
|
+
throw new Error("audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31802
31802
|
}
|
|
31803
31803
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
31804
31804
|
"thinkingConfig"
|
|
@@ -31817,7 +31817,7 @@ function generateContentConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
|
31817
31817
|
setValueByPath(toObject, ["enableEnhancedCivicAnswers"], fromEnableEnhancedCivicAnswers);
|
|
31818
31818
|
}
|
|
31819
31819
|
if (getValueByPath(fromObject, ["modelArmorConfig"]) !== void 0) {
|
|
31820
|
-
throw new Error("modelArmorConfig parameter is
|
|
31820
|
+
throw new Error("modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31821
31821
|
}
|
|
31822
31822
|
const fromServiceTier = getValueByPath(fromObject, ["serviceTier"]);
|
|
31823
31823
|
if (parentObject !== void 0 && fromServiceTier != null) {
|
|
@@ -31904,10 +31904,10 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
31904
31904
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
31905
31905
|
}
|
|
31906
31906
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
31907
|
-
throw new Error("blockingConfidence parameter is
|
|
31907
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31908
31908
|
}
|
|
31909
31909
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
31910
|
-
throw new Error("excludeDomains parameter is
|
|
31910
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31911
31911
|
}
|
|
31912
31912
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
31913
31913
|
"timeRangeFilter"
|
|
@@ -31928,19 +31928,19 @@ function imageConfigToMldev$1(fromObject) {
|
|
|
31928
31928
|
setValueByPath(toObject, ["imageSize"], fromImageSize);
|
|
31929
31929
|
}
|
|
31930
31930
|
if (getValueByPath(fromObject, ["personGeneration"]) !== void 0) {
|
|
31931
|
-
throw new Error("personGeneration parameter is
|
|
31931
|
+
throw new Error("personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31932
31932
|
}
|
|
31933
31933
|
if (getValueByPath(fromObject, ["prominentPeople"]) !== void 0) {
|
|
31934
|
-
throw new Error("prominentPeople parameter is
|
|
31934
|
+
throw new Error("prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31935
31935
|
}
|
|
31936
31936
|
if (getValueByPath(fromObject, ["outputMimeType"]) !== void 0) {
|
|
31937
|
-
throw new Error("outputMimeType parameter is
|
|
31937
|
+
throw new Error("outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31938
31938
|
}
|
|
31939
31939
|
if (getValueByPath(fromObject, ["outputCompressionQuality"]) !== void 0) {
|
|
31940
|
-
throw new Error("outputCompressionQuality parameter is
|
|
31940
|
+
throw new Error("outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31941
31941
|
}
|
|
31942
31942
|
if (getValueByPath(fromObject, ["imageOutputOptions"]) !== void 0) {
|
|
31943
|
-
throw new Error("imageOutputOptions parameter is
|
|
31943
|
+
throw new Error("imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
31944
31944
|
}
|
|
31945
31945
|
return toObject;
|
|
31946
31946
|
}
|
|
@@ -31997,7 +31997,7 @@ function listBatchJobsConfigToMldev(fromObject, parentObject) {
|
|
|
31997
31997
|
setValueByPath(parentObject, ["_query", "pageToken"], fromPageToken);
|
|
31998
31998
|
}
|
|
31999
31999
|
if (getValueByPath(fromObject, ["filter"]) !== void 0) {
|
|
32000
|
-
throw new Error("filter parameter is
|
|
32000
|
+
throw new Error("filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32001
32001
|
}
|
|
32002
32002
|
return toObject;
|
|
32003
32003
|
}
|
|
@@ -32166,7 +32166,7 @@ function safetySettingToMldev$3(fromObject) {
|
|
|
32166
32166
|
setValueByPath(toObject, ["category"], fromCategory);
|
|
32167
32167
|
}
|
|
32168
32168
|
if (getValueByPath(fromObject, ["method"]) !== void 0) {
|
|
32169
|
-
throw new Error("method parameter is
|
|
32169
|
+
throw new Error("method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32170
32170
|
}
|
|
32171
32171
|
const fromThreshold = getValueByPath(fromObject, ["threshold"]);
|
|
32172
32172
|
if (fromThreshold != null) {
|
|
@@ -32197,7 +32197,7 @@ function toolConfigToMldev$2(fromObject) {
|
|
|
32197
32197
|
function toolToMldev$4(fromObject) {
|
|
32198
32198
|
const toObject = {};
|
|
32199
32199
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
32200
|
-
throw new Error("retrieval parameter is
|
|
32200
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32201
32201
|
}
|
|
32202
32202
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
32203
32203
|
if (fromComputerUse != null) {
|
|
@@ -32222,7 +32222,7 @@ function toolToMldev$4(fromObject) {
|
|
|
32222
32222
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
32223
32223
|
}
|
|
32224
32224
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
32225
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
32225
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32226
32226
|
}
|
|
32227
32227
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
32228
32228
|
"functionDeclarations"
|
|
@@ -32243,7 +32243,7 @@ function toolToMldev$4(fromObject) {
|
|
|
32243
32243
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
32244
32244
|
}
|
|
32245
32245
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
32246
|
-
throw new Error("parallelAiSearch parameter is
|
|
32246
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32247
32247
|
}
|
|
32248
32248
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
32249
32249
|
if (fromUrlContext != null) {
|
|
@@ -32890,22 +32890,22 @@ function authConfigToMldev$3(fromObject) {
|
|
|
32890
32890
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
32891
32891
|
}
|
|
32892
32892
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
32893
|
-
throw new Error("apiKeyConfig parameter is
|
|
32893
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32894
32894
|
}
|
|
32895
32895
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
32896
|
-
throw new Error("authType parameter is
|
|
32896
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32897
32897
|
}
|
|
32898
32898
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
32899
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
32899
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32900
32900
|
}
|
|
32901
32901
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
32902
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
32902
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32903
32903
|
}
|
|
32904
32904
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
32905
|
-
throw new Error("oauthConfig parameter is
|
|
32905
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32906
32906
|
}
|
|
32907
32907
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
32908
|
-
throw new Error("oidcConfig parameter is
|
|
32908
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32909
32909
|
}
|
|
32910
32910
|
return toObject;
|
|
32911
32911
|
}
|
|
@@ -32916,7 +32916,7 @@ function blobToMldev$3(fromObject) {
|
|
|
32916
32916
|
setValueByPath(toObject, ["data"], fromData);
|
|
32917
32917
|
}
|
|
32918
32918
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
32919
|
-
throw new Error("displayName parameter is
|
|
32919
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
32920
32920
|
}
|
|
32921
32921
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
32922
32922
|
if (fromMimeType != null) {
|
|
@@ -33005,7 +33005,7 @@ function createCachedContentConfigToMldev(fromObject, parentObject) {
|
|
|
33005
33005
|
setValueByPath(parentObject, ["toolConfig"], toolConfigToMldev$1(fromToolConfig));
|
|
33006
33006
|
}
|
|
33007
33007
|
if (getValueByPath(fromObject, ["kmsKeyName"]) !== void 0) {
|
|
33008
|
-
throw new Error("kmsKeyName parameter is
|
|
33008
|
+
throw new Error("kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33009
33009
|
}
|
|
33010
33010
|
return toObject;
|
|
33011
33011
|
}
|
|
@@ -33122,7 +33122,7 @@ function deleteCachedContentResponseFromVertex(fromObject) {
|
|
|
33122
33122
|
function fileDataToMldev$3(fromObject) {
|
|
33123
33123
|
const toObject = {};
|
|
33124
33124
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
33125
|
-
throw new Error("displayName parameter is
|
|
33125
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33126
33126
|
}
|
|
33127
33127
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
33128
33128
|
if (fromFileUri != null) {
|
|
@@ -33149,10 +33149,10 @@ function functionCallToMldev$3(fromObject) {
|
|
|
33149
33149
|
setValueByPath(toObject, ["name"], fromName);
|
|
33150
33150
|
}
|
|
33151
33151
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
33152
|
-
throw new Error("partialArgs parameter is
|
|
33152
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33153
33153
|
}
|
|
33154
33154
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
33155
|
-
throw new Error("willContinue parameter is
|
|
33155
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33156
33156
|
}
|
|
33157
33157
|
return toObject;
|
|
33158
33158
|
}
|
|
@@ -33169,42 +33169,7 @@ function functionCallingConfigToMldev$1(fromObject) {
|
|
|
33169
33169
|
setValueByPath(toObject, ["mode"], fromMode);
|
|
33170
33170
|
}
|
|
33171
33171
|
if (getValueByPath(fromObject, ["streamFunctionCallArguments"]) !== void 0) {
|
|
33172
|
-
throw new Error("streamFunctionCallArguments parameter is
|
|
33173
|
-
}
|
|
33174
|
-
return toObject;
|
|
33175
|
-
}
|
|
33176
|
-
function functionDeclarationToVertex$2(fromObject) {
|
|
33177
|
-
const toObject = {};
|
|
33178
|
-
const fromDescription = getValueByPath(fromObject, ["description"]);
|
|
33179
|
-
if (fromDescription != null) {
|
|
33180
|
-
setValueByPath(toObject, ["description"], fromDescription);
|
|
33181
|
-
}
|
|
33182
|
-
const fromName = getValueByPath(fromObject, ["name"]);
|
|
33183
|
-
if (fromName != null) {
|
|
33184
|
-
setValueByPath(toObject, ["name"], fromName);
|
|
33185
|
-
}
|
|
33186
|
-
const fromParameters = getValueByPath(fromObject, ["parameters"]);
|
|
33187
|
-
if (fromParameters != null) {
|
|
33188
|
-
setValueByPath(toObject, ["parameters"], fromParameters);
|
|
33189
|
-
}
|
|
33190
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
33191
|
-
"parametersJsonSchema"
|
|
33192
|
-
]);
|
|
33193
|
-
if (fromParametersJsonSchema != null) {
|
|
33194
|
-
setValueByPath(toObject, ["parametersJsonSchema"], fromParametersJsonSchema);
|
|
33195
|
-
}
|
|
33196
|
-
const fromResponse = getValueByPath(fromObject, ["response"]);
|
|
33197
|
-
if (fromResponse != null) {
|
|
33198
|
-
setValueByPath(toObject, ["response"], fromResponse);
|
|
33199
|
-
}
|
|
33200
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
33201
|
-
"responseJsonSchema"
|
|
33202
|
-
]);
|
|
33203
|
-
if (fromResponseJsonSchema != null) {
|
|
33204
|
-
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
33205
|
-
}
|
|
33206
|
-
if (getValueByPath(fromObject, ["behavior"]) !== void 0) {
|
|
33207
|
-
throw new Error("behavior parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).");
|
|
33172
|
+
throw new Error("streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33208
33173
|
}
|
|
33209
33174
|
return toObject;
|
|
33210
33175
|
}
|
|
@@ -33243,10 +33208,10 @@ function googleSearchToMldev$3(fromObject) {
|
|
|
33243
33208
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
33244
33209
|
}
|
|
33245
33210
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
33246
|
-
throw new Error("blockingConfidence parameter is
|
|
33211
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33247
33212
|
}
|
|
33248
33213
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
33249
|
-
throw new Error("excludeDomains parameter is
|
|
33214
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33250
33215
|
}
|
|
33251
33216
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
33252
33217
|
"timeRangeFilter"
|
|
@@ -33483,13 +33448,13 @@ function partToVertex$2(fromObject) {
|
|
|
33483
33448
|
setValueByPath(toObject, ["videoMetadata"], fromVideoMetadata);
|
|
33484
33449
|
}
|
|
33485
33450
|
if (getValueByPath(fromObject, ["toolCall"]) !== void 0) {
|
|
33486
|
-
throw new Error("toolCall parameter is
|
|
33451
|
+
throw new Error("toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
33487
33452
|
}
|
|
33488
33453
|
if (getValueByPath(fromObject, ["toolResponse"]) !== void 0) {
|
|
33489
|
-
throw new Error("toolResponse parameter is
|
|
33454
|
+
throw new Error("toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
33490
33455
|
}
|
|
33491
33456
|
if (getValueByPath(fromObject, ["partMetadata"]) !== void 0) {
|
|
33492
|
-
throw new Error("partMetadata parameter is
|
|
33457
|
+
throw new Error("partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
33493
33458
|
}
|
|
33494
33459
|
return toObject;
|
|
33495
33460
|
}
|
|
@@ -33528,14 +33493,14 @@ function toolConfigToVertex$1(fromObject) {
|
|
|
33528
33493
|
setValueByPath(toObject, ["functionCallingConfig"], fromFunctionCallingConfig);
|
|
33529
33494
|
}
|
|
33530
33495
|
if (getValueByPath(fromObject, ["includeServerSideToolInvocations"]) !== void 0) {
|
|
33531
|
-
throw new Error("includeServerSideToolInvocations parameter is
|
|
33496
|
+
throw new Error("includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
33532
33497
|
}
|
|
33533
33498
|
return toObject;
|
|
33534
33499
|
}
|
|
33535
33500
|
function toolToMldev$3(fromObject) {
|
|
33536
33501
|
const toObject = {};
|
|
33537
33502
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
33538
|
-
throw new Error("retrieval parameter is
|
|
33503
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33539
33504
|
}
|
|
33540
33505
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
33541
33506
|
if (fromComputerUse != null) {
|
|
@@ -33560,7 +33525,7 @@ function toolToMldev$3(fromObject) {
|
|
|
33560
33525
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
33561
33526
|
}
|
|
33562
33527
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
33563
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
33528
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33564
33529
|
}
|
|
33565
33530
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
33566
33531
|
"functionDeclarations"
|
|
@@ -33581,7 +33546,7 @@ function toolToMldev$3(fromObject) {
|
|
|
33581
33546
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
33582
33547
|
}
|
|
33583
33548
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
33584
|
-
throw new Error("parallelAiSearch parameter is
|
|
33549
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
33585
33550
|
}
|
|
33586
33551
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
33587
33552
|
if (fromUrlContext != null) {
|
|
@@ -33610,7 +33575,7 @@ function toolToVertex$2(fromObject) {
|
|
|
33610
33575
|
setValueByPath(toObject, ["computerUse"], fromComputerUse);
|
|
33611
33576
|
}
|
|
33612
33577
|
if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) {
|
|
33613
|
-
throw new Error("fileSearch parameter is
|
|
33578
|
+
throw new Error("fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
33614
33579
|
}
|
|
33615
33580
|
const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
|
|
33616
33581
|
if (fromGoogleSearch != null) {
|
|
@@ -33639,7 +33604,7 @@ function toolToVertex$2(fromObject) {
|
|
|
33639
33604
|
let transformedList = fromFunctionDeclarations;
|
|
33640
33605
|
if (Array.isArray(transformedList)) {
|
|
33641
33606
|
transformedList = transformedList.map((item) => {
|
|
33642
|
-
return
|
|
33607
|
+
return item;
|
|
33643
33608
|
});
|
|
33644
33609
|
}
|
|
33645
33610
|
setValueByPath(toObject, ["functionDeclarations"], transformedList);
|
|
@@ -33661,7 +33626,7 @@ function toolToVertex$2(fromObject) {
|
|
|
33661
33626
|
setValueByPath(toObject, ["urlContext"], fromUrlContext);
|
|
33662
33627
|
}
|
|
33663
33628
|
if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) {
|
|
33664
|
-
throw new Error("mcpServers parameter is
|
|
33629
|
+
throw new Error("mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
33665
33630
|
}
|
|
33666
33631
|
return toObject;
|
|
33667
33632
|
}
|
|
@@ -34810,7 +34775,7 @@ var Files = class extends BaseModule {
|
|
|
34810
34775
|
function audioTranscriptionConfigToMldev$1(fromObject) {
|
|
34811
34776
|
const toObject = {};
|
|
34812
34777
|
if (getValueByPath(fromObject, ["languageCodes"]) !== void 0) {
|
|
34813
|
-
throw new Error("languageCodes parameter is
|
|
34778
|
+
throw new Error("languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34814
34779
|
}
|
|
34815
34780
|
return toObject;
|
|
34816
34781
|
}
|
|
@@ -34821,22 +34786,22 @@ function authConfigToMldev$2(fromObject) {
|
|
|
34821
34786
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
34822
34787
|
}
|
|
34823
34788
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
34824
|
-
throw new Error("apiKeyConfig parameter is
|
|
34789
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34825
34790
|
}
|
|
34826
34791
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
34827
|
-
throw new Error("authType parameter is
|
|
34792
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34828
34793
|
}
|
|
34829
34794
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
34830
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
34795
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34831
34796
|
}
|
|
34832
34797
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
34833
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
34798
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34834
34799
|
}
|
|
34835
34800
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
34836
|
-
throw new Error("oauthConfig parameter is
|
|
34801
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34837
34802
|
}
|
|
34838
34803
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
34839
|
-
throw new Error("oidcConfig parameter is
|
|
34804
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34840
34805
|
}
|
|
34841
34806
|
return toObject;
|
|
34842
34807
|
}
|
|
@@ -34847,7 +34812,7 @@ function blobToMldev$2(fromObject) {
|
|
|
34847
34812
|
setValueByPath(toObject, ["data"], fromData);
|
|
34848
34813
|
}
|
|
34849
34814
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
34850
|
-
throw new Error("displayName parameter is
|
|
34815
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34851
34816
|
}
|
|
34852
34817
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
34853
34818
|
if (fromMimeType != null) {
|
|
@@ -34894,7 +34859,7 @@ function contentToVertex$1(fromObject) {
|
|
|
34894
34859
|
function fileDataToMldev$2(fromObject) {
|
|
34895
34860
|
const toObject = {};
|
|
34896
34861
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
34897
|
-
throw new Error("displayName parameter is
|
|
34862
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34898
34863
|
}
|
|
34899
34864
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
34900
34865
|
if (fromFileUri != null) {
|
|
@@ -34921,45 +34886,10 @@ function functionCallToMldev$2(fromObject) {
|
|
|
34921
34886
|
setValueByPath(toObject, ["name"], fromName);
|
|
34922
34887
|
}
|
|
34923
34888
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
34924
|
-
throw new Error("partialArgs parameter is
|
|
34889
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34925
34890
|
}
|
|
34926
34891
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
34927
|
-
throw new Error("willContinue parameter is
|
|
34928
|
-
}
|
|
34929
|
-
return toObject;
|
|
34930
|
-
}
|
|
34931
|
-
function functionDeclarationToVertex$1(fromObject) {
|
|
34932
|
-
const toObject = {};
|
|
34933
|
-
const fromDescription = getValueByPath(fromObject, ["description"]);
|
|
34934
|
-
if (fromDescription != null) {
|
|
34935
|
-
setValueByPath(toObject, ["description"], fromDescription);
|
|
34936
|
-
}
|
|
34937
|
-
const fromName = getValueByPath(fromObject, ["name"]);
|
|
34938
|
-
if (fromName != null) {
|
|
34939
|
-
setValueByPath(toObject, ["name"], fromName);
|
|
34940
|
-
}
|
|
34941
|
-
const fromParameters = getValueByPath(fromObject, ["parameters"]);
|
|
34942
|
-
if (fromParameters != null) {
|
|
34943
|
-
setValueByPath(toObject, ["parameters"], fromParameters);
|
|
34944
|
-
}
|
|
34945
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
34946
|
-
"parametersJsonSchema"
|
|
34947
|
-
]);
|
|
34948
|
-
if (fromParametersJsonSchema != null) {
|
|
34949
|
-
setValueByPath(toObject, ["parametersJsonSchema"], fromParametersJsonSchema);
|
|
34950
|
-
}
|
|
34951
|
-
const fromResponse = getValueByPath(fromObject, ["response"]);
|
|
34952
|
-
if (fromResponse != null) {
|
|
34953
|
-
setValueByPath(toObject, ["response"], fromResponse);
|
|
34954
|
-
}
|
|
34955
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
34956
|
-
"responseJsonSchema"
|
|
34957
|
-
]);
|
|
34958
|
-
if (fromResponseJsonSchema != null) {
|
|
34959
|
-
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
34960
|
-
}
|
|
34961
|
-
if (getValueByPath(fromObject, ["behavior"]) !== void 0) {
|
|
34962
|
-
throw new Error("behavior parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).");
|
|
34892
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
34963
34893
|
}
|
|
34964
34894
|
return toObject;
|
|
34965
34895
|
}
|
|
@@ -35086,7 +35016,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
35086
35016
|
setValueByPath(toObject, ["topP"], fromTopP);
|
|
35087
35017
|
}
|
|
35088
35018
|
if (getValueByPath(fromObject, ["enableEnhancedCivicAnswers"]) !== void 0) {
|
|
35089
|
-
throw new Error("enableEnhancedCivicAnswers parameter is
|
|
35019
|
+
throw new Error("enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
35090
35020
|
}
|
|
35091
35021
|
return toObject;
|
|
35092
35022
|
}
|
|
@@ -35109,10 +35039,10 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
35109
35039
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
35110
35040
|
}
|
|
35111
35041
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
35112
|
-
throw new Error("blockingConfidence parameter is
|
|
35042
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35113
35043
|
}
|
|
35114
35044
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
35115
|
-
throw new Error("excludeDomains parameter is
|
|
35045
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35116
35046
|
}
|
|
35117
35047
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
35118
35048
|
"timeRangeFilter"
|
|
@@ -35231,7 +35161,7 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
35231
35161
|
setValueByPath(parentObject, ["setup", "proactivity"], fromProactivity);
|
|
35232
35162
|
}
|
|
35233
35163
|
if (getValueByPath(fromObject, ["explicitVadSignal"]) !== void 0) {
|
|
35234
|
-
throw new Error("explicitVadSignal parameter is
|
|
35164
|
+
throw new Error("explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35235
35165
|
}
|
|
35236
35166
|
const fromAvatarConfig = getValueByPath(fromObject, ["avatarConfig"]);
|
|
35237
35167
|
if (parentObject !== void 0 && fromAvatarConfig != null) {
|
|
@@ -35249,6 +35179,12 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
35249
35179
|
}
|
|
35250
35180
|
setValueByPath(parentObject, ["setup", "safetySettings"], transformedList);
|
|
35251
35181
|
}
|
|
35182
|
+
const fromStreamTranslationConfig = getValueByPath(fromObject, [
|
|
35183
|
+
"streamTranslationConfig"
|
|
35184
|
+
]);
|
|
35185
|
+
if (parentObject !== void 0 && fromStreamTranslationConfig != null) {
|
|
35186
|
+
setValueByPath(parentObject, ["setup", "generationConfig", "streamTranslationConfig"], fromStreamTranslationConfig);
|
|
35187
|
+
}
|
|
35252
35188
|
return toObject;
|
|
35253
35189
|
}
|
|
35254
35190
|
function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
@@ -35381,6 +35317,9 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
35381
35317
|
}
|
|
35382
35318
|
setValueByPath(parentObject, ["setup", "safetySettings"], transformedList);
|
|
35383
35319
|
}
|
|
35320
|
+
if (getValueByPath(fromObject, ["streamTranslationConfig"]) !== void 0) {
|
|
35321
|
+
throw new Error("streamTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
35322
|
+
}
|
|
35384
35323
|
return toObject;
|
|
35385
35324
|
}
|
|
35386
35325
|
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
@@ -35702,13 +35641,13 @@ function partToVertex$1(fromObject) {
|
|
|
35702
35641
|
setValueByPath(toObject, ["videoMetadata"], fromVideoMetadata);
|
|
35703
35642
|
}
|
|
35704
35643
|
if (getValueByPath(fromObject, ["toolCall"]) !== void 0) {
|
|
35705
|
-
throw new Error("toolCall parameter is
|
|
35644
|
+
throw new Error("toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
35706
35645
|
}
|
|
35707
35646
|
if (getValueByPath(fromObject, ["toolResponse"]) !== void 0) {
|
|
35708
|
-
throw new Error("toolResponse parameter is
|
|
35647
|
+
throw new Error("toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
35709
35648
|
}
|
|
35710
35649
|
if (getValueByPath(fromObject, ["partMetadata"]) !== void 0) {
|
|
35711
|
-
throw new Error("partMetadata parameter is
|
|
35650
|
+
throw new Error("partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
35712
35651
|
}
|
|
35713
35652
|
return toObject;
|
|
35714
35653
|
}
|
|
@@ -35719,7 +35658,7 @@ function safetySettingToMldev$2(fromObject) {
|
|
|
35719
35658
|
setValueByPath(toObject, ["category"], fromCategory);
|
|
35720
35659
|
}
|
|
35721
35660
|
if (getValueByPath(fromObject, ["method"]) !== void 0) {
|
|
35722
|
-
throw new Error("method parameter is
|
|
35661
|
+
throw new Error("method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35723
35662
|
}
|
|
35724
35663
|
const fromThreshold = getValueByPath(fromObject, ["threshold"]);
|
|
35725
35664
|
if (fromThreshold != null) {
|
|
@@ -35734,14 +35673,14 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
35734
35673
|
setValueByPath(toObject, ["handle"], fromHandle);
|
|
35735
35674
|
}
|
|
35736
35675
|
if (getValueByPath(fromObject, ["transparent"]) !== void 0) {
|
|
35737
|
-
throw new Error("transparent parameter is
|
|
35676
|
+
throw new Error("transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35738
35677
|
}
|
|
35739
35678
|
return toObject;
|
|
35740
35679
|
}
|
|
35741
35680
|
function toolToMldev$2(fromObject) {
|
|
35742
35681
|
const toObject = {};
|
|
35743
35682
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
35744
|
-
throw new Error("retrieval parameter is
|
|
35683
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35745
35684
|
}
|
|
35746
35685
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
35747
35686
|
if (fromComputerUse != null) {
|
|
@@ -35766,7 +35705,7 @@ function toolToMldev$2(fromObject) {
|
|
|
35766
35705
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
35767
35706
|
}
|
|
35768
35707
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
35769
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
35708
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35770
35709
|
}
|
|
35771
35710
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
35772
35711
|
"functionDeclarations"
|
|
@@ -35787,7 +35726,7 @@ function toolToMldev$2(fromObject) {
|
|
|
35787
35726
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
35788
35727
|
}
|
|
35789
35728
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
35790
|
-
throw new Error("parallelAiSearch parameter is
|
|
35729
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35791
35730
|
}
|
|
35792
35731
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
35793
35732
|
if (fromUrlContext != null) {
|
|
@@ -35816,7 +35755,7 @@ function toolToVertex$1(fromObject) {
|
|
|
35816
35755
|
setValueByPath(toObject, ["computerUse"], fromComputerUse);
|
|
35817
35756
|
}
|
|
35818
35757
|
if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) {
|
|
35819
|
-
throw new Error("fileSearch parameter is
|
|
35758
|
+
throw new Error("fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
35820
35759
|
}
|
|
35821
35760
|
const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
|
|
35822
35761
|
if (fromGoogleSearch != null) {
|
|
@@ -35845,7 +35784,7 @@ function toolToVertex$1(fromObject) {
|
|
|
35845
35784
|
let transformedList = fromFunctionDeclarations;
|
|
35846
35785
|
if (Array.isArray(transformedList)) {
|
|
35847
35786
|
transformedList = transformedList.map((item) => {
|
|
35848
|
-
return
|
|
35787
|
+
return item;
|
|
35849
35788
|
});
|
|
35850
35789
|
}
|
|
35851
35790
|
setValueByPath(toObject, ["functionDeclarations"], transformedList);
|
|
@@ -35867,7 +35806,7 @@ function toolToVertex$1(fromObject) {
|
|
|
35867
35806
|
setValueByPath(toObject, ["urlContext"], fromUrlContext);
|
|
35868
35807
|
}
|
|
35869
35808
|
if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) {
|
|
35870
|
-
throw new Error("mcpServers parameter is
|
|
35809
|
+
throw new Error("mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
35871
35810
|
}
|
|
35872
35811
|
return toObject;
|
|
35873
35812
|
}
|
|
@@ -35978,22 +35917,22 @@ function authConfigToMldev$1(fromObject, _rootObject) {
|
|
|
35978
35917
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
35979
35918
|
}
|
|
35980
35919
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
35981
|
-
throw new Error("apiKeyConfig parameter is
|
|
35920
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35982
35921
|
}
|
|
35983
35922
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
35984
|
-
throw new Error("authType parameter is
|
|
35923
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35985
35924
|
}
|
|
35986
35925
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
35987
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
35926
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35988
35927
|
}
|
|
35989
35928
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
35990
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
35929
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35991
35930
|
}
|
|
35992
35931
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
35993
|
-
throw new Error("oauthConfig parameter is
|
|
35932
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35994
35933
|
}
|
|
35995
35934
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
35996
|
-
throw new Error("oidcConfig parameter is
|
|
35935
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
35997
35936
|
}
|
|
35998
35937
|
return toObject;
|
|
35999
35938
|
}
|
|
@@ -36004,7 +35943,7 @@ function blobToMldev$1(fromObject, _rootObject) {
|
|
|
36004
35943
|
setValueByPath(toObject, ["data"], fromData);
|
|
36005
35944
|
}
|
|
36006
35945
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
36007
|
-
throw new Error("displayName parameter is
|
|
35946
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36008
35947
|
}
|
|
36009
35948
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
36010
35949
|
if (fromMimeType != null) {
|
|
@@ -36201,13 +36140,13 @@ function controlReferenceConfigToVertex(fromObject, _rootObject) {
|
|
|
36201
36140
|
function countTokensConfigToMldev(fromObject, _rootObject) {
|
|
36202
36141
|
const toObject = {};
|
|
36203
36142
|
if (getValueByPath(fromObject, ["systemInstruction"]) !== void 0) {
|
|
36204
|
-
throw new Error("systemInstruction parameter is
|
|
36143
|
+
throw new Error("systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36205
36144
|
}
|
|
36206
36145
|
if (getValueByPath(fromObject, ["tools"]) !== void 0) {
|
|
36207
|
-
throw new Error("tools parameter is
|
|
36146
|
+
throw new Error("tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36208
36147
|
}
|
|
36209
36148
|
if (getValueByPath(fromObject, ["generationConfig"]) !== void 0) {
|
|
36210
|
-
throw new Error("generationConfig parameter is
|
|
36149
|
+
throw new Error("generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36211
36150
|
}
|
|
36212
36151
|
return toObject;
|
|
36213
36152
|
}
|
|
@@ -36508,16 +36447,16 @@ function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
36508
36447
|
setValueByPath(parentObject, ["requests[]", "outputDimensionality"], fromOutputDimensionality);
|
|
36509
36448
|
}
|
|
36510
36449
|
if (getValueByPath(fromObject, ["mimeType"]) !== void 0) {
|
|
36511
|
-
throw new Error("mimeType parameter is
|
|
36450
|
+
throw new Error("mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36512
36451
|
}
|
|
36513
36452
|
if (getValueByPath(fromObject, ["autoTruncate"]) !== void 0) {
|
|
36514
|
-
throw new Error("autoTruncate parameter is
|
|
36453
|
+
throw new Error("autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36515
36454
|
}
|
|
36516
36455
|
if (getValueByPath(fromObject, ["documentOcr"]) !== void 0) {
|
|
36517
|
-
throw new Error("documentOcr parameter is
|
|
36456
|
+
throw new Error("documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36518
36457
|
}
|
|
36519
36458
|
if (getValueByPath(fromObject, ["audioTrackExtraction"]) !== void 0) {
|
|
36520
|
-
throw new Error("audioTrackExtraction parameter is
|
|
36459
|
+
throw new Error("audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36521
36460
|
}
|
|
36522
36461
|
return toObject;
|
|
36523
36462
|
}
|
|
@@ -36795,7 +36734,7 @@ function endpointFromVertex(fromObject, _rootObject) {
|
|
|
36795
36734
|
function fileDataToMldev$1(fromObject, _rootObject) {
|
|
36796
36735
|
const toObject = {};
|
|
36797
36736
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
36798
|
-
throw new Error("displayName parameter is
|
|
36737
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36799
36738
|
}
|
|
36800
36739
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
36801
36740
|
if (fromFileUri != null) {
|
|
@@ -36822,10 +36761,10 @@ function functionCallToMldev$1(fromObject, _rootObject) {
|
|
|
36822
36761
|
setValueByPath(toObject, ["name"], fromName);
|
|
36823
36762
|
}
|
|
36824
36763
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
36825
|
-
throw new Error("partialArgs parameter is
|
|
36764
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36826
36765
|
}
|
|
36827
36766
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
36828
|
-
throw new Error("willContinue parameter is
|
|
36767
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36829
36768
|
}
|
|
36830
36769
|
return toObject;
|
|
36831
36770
|
}
|
|
@@ -36842,42 +36781,7 @@ function functionCallingConfigToMldev(fromObject, _rootObject) {
|
|
|
36842
36781
|
setValueByPath(toObject, ["mode"], fromMode);
|
|
36843
36782
|
}
|
|
36844
36783
|
if (getValueByPath(fromObject, ["streamFunctionCallArguments"]) !== void 0) {
|
|
36845
|
-
throw new Error("streamFunctionCallArguments parameter is
|
|
36846
|
-
}
|
|
36847
|
-
return toObject;
|
|
36848
|
-
}
|
|
36849
|
-
function functionDeclarationToVertex(fromObject, _rootObject) {
|
|
36850
|
-
const toObject = {};
|
|
36851
|
-
const fromDescription = getValueByPath(fromObject, ["description"]);
|
|
36852
|
-
if (fromDescription != null) {
|
|
36853
|
-
setValueByPath(toObject, ["description"], fromDescription);
|
|
36854
|
-
}
|
|
36855
|
-
const fromName = getValueByPath(fromObject, ["name"]);
|
|
36856
|
-
if (fromName != null) {
|
|
36857
|
-
setValueByPath(toObject, ["name"], fromName);
|
|
36858
|
-
}
|
|
36859
|
-
const fromParameters = getValueByPath(fromObject, ["parameters"]);
|
|
36860
|
-
if (fromParameters != null) {
|
|
36861
|
-
setValueByPath(toObject, ["parameters"], fromParameters);
|
|
36862
|
-
}
|
|
36863
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
36864
|
-
"parametersJsonSchema"
|
|
36865
|
-
]);
|
|
36866
|
-
if (fromParametersJsonSchema != null) {
|
|
36867
|
-
setValueByPath(toObject, ["parametersJsonSchema"], fromParametersJsonSchema);
|
|
36868
|
-
}
|
|
36869
|
-
const fromResponse = getValueByPath(fromObject, ["response"]);
|
|
36870
|
-
if (fromResponse != null) {
|
|
36871
|
-
setValueByPath(toObject, ["response"], fromResponse);
|
|
36872
|
-
}
|
|
36873
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
36874
|
-
"responseJsonSchema"
|
|
36875
|
-
]);
|
|
36876
|
-
if (fromResponseJsonSchema != null) {
|
|
36877
|
-
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
36878
|
-
}
|
|
36879
|
-
if (getValueByPath(fromObject, ["behavior"]) !== void 0) {
|
|
36880
|
-
throw new Error("behavior parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).");
|
|
36784
|
+
throw new Error("streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36881
36785
|
}
|
|
36882
36786
|
return toObject;
|
|
36883
36787
|
}
|
|
@@ -36964,10 +36868,10 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
36964
36868
|
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
36965
36869
|
}
|
|
36966
36870
|
if (getValueByPath(fromObject, ["routingConfig"]) !== void 0) {
|
|
36967
|
-
throw new Error("routingConfig parameter is
|
|
36871
|
+
throw new Error("routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36968
36872
|
}
|
|
36969
36873
|
if (getValueByPath(fromObject, ["modelSelectionConfig"]) !== void 0) {
|
|
36970
|
-
throw new Error("modelSelectionConfig parameter is
|
|
36874
|
+
throw new Error("modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
36971
36875
|
}
|
|
36972
36876
|
const fromSafetySettings = getValueByPath(fromObject, [
|
|
36973
36877
|
"safetySettings"
|
|
@@ -36996,7 +36900,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
36996
36900
|
setValueByPath(parentObject, ["toolConfig"], toolConfigToMldev(fromToolConfig));
|
|
36997
36901
|
}
|
|
36998
36902
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
36999
|
-
throw new Error("labels parameter is
|
|
36903
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37000
36904
|
}
|
|
37001
36905
|
const fromCachedContent = getValueByPath(fromObject, [
|
|
37002
36906
|
"cachedContent"
|
|
@@ -37021,7 +36925,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
37021
36925
|
setValueByPath(toObject, ["speechConfig"], tSpeechConfig(fromSpeechConfig));
|
|
37022
36926
|
}
|
|
37023
36927
|
if (getValueByPath(fromObject, ["audioTimestamp"]) !== void 0) {
|
|
37024
|
-
throw new Error("audioTimestamp parameter is
|
|
36928
|
+
throw new Error("audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37025
36929
|
}
|
|
37026
36930
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
37027
36931
|
"thinkingConfig"
|
|
@@ -37040,7 +36944,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootO
|
|
|
37040
36944
|
setValueByPath(toObject, ["enableEnhancedCivicAnswers"], fromEnableEnhancedCivicAnswers);
|
|
37041
36945
|
}
|
|
37042
36946
|
if (getValueByPath(fromObject, ["modelArmorConfig"]) !== void 0) {
|
|
37043
|
-
throw new Error("modelArmorConfig parameter is
|
|
36947
|
+
throw new Error("modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37044
36948
|
}
|
|
37045
36949
|
const fromServiceTier = getValueByPath(fromObject, ["serviceTier"]);
|
|
37046
36950
|
if (parentObject !== void 0 && fromServiceTier != null) {
|
|
@@ -37211,7 +37115,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
37211
37115
|
setValueByPath(toObject, ["imageConfig"], imageConfigToVertex(fromImageConfig));
|
|
37212
37116
|
}
|
|
37213
37117
|
if (getValueByPath(fromObject, ["enableEnhancedCivicAnswers"]) !== void 0) {
|
|
37214
|
-
throw new Error("enableEnhancedCivicAnswers parameter is
|
|
37118
|
+
throw new Error("enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
37215
37119
|
}
|
|
37216
37120
|
const fromModelArmorConfig = getValueByPath(fromObject, [
|
|
37217
37121
|
"modelArmorConfig"
|
|
@@ -37360,10 +37264,10 @@ function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
|
37360
37264
|
function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
37361
37265
|
const toObject = {};
|
|
37362
37266
|
if (getValueByPath(fromObject, ["outputGcsUri"]) !== void 0) {
|
|
37363
|
-
throw new Error("outputGcsUri parameter is
|
|
37267
|
+
throw new Error("outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37364
37268
|
}
|
|
37365
37269
|
if (getValueByPath(fromObject, ["negativePrompt"]) !== void 0) {
|
|
37366
|
-
throw new Error("negativePrompt parameter is
|
|
37270
|
+
throw new Error("negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37367
37271
|
}
|
|
37368
37272
|
const fromNumberOfImages = getValueByPath(fromObject, [
|
|
37369
37273
|
"numberOfImages"
|
|
@@ -37382,7 +37286,7 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
37382
37286
|
setValueByPath(parentObject, ["parameters", "guidanceScale"], fromGuidanceScale);
|
|
37383
37287
|
}
|
|
37384
37288
|
if (getValueByPath(fromObject, ["seed"]) !== void 0) {
|
|
37385
|
-
throw new Error("seed parameter is
|
|
37289
|
+
throw new Error("seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37386
37290
|
}
|
|
37387
37291
|
const fromSafetyFilterLevel = getValueByPath(fromObject, [
|
|
37388
37292
|
"safetyFilterLevel"
|
|
@@ -37425,17 +37329,17 @@ function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
37425
37329
|
setValueByPath(parentObject, ["parameters", "outputOptions", "compressionQuality"], fromOutputCompressionQuality);
|
|
37426
37330
|
}
|
|
37427
37331
|
if (getValueByPath(fromObject, ["addWatermark"]) !== void 0) {
|
|
37428
|
-
throw new Error("addWatermark parameter is
|
|
37332
|
+
throw new Error("addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37429
37333
|
}
|
|
37430
37334
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
37431
|
-
throw new Error("labels parameter is
|
|
37335
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37432
37336
|
}
|
|
37433
37337
|
const fromImageSize = getValueByPath(fromObject, ["imageSize"]);
|
|
37434
37338
|
if (parentObject !== void 0 && fromImageSize != null) {
|
|
37435
37339
|
setValueByPath(parentObject, ["parameters", "sampleImageSize"], fromImageSize);
|
|
37436
37340
|
}
|
|
37437
37341
|
if (getValueByPath(fromObject, ["enhancePrompt"]) !== void 0) {
|
|
37438
|
-
throw new Error("enhancePrompt parameter is
|
|
37342
|
+
throw new Error("enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37439
37343
|
}
|
|
37440
37344
|
return toObject;
|
|
37441
37345
|
}
|
|
@@ -37628,10 +37532,10 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
37628
37532
|
setValueByPath(parentObject, ["parameters", "sampleCount"], fromNumberOfVideos);
|
|
37629
37533
|
}
|
|
37630
37534
|
if (getValueByPath(fromObject, ["outputGcsUri"]) !== void 0) {
|
|
37631
|
-
throw new Error("outputGcsUri parameter is
|
|
37535
|
+
throw new Error("outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37632
37536
|
}
|
|
37633
37537
|
if (getValueByPath(fromObject, ["fps"]) !== void 0) {
|
|
37634
|
-
throw new Error("fps parameter is
|
|
37538
|
+
throw new Error("fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37635
37539
|
}
|
|
37636
37540
|
const fromDurationSeconds = getValueByPath(fromObject, [
|
|
37637
37541
|
"durationSeconds"
|
|
@@ -37640,7 +37544,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
37640
37544
|
setValueByPath(parentObject, ["parameters", "durationSeconds"], fromDurationSeconds);
|
|
37641
37545
|
}
|
|
37642
37546
|
if (getValueByPath(fromObject, ["seed"]) !== void 0) {
|
|
37643
|
-
throw new Error("seed parameter is
|
|
37547
|
+
throw new Error("seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37644
37548
|
}
|
|
37645
37549
|
const fromAspectRatio = getValueByPath(fromObject, ["aspectRatio"]);
|
|
37646
37550
|
if (parentObject !== void 0 && fromAspectRatio != null) {
|
|
@@ -37657,7 +37561,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
37657
37561
|
setValueByPath(parentObject, ["parameters", "personGeneration"], fromPersonGeneration);
|
|
37658
37562
|
}
|
|
37659
37563
|
if (getValueByPath(fromObject, ["pubsubTopic"]) !== void 0) {
|
|
37660
|
-
throw new Error("pubsubTopic parameter is
|
|
37564
|
+
throw new Error("pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37661
37565
|
}
|
|
37662
37566
|
const fromNegativePrompt = getValueByPath(fromObject, [
|
|
37663
37567
|
"negativePrompt"
|
|
@@ -37672,7 +37576,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
37672
37576
|
setValueByPath(parentObject, ["parameters", "enhancePrompt"], fromEnhancePrompt);
|
|
37673
37577
|
}
|
|
37674
37578
|
if (getValueByPath(fromObject, ["generateAudio"]) !== void 0) {
|
|
37675
|
-
throw new Error("generateAudio parameter is
|
|
37579
|
+
throw new Error("generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37676
37580
|
}
|
|
37677
37581
|
const fromLastFrame = getValueByPath(fromObject, ["lastFrame"]);
|
|
37678
37582
|
if (parentObject !== void 0 && fromLastFrame != null) {
|
|
@@ -37691,13 +37595,13 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
37691
37595
|
setValueByPath(parentObject, ["instances[0]", "referenceImages"], transformedList);
|
|
37692
37596
|
}
|
|
37693
37597
|
if (getValueByPath(fromObject, ["mask"]) !== void 0) {
|
|
37694
|
-
throw new Error("mask parameter is
|
|
37598
|
+
throw new Error("mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37695
37599
|
}
|
|
37696
37600
|
if (getValueByPath(fromObject, ["compressionQuality"]) !== void 0) {
|
|
37697
|
-
throw new Error("compressionQuality parameter is
|
|
37601
|
+
throw new Error("compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37698
37602
|
}
|
|
37699
37603
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
37700
|
-
throw new Error("labels parameter is
|
|
37604
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37701
37605
|
}
|
|
37702
37606
|
const fromWebhookConfig = getValueByPath(fromObject, [
|
|
37703
37607
|
"webhookConfig"
|
|
@@ -37706,7 +37610,7 @@ function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
|
37706
37610
|
setValueByPath(parentObject, ["webhookConfig"], fromWebhookConfig);
|
|
37707
37611
|
}
|
|
37708
37612
|
if (getValueByPath(fromObject, ["resizeMode"]) !== void 0) {
|
|
37709
|
-
throw new Error("resizeMode parameter is
|
|
37613
|
+
throw new Error("resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37710
37614
|
}
|
|
37711
37615
|
return toObject;
|
|
37712
37616
|
}
|
|
@@ -37803,7 +37707,7 @@ function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
37803
37707
|
setValueByPath(parentObject, ["labels"], fromLabels);
|
|
37804
37708
|
}
|
|
37805
37709
|
if (getValueByPath(fromObject, ["webhookConfig"]) !== void 0) {
|
|
37806
|
-
throw new Error("webhookConfig parameter is
|
|
37710
|
+
throw new Error("webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
37807
37711
|
}
|
|
37808
37712
|
const fromResizeMode = getValueByPath(fromObject, ["resizeMode"]);
|
|
37809
37713
|
if (parentObject !== void 0 && fromResizeMode != null) {
|
|
@@ -38201,7 +38105,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
38201
38105
|
setValueByPath(toObject, ["topP"], fromTopP);
|
|
38202
38106
|
}
|
|
38203
38107
|
if (getValueByPath(fromObject, ["enableEnhancedCivicAnswers"]) !== void 0) {
|
|
38204
|
-
throw new Error("enableEnhancedCivicAnswers parameter is
|
|
38108
|
+
throw new Error("enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
38205
38109
|
}
|
|
38206
38110
|
return toObject;
|
|
38207
38111
|
}
|
|
@@ -38240,10 +38144,10 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
|
38240
38144
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
38241
38145
|
}
|
|
38242
38146
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
38243
|
-
throw new Error("blockingConfidence parameter is
|
|
38147
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38244
38148
|
}
|
|
38245
38149
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
38246
|
-
throw new Error("excludeDomains parameter is
|
|
38150
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38247
38151
|
}
|
|
38248
38152
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
38249
38153
|
"timeRangeFilter"
|
|
@@ -38264,19 +38168,19 @@ function imageConfigToMldev(fromObject, _rootObject) {
|
|
|
38264
38168
|
setValueByPath(toObject, ["imageSize"], fromImageSize);
|
|
38265
38169
|
}
|
|
38266
38170
|
if (getValueByPath(fromObject, ["personGeneration"]) !== void 0) {
|
|
38267
|
-
throw new Error("personGeneration parameter is
|
|
38171
|
+
throw new Error("personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38268
38172
|
}
|
|
38269
38173
|
if (getValueByPath(fromObject, ["prominentPeople"]) !== void 0) {
|
|
38270
|
-
throw new Error("prominentPeople parameter is
|
|
38174
|
+
throw new Error("prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38271
38175
|
}
|
|
38272
38176
|
if (getValueByPath(fromObject, ["outputMimeType"]) !== void 0) {
|
|
38273
|
-
throw new Error("outputMimeType parameter is
|
|
38177
|
+
throw new Error("outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38274
38178
|
}
|
|
38275
38179
|
if (getValueByPath(fromObject, ["outputCompressionQuality"]) !== void 0) {
|
|
38276
|
-
throw new Error("outputCompressionQuality parameter is
|
|
38180
|
+
throw new Error("outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38277
38181
|
}
|
|
38278
38182
|
if (getValueByPath(fromObject, ["imageOutputOptions"]) !== void 0) {
|
|
38279
|
-
throw new Error("imageOutputOptions parameter is
|
|
38183
|
+
throw new Error("imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38280
38184
|
}
|
|
38281
38185
|
return toObject;
|
|
38282
38186
|
}
|
|
@@ -38357,7 +38261,7 @@ function imageFromVertex(fromObject, _rootObject) {
|
|
|
38357
38261
|
function imageToMldev(fromObject, _rootObject) {
|
|
38358
38262
|
const toObject = {};
|
|
38359
38263
|
if (getValueByPath(fromObject, ["gcsUri"]) !== void 0) {
|
|
38360
|
-
throw new Error("gcsUri parameter is
|
|
38264
|
+
throw new Error("gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38361
38265
|
}
|
|
38362
38266
|
const fromImageBytes = getValueByPath(fromObject, ["imageBytes"]);
|
|
38363
38267
|
if (fromImageBytes != null) {
|
|
@@ -38760,13 +38664,13 @@ function partToVertex(fromObject, _rootObject) {
|
|
|
38760
38664
|
setValueByPath(toObject, ["videoMetadata"], fromVideoMetadata);
|
|
38761
38665
|
}
|
|
38762
38666
|
if (getValueByPath(fromObject, ["toolCall"]) !== void 0) {
|
|
38763
|
-
throw new Error("toolCall parameter is
|
|
38667
|
+
throw new Error("toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
38764
38668
|
}
|
|
38765
38669
|
if (getValueByPath(fromObject, ["toolResponse"]) !== void 0) {
|
|
38766
|
-
throw new Error("toolResponse parameter is
|
|
38670
|
+
throw new Error("toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
38767
38671
|
}
|
|
38768
38672
|
if (getValueByPath(fromObject, ["partMetadata"]) !== void 0) {
|
|
38769
|
-
throw new Error("partMetadata parameter is
|
|
38673
|
+
throw new Error("partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
38770
38674
|
}
|
|
38771
38675
|
return toObject;
|
|
38772
38676
|
}
|
|
@@ -38989,7 +38893,7 @@ function safetySettingToMldev$1(fromObject, _rootObject) {
|
|
|
38989
38893
|
setValueByPath(toObject, ["category"], fromCategory);
|
|
38990
38894
|
}
|
|
38991
38895
|
if (getValueByPath(fromObject, ["method"]) !== void 0) {
|
|
38992
|
-
throw new Error("method parameter is
|
|
38896
|
+
throw new Error("method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38993
38897
|
}
|
|
38994
38898
|
const fromThreshold = getValueByPath(fromObject, ["threshold"]);
|
|
38995
38899
|
if (fromThreshold != null) {
|
|
@@ -39122,14 +39026,14 @@ function toolConfigToVertex(fromObject, _rootObject) {
|
|
|
39122
39026
|
setValueByPath(toObject, ["functionCallingConfig"], fromFunctionCallingConfig);
|
|
39123
39027
|
}
|
|
39124
39028
|
if (getValueByPath(fromObject, ["includeServerSideToolInvocations"]) !== void 0) {
|
|
39125
|
-
throw new Error("includeServerSideToolInvocations parameter is
|
|
39029
|
+
throw new Error("includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
39126
39030
|
}
|
|
39127
39031
|
return toObject;
|
|
39128
39032
|
}
|
|
39129
39033
|
function toolToMldev$1(fromObject, rootObject) {
|
|
39130
39034
|
const toObject = {};
|
|
39131
39035
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
39132
|
-
throw new Error("retrieval parameter is
|
|
39036
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39133
39037
|
}
|
|
39134
39038
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
39135
39039
|
if (fromComputerUse != null) {
|
|
@@ -39154,7 +39058,7 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
39154
39058
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
39155
39059
|
}
|
|
39156
39060
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
39157
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
39061
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39158
39062
|
}
|
|
39159
39063
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
39160
39064
|
"functionDeclarations"
|
|
@@ -39175,7 +39079,7 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
39175
39079
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
39176
39080
|
}
|
|
39177
39081
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
39178
|
-
throw new Error("parallelAiSearch parameter is
|
|
39082
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39179
39083
|
}
|
|
39180
39084
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
39181
39085
|
if (fromUrlContext != null) {
|
|
@@ -39193,7 +39097,7 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
39193
39097
|
}
|
|
39194
39098
|
return toObject;
|
|
39195
39099
|
}
|
|
39196
|
-
function toolToVertex(fromObject,
|
|
39100
|
+
function toolToVertex(fromObject, _rootObject) {
|
|
39197
39101
|
const toObject = {};
|
|
39198
39102
|
const fromRetrieval = getValueByPath(fromObject, ["retrieval"]);
|
|
39199
39103
|
if (fromRetrieval != null) {
|
|
@@ -39204,7 +39108,7 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
39204
39108
|
setValueByPath(toObject, ["computerUse"], fromComputerUse);
|
|
39205
39109
|
}
|
|
39206
39110
|
if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) {
|
|
39207
|
-
throw new Error("fileSearch parameter is
|
|
39111
|
+
throw new Error("fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
39208
39112
|
}
|
|
39209
39113
|
const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
|
|
39210
39114
|
if (fromGoogleSearch != null) {
|
|
@@ -39233,7 +39137,7 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
39233
39137
|
let transformedList = fromFunctionDeclarations;
|
|
39234
39138
|
if (Array.isArray(transformedList)) {
|
|
39235
39139
|
transformedList = transformedList.map((item) => {
|
|
39236
|
-
return
|
|
39140
|
+
return item;
|
|
39237
39141
|
});
|
|
39238
39142
|
}
|
|
39239
39143
|
setValueByPath(toObject, ["functionDeclarations"], transformedList);
|
|
@@ -39255,7 +39159,7 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
39255
39159
|
setValueByPath(toObject, ["urlContext"], fromUrlContext);
|
|
39256
39160
|
}
|
|
39257
39161
|
if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) {
|
|
39258
|
-
throw new Error("mcpServers parameter is
|
|
39162
|
+
throw new Error("mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
39259
39163
|
}
|
|
39260
39164
|
return toObject;
|
|
39261
39165
|
}
|
|
@@ -39568,19 +39472,25 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
39568
39472
|
}
|
|
39569
39473
|
return toObject;
|
|
39570
39474
|
}
|
|
39571
|
-
function createFileSearchStoreConfigToMldev(fromObject, parentObject) {
|
|
39475
|
+
function createFileSearchStoreConfigToMldev(apiClient, fromObject, parentObject) {
|
|
39572
39476
|
const toObject = {};
|
|
39573
39477
|
const fromDisplayName = getValueByPath(fromObject, ["displayName"]);
|
|
39574
39478
|
if (parentObject !== void 0 && fromDisplayName != null) {
|
|
39575
39479
|
setValueByPath(parentObject, ["displayName"], fromDisplayName);
|
|
39576
39480
|
}
|
|
39481
|
+
const fromEmbeddingModel = getValueByPath(fromObject, [
|
|
39482
|
+
"embeddingModel"
|
|
39483
|
+
]);
|
|
39484
|
+
if (parentObject !== void 0 && fromEmbeddingModel != null) {
|
|
39485
|
+
setValueByPath(parentObject, ["embeddingModel"], tModel(apiClient, fromEmbeddingModel));
|
|
39486
|
+
}
|
|
39577
39487
|
return toObject;
|
|
39578
39488
|
}
|
|
39579
|
-
function createFileSearchStoreParametersToMldev(fromObject) {
|
|
39489
|
+
function createFileSearchStoreParametersToMldev(apiClient, fromObject) {
|
|
39580
39490
|
const toObject = {};
|
|
39581
39491
|
const fromConfig = getValueByPath(fromObject, ["config"]);
|
|
39582
39492
|
if (fromConfig != null) {
|
|
39583
|
-
createFileSearchStoreConfigToMldev(fromConfig, toObject);
|
|
39493
|
+
createFileSearchStoreConfigToMldev(apiClient, fromConfig, toObject);
|
|
39584
39494
|
}
|
|
39585
39495
|
return toObject;
|
|
39586
39496
|
}
|
|
@@ -39800,7 +39710,7 @@ var CONTENT_TYPE_HEADER = "Content-Type";
|
|
|
39800
39710
|
var SERVER_TIMEOUT_HEADER = "X-Server-Timeout";
|
|
39801
39711
|
var USER_AGENT_HEADER = "User-Agent";
|
|
39802
39712
|
var GOOGLE_API_CLIENT_HEADER = "x-goog-api-client";
|
|
39803
|
-
var SDK_VERSION = "
|
|
39713
|
+
var SDK_VERSION = "2.3.0";
|
|
39804
39714
|
var LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
39805
39715
|
var VERTEX_AI_API_DEFAULT_VERSION = "v1beta1";
|
|
39806
39716
|
var GOOGLE_AI_API_DEFAULT_VERSION = "v1beta";
|
|
@@ -40021,6 +39931,20 @@ var ApiClient = class {
|
|
|
40021
39931
|
const abortController = new AbortController();
|
|
40022
39932
|
const signal = abortController.signal;
|
|
40023
39933
|
if (httpOptions.timeout && (httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.timeout) > 0) {
|
|
39934
|
+
const dispatcherSymbol = /* @__PURE__ */ Symbol.for("undici.globalDispatcher.1");
|
|
39935
|
+
const globalDispatcher = globalThis[dispatcherSymbol];
|
|
39936
|
+
if (globalDispatcher) {
|
|
39937
|
+
const symbols = Object.getOwnPropertySymbols(globalDispatcher);
|
|
39938
|
+
for (const sym of symbols) {
|
|
39939
|
+
const desc = sym.description;
|
|
39940
|
+
if ((desc === null || desc === void 0 ? void 0 : desc.includes("headers timeout")) || (desc === null || desc === void 0 ? void 0 : desc.includes("body timeout"))) {
|
|
39941
|
+
const currentTimeout = globalDispatcher[sym];
|
|
39942
|
+
if (typeof currentTimeout === "number") {
|
|
39943
|
+
globalDispatcher[sym] = Math.max(currentTimeout, httpOptions.timeout);
|
|
39944
|
+
}
|
|
39945
|
+
}
|
|
39946
|
+
}
|
|
39947
|
+
}
|
|
40024
39948
|
const timeoutHandle = setTimeout(() => abortController.abort(), httpOptions.timeout);
|
|
40025
39949
|
if (timeoutHandle && typeof timeoutHandle.unref === "function") {
|
|
40026
39950
|
timeoutHandle.unref();
|
|
@@ -40047,7 +39971,7 @@ var ApiClient = class {
|
|
|
40047
39971
|
if (e2 instanceof Error) {
|
|
40048
39972
|
throw e2;
|
|
40049
39973
|
} else {
|
|
40050
|
-
throw new Error(
|
|
39974
|
+
throw new Error(`exception ${e2} sending request`, { cause: e2 });
|
|
40051
39975
|
}
|
|
40052
39976
|
});
|
|
40053
39977
|
}
|
|
@@ -40059,7 +39983,7 @@ var ApiClient = class {
|
|
|
40059
39983
|
if (e2 instanceof Error) {
|
|
40060
39984
|
throw e2;
|
|
40061
39985
|
} else {
|
|
40062
|
-
throw new Error(
|
|
39986
|
+
throw new Error(`exception ${e2} sending request`, { cause: e2 });
|
|
40063
39987
|
}
|
|
40064
39988
|
});
|
|
40065
39989
|
}
|
|
@@ -40179,9 +40103,9 @@ var ApiClient = class {
|
|
|
40179
40103
|
for (const [key, value] of Object.entries(httpOptions.headers)) {
|
|
40180
40104
|
headers.append(key, value);
|
|
40181
40105
|
}
|
|
40182
|
-
|
|
40183
|
-
|
|
40184
|
-
|
|
40106
|
+
}
|
|
40107
|
+
if ((httpOptions === null || httpOptions === void 0 ? void 0 : httpOptions.timeout) && httpOptions.timeout > 0) {
|
|
40108
|
+
headers.append(SERVER_TIMEOUT_HEADER, String(Math.ceil(httpOptions.timeout / 1e3)));
|
|
40185
40109
|
}
|
|
40186
40110
|
await this.clientOptions.auth.addAuthHeaders(headers, url2);
|
|
40187
40111
|
return headers;
|
|
@@ -41268,7 +41192,7 @@ var Models = class extends BaseModule {
|
|
|
41268
41192
|
if (this.apiClient.isVertexAI()) {
|
|
41269
41193
|
if (!actualParams.config.queryBase) {
|
|
41270
41194
|
if ((_a3 = actualParams.config) === null || _a3 === void 0 ? void 0 : _a3.filter) {
|
|
41271
|
-
throw new Error("Filtering tuned models list
|
|
41195
|
+
throw new Error("Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
41272
41196
|
} else {
|
|
41273
41197
|
actualParams.config.filter = "labels.tune-type:*";
|
|
41274
41198
|
}
|
|
@@ -42567,7 +42491,7 @@ var Operations = class extends BaseModule {
|
|
|
42567
42491
|
function audioTranscriptionConfigToMldev(fromObject) {
|
|
42568
42492
|
const toObject = {};
|
|
42569
42493
|
if (getValueByPath(fromObject, ["languageCodes"]) !== void 0) {
|
|
42570
|
-
throw new Error("languageCodes parameter is
|
|
42494
|
+
throw new Error("languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42571
42495
|
}
|
|
42572
42496
|
return toObject;
|
|
42573
42497
|
}
|
|
@@ -42578,22 +42502,22 @@ function authConfigToMldev(fromObject) {
|
|
|
42578
42502
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
42579
42503
|
}
|
|
42580
42504
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
42581
|
-
throw new Error("apiKeyConfig parameter is
|
|
42505
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42582
42506
|
}
|
|
42583
42507
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
42584
|
-
throw new Error("authType parameter is
|
|
42508
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42585
42509
|
}
|
|
42586
42510
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
42587
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
42511
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42588
42512
|
}
|
|
42589
42513
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
42590
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
42514
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42591
42515
|
}
|
|
42592
42516
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
42593
|
-
throw new Error("oauthConfig parameter is
|
|
42517
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42594
42518
|
}
|
|
42595
42519
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
42596
|
-
throw new Error("oidcConfig parameter is
|
|
42520
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42597
42521
|
}
|
|
42598
42522
|
return toObject;
|
|
42599
42523
|
}
|
|
@@ -42604,7 +42528,7 @@ function blobToMldev(fromObject) {
|
|
|
42604
42528
|
setValueByPath(toObject, ["data"], fromData);
|
|
42605
42529
|
}
|
|
42606
42530
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
42607
|
-
throw new Error("displayName parameter is
|
|
42531
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42608
42532
|
}
|
|
42609
42533
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
42610
42534
|
if (fromMimeType != null) {
|
|
@@ -42671,7 +42595,7 @@ function createAuthTokenParametersToMldev(apiClient, fromObject) {
|
|
|
42671
42595
|
function fileDataToMldev(fromObject) {
|
|
42672
42596
|
const toObject = {};
|
|
42673
42597
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
42674
|
-
throw new Error("displayName parameter is
|
|
42598
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42675
42599
|
}
|
|
42676
42600
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
42677
42601
|
if (fromFileUri != null) {
|
|
@@ -42698,10 +42622,10 @@ function functionCallToMldev(fromObject) {
|
|
|
42698
42622
|
setValueByPath(toObject, ["name"], fromName);
|
|
42699
42623
|
}
|
|
42700
42624
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
42701
|
-
throw new Error("partialArgs parameter is
|
|
42625
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42702
42626
|
}
|
|
42703
42627
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
42704
|
-
throw new Error("willContinue parameter is
|
|
42628
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42705
42629
|
}
|
|
42706
42630
|
return toObject;
|
|
42707
42631
|
}
|
|
@@ -42724,10 +42648,10 @@ function googleSearchToMldev(fromObject) {
|
|
|
42724
42648
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
42725
42649
|
}
|
|
42726
42650
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
42727
|
-
throw new Error("blockingConfidence parameter is
|
|
42651
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42728
42652
|
}
|
|
42729
42653
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
42730
|
-
throw new Error("excludeDomains parameter is
|
|
42654
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42731
42655
|
}
|
|
42732
42656
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
42733
42657
|
"timeRangeFilter"
|
|
@@ -42846,7 +42770,7 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
42846
42770
|
setValueByPath(parentObject, ["setup", "proactivity"], fromProactivity);
|
|
42847
42771
|
}
|
|
42848
42772
|
if (getValueByPath(fromObject, ["explicitVadSignal"]) !== void 0) {
|
|
42849
|
-
throw new Error("explicitVadSignal parameter is
|
|
42773
|
+
throw new Error("explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42850
42774
|
}
|
|
42851
42775
|
const fromAvatarConfig = getValueByPath(fromObject, ["avatarConfig"]);
|
|
42852
42776
|
if (parentObject !== void 0 && fromAvatarConfig != null) {
|
|
@@ -42864,6 +42788,12 @@ function liveConnectConfigToMldev(fromObject, parentObject) {
|
|
|
42864
42788
|
}
|
|
42865
42789
|
setValueByPath(parentObject, ["setup", "safetySettings"], transformedList);
|
|
42866
42790
|
}
|
|
42791
|
+
const fromStreamTranslationConfig = getValueByPath(fromObject, [
|
|
42792
|
+
"streamTranslationConfig"
|
|
42793
|
+
]);
|
|
42794
|
+
if (parentObject !== void 0 && fromStreamTranslationConfig != null) {
|
|
42795
|
+
setValueByPath(parentObject, ["setup", "generationConfig", "streamTranslationConfig"], fromStreamTranslationConfig);
|
|
42796
|
+
}
|
|
42867
42797
|
return toObject;
|
|
42868
42798
|
}
|
|
42869
42799
|
function liveConnectConstraintsToMldev(apiClient, fromObject) {
|
|
@@ -42957,7 +42887,7 @@ function safetySettingToMldev(fromObject) {
|
|
|
42957
42887
|
setValueByPath(toObject, ["category"], fromCategory);
|
|
42958
42888
|
}
|
|
42959
42889
|
if (getValueByPath(fromObject, ["method"]) !== void 0) {
|
|
42960
|
-
throw new Error("method parameter is
|
|
42890
|
+
throw new Error("method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42961
42891
|
}
|
|
42962
42892
|
const fromThreshold = getValueByPath(fromObject, ["threshold"]);
|
|
42963
42893
|
if (fromThreshold != null) {
|
|
@@ -42972,14 +42902,14 @@ function sessionResumptionConfigToMldev(fromObject) {
|
|
|
42972
42902
|
setValueByPath(toObject, ["handle"], fromHandle);
|
|
42973
42903
|
}
|
|
42974
42904
|
if (getValueByPath(fromObject, ["transparent"]) !== void 0) {
|
|
42975
|
-
throw new Error("transparent parameter is
|
|
42905
|
+
throw new Error("transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42976
42906
|
}
|
|
42977
42907
|
return toObject;
|
|
42978
42908
|
}
|
|
42979
42909
|
function toolToMldev(fromObject) {
|
|
42980
42910
|
const toObject = {};
|
|
42981
42911
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
42982
|
-
throw new Error("retrieval parameter is
|
|
42912
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42983
42913
|
}
|
|
42984
42914
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
42985
42915
|
if (fromComputerUse != null) {
|
|
@@ -43004,7 +42934,7 @@ function toolToMldev(fromObject) {
|
|
|
43004
42934
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
43005
42935
|
}
|
|
43006
42936
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
43007
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
42937
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43008
42938
|
}
|
|
43009
42939
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
43010
42940
|
"functionDeclarations"
|
|
@@ -43025,7 +42955,7 @@ function toolToMldev(fromObject) {
|
|
|
43025
42955
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
43026
42956
|
}
|
|
43027
42957
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
43028
|
-
throw new Error("parallelAiSearch parameter is
|
|
42958
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43029
42959
|
}
|
|
43030
42960
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
43031
42961
|
if (fromUrlContext != null) {
|
|
@@ -43473,6 +43403,45 @@ var FileSearchStores = class extends BaseModule {
|
|
|
43473
43403
|
}
|
|
43474
43404
|
return this.apiClient.uploadFileToFileSearchStore(params.fileSearchStoreName, params.file, params.config);
|
|
43475
43405
|
}
|
|
43406
|
+
/**
|
|
43407
|
+
* Downloads media using a Media ID or URI.
|
|
43408
|
+
* This method is only supported in the Gemini Developer client.
|
|
43409
|
+
*
|
|
43410
|
+
* @param uri - The URI or Media ID of the blob.
|
|
43411
|
+
* @param config - Optional configuration for the download.
|
|
43412
|
+
* @returns A promise that resolves to the blob data as a Uint8Array.
|
|
43413
|
+
*/
|
|
43414
|
+
async downloadMedia(uri, config2) {
|
|
43415
|
+
if (this.apiClient.isVertexAI()) {
|
|
43416
|
+
throw new Error("This method is only supported in the Gemini Developer client.");
|
|
43417
|
+
}
|
|
43418
|
+
const parsedUri = new URL(uri, "http://dummy.com");
|
|
43419
|
+
let pathname = parsedUri.pathname;
|
|
43420
|
+
if (pathname.startsWith("/")) {
|
|
43421
|
+
pathname = pathname.slice(1);
|
|
43422
|
+
}
|
|
43423
|
+
if (!pathname.includes("/media/")) {
|
|
43424
|
+
throw new Error(`Invalid uri format: ${uri}. Expected to contain /media/`);
|
|
43425
|
+
}
|
|
43426
|
+
const queryParams = {};
|
|
43427
|
+
parsedUri.searchParams.forEach((value, key) => {
|
|
43428
|
+
queryParams[key] = value;
|
|
43429
|
+
});
|
|
43430
|
+
queryParams["alt"] = "media";
|
|
43431
|
+
const httpOptions = Object.assign({}, config2 === null || config2 === void 0 ? void 0 : config2.httpOptions);
|
|
43432
|
+
const response = await this.apiClient.request({
|
|
43433
|
+
path: pathname,
|
|
43434
|
+
httpMethod: "GET",
|
|
43435
|
+
queryParams,
|
|
43436
|
+
httpOptions
|
|
43437
|
+
});
|
|
43438
|
+
if (response instanceof HttpResponse) {
|
|
43439
|
+
const arrayBuffer = await response.responseInternal.arrayBuffer();
|
|
43440
|
+
return new Uint8Array(arrayBuffer);
|
|
43441
|
+
} else {
|
|
43442
|
+
throw new Error("Unexpected response type from downloadMedia");
|
|
43443
|
+
}
|
|
43444
|
+
}
|
|
43476
43445
|
/**
|
|
43477
43446
|
* Creates a File Search Store.
|
|
43478
43447
|
*
|
|
@@ -43487,7 +43456,7 @@ var FileSearchStores = class extends BaseModule {
|
|
|
43487
43456
|
if (this.apiClient.isVertexAI()) {
|
|
43488
43457
|
throw new Error("This method is only supported by the Gemini Developer API.");
|
|
43489
43458
|
} else {
|
|
43490
|
-
const body = createFileSearchStoreParametersToMldev(params);
|
|
43459
|
+
const body = createFileSearchStoreParametersToMldev(this.apiClient, params);
|
|
43491
43460
|
path3 = formatMap("fileSearchStores", body["_url"]);
|
|
43492
43461
|
queryParams = body["_query"];
|
|
43493
43462
|
delete body["_url"];
|
|
@@ -44011,167 +43980,6 @@ var APIResource = class {
|
|
|
44011
43980
|
}
|
|
44012
43981
|
};
|
|
44013
43982
|
APIResource._key = [];
|
|
44014
|
-
function encodeURIPath(str) {
|
|
44015
|
-
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
44016
|
-
}
|
|
44017
|
-
var EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
44018
|
-
var createPathTagFunction = (pathEncoder = encodeURIPath) => (function path3(statics, ...params) {
|
|
44019
|
-
if (statics.length === 1)
|
|
44020
|
-
return statics[0];
|
|
44021
|
-
let postPath = false;
|
|
44022
|
-
const invalidSegments = [];
|
|
44023
|
-
const path4 = statics.reduce((previousValue, currentValue, index) => {
|
|
44024
|
-
var _a3, _b, _c;
|
|
44025
|
-
if (/[?#]/.test(currentValue)) {
|
|
44026
|
-
postPath = true;
|
|
44027
|
-
}
|
|
44028
|
-
const value = params[index];
|
|
44029
|
-
let encoded = (postPath ? encodeURIComponent : pathEncoder)("" + value);
|
|
44030
|
-
if (index !== params.length && (value == null || typeof value === "object" && // handle values from other realms
|
|
44031
|
-
value.toString === ((_c = Object.getPrototypeOf((_b = Object.getPrototypeOf((_a3 = value.hasOwnProperty) !== null && _a3 !== void 0 ? _a3 : EMPTY)) !== null && _b !== void 0 ? _b : EMPTY)) === null || _c === void 0 ? void 0 : _c.toString))) {
|
|
44032
|
-
encoded = value + "";
|
|
44033
|
-
invalidSegments.push({
|
|
44034
|
-
start: previousValue.length + currentValue.length,
|
|
44035
|
-
length: encoded.length,
|
|
44036
|
-
error: `Value of type ${Object.prototype.toString.call(value).slice(8, -1)} is not a valid path parameter`
|
|
44037
|
-
});
|
|
44038
|
-
}
|
|
44039
|
-
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
44040
|
-
}, "");
|
|
44041
|
-
const pathOnly = path4.split(/[?#]/, 1)[0];
|
|
44042
|
-
const invalidSegmentPattern = /(^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
44043
|
-
let match;
|
|
44044
|
-
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
44045
|
-
const hasLeadingSlash = match[0].startsWith("/");
|
|
44046
|
-
const offset = hasLeadingSlash ? 1 : 0;
|
|
44047
|
-
const cleanMatch = hasLeadingSlash ? match[0].slice(1) : match[0];
|
|
44048
|
-
invalidSegments.push({
|
|
44049
|
-
start: match.index + offset,
|
|
44050
|
-
length: cleanMatch.length,
|
|
44051
|
-
error: `Value "${cleanMatch}" can't be safely passed as a path parameter`
|
|
44052
|
-
});
|
|
44053
|
-
}
|
|
44054
|
-
invalidSegments.sort((a, b) => a.start - b.start);
|
|
44055
|
-
if (invalidSegments.length > 0) {
|
|
44056
|
-
let lastEnd = 0;
|
|
44057
|
-
const underline = invalidSegments.reduce((acc, segment) => {
|
|
44058
|
-
const spaces = " ".repeat(segment.start - lastEnd);
|
|
44059
|
-
const arrows = "^".repeat(segment.length);
|
|
44060
|
-
lastEnd = segment.start + segment.length;
|
|
44061
|
-
return acc + spaces + arrows;
|
|
44062
|
-
}, "");
|
|
44063
|
-
throw new GeminiNextGenAPIClientError(`Path parameters result in path with invalid segments:
|
|
44064
|
-
${invalidSegments.map((e2) => e2.error).join("\n")}
|
|
44065
|
-
${path4}
|
|
44066
|
-
${underline}`);
|
|
44067
|
-
}
|
|
44068
|
-
return path4;
|
|
44069
|
-
});
|
|
44070
|
-
var path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
44071
|
-
var BaseInteractions = class extends APIResource {
|
|
44072
|
-
create(params, options) {
|
|
44073
|
-
var _a3;
|
|
44074
|
-
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
44075
|
-
if ("model" in body && "agent_config" in body) {
|
|
44076
|
-
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`model\` and \`agent_config\`. If specifying \`model\`, use \`generation_config\`.`);
|
|
44077
|
-
}
|
|
44078
|
-
if ("agent" in body && "generation_config" in body) {
|
|
44079
|
-
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`agent\` and \`generation_config\`. If specifying \`agent\`, use \`agent_config\`.`);
|
|
44080
|
-
}
|
|
44081
|
-
return this._client.post(path`/${api_version}/interactions`, Object.assign(Object.assign({ body }, options), { stream: (_a3 = params.stream) !== null && _a3 !== void 0 ? _a3 : false }));
|
|
44082
|
-
}
|
|
44083
|
-
/**
|
|
44084
|
-
* Deletes the interaction by id.
|
|
44085
|
-
*
|
|
44086
|
-
* @example
|
|
44087
|
-
* ```ts
|
|
44088
|
-
* const interaction = await client.interactions.delete('id', {
|
|
44089
|
-
* api_version: 'api_version',
|
|
44090
|
-
* });
|
|
44091
|
-
* ```
|
|
44092
|
-
*/
|
|
44093
|
-
delete(id, params = {}, options) {
|
|
44094
|
-
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
44095
|
-
return this._client.delete(path`/${api_version}/interactions/${id}`, options);
|
|
44096
|
-
}
|
|
44097
|
-
/**
|
|
44098
|
-
* Cancels an interaction by id. This only applies to background interactions that
|
|
44099
|
-
* are still running.
|
|
44100
|
-
*
|
|
44101
|
-
* @example
|
|
44102
|
-
* ```ts
|
|
44103
|
-
* const interaction = await client.interactions.cancel('id', {
|
|
44104
|
-
* api_version: 'api_version',
|
|
44105
|
-
* });
|
|
44106
|
-
* ```
|
|
44107
|
-
*/
|
|
44108
|
-
cancel(id, params = {}, options) {
|
|
44109
|
-
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
44110
|
-
return this._client.post(path`/${api_version}/interactions/${id}/cancel`, options);
|
|
44111
|
-
}
|
|
44112
|
-
get(id, params = {}, options) {
|
|
44113
|
-
var _a3;
|
|
44114
|
-
const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
|
|
44115
|
-
return this._client.get(path`/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a3 = params === null || params === void 0 ? void 0 : params.stream) !== null && _a3 !== void 0 ? _a3 : false }));
|
|
44116
|
-
}
|
|
44117
|
-
};
|
|
44118
|
-
BaseInteractions._key = Object.freeze(["interactions"]);
|
|
44119
|
-
var Interactions = class extends BaseInteractions {
|
|
44120
|
-
};
|
|
44121
|
-
var BaseWebhooks = class extends APIResource {
|
|
44122
|
-
/**
|
|
44123
|
-
* Creates a new Webhook.
|
|
44124
|
-
*/
|
|
44125
|
-
create(params, options) {
|
|
44126
|
-
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
44127
|
-
return this._client.post(path`/${api_version}/webhooks`, Object.assign({ body }, options));
|
|
44128
|
-
}
|
|
44129
|
-
/**
|
|
44130
|
-
* Updates an existing Webhook.
|
|
44131
|
-
*/
|
|
44132
|
-
update(id, params = {}, options) {
|
|
44133
|
-
const _a3 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion, update_mask } = _a3, body = __rest(_a3, ["api_version", "update_mask"]);
|
|
44134
|
-
return this._client.patch(path`/${api_version}/webhooks/${id}`, Object.assign({ query: { update_mask }, body }, options));
|
|
44135
|
-
}
|
|
44136
|
-
/**
|
|
44137
|
-
* Lists all Webhooks.
|
|
44138
|
-
*/
|
|
44139
|
-
list(params = {}, options) {
|
|
44140
|
-
const _a3 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a3, query = __rest(_a3, ["api_version"]);
|
|
44141
|
-
return this._client.get(path`/${api_version}/webhooks`, Object.assign({ query }, options));
|
|
44142
|
-
}
|
|
44143
|
-
/**
|
|
44144
|
-
* Deletes a Webhook.
|
|
44145
|
-
*/
|
|
44146
|
-
delete(id, params = {}, options) {
|
|
44147
|
-
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
44148
|
-
return this._client.delete(path`/${api_version}/webhooks/${id}`, options);
|
|
44149
|
-
}
|
|
44150
|
-
/**
|
|
44151
|
-
* Gets a specific Webhook.
|
|
44152
|
-
*/
|
|
44153
|
-
get(id, params = {}, options) {
|
|
44154
|
-
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
44155
|
-
return this._client.get(path`/${api_version}/webhooks/${id}`, options);
|
|
44156
|
-
}
|
|
44157
|
-
/**
|
|
44158
|
-
* Sends a ping event to a Webhook.
|
|
44159
|
-
*/
|
|
44160
|
-
ping(id, params = void 0, options) {
|
|
44161
|
-
const { api_version = this._client.apiVersion, body } = params !== null && params !== void 0 ? params : {};
|
|
44162
|
-
return this._client.post(path`/${api_version}/webhooks/${id}:ping`, Object.assign({ body }, options));
|
|
44163
|
-
}
|
|
44164
|
-
/**
|
|
44165
|
-
* Generates a new signing secret for a Webhook.
|
|
44166
|
-
*/
|
|
44167
|
-
rotateSigningSecret(id, params = {}, options) {
|
|
44168
|
-
const _a3 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a3, body = __rest(_a3, ["api_version"]);
|
|
44169
|
-
return this._client.post(path`/${api_version}/webhooks/${id}:rotateSigningSecret`, Object.assign({ body }, options));
|
|
44170
|
-
}
|
|
44171
|
-
};
|
|
44172
|
-
BaseWebhooks._key = Object.freeze(["webhooks"]);
|
|
44173
|
-
var Webhooks = class extends BaseWebhooks {
|
|
44174
|
-
};
|
|
44175
43983
|
function concatBytes(buffers) {
|
|
44176
43984
|
let length = 0;
|
|
44177
43985
|
for (const buffer of buffers) {
|
|
@@ -44637,6 +44445,318 @@ function partition(str, delimiter) {
|
|
|
44637
44445
|
}
|
|
44638
44446
|
return [str, "", ""];
|
|
44639
44447
|
}
|
|
44448
|
+
var LEGACY_LYRIA_MODELS = /* @__PURE__ */ new Set([
|
|
44449
|
+
"lyria-3-pro-preview",
|
|
44450
|
+
"lyria-3-clip-preview"
|
|
44451
|
+
]);
|
|
44452
|
+
var LEGACY_EVENT_TYPE_RENAMES = {
|
|
44453
|
+
"interaction.start": "interaction.created",
|
|
44454
|
+
"content.start": "step.start",
|
|
44455
|
+
"content.delta": "step.delta",
|
|
44456
|
+
"content.stop": "step.stop",
|
|
44457
|
+
"interaction.complete": "interaction.completed"
|
|
44458
|
+
};
|
|
44459
|
+
function isLegacyLyriaRequest({ isVertex, model }) {
|
|
44460
|
+
return Boolean(isVertex) && typeof model === "string" && LEGACY_LYRIA_MODELS.has(model);
|
|
44461
|
+
}
|
|
44462
|
+
function isVertexClient(client) {
|
|
44463
|
+
const adapter = client.clientAdapter;
|
|
44464
|
+
return Boolean(adapter && adapter.isVertexAI());
|
|
44465
|
+
}
|
|
44466
|
+
function isPlainObject(value) {
|
|
44467
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
44468
|
+
}
|
|
44469
|
+
function wrapOutputsAsSteps(data) {
|
|
44470
|
+
if (!("outputs" in data) || "steps" in data) {
|
|
44471
|
+
return data;
|
|
44472
|
+
}
|
|
44473
|
+
const { outputs } = data, rest = __rest(data, ["outputs"]);
|
|
44474
|
+
return Object.assign(Object.assign({}, rest), { steps: [{ type: "model_output", content: outputs }] });
|
|
44475
|
+
}
|
|
44476
|
+
function coerceLegacyInteractionResponse(data) {
|
|
44477
|
+
if (!isPlainObject(data))
|
|
44478
|
+
return data;
|
|
44479
|
+
return wrapOutputsAsSteps(data);
|
|
44480
|
+
}
|
|
44481
|
+
function maybeRemapLegacyStreamEvent(data) {
|
|
44482
|
+
if (!isPlainObject(data))
|
|
44483
|
+
return data;
|
|
44484
|
+
const eventType = data["event_type"];
|
|
44485
|
+
if (typeof eventType !== "string" || !(eventType in LEGACY_EVENT_TYPE_RENAMES)) {
|
|
44486
|
+
return data;
|
|
44487
|
+
}
|
|
44488
|
+
const renamed = Object.assign(Object.assign({}, data), { event_type: LEGACY_EVENT_TYPE_RENAMES[eventType] });
|
|
44489
|
+
if (eventType === "content.start") {
|
|
44490
|
+
const { content } = renamed, rest = __rest(renamed, ["content"]);
|
|
44491
|
+
let stepContent;
|
|
44492
|
+
if (content == null) {
|
|
44493
|
+
stepContent = [];
|
|
44494
|
+
} else if (Array.isArray(content)) {
|
|
44495
|
+
stepContent = content;
|
|
44496
|
+
} else {
|
|
44497
|
+
stepContent = [content];
|
|
44498
|
+
}
|
|
44499
|
+
return Object.assign(Object.assign({}, rest), { step: { type: "model_output", content: stepContent } });
|
|
44500
|
+
}
|
|
44501
|
+
if (eventType === "interaction.start" || eventType === "interaction.complete") {
|
|
44502
|
+
const inner = renamed["interaction"];
|
|
44503
|
+
if (isPlainObject(inner)) {
|
|
44504
|
+
renamed["interaction"] = wrapOutputsAsSteps(inner);
|
|
44505
|
+
}
|
|
44506
|
+
}
|
|
44507
|
+
return renamed;
|
|
44508
|
+
}
|
|
44509
|
+
var LegacyLyriaStream = class _LegacyLyriaStream extends Stream3 {
|
|
44510
|
+
static fromSSEResponse(response, controller, client) {
|
|
44511
|
+
const base = Stream3.fromSSEResponse(response, controller, client);
|
|
44512
|
+
function wrappedIterator() {
|
|
44513
|
+
return __asyncGenerator(this, arguments, function* wrappedIterator_1() {
|
|
44514
|
+
var _a3, e_1, _b, _c;
|
|
44515
|
+
try {
|
|
44516
|
+
for (var _d = true, base_1 = __asyncValues(base), base_1_1; base_1_1 = yield __await(base_1.next()), _a3 = base_1_1.done, !_a3; _d = true) {
|
|
44517
|
+
_c = base_1_1.value;
|
|
44518
|
+
_d = false;
|
|
44519
|
+
const item = _c;
|
|
44520
|
+
yield yield __await(maybeRemapLegacyStreamEvent(item));
|
|
44521
|
+
}
|
|
44522
|
+
} catch (e_1_1) {
|
|
44523
|
+
e_1 = { error: e_1_1 };
|
|
44524
|
+
} finally {
|
|
44525
|
+
try {
|
|
44526
|
+
if (!_d && !_a3 && (_b = base_1.return)) yield __await(_b.call(base_1));
|
|
44527
|
+
} finally {
|
|
44528
|
+
if (e_1) throw e_1.error;
|
|
44529
|
+
}
|
|
44530
|
+
}
|
|
44531
|
+
});
|
|
44532
|
+
}
|
|
44533
|
+
return new _LegacyLyriaStream(wrappedIterator, controller, client);
|
|
44534
|
+
}
|
|
44535
|
+
};
|
|
44536
|
+
function encodeURIPath(str) {
|
|
44537
|
+
return str.replace(/[^A-Za-z0-9\-._~!$&'()*+,;=:@]+/g, encodeURIComponent);
|
|
44538
|
+
}
|
|
44539
|
+
var EMPTY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.create(null));
|
|
44540
|
+
var createPathTagFunction = (pathEncoder = encodeURIPath) => (function path3(statics, ...params) {
|
|
44541
|
+
if (statics.length === 1)
|
|
44542
|
+
return statics[0];
|
|
44543
|
+
let postPath = false;
|
|
44544
|
+
const invalidSegments = [];
|
|
44545
|
+
const path4 = statics.reduce((previousValue, currentValue, index) => {
|
|
44546
|
+
var _a3, _b, _c;
|
|
44547
|
+
if (/[?#]/.test(currentValue)) {
|
|
44548
|
+
postPath = true;
|
|
44549
|
+
}
|
|
44550
|
+
const value = params[index];
|
|
44551
|
+
let encoded = (postPath ? encodeURIComponent : pathEncoder)("" + value);
|
|
44552
|
+
if (index !== params.length && (value == null || typeof value === "object" && // handle values from other realms
|
|
44553
|
+
value.toString === ((_c = Object.getPrototypeOf((_b = Object.getPrototypeOf((_a3 = value.hasOwnProperty) !== null && _a3 !== void 0 ? _a3 : EMPTY)) !== null && _b !== void 0 ? _b : EMPTY)) === null || _c === void 0 ? void 0 : _c.toString))) {
|
|
44554
|
+
encoded = value + "";
|
|
44555
|
+
invalidSegments.push({
|
|
44556
|
+
start: previousValue.length + currentValue.length,
|
|
44557
|
+
length: encoded.length,
|
|
44558
|
+
error: `Value of type ${Object.prototype.toString.call(value).slice(8, -1)} is not a valid path parameter`
|
|
44559
|
+
});
|
|
44560
|
+
}
|
|
44561
|
+
return previousValue + currentValue + (index === params.length ? "" : encoded);
|
|
44562
|
+
}, "");
|
|
44563
|
+
const pathOnly = path4.split(/[?#]/, 1)[0];
|
|
44564
|
+
const invalidSegmentPattern = /(^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
44565
|
+
let match;
|
|
44566
|
+
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
44567
|
+
const hasLeadingSlash = match[0].startsWith("/");
|
|
44568
|
+
const offset = hasLeadingSlash ? 1 : 0;
|
|
44569
|
+
const cleanMatch = hasLeadingSlash ? match[0].slice(1) : match[0];
|
|
44570
|
+
invalidSegments.push({
|
|
44571
|
+
start: match.index + offset,
|
|
44572
|
+
length: cleanMatch.length,
|
|
44573
|
+
error: `Value "${cleanMatch}" can't be safely passed as a path parameter`
|
|
44574
|
+
});
|
|
44575
|
+
}
|
|
44576
|
+
invalidSegments.sort((a, b) => a.start - b.start);
|
|
44577
|
+
if (invalidSegments.length > 0) {
|
|
44578
|
+
let lastEnd = 0;
|
|
44579
|
+
const underline = invalidSegments.reduce((acc, segment) => {
|
|
44580
|
+
const spaces = " ".repeat(segment.start - lastEnd);
|
|
44581
|
+
const arrows = "^".repeat(segment.length);
|
|
44582
|
+
lastEnd = segment.start + segment.length;
|
|
44583
|
+
return acc + spaces + arrows;
|
|
44584
|
+
}, "");
|
|
44585
|
+
throw new GeminiNextGenAPIClientError(`Path parameters result in path with invalid segments:
|
|
44586
|
+
${invalidSegments.map((e2) => e2.error).join("\n")}
|
|
44587
|
+
${path4}
|
|
44588
|
+
${underline}`);
|
|
44589
|
+
}
|
|
44590
|
+
return path4;
|
|
44591
|
+
});
|
|
44592
|
+
var path = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
44593
|
+
var BaseInteractions = class extends APIResource {
|
|
44594
|
+
create(params, options) {
|
|
44595
|
+
var _a3;
|
|
44596
|
+
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
44597
|
+
if ("model" in body && "agent_config" in body) {
|
|
44598
|
+
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`model\` and \`agent_config\`. If specifying \`model\`, use \`generation_config\`.`);
|
|
44599
|
+
}
|
|
44600
|
+
if ("agent" in body && "generation_config" in body) {
|
|
44601
|
+
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`agent\` and \`generation_config\`. If specifying \`agent\`, use \`agent_config\`.`);
|
|
44602
|
+
}
|
|
44603
|
+
const needsLegacyLyriaShim = isLegacyLyriaRequest({
|
|
44604
|
+
isVertex: isVertexClient(this._client),
|
|
44605
|
+
model: "model" in body ? body.model : void 0
|
|
44606
|
+
});
|
|
44607
|
+
const isStreaming = (_a3 = params.stream) !== null && _a3 !== void 0 ? _a3 : false;
|
|
44608
|
+
const promise2 = this._client.post(path`/${api_version}/interactions`, Object.assign(Object.assign(Object.assign({ body }, options), { stream: isStreaming }), needsLegacyLyriaShim && isStreaming ? { __streamClass: LegacyLyriaStream } : {}));
|
|
44609
|
+
if (isStreaming) {
|
|
44610
|
+
return promise2;
|
|
44611
|
+
}
|
|
44612
|
+
let nonStreaming = promise2;
|
|
44613
|
+
if (needsLegacyLyriaShim) {
|
|
44614
|
+
nonStreaming = nonStreaming._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
|
|
44615
|
+
}
|
|
44616
|
+
return nonStreaming._thenUnwrap(addOutputProperties);
|
|
44617
|
+
}
|
|
44618
|
+
/**
|
|
44619
|
+
* Deletes the interaction by id.
|
|
44620
|
+
*
|
|
44621
|
+
* @example
|
|
44622
|
+
* ```ts
|
|
44623
|
+
* const interaction = await client.interactions.delete('id', {
|
|
44624
|
+
* api_version: 'api_version',
|
|
44625
|
+
* });
|
|
44626
|
+
* ```
|
|
44627
|
+
*/
|
|
44628
|
+
delete(id, params = {}, options) {
|
|
44629
|
+
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
44630
|
+
return this._client.delete(path`/${api_version}/interactions/${id}`, options);
|
|
44631
|
+
}
|
|
44632
|
+
/**
|
|
44633
|
+
* Cancels an interaction by id. This only applies to background interactions that
|
|
44634
|
+
* are still running.
|
|
44635
|
+
*
|
|
44636
|
+
* @example
|
|
44637
|
+
* ```ts
|
|
44638
|
+
* const interaction = await client.interactions.cancel('id', {
|
|
44639
|
+
* api_version: 'api_version',
|
|
44640
|
+
* });
|
|
44641
|
+
* ```
|
|
44642
|
+
*/
|
|
44643
|
+
cancel(id, params = {}, options) {
|
|
44644
|
+
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
44645
|
+
return this._client.post(path`/${api_version}/interactions/${id}/cancel`, options)._thenUnwrap(addOutputProperties);
|
|
44646
|
+
}
|
|
44647
|
+
get(id, params = {}, options) {
|
|
44648
|
+
var _a3;
|
|
44649
|
+
const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
|
|
44650
|
+
const response = this._client.get(path`/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a3 = params === null || params === void 0 ? void 0 : params.stream) !== null && _a3 !== void 0 ? _a3 : false }));
|
|
44651
|
+
if (params === null || params === void 0 ? void 0 : params.stream) {
|
|
44652
|
+
return response;
|
|
44653
|
+
}
|
|
44654
|
+
return response._thenUnwrap(addOutputProperties);
|
|
44655
|
+
}
|
|
44656
|
+
};
|
|
44657
|
+
BaseInteractions._key = Object.freeze(["interactions"]);
|
|
44658
|
+
var Interactions = class extends BaseInteractions {
|
|
44659
|
+
};
|
|
44660
|
+
function addOutputProperties(interaction) {
|
|
44661
|
+
var _a3, _b;
|
|
44662
|
+
const steps = (_a3 = interaction.steps) !== null && _a3 !== void 0 ? _a3 : [];
|
|
44663
|
+
let firstTrailing = steps.length;
|
|
44664
|
+
while (firstTrailing > 0 && steps[firstTrailing - 1].type === "model_output") {
|
|
44665
|
+
firstTrailing--;
|
|
44666
|
+
}
|
|
44667
|
+
const modelSteps = steps.slice(firstTrailing);
|
|
44668
|
+
const output = modelSteps.flatMap((step) => {
|
|
44669
|
+
var _a4;
|
|
44670
|
+
return (_a4 = step.content) !== null && _a4 !== void 0 ? _a4 : [];
|
|
44671
|
+
});
|
|
44672
|
+
const textParts = [];
|
|
44673
|
+
for (let i2 = output.length - 1; i2 >= 0; i2--) {
|
|
44674
|
+
const content = output[i2];
|
|
44675
|
+
if (content.type !== "text")
|
|
44676
|
+
break;
|
|
44677
|
+
textParts.push((_b = content.text) !== null && _b !== void 0 ? _b : "");
|
|
44678
|
+
}
|
|
44679
|
+
const output_text = textParts.reverse().join("");
|
|
44680
|
+
let output_image;
|
|
44681
|
+
let output_audio;
|
|
44682
|
+
let output_video;
|
|
44683
|
+
for (let i2 = steps.length - 1; i2 >= 0; i2--) {
|
|
44684
|
+
const step = steps[i2];
|
|
44685
|
+
const anyStep = step;
|
|
44686
|
+
if (anyStep.type === "user_input") {
|
|
44687
|
+
break;
|
|
44688
|
+
}
|
|
44689
|
+
if (anyStep.type === "model_output" && anyStep.content) {
|
|
44690
|
+
for (let j = anyStep.content.length - 1; j >= 0; j--) {
|
|
44691
|
+
const content = anyStep.content[j];
|
|
44692
|
+
if (content.type === "image" && !output_image) {
|
|
44693
|
+
output_image = content;
|
|
44694
|
+
}
|
|
44695
|
+
if (content.type === "audio" && !output_audio) {
|
|
44696
|
+
output_audio = content;
|
|
44697
|
+
}
|
|
44698
|
+
if (content.type === "video" && !output_video) {
|
|
44699
|
+
output_video = content;
|
|
44700
|
+
}
|
|
44701
|
+
}
|
|
44702
|
+
}
|
|
44703
|
+
}
|
|
44704
|
+
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 });
|
|
44705
|
+
}
|
|
44706
|
+
var BaseWebhooks = class extends APIResource {
|
|
44707
|
+
/**
|
|
44708
|
+
* Creates a new Webhook.
|
|
44709
|
+
*/
|
|
44710
|
+
create(params, options) {
|
|
44711
|
+
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
44712
|
+
return this._client.post(path`/${api_version}/webhooks`, Object.assign({ body }, options));
|
|
44713
|
+
}
|
|
44714
|
+
/**
|
|
44715
|
+
* Updates an existing Webhook.
|
|
44716
|
+
*/
|
|
44717
|
+
update(id, params = {}, options) {
|
|
44718
|
+
const _a3 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion, update_mask } = _a3, body = __rest(_a3, ["api_version", "update_mask"]);
|
|
44719
|
+
return this._client.patch(path`/${api_version}/webhooks/${id}`, Object.assign({ query: { update_mask }, body }, options));
|
|
44720
|
+
}
|
|
44721
|
+
/**
|
|
44722
|
+
* Lists all Webhooks.
|
|
44723
|
+
*/
|
|
44724
|
+
list(params = {}, options) {
|
|
44725
|
+
const _a3 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a3, query = __rest(_a3, ["api_version"]);
|
|
44726
|
+
return this._client.get(path`/${api_version}/webhooks`, Object.assign({ query }, options));
|
|
44727
|
+
}
|
|
44728
|
+
/**
|
|
44729
|
+
* Deletes a Webhook.
|
|
44730
|
+
*/
|
|
44731
|
+
delete(id, params = {}, options) {
|
|
44732
|
+
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
44733
|
+
return this._client.delete(path`/${api_version}/webhooks/${id}`, options);
|
|
44734
|
+
}
|
|
44735
|
+
/**
|
|
44736
|
+
* Gets a specific Webhook.
|
|
44737
|
+
*/
|
|
44738
|
+
get(id, params = {}, options) {
|
|
44739
|
+
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
44740
|
+
return this._client.get(path`/${api_version}/webhooks/${id}`, options);
|
|
44741
|
+
}
|
|
44742
|
+
/**
|
|
44743
|
+
* Sends a ping event to a Webhook.
|
|
44744
|
+
*/
|
|
44745
|
+
ping(id, params = void 0, options) {
|
|
44746
|
+
const { api_version = this._client.apiVersion, body } = params !== null && params !== void 0 ? params : {};
|
|
44747
|
+
return this._client.post(path`/${api_version}/webhooks/${id}:ping`, Object.assign({ body }, options));
|
|
44748
|
+
}
|
|
44749
|
+
/**
|
|
44750
|
+
* Generates a new signing secret for a Webhook.
|
|
44751
|
+
*/
|
|
44752
|
+
rotateSigningSecret(id, params = {}, options) {
|
|
44753
|
+
const _a3 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a3, body = __rest(_a3, ["api_version"]);
|
|
44754
|
+
return this._client.post(path`/${api_version}/webhooks/${id}:rotateSigningSecret`, Object.assign({ body }, options));
|
|
44755
|
+
}
|
|
44756
|
+
};
|
|
44757
|
+
BaseWebhooks._key = Object.freeze(["webhooks"]);
|
|
44758
|
+
var Webhooks = class extends BaseWebhooks {
|
|
44759
|
+
};
|
|
44640
44760
|
async function defaultParseResponse(client, props) {
|
|
44641
44761
|
const { response, requestLogID, retryOfRequestLogID, startTime } = props;
|
|
44642
44762
|
const body = await (async () => {
|
|
@@ -45139,7 +45259,7 @@ var BaseGeminiNextGenAPIClient = class _BaseGeminiNextGenAPIClient {
|
|
|
45139
45259
|
const authHeaders = await this.authHeaders(options);
|
|
45140
45260
|
let headers = buildHeaders([
|
|
45141
45261
|
idempotencyHeaders,
|
|
45142
|
-
{ Accept: "application/json", "User-Agent": this.getUserAgent() },
|
|
45262
|
+
{ Accept: "application/json", "User-Agent": this.getUserAgent(), "Api-Revision": "2026-05-20" },
|
|
45143
45263
|
this._options.defaultHeaders,
|
|
45144
45264
|
bodyHeaders,
|
|
45145
45265
|
options.headers,
|
|
@@ -45387,7 +45507,7 @@ function cancelTuningJobResponseFromVertex(fromObject, _rootObject) {
|
|
|
45387
45507
|
function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
45388
45508
|
const toObject = {};
|
|
45389
45509
|
if (getValueByPath(fromObject, ["validationDataset"]) !== void 0) {
|
|
45390
|
-
throw new Error("validationDataset parameter is
|
|
45510
|
+
throw new Error("validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45391
45511
|
}
|
|
45392
45512
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
45393
45513
|
"tunedModelDisplayName"
|
|
@@ -45396,7 +45516,7 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
45396
45516
|
setValueByPath(parentObject, ["displayName"], fromTunedModelDisplayName);
|
|
45397
45517
|
}
|
|
45398
45518
|
if (getValueByPath(fromObject, ["description"]) !== void 0) {
|
|
45399
|
-
throw new Error("description parameter is
|
|
45519
|
+
throw new Error("description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45400
45520
|
}
|
|
45401
45521
|
const fromEpochCount = getValueByPath(fromObject, ["epochCount"]);
|
|
45402
45522
|
if (parentObject !== void 0 && fromEpochCount != null) {
|
|
@@ -45409,19 +45529,19 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
45409
45529
|
setValueByPath(toObject, ["tuningTask", "hyperparameters", "learningRateMultiplier"], fromLearningRateMultiplier);
|
|
45410
45530
|
}
|
|
45411
45531
|
if (getValueByPath(fromObject, ["exportLastCheckpointOnly"]) !== void 0) {
|
|
45412
|
-
throw new Error("exportLastCheckpointOnly parameter is
|
|
45532
|
+
throw new Error("exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45413
45533
|
}
|
|
45414
45534
|
if (getValueByPath(fromObject, ["preTunedModelCheckpointId"]) !== void 0) {
|
|
45415
|
-
throw new Error("preTunedModelCheckpointId parameter is
|
|
45535
|
+
throw new Error("preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45416
45536
|
}
|
|
45417
45537
|
if (getValueByPath(fromObject, ["adapterSize"]) !== void 0) {
|
|
45418
|
-
throw new Error("adapterSize parameter is
|
|
45538
|
+
throw new Error("adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45419
45539
|
}
|
|
45420
45540
|
if (getValueByPath(fromObject, ["tuningMode"]) !== void 0) {
|
|
45421
|
-
throw new Error("tuningMode parameter is
|
|
45541
|
+
throw new Error("tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45422
45542
|
}
|
|
45423
45543
|
if (getValueByPath(fromObject, ["customBaseModel"]) !== void 0) {
|
|
45424
|
-
throw new Error("customBaseModel parameter is
|
|
45544
|
+
throw new Error("customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45425
45545
|
}
|
|
45426
45546
|
const fromBatchSize = getValueByPath(fromObject, ["batchSize"]);
|
|
45427
45547
|
if (parentObject !== void 0 && fromBatchSize != null) {
|
|
@@ -45432,25 +45552,25 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
45432
45552
|
setValueByPath(parentObject, ["tuningTask", "hyperparameters", "learningRate"], fromLearningRate);
|
|
45433
45553
|
}
|
|
45434
45554
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
45435
|
-
throw new Error("labels parameter is
|
|
45555
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45436
45556
|
}
|
|
45437
45557
|
if (getValueByPath(fromObject, ["beta"]) !== void 0) {
|
|
45438
|
-
throw new Error("beta parameter is
|
|
45558
|
+
throw new Error("beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45439
45559
|
}
|
|
45440
45560
|
if (getValueByPath(fromObject, ["baseTeacherModel"]) !== void 0) {
|
|
45441
|
-
throw new Error("baseTeacherModel parameter is
|
|
45561
|
+
throw new Error("baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45442
45562
|
}
|
|
45443
45563
|
if (getValueByPath(fromObject, ["tunedTeacherModelSource"]) !== void 0) {
|
|
45444
|
-
throw new Error("tunedTeacherModelSource parameter is
|
|
45564
|
+
throw new Error("tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45445
45565
|
}
|
|
45446
45566
|
if (getValueByPath(fromObject, ["sftLossWeightMultiplier"]) !== void 0) {
|
|
45447
|
-
throw new Error("sftLossWeightMultiplier parameter is
|
|
45567
|
+
throw new Error("sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45448
45568
|
}
|
|
45449
45569
|
if (getValueByPath(fromObject, ["outputUri"]) !== void 0) {
|
|
45450
|
-
throw new Error("outputUri parameter is
|
|
45570
|
+
throw new Error("outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45451
45571
|
}
|
|
45452
45572
|
if (getValueByPath(fromObject, ["encryptionSpec"]) !== void 0) {
|
|
45453
|
-
throw new Error("encryptionSpec parameter is
|
|
45573
|
+
throw new Error("encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45454
45574
|
}
|
|
45455
45575
|
return toObject;
|
|
45456
45576
|
}
|
|
@@ -45831,10 +45951,10 @@ function tunedModelFromMldev(fromObject, _rootObject) {
|
|
|
45831
45951
|
function tuningDatasetToMldev(fromObject, _rootObject) {
|
|
45832
45952
|
const toObject = {};
|
|
45833
45953
|
if (getValueByPath(fromObject, ["gcsUri"]) !== void 0) {
|
|
45834
|
-
throw new Error("gcsUri parameter is
|
|
45954
|
+
throw new Error("gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45835
45955
|
}
|
|
45836
45956
|
if (getValueByPath(fromObject, ["vertexDatasetResource"]) !== void 0) {
|
|
45837
|
-
throw new Error("vertexDatasetResource parameter is
|
|
45957
|
+
throw new Error("vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45838
45958
|
}
|
|
45839
45959
|
const fromExamples = getValueByPath(fromObject, ["examples"]);
|
|
45840
45960
|
if (fromExamples != null) {
|
|
@@ -45903,7 +46023,7 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
|
|
|
45903
46023
|
}
|
|
45904
46024
|
}
|
|
45905
46025
|
if (getValueByPath(fromObject, ["examples"]) !== void 0) {
|
|
45906
|
-
throw new Error("examples parameter is
|
|
46026
|
+
throw new Error("examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
45907
46027
|
}
|
|
45908
46028
|
return toObject;
|
|
45909
46029
|
}
|
|
@@ -47848,7 +47968,7 @@ __export(util_exports, {
|
|
|
47848
47968
|
getSizableOrigin: () => getSizableOrigin,
|
|
47849
47969
|
hexToUint8Array: () => hexToUint8Array,
|
|
47850
47970
|
isObject: () => isObject,
|
|
47851
|
-
isPlainObject: () =>
|
|
47971
|
+
isPlainObject: () => isPlainObject2,
|
|
47852
47972
|
issue: () => issue,
|
|
47853
47973
|
joinValues: () => joinValues,
|
|
47854
47974
|
jsonStringifyReplacer: () => jsonStringifyReplacer,
|
|
@@ -48032,7 +48152,7 @@ var allowsEval = cached(() => {
|
|
|
48032
48152
|
return false;
|
|
48033
48153
|
}
|
|
48034
48154
|
});
|
|
48035
|
-
function
|
|
48155
|
+
function isPlainObject2(o) {
|
|
48036
48156
|
if (isObject(o) === false)
|
|
48037
48157
|
return false;
|
|
48038
48158
|
const ctor = o.constructor;
|
|
@@ -48049,7 +48169,7 @@ function isPlainObject(o) {
|
|
|
48049
48169
|
return true;
|
|
48050
48170
|
}
|
|
48051
48171
|
function shallowClone(o) {
|
|
48052
|
-
if (
|
|
48172
|
+
if (isPlainObject2(o))
|
|
48053
48173
|
return { ...o };
|
|
48054
48174
|
if (Array.isArray(o))
|
|
48055
48175
|
return [...o];
|
|
@@ -48242,7 +48362,7 @@ function omit(schema, mask) {
|
|
|
48242
48362
|
return clone2(schema, def);
|
|
48243
48363
|
}
|
|
48244
48364
|
function extend(schema, shape) {
|
|
48245
|
-
if (!
|
|
48365
|
+
if (!isPlainObject2(shape)) {
|
|
48246
48366
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
48247
48367
|
}
|
|
48248
48368
|
const checks = schema._zod.def.checks;
|
|
@@ -48265,7 +48385,7 @@ function extend(schema, shape) {
|
|
|
48265
48385
|
return clone2(schema, def);
|
|
48266
48386
|
}
|
|
48267
48387
|
function safeExtend(schema, shape) {
|
|
48268
|
-
if (!
|
|
48388
|
+
if (!isPlainObject2(shape)) {
|
|
48269
48389
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
48270
48390
|
}
|
|
48271
48391
|
const def = mergeDefs(schema._zod.def, {
|
|
@@ -50540,7 +50660,7 @@ function mergeValues(a, b) {
|
|
|
50540
50660
|
if (a instanceof Date && b instanceof Date && +a === +b) {
|
|
50541
50661
|
return { valid: true, data: a };
|
|
50542
50662
|
}
|
|
50543
|
-
if (
|
|
50663
|
+
if (isPlainObject2(a) && isPlainObject2(b)) {
|
|
50544
50664
|
const bKeys = Object.keys(b);
|
|
50545
50665
|
const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
|
|
50546
50666
|
const newObj = { ...a, ...b };
|
|
@@ -50694,7 +50814,7 @@ var $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
|
|
|
50694
50814
|
$ZodType.init(inst, def);
|
|
50695
50815
|
inst._zod.parse = (payload, ctx) => {
|
|
50696
50816
|
const input = payload.value;
|
|
50697
|
-
if (!
|
|
50817
|
+
if (!isPlainObject2(input)) {
|
|
50698
50818
|
payload.issues.push({
|
|
50699
50819
|
expected: "record",
|
|
50700
50820
|
code: "invalid_type",
|
|
@@ -64881,7 +65001,7 @@ var nullableType = ZodNullable2.create;
|
|
|
64881
65001
|
var preprocessType = ZodEffects.createWithPreprocess;
|
|
64882
65002
|
var pipelineType = ZodPipeline.create;
|
|
64883
65003
|
|
|
64884
|
-
//
|
|
65004
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js
|
|
64885
65005
|
function isZ4Schema(s2) {
|
|
64886
65006
|
const schema = s2;
|
|
64887
65007
|
return !!schema._zod;
|
|
@@ -64944,7 +65064,7 @@ function getLiteralValue(schema) {
|
|
|
64944
65064
|
return void 0;
|
|
64945
65065
|
}
|
|
64946
65066
|
|
|
64947
|
-
//
|
|
65067
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
|
|
64948
65068
|
var LATEST_PROTOCOL_VERSION = "2025-11-25";
|
|
64949
65069
|
var SUPPORTED_PROTOCOL_VERSIONS = [LATEST_PROTOCOL_VERSION, "2025-06-18", "2025-03-26", "2024-11-05", "2024-10-07"];
|
|
64950
65070
|
var RELATED_TASK_META_KEY = "io.modelcontextprotocol/related-task";
|
|
@@ -64954,10 +65074,9 @@ var ProgressTokenSchema = union([string2(), number2().int()]);
|
|
|
64954
65074
|
var CursorSchema = string2();
|
|
64955
65075
|
var TaskCreationParamsSchema = looseObject({
|
|
64956
65076
|
/**
|
|
64957
|
-
*
|
|
64958
|
-
* If null, the task has unlimited lifetime until manually cleaned up.
|
|
65077
|
+
* Requested duration in milliseconds to retain task from creation.
|
|
64959
65078
|
*/
|
|
64960
|
-
ttl:
|
|
65079
|
+
ttl: number2().optional(),
|
|
64961
65080
|
/**
|
|
64962
65081
|
* Time in milliseconds to wait between task status requests.
|
|
64963
65082
|
*/
|
|
@@ -65257,7 +65376,11 @@ var ClientCapabilitiesSchema = object({
|
|
|
65257
65376
|
/**
|
|
65258
65377
|
* Present if the client supports task creation.
|
|
65259
65378
|
*/
|
|
65260
|
-
tasks: ClientTasksCapabilitySchema.optional()
|
|
65379
|
+
tasks: ClientTasksCapabilitySchema.optional(),
|
|
65380
|
+
/**
|
|
65381
|
+
* Extensions that the client supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
|
65382
|
+
*/
|
|
65383
|
+
extensions: record(string2(), AssertObjectSchema).optional()
|
|
65261
65384
|
});
|
|
65262
65385
|
var InitializeRequestParamsSchema = BaseRequestParamsSchema.extend({
|
|
65263
65386
|
/**
|
|
@@ -65318,7 +65441,11 @@ var ServerCapabilitiesSchema = object({
|
|
|
65318
65441
|
/**
|
|
65319
65442
|
* Present if the server supports task creation.
|
|
65320
65443
|
*/
|
|
65321
|
-
tasks: ServerTasksCapabilitySchema.optional()
|
|
65444
|
+
tasks: ServerTasksCapabilitySchema.optional(),
|
|
65445
|
+
/**
|
|
65446
|
+
* Extensions that the server supports. Keys are extension identifiers (vendor-prefix/extension-name).
|
|
65447
|
+
*/
|
|
65448
|
+
extensions: record(string2(), AssertObjectSchema).optional()
|
|
65322
65449
|
});
|
|
65323
65450
|
var InitializeResultSchema = ResultSchema.extend({
|
|
65324
65451
|
/**
|
|
@@ -65510,6 +65637,12 @@ var ResourceSchema = object({
|
|
|
65510
65637
|
* The MIME type of this resource, if known.
|
|
65511
65638
|
*/
|
|
65512
65639
|
mimeType: optional(string2()),
|
|
65640
|
+
/**
|
|
65641
|
+
* The size of the raw resource content, in bytes (i.e., before base64 encoding or any tokenization), if known.
|
|
65642
|
+
*
|
|
65643
|
+
* This can be used by Hosts to display file sizes and estimate context window usage.
|
|
65644
|
+
*/
|
|
65645
|
+
size: optional(number2()),
|
|
65513
65646
|
/**
|
|
65514
65647
|
* Optional annotations for the client.
|
|
65515
65648
|
*/
|
|
@@ -66450,7 +66583,7 @@ var UrlElicitationRequiredError = class extends McpError {
|
|
|
66450
66583
|
}
|
|
66451
66584
|
};
|
|
66452
66585
|
|
|
66453
|
-
//
|
|
66586
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js
|
|
66454
66587
|
function isTerminal(status) {
|
|
66455
66588
|
return status === "completed" || status === "failed" || status === "cancelled";
|
|
66456
66589
|
}
|
|
@@ -67739,7 +67872,7 @@ var zodToJsonSchema = (schema, options) => {
|
|
|
67739
67872
|
return combined;
|
|
67740
67873
|
};
|
|
67741
67874
|
|
|
67742
|
-
//
|
|
67875
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js
|
|
67743
67876
|
function mapMiniTarget(t2) {
|
|
67744
67877
|
if (!t2)
|
|
67745
67878
|
return "draft-7";
|
|
@@ -67781,7 +67914,7 @@ function parseWithCompat(schema, data) {
|
|
|
67781
67914
|
return result.data;
|
|
67782
67915
|
}
|
|
67783
67916
|
|
|
67784
|
-
//
|
|
67917
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js
|
|
67785
67918
|
var DEFAULT_REQUEST_TIMEOUT_MSEC = 6e4;
|
|
67786
67919
|
var Protocol = class {
|
|
67787
67920
|
constructor(_options) {
|
|
@@ -67993,6 +68126,10 @@ var Protocol = class {
|
|
|
67993
68126
|
this._progressHandlers.clear();
|
|
67994
68127
|
this._taskProgressTokens.clear();
|
|
67995
68128
|
this._pendingDebouncedNotifications.clear();
|
|
68129
|
+
for (const info of this._timeoutInfo.values()) {
|
|
68130
|
+
clearTimeout(info.timeoutId);
|
|
68131
|
+
}
|
|
68132
|
+
this._timeoutInfo.clear();
|
|
67996
68133
|
for (const controller of this._requestHandlerAbortControllers.values()) {
|
|
67997
68134
|
controller.abort();
|
|
67998
68135
|
}
|
|
@@ -68123,7 +68260,9 @@ var Protocol = class {
|
|
|
68123
68260
|
await capturedTransport?.send(errorResponse);
|
|
68124
68261
|
}
|
|
68125
68262
|
}).catch((error48) => this._onerror(new Error(`Failed to send response: ${error48}`))).finally(() => {
|
|
68126
|
-
this._requestHandlerAbortControllers.
|
|
68263
|
+
if (this._requestHandlerAbortControllers.get(request.id) === abortController) {
|
|
68264
|
+
this._requestHandlerAbortControllers.delete(request.id);
|
|
68265
|
+
}
|
|
68127
68266
|
});
|
|
68128
68267
|
}
|
|
68129
68268
|
_onprogress(notification) {
|
|
@@ -68709,7 +68848,7 @@ var Protocol = class {
|
|
|
68709
68848
|
};
|
|
68710
68849
|
}
|
|
68711
68850
|
};
|
|
68712
|
-
function
|
|
68851
|
+
function isPlainObject3(value) {
|
|
68713
68852
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
68714
68853
|
}
|
|
68715
68854
|
function mergeCapabilities(base, additional) {
|
|
@@ -68720,7 +68859,7 @@ function mergeCapabilities(base, additional) {
|
|
|
68720
68859
|
if (addValue === void 0)
|
|
68721
68860
|
continue;
|
|
68722
68861
|
const baseValue = result[k];
|
|
68723
|
-
if (
|
|
68862
|
+
if (isPlainObject3(baseValue) && isPlainObject3(addValue)) {
|
|
68724
68863
|
result[k] = { ...baseValue, ...addValue };
|
|
68725
68864
|
} else {
|
|
68726
68865
|
result[k] = addValue;
|
|
@@ -68729,7 +68868,7 @@ function mergeCapabilities(base, additional) {
|
|
|
68729
68868
|
return result;
|
|
68730
68869
|
}
|
|
68731
68870
|
|
|
68732
|
-
//
|
|
68871
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js
|
|
68733
68872
|
var import_ajv = __toESM(require_ajv(), 1);
|
|
68734
68873
|
var import_ajv_formats = __toESM(require_dist3(), 1);
|
|
68735
68874
|
function createDefaultAjvInstance() {
|
|
@@ -68797,7 +68936,7 @@ var AjvJsonSchemaValidator = class {
|
|
|
68797
68936
|
}
|
|
68798
68937
|
};
|
|
68799
68938
|
|
|
68800
|
-
//
|
|
68939
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js
|
|
68801
68940
|
var ExperimentalServerTasks = class {
|
|
68802
68941
|
constructor(_server) {
|
|
68803
68942
|
this._server = _server;
|
|
@@ -69010,7 +69149,7 @@ var ExperimentalServerTasks = class {
|
|
|
69010
69149
|
}
|
|
69011
69150
|
};
|
|
69012
69151
|
|
|
69013
|
-
//
|
|
69152
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js
|
|
69014
69153
|
function assertToolsCallTaskCapability(requests, method, entityName) {
|
|
69015
69154
|
if (!requests) {
|
|
69016
69155
|
throw new Error(`${entityName} does not support task creation (required for ${method})`);
|
|
@@ -69045,7 +69184,7 @@ function assertClientRequestTaskCapability(requests, method, entityName) {
|
|
|
69045
69184
|
}
|
|
69046
69185
|
}
|
|
69047
69186
|
|
|
69048
|
-
//
|
|
69187
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js
|
|
69049
69188
|
var Server = class extends Protocol {
|
|
69050
69189
|
/**
|
|
69051
69190
|
* Initializes this server with the given name and version information.
|
|
@@ -69425,10 +69564,10 @@ var Server = class extends Protocol {
|
|
|
69425
69564
|
}
|
|
69426
69565
|
};
|
|
69427
69566
|
|
|
69428
|
-
//
|
|
69567
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
69429
69568
|
import process3 from "node:process";
|
|
69430
69569
|
|
|
69431
|
-
//
|
|
69570
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js
|
|
69432
69571
|
var ReadBuffer = class {
|
|
69433
69572
|
append(chunk) {
|
|
69434
69573
|
this._buffer = this._buffer ? Buffer.concat([this._buffer, chunk]) : chunk;
|
|
@@ -69456,7 +69595,7 @@ function serializeMessage(message) {
|
|
|
69456
69595
|
return JSON.stringify(message) + "\n";
|
|
69457
69596
|
}
|
|
69458
69597
|
|
|
69459
|
-
//
|
|
69598
|
+
// node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js
|
|
69460
69599
|
var StdioServerTransport = class {
|
|
69461
69600
|
constructor(_stdin = process3.stdin, _stdout = process3.stdout) {
|
|
69462
69601
|
this._stdin = _stdin;
|