@misterscan/sesi 1.2.0 → 1.2.2
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/bin/sesi.js +3 -3
- package/dist/ai-runtime.d.ts.map +1 -1
- package/dist/ai-runtime.js +11 -3
- package/dist/ai-runtime.js.map +1 -1
- package/dist/builtins.d.ts.map +1 -1
- package/dist/builtins.js +6 -1
- package/dist/builtins.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/interpreter.d.ts +10 -1
- package/dist/interpreter.d.ts.map +1 -1
- package/dist/interpreter.js +62 -10
- package/dist/interpreter.js.map +1 -1
- package/dist/parser.d.ts.map +1 -1
- package/dist/parser.js +8 -0
- package/dist/parser.js.map +1 -1
- package/dist/sesi.bundled.js +498 -385
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/BUILTINS.md +62 -1
- package/docs/IMAGE_GENERATION.md +3 -3
- package/docs/README.md +8 -8
- package/docs/SKILLS.md +133 -0
- package/docs/SPECIFICATION.md +75 -19
- package/docs/SYSTEMS_REASONING.md +22 -22
- package/docs/favicon.ico +0 -0
- package/examples/16_modules.sesi +1 -1
- package/main/sesi_db_chatbot.sesi +280 -261
- package/main/start.sesi +1 -1
- package/main/terminal.log +56 -0
- package/main/unified_sesi_ai.sesi +1 -1
- package/package.json +20 -14
package/dist/sesi.bundled.js
CHANGED
|
@@ -37728,22 +37728,22 @@ var require_node4 = __commonJS({
|
|
|
37728
37728
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
37729
37729
|
}
|
|
37730
37730
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
37731
|
-
throw new Error("apiKeyConfig parameter is
|
|
37731
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37732
37732
|
}
|
|
37733
37733
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
37734
|
-
throw new Error("authType parameter is
|
|
37734
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37735
37735
|
}
|
|
37736
37736
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
37737
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
37737
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37738
37738
|
}
|
|
37739
37739
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
37740
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
37740
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37741
37741
|
}
|
|
37742
37742
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
37743
|
-
throw new Error("oauthConfig parameter is
|
|
37743
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37744
37744
|
}
|
|
37745
37745
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
37746
|
-
throw new Error("oidcConfig parameter is
|
|
37746
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37747
37747
|
}
|
|
37748
37748
|
return toObject;
|
|
37749
37749
|
}
|
|
@@ -37824,13 +37824,13 @@ var require_node4 = __commonJS({
|
|
|
37824
37824
|
setValueByPath(toObject, ["bigqueryDestination", "outputUri"], fromBigqueryUri);
|
|
37825
37825
|
}
|
|
37826
37826
|
if (getValueByPath(fromObject, ["fileName"]) !== void 0) {
|
|
37827
|
-
throw new Error("fileName parameter is
|
|
37827
|
+
throw new Error("fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
37828
37828
|
}
|
|
37829
37829
|
if (getValueByPath(fromObject, ["inlinedResponses"]) !== void 0) {
|
|
37830
|
-
throw new Error("inlinedResponses parameter is
|
|
37830
|
+
throw new Error("inlinedResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
37831
37831
|
}
|
|
37832
37832
|
if (getValueByPath(fromObject, ["inlinedEmbedContentResponses"]) !== void 0) {
|
|
37833
|
-
throw new Error("inlinedEmbedContentResponses parameter is
|
|
37833
|
+
throw new Error("inlinedEmbedContentResponses parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
37834
37834
|
}
|
|
37835
37835
|
const fromVertexDataset = getValueByPath(fromObject, [
|
|
37836
37836
|
"vertexDataset"
|
|
@@ -37975,13 +37975,13 @@ var require_node4 = __commonJS({
|
|
|
37975
37975
|
function batchJobSourceToMldev(apiClient, fromObject) {
|
|
37976
37976
|
const toObject = {};
|
|
37977
37977
|
if (getValueByPath(fromObject, ["format"]) !== void 0) {
|
|
37978
|
-
throw new Error("format parameter is
|
|
37978
|
+
throw new Error("format parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37979
37979
|
}
|
|
37980
37980
|
if (getValueByPath(fromObject, ["gcsUri"]) !== void 0) {
|
|
37981
|
-
throw new Error("gcsUri parameter is
|
|
37981
|
+
throw new Error("gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37982
37982
|
}
|
|
37983
37983
|
if (getValueByPath(fromObject, ["bigqueryUri"]) !== void 0) {
|
|
37984
|
-
throw new Error("bigqueryUri parameter is
|
|
37984
|
+
throw new Error("bigqueryUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
37985
37985
|
}
|
|
37986
37986
|
const fromFileName = getValueByPath(fromObject, ["fileName"]);
|
|
37987
37987
|
if (fromFileName != null) {
|
|
@@ -38000,7 +38000,7 @@ var require_node4 = __commonJS({
|
|
|
38000
38000
|
setValueByPath(toObject, ["requests", "requests"], transformedList);
|
|
38001
38001
|
}
|
|
38002
38002
|
if (getValueByPath(fromObject, ["vertexDatasetName"]) !== void 0) {
|
|
38003
|
-
throw new Error("vertexDatasetName parameter is
|
|
38003
|
+
throw new Error("vertexDatasetName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38004
38004
|
}
|
|
38005
38005
|
return toObject;
|
|
38006
38006
|
}
|
|
@@ -38019,10 +38019,10 @@ var require_node4 = __commonJS({
|
|
|
38019
38019
|
setValueByPath(toObject, ["bigquerySource", "inputUri"], fromBigqueryUri);
|
|
38020
38020
|
}
|
|
38021
38021
|
if (getValueByPath(fromObject, ["fileName"]) !== void 0) {
|
|
38022
|
-
throw new Error("fileName parameter is
|
|
38022
|
+
throw new Error("fileName parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
38023
38023
|
}
|
|
38024
38024
|
if (getValueByPath(fromObject, ["inlinedRequests"]) !== void 0) {
|
|
38025
|
-
throw new Error("inlinedRequests parameter is
|
|
38025
|
+
throw new Error("inlinedRequests parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
38026
38026
|
}
|
|
38027
38027
|
const fromVertexDatasetName = getValueByPath(fromObject, [
|
|
38028
38028
|
"vertexDatasetName"
|
|
@@ -38039,7 +38039,7 @@ var require_node4 = __commonJS({
|
|
|
38039
38039
|
setValueByPath(toObject, ["data"], fromData);
|
|
38040
38040
|
}
|
|
38041
38041
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
38042
|
-
throw new Error("displayName parameter is
|
|
38042
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38043
38043
|
}
|
|
38044
38044
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
38045
38045
|
if (fromMimeType != null) {
|
|
@@ -38162,7 +38162,7 @@ var require_node4 = __commonJS({
|
|
|
38162
38162
|
setValueByPath(parentObject, ["batch", "displayName"], fromDisplayName);
|
|
38163
38163
|
}
|
|
38164
38164
|
if (getValueByPath(fromObject, ["dest"]) !== void 0) {
|
|
38165
|
-
throw new Error("dest parameter is
|
|
38165
|
+
throw new Error("dest parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38166
38166
|
}
|
|
38167
38167
|
const fromWebhookConfig = getValueByPath(fromObject, [
|
|
38168
38168
|
"webhookConfig"
|
|
@@ -38183,7 +38183,7 @@ var require_node4 = __commonJS({
|
|
|
38183
38183
|
setValueByPath(parentObject, ["outputConfig"], batchJobDestinationToVertex(tBatchJobDestination(fromDest)));
|
|
38184
38184
|
}
|
|
38185
38185
|
if (getValueByPath(fromObject, ["webhookConfig"]) !== void 0) {
|
|
38186
|
-
throw new Error("webhookConfig parameter is
|
|
38186
|
+
throw new Error("webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
38187
38187
|
}
|
|
38188
38188
|
return toObject;
|
|
38189
38189
|
}
|
|
@@ -38339,16 +38339,16 @@ var require_node4 = __commonJS({
|
|
|
38339
38339
|
setValueByPath(parentObject, ["requests[]", "outputDimensionality"], fromOutputDimensionality);
|
|
38340
38340
|
}
|
|
38341
38341
|
if (getValueByPath(fromObject, ["mimeType"]) !== void 0) {
|
|
38342
|
-
throw new Error("mimeType parameter is
|
|
38342
|
+
throw new Error("mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38343
38343
|
}
|
|
38344
38344
|
if (getValueByPath(fromObject, ["autoTruncate"]) !== void 0) {
|
|
38345
|
-
throw new Error("autoTruncate parameter is
|
|
38345
|
+
throw new Error("autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38346
38346
|
}
|
|
38347
38347
|
if (getValueByPath(fromObject, ["documentOcr"]) !== void 0) {
|
|
38348
|
-
throw new Error("documentOcr parameter is
|
|
38348
|
+
throw new Error("documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38349
38349
|
}
|
|
38350
38350
|
if (getValueByPath(fromObject, ["audioTrackExtraction"]) !== void 0) {
|
|
38351
|
-
throw new Error("audioTrackExtraction parameter is
|
|
38351
|
+
throw new Error("audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38352
38352
|
}
|
|
38353
38353
|
return toObject;
|
|
38354
38354
|
}
|
|
@@ -38369,7 +38369,7 @@ var require_node4 = __commonJS({
|
|
|
38369
38369
|
function fileDataToMldev$4(fromObject) {
|
|
38370
38370
|
const toObject = {};
|
|
38371
38371
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
38372
|
-
throw new Error("displayName parameter is
|
|
38372
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38373
38373
|
}
|
|
38374
38374
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
38375
38375
|
if (fromFileUri != null) {
|
|
@@ -38396,10 +38396,10 @@ var require_node4 = __commonJS({
|
|
|
38396
38396
|
setValueByPath(toObject, ["name"], fromName);
|
|
38397
38397
|
}
|
|
38398
38398
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
38399
|
-
throw new Error("partialArgs parameter is
|
|
38399
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38400
38400
|
}
|
|
38401
38401
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
38402
|
-
throw new Error("willContinue parameter is
|
|
38402
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38403
38403
|
}
|
|
38404
38404
|
return toObject;
|
|
38405
38405
|
}
|
|
@@ -38416,7 +38416,7 @@ var require_node4 = __commonJS({
|
|
|
38416
38416
|
setValueByPath(toObject, ["mode"], fromMode);
|
|
38417
38417
|
}
|
|
38418
38418
|
if (getValueByPath(fromObject, ["streamFunctionCallArguments"]) !== void 0) {
|
|
38419
|
-
throw new Error("streamFunctionCallArguments parameter is
|
|
38419
|
+
throw new Error("streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38420
38420
|
}
|
|
38421
38421
|
return toObject;
|
|
38422
38422
|
}
|
|
@@ -38503,10 +38503,10 @@ var require_node4 = __commonJS({
|
|
|
38503
38503
|
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
38504
38504
|
}
|
|
38505
38505
|
if (getValueByPath(fromObject, ["routingConfig"]) !== void 0) {
|
|
38506
|
-
throw new Error("routingConfig parameter is
|
|
38506
|
+
throw new Error("routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38507
38507
|
}
|
|
38508
38508
|
if (getValueByPath(fromObject, ["modelSelectionConfig"]) !== void 0) {
|
|
38509
|
-
throw new Error("modelSelectionConfig parameter is
|
|
38509
|
+
throw new Error("modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38510
38510
|
}
|
|
38511
38511
|
const fromSafetySettings = getValueByPath(fromObject, [
|
|
38512
38512
|
"safetySettings"
|
|
@@ -38535,7 +38535,7 @@ var require_node4 = __commonJS({
|
|
|
38535
38535
|
setValueByPath(parentObject, ["toolConfig"], toolConfigToMldev$2(fromToolConfig));
|
|
38536
38536
|
}
|
|
38537
38537
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
38538
|
-
throw new Error("labels parameter is
|
|
38538
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38539
38539
|
}
|
|
38540
38540
|
const fromCachedContent = getValueByPath(fromObject, [
|
|
38541
38541
|
"cachedContent"
|
|
@@ -38560,7 +38560,7 @@ var require_node4 = __commonJS({
|
|
|
38560
38560
|
setValueByPath(toObject, ["speechConfig"], tSpeechConfig(fromSpeechConfig));
|
|
38561
38561
|
}
|
|
38562
38562
|
if (getValueByPath(fromObject, ["audioTimestamp"]) !== void 0) {
|
|
38563
|
-
throw new Error("audioTimestamp parameter is
|
|
38563
|
+
throw new Error("audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38564
38564
|
}
|
|
38565
38565
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
38566
38566
|
"thinkingConfig"
|
|
@@ -38579,7 +38579,7 @@ var require_node4 = __commonJS({
|
|
|
38579
38579
|
setValueByPath(toObject, ["enableEnhancedCivicAnswers"], fromEnableEnhancedCivicAnswers);
|
|
38580
38580
|
}
|
|
38581
38581
|
if (getValueByPath(fromObject, ["modelArmorConfig"]) !== void 0) {
|
|
38582
|
-
throw new Error("modelArmorConfig parameter is
|
|
38582
|
+
throw new Error("modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38583
38583
|
}
|
|
38584
38584
|
const fromServiceTier = getValueByPath(fromObject, ["serviceTier"]);
|
|
38585
38585
|
if (parentObject !== void 0 && fromServiceTier != null) {
|
|
@@ -38666,10 +38666,10 @@ var require_node4 = __commonJS({
|
|
|
38666
38666
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
38667
38667
|
}
|
|
38668
38668
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
38669
|
-
throw new Error("blockingConfidence parameter is
|
|
38669
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38670
38670
|
}
|
|
38671
38671
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
38672
|
-
throw new Error("excludeDomains parameter is
|
|
38672
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38673
38673
|
}
|
|
38674
38674
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
38675
38675
|
"timeRangeFilter"
|
|
@@ -38690,19 +38690,19 @@ var require_node4 = __commonJS({
|
|
|
38690
38690
|
setValueByPath(toObject, ["imageSize"], fromImageSize);
|
|
38691
38691
|
}
|
|
38692
38692
|
if (getValueByPath(fromObject, ["personGeneration"]) !== void 0) {
|
|
38693
|
-
throw new Error("personGeneration parameter is
|
|
38693
|
+
throw new Error("personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38694
38694
|
}
|
|
38695
38695
|
if (getValueByPath(fromObject, ["prominentPeople"]) !== void 0) {
|
|
38696
|
-
throw new Error("prominentPeople parameter is
|
|
38696
|
+
throw new Error("prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38697
38697
|
}
|
|
38698
38698
|
if (getValueByPath(fromObject, ["outputMimeType"]) !== void 0) {
|
|
38699
|
-
throw new Error("outputMimeType parameter is
|
|
38699
|
+
throw new Error("outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38700
38700
|
}
|
|
38701
38701
|
if (getValueByPath(fromObject, ["outputCompressionQuality"]) !== void 0) {
|
|
38702
|
-
throw new Error("outputCompressionQuality parameter is
|
|
38702
|
+
throw new Error("outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38703
38703
|
}
|
|
38704
38704
|
if (getValueByPath(fromObject, ["imageOutputOptions"]) !== void 0) {
|
|
38705
|
-
throw new Error("imageOutputOptions parameter is
|
|
38705
|
+
throw new Error("imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38706
38706
|
}
|
|
38707
38707
|
return toObject;
|
|
38708
38708
|
}
|
|
@@ -38759,7 +38759,7 @@ var require_node4 = __commonJS({
|
|
|
38759
38759
|
setValueByPath(parentObject, ["_query", "pageToken"], fromPageToken);
|
|
38760
38760
|
}
|
|
38761
38761
|
if (getValueByPath(fromObject, ["filter"]) !== void 0) {
|
|
38762
|
-
throw new Error("filter parameter is
|
|
38762
|
+
throw new Error("filter parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38763
38763
|
}
|
|
38764
38764
|
return toObject;
|
|
38765
38765
|
}
|
|
@@ -38928,7 +38928,7 @@ var require_node4 = __commonJS({
|
|
|
38928
38928
|
setValueByPath(toObject, ["category"], fromCategory);
|
|
38929
38929
|
}
|
|
38930
38930
|
if (getValueByPath(fromObject, ["method"]) !== void 0) {
|
|
38931
|
-
throw new Error("method parameter is
|
|
38931
|
+
throw new Error("method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38932
38932
|
}
|
|
38933
38933
|
const fromThreshold = getValueByPath(fromObject, ["threshold"]);
|
|
38934
38934
|
if (fromThreshold != null) {
|
|
@@ -38959,7 +38959,7 @@ var require_node4 = __commonJS({
|
|
|
38959
38959
|
function toolToMldev$4(fromObject) {
|
|
38960
38960
|
const toObject = {};
|
|
38961
38961
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
38962
|
-
throw new Error("retrieval parameter is
|
|
38962
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38963
38963
|
}
|
|
38964
38964
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
38965
38965
|
if (fromComputerUse != null) {
|
|
@@ -38984,7 +38984,7 @@ var require_node4 = __commonJS({
|
|
|
38984
38984
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
38985
38985
|
}
|
|
38986
38986
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
38987
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
38987
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
38988
38988
|
}
|
|
38989
38989
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
38990
38990
|
"functionDeclarations"
|
|
@@ -39005,7 +39005,7 @@ var require_node4 = __commonJS({
|
|
|
39005
39005
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
39006
39006
|
}
|
|
39007
39007
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
39008
|
-
throw new Error("parallelAiSearch parameter is
|
|
39008
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39009
39009
|
}
|
|
39010
39010
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
39011
39011
|
if (fromUrlContext != null) {
|
|
@@ -39652,22 +39652,22 @@ var require_node4 = __commonJS({
|
|
|
39652
39652
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
39653
39653
|
}
|
|
39654
39654
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
39655
|
-
throw new Error("apiKeyConfig parameter is
|
|
39655
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39656
39656
|
}
|
|
39657
39657
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
39658
|
-
throw new Error("authType parameter is
|
|
39658
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39659
39659
|
}
|
|
39660
39660
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
39661
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
39661
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39662
39662
|
}
|
|
39663
39663
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
39664
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
39664
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39665
39665
|
}
|
|
39666
39666
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
39667
|
-
throw new Error("oauthConfig parameter is
|
|
39667
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39668
39668
|
}
|
|
39669
39669
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
39670
|
-
throw new Error("oidcConfig parameter is
|
|
39670
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39671
39671
|
}
|
|
39672
39672
|
return toObject;
|
|
39673
39673
|
}
|
|
@@ -39678,7 +39678,7 @@ var require_node4 = __commonJS({
|
|
|
39678
39678
|
setValueByPath(toObject, ["data"], fromData);
|
|
39679
39679
|
}
|
|
39680
39680
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
39681
|
-
throw new Error("displayName parameter is
|
|
39681
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39682
39682
|
}
|
|
39683
39683
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
39684
39684
|
if (fromMimeType != null) {
|
|
@@ -39767,7 +39767,7 @@ var require_node4 = __commonJS({
|
|
|
39767
39767
|
setValueByPath(parentObject, ["toolConfig"], toolConfigToMldev$1(fromToolConfig));
|
|
39768
39768
|
}
|
|
39769
39769
|
if (getValueByPath(fromObject, ["kmsKeyName"]) !== void 0) {
|
|
39770
|
-
throw new Error("kmsKeyName parameter is
|
|
39770
|
+
throw new Error("kmsKeyName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39771
39771
|
}
|
|
39772
39772
|
return toObject;
|
|
39773
39773
|
}
|
|
@@ -39884,7 +39884,7 @@ var require_node4 = __commonJS({
|
|
|
39884
39884
|
function fileDataToMldev$3(fromObject) {
|
|
39885
39885
|
const toObject = {};
|
|
39886
39886
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
39887
|
-
throw new Error("displayName parameter is
|
|
39887
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39888
39888
|
}
|
|
39889
39889
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
39890
39890
|
if (fromFileUri != null) {
|
|
@@ -39911,10 +39911,10 @@ var require_node4 = __commonJS({
|
|
|
39911
39911
|
setValueByPath(toObject, ["name"], fromName);
|
|
39912
39912
|
}
|
|
39913
39913
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
39914
|
-
throw new Error("partialArgs parameter is
|
|
39914
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39915
39915
|
}
|
|
39916
39916
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
39917
|
-
throw new Error("willContinue parameter is
|
|
39917
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39918
39918
|
}
|
|
39919
39919
|
return toObject;
|
|
39920
39920
|
}
|
|
@@ -39931,42 +39931,7 @@ var require_node4 = __commonJS({
|
|
|
39931
39931
|
setValueByPath(toObject, ["mode"], fromMode);
|
|
39932
39932
|
}
|
|
39933
39933
|
if (getValueByPath(fromObject, ["streamFunctionCallArguments"]) !== void 0) {
|
|
39934
|
-
throw new Error("streamFunctionCallArguments parameter is
|
|
39935
|
-
}
|
|
39936
|
-
return toObject;
|
|
39937
|
-
}
|
|
39938
|
-
function functionDeclarationToVertex$2(fromObject) {
|
|
39939
|
-
const toObject = {};
|
|
39940
|
-
const fromDescription = getValueByPath(fromObject, ["description"]);
|
|
39941
|
-
if (fromDescription != null) {
|
|
39942
|
-
setValueByPath(toObject, ["description"], fromDescription);
|
|
39943
|
-
}
|
|
39944
|
-
const fromName = getValueByPath(fromObject, ["name"]);
|
|
39945
|
-
if (fromName != null) {
|
|
39946
|
-
setValueByPath(toObject, ["name"], fromName);
|
|
39947
|
-
}
|
|
39948
|
-
const fromParameters = getValueByPath(fromObject, ["parameters"]);
|
|
39949
|
-
if (fromParameters != null) {
|
|
39950
|
-
setValueByPath(toObject, ["parameters"], fromParameters);
|
|
39951
|
-
}
|
|
39952
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
39953
|
-
"parametersJsonSchema"
|
|
39954
|
-
]);
|
|
39955
|
-
if (fromParametersJsonSchema != null) {
|
|
39956
|
-
setValueByPath(toObject, ["parametersJsonSchema"], fromParametersJsonSchema);
|
|
39957
|
-
}
|
|
39958
|
-
const fromResponse = getValueByPath(fromObject, ["response"]);
|
|
39959
|
-
if (fromResponse != null) {
|
|
39960
|
-
setValueByPath(toObject, ["response"], fromResponse);
|
|
39961
|
-
}
|
|
39962
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
39963
|
-
"responseJsonSchema"
|
|
39964
|
-
]);
|
|
39965
|
-
if (fromResponseJsonSchema != null) {
|
|
39966
|
-
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
39967
|
-
}
|
|
39968
|
-
if (getValueByPath(fromObject, ["behavior"]) !== void 0) {
|
|
39969
|
-
throw new Error("behavior parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).");
|
|
39934
|
+
throw new Error("streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
39970
39935
|
}
|
|
39971
39936
|
return toObject;
|
|
39972
39937
|
}
|
|
@@ -40005,10 +39970,10 @@ var require_node4 = __commonJS({
|
|
|
40005
39970
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
40006
39971
|
}
|
|
40007
39972
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
40008
|
-
throw new Error("blockingConfidence parameter is
|
|
39973
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
40009
39974
|
}
|
|
40010
39975
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
40011
|
-
throw new Error("excludeDomains parameter is
|
|
39976
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
40012
39977
|
}
|
|
40013
39978
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
40014
39979
|
"timeRangeFilter"
|
|
@@ -40245,13 +40210,13 @@ var require_node4 = __commonJS({
|
|
|
40245
40210
|
setValueByPath(toObject, ["videoMetadata"], fromVideoMetadata);
|
|
40246
40211
|
}
|
|
40247
40212
|
if (getValueByPath(fromObject, ["toolCall"]) !== void 0) {
|
|
40248
|
-
throw new Error("toolCall parameter is
|
|
40213
|
+
throw new Error("toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
40249
40214
|
}
|
|
40250
40215
|
if (getValueByPath(fromObject, ["toolResponse"]) !== void 0) {
|
|
40251
|
-
throw new Error("toolResponse parameter is
|
|
40216
|
+
throw new Error("toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
40252
40217
|
}
|
|
40253
40218
|
if (getValueByPath(fromObject, ["partMetadata"]) !== void 0) {
|
|
40254
|
-
throw new Error("partMetadata parameter is
|
|
40219
|
+
throw new Error("partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
40255
40220
|
}
|
|
40256
40221
|
return toObject;
|
|
40257
40222
|
}
|
|
@@ -40290,14 +40255,14 @@ var require_node4 = __commonJS({
|
|
|
40290
40255
|
setValueByPath(toObject, ["functionCallingConfig"], fromFunctionCallingConfig);
|
|
40291
40256
|
}
|
|
40292
40257
|
if (getValueByPath(fromObject, ["includeServerSideToolInvocations"]) !== void 0) {
|
|
40293
|
-
throw new Error("includeServerSideToolInvocations parameter is
|
|
40258
|
+
throw new Error("includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
40294
40259
|
}
|
|
40295
40260
|
return toObject;
|
|
40296
40261
|
}
|
|
40297
40262
|
function toolToMldev$3(fromObject) {
|
|
40298
40263
|
const toObject = {};
|
|
40299
40264
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
40300
|
-
throw new Error("retrieval parameter is
|
|
40265
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
40301
40266
|
}
|
|
40302
40267
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
40303
40268
|
if (fromComputerUse != null) {
|
|
@@ -40322,7 +40287,7 @@ var require_node4 = __commonJS({
|
|
|
40322
40287
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
40323
40288
|
}
|
|
40324
40289
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
40325
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
40290
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
40326
40291
|
}
|
|
40327
40292
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
40328
40293
|
"functionDeclarations"
|
|
@@ -40343,7 +40308,7 @@ var require_node4 = __commonJS({
|
|
|
40343
40308
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
40344
40309
|
}
|
|
40345
40310
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
40346
|
-
throw new Error("parallelAiSearch parameter is
|
|
40311
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
40347
40312
|
}
|
|
40348
40313
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
40349
40314
|
if (fromUrlContext != null) {
|
|
@@ -40372,7 +40337,7 @@ var require_node4 = __commonJS({
|
|
|
40372
40337
|
setValueByPath(toObject, ["computerUse"], fromComputerUse);
|
|
40373
40338
|
}
|
|
40374
40339
|
if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) {
|
|
40375
|
-
throw new Error("fileSearch parameter is
|
|
40340
|
+
throw new Error("fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
40376
40341
|
}
|
|
40377
40342
|
const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
|
|
40378
40343
|
if (fromGoogleSearch != null) {
|
|
@@ -40401,7 +40366,7 @@ var require_node4 = __commonJS({
|
|
|
40401
40366
|
let transformedList = fromFunctionDeclarations;
|
|
40402
40367
|
if (Array.isArray(transformedList)) {
|
|
40403
40368
|
transformedList = transformedList.map((item) => {
|
|
40404
|
-
return
|
|
40369
|
+
return item;
|
|
40405
40370
|
});
|
|
40406
40371
|
}
|
|
40407
40372
|
setValueByPath(toObject, ["functionDeclarations"], transformedList);
|
|
@@ -40423,7 +40388,7 @@ var require_node4 = __commonJS({
|
|
|
40423
40388
|
setValueByPath(toObject, ["urlContext"], fromUrlContext);
|
|
40424
40389
|
}
|
|
40425
40390
|
if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) {
|
|
40426
|
-
throw new Error("mcpServers parameter is
|
|
40391
|
+
throw new Error("mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
40427
40392
|
}
|
|
40428
40393
|
return toObject;
|
|
40429
40394
|
}
|
|
@@ -41572,7 +41537,7 @@ var require_node4 = __commonJS({
|
|
|
41572
41537
|
function audioTranscriptionConfigToMldev$1(fromObject) {
|
|
41573
41538
|
const toObject = {};
|
|
41574
41539
|
if (getValueByPath(fromObject, ["languageCodes"]) !== void 0) {
|
|
41575
|
-
throw new Error("languageCodes parameter is
|
|
41540
|
+
throw new Error("languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41576
41541
|
}
|
|
41577
41542
|
return toObject;
|
|
41578
41543
|
}
|
|
@@ -41583,22 +41548,22 @@ var require_node4 = __commonJS({
|
|
|
41583
41548
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
41584
41549
|
}
|
|
41585
41550
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
41586
|
-
throw new Error("apiKeyConfig parameter is
|
|
41551
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41587
41552
|
}
|
|
41588
41553
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
41589
|
-
throw new Error("authType parameter is
|
|
41554
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41590
41555
|
}
|
|
41591
41556
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
41592
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
41557
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41593
41558
|
}
|
|
41594
41559
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
41595
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
41560
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41596
41561
|
}
|
|
41597
41562
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
41598
|
-
throw new Error("oauthConfig parameter is
|
|
41563
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41599
41564
|
}
|
|
41600
41565
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
41601
|
-
throw new Error("oidcConfig parameter is
|
|
41566
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41602
41567
|
}
|
|
41603
41568
|
return toObject;
|
|
41604
41569
|
}
|
|
@@ -41609,7 +41574,7 @@ var require_node4 = __commonJS({
|
|
|
41609
41574
|
setValueByPath(toObject, ["data"], fromData);
|
|
41610
41575
|
}
|
|
41611
41576
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
41612
|
-
throw new Error("displayName parameter is
|
|
41577
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41613
41578
|
}
|
|
41614
41579
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
41615
41580
|
if (fromMimeType != null) {
|
|
@@ -41656,7 +41621,7 @@ var require_node4 = __commonJS({
|
|
|
41656
41621
|
function fileDataToMldev$2(fromObject) {
|
|
41657
41622
|
const toObject = {};
|
|
41658
41623
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
41659
|
-
throw new Error("displayName parameter is
|
|
41624
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41660
41625
|
}
|
|
41661
41626
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
41662
41627
|
if (fromFileUri != null) {
|
|
@@ -41683,45 +41648,10 @@ var require_node4 = __commonJS({
|
|
|
41683
41648
|
setValueByPath(toObject, ["name"], fromName);
|
|
41684
41649
|
}
|
|
41685
41650
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
41686
|
-
throw new Error("partialArgs parameter is
|
|
41651
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41687
41652
|
}
|
|
41688
41653
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
41689
|
-
throw new Error("willContinue parameter is
|
|
41690
|
-
}
|
|
41691
|
-
return toObject;
|
|
41692
|
-
}
|
|
41693
|
-
function functionDeclarationToVertex$1(fromObject) {
|
|
41694
|
-
const toObject = {};
|
|
41695
|
-
const fromDescription = getValueByPath(fromObject, ["description"]);
|
|
41696
|
-
if (fromDescription != null) {
|
|
41697
|
-
setValueByPath(toObject, ["description"], fromDescription);
|
|
41698
|
-
}
|
|
41699
|
-
const fromName = getValueByPath(fromObject, ["name"]);
|
|
41700
|
-
if (fromName != null) {
|
|
41701
|
-
setValueByPath(toObject, ["name"], fromName);
|
|
41702
|
-
}
|
|
41703
|
-
const fromParameters = getValueByPath(fromObject, ["parameters"]);
|
|
41704
|
-
if (fromParameters != null) {
|
|
41705
|
-
setValueByPath(toObject, ["parameters"], fromParameters);
|
|
41706
|
-
}
|
|
41707
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
41708
|
-
"parametersJsonSchema"
|
|
41709
|
-
]);
|
|
41710
|
-
if (fromParametersJsonSchema != null) {
|
|
41711
|
-
setValueByPath(toObject, ["parametersJsonSchema"], fromParametersJsonSchema);
|
|
41712
|
-
}
|
|
41713
|
-
const fromResponse = getValueByPath(fromObject, ["response"]);
|
|
41714
|
-
if (fromResponse != null) {
|
|
41715
|
-
setValueByPath(toObject, ["response"], fromResponse);
|
|
41716
|
-
}
|
|
41717
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
41718
|
-
"responseJsonSchema"
|
|
41719
|
-
]);
|
|
41720
|
-
if (fromResponseJsonSchema != null) {
|
|
41721
|
-
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
41722
|
-
}
|
|
41723
|
-
if (getValueByPath(fromObject, ["behavior"]) !== void 0) {
|
|
41724
|
-
throw new Error("behavior parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).");
|
|
41654
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41725
41655
|
}
|
|
41726
41656
|
return toObject;
|
|
41727
41657
|
}
|
|
@@ -41848,7 +41778,7 @@ var require_node4 = __commonJS({
|
|
|
41848
41778
|
setValueByPath(toObject, ["topP"], fromTopP);
|
|
41849
41779
|
}
|
|
41850
41780
|
if (getValueByPath(fromObject, ["enableEnhancedCivicAnswers"]) !== void 0) {
|
|
41851
|
-
throw new Error("enableEnhancedCivicAnswers parameter is
|
|
41781
|
+
throw new Error("enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
41852
41782
|
}
|
|
41853
41783
|
return toObject;
|
|
41854
41784
|
}
|
|
@@ -41871,10 +41801,10 @@ var require_node4 = __commonJS({
|
|
|
41871
41801
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
41872
41802
|
}
|
|
41873
41803
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
41874
|
-
throw new Error("blockingConfidence parameter is
|
|
41804
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41875
41805
|
}
|
|
41876
41806
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
41877
|
-
throw new Error("excludeDomains parameter is
|
|
41807
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41878
41808
|
}
|
|
41879
41809
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
41880
41810
|
"timeRangeFilter"
|
|
@@ -41993,7 +41923,7 @@ var require_node4 = __commonJS({
|
|
|
41993
41923
|
setValueByPath(parentObject, ["setup", "proactivity"], fromProactivity);
|
|
41994
41924
|
}
|
|
41995
41925
|
if (getValueByPath(fromObject, ["explicitVadSignal"]) !== void 0) {
|
|
41996
|
-
throw new Error("explicitVadSignal parameter is
|
|
41926
|
+
throw new Error("explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
41997
41927
|
}
|
|
41998
41928
|
const fromAvatarConfig = getValueByPath(fromObject, ["avatarConfig"]);
|
|
41999
41929
|
if (parentObject !== void 0 && fromAvatarConfig != null) {
|
|
@@ -42011,6 +41941,12 @@ var require_node4 = __commonJS({
|
|
|
42011
41941
|
}
|
|
42012
41942
|
setValueByPath(parentObject, ["setup", "safetySettings"], transformedList);
|
|
42013
41943
|
}
|
|
41944
|
+
const fromStreamTranslationConfig = getValueByPath(fromObject, [
|
|
41945
|
+
"streamTranslationConfig"
|
|
41946
|
+
]);
|
|
41947
|
+
if (parentObject !== void 0 && fromStreamTranslationConfig != null) {
|
|
41948
|
+
setValueByPath(parentObject, ["setup", "generationConfig", "streamTranslationConfig"], fromStreamTranslationConfig);
|
|
41949
|
+
}
|
|
42014
41950
|
return toObject;
|
|
42015
41951
|
}
|
|
42016
41952
|
function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
@@ -42143,6 +42079,9 @@ var require_node4 = __commonJS({
|
|
|
42143
42079
|
}
|
|
42144
42080
|
setValueByPath(parentObject, ["setup", "safetySettings"], transformedList);
|
|
42145
42081
|
}
|
|
42082
|
+
if (getValueByPath(fromObject, ["streamTranslationConfig"]) !== void 0) {
|
|
42083
|
+
throw new Error("streamTranslationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
42084
|
+
}
|
|
42146
42085
|
return toObject;
|
|
42147
42086
|
}
|
|
42148
42087
|
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
@@ -42464,13 +42403,13 @@ var require_node4 = __commonJS({
|
|
|
42464
42403
|
setValueByPath(toObject, ["videoMetadata"], fromVideoMetadata);
|
|
42465
42404
|
}
|
|
42466
42405
|
if (getValueByPath(fromObject, ["toolCall"]) !== void 0) {
|
|
42467
|
-
throw new Error("toolCall parameter is
|
|
42406
|
+
throw new Error("toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
42468
42407
|
}
|
|
42469
42408
|
if (getValueByPath(fromObject, ["toolResponse"]) !== void 0) {
|
|
42470
|
-
throw new Error("toolResponse parameter is
|
|
42409
|
+
throw new Error("toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
42471
42410
|
}
|
|
42472
42411
|
if (getValueByPath(fromObject, ["partMetadata"]) !== void 0) {
|
|
42473
|
-
throw new Error("partMetadata parameter is
|
|
42412
|
+
throw new Error("partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
42474
42413
|
}
|
|
42475
42414
|
return toObject;
|
|
42476
42415
|
}
|
|
@@ -42481,7 +42420,7 @@ var require_node4 = __commonJS({
|
|
|
42481
42420
|
setValueByPath(toObject, ["category"], fromCategory);
|
|
42482
42421
|
}
|
|
42483
42422
|
if (getValueByPath(fromObject, ["method"]) !== void 0) {
|
|
42484
|
-
throw new Error("method parameter is
|
|
42423
|
+
throw new Error("method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42485
42424
|
}
|
|
42486
42425
|
const fromThreshold = getValueByPath(fromObject, ["threshold"]);
|
|
42487
42426
|
if (fromThreshold != null) {
|
|
@@ -42496,14 +42435,14 @@ var require_node4 = __commonJS({
|
|
|
42496
42435
|
setValueByPath(toObject, ["handle"], fromHandle);
|
|
42497
42436
|
}
|
|
42498
42437
|
if (getValueByPath(fromObject, ["transparent"]) !== void 0) {
|
|
42499
|
-
throw new Error("transparent parameter is
|
|
42438
|
+
throw new Error("transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42500
42439
|
}
|
|
42501
42440
|
return toObject;
|
|
42502
42441
|
}
|
|
42503
42442
|
function toolToMldev$2(fromObject) {
|
|
42504
42443
|
const toObject = {};
|
|
42505
42444
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
42506
|
-
throw new Error("retrieval parameter is
|
|
42445
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42507
42446
|
}
|
|
42508
42447
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
42509
42448
|
if (fromComputerUse != null) {
|
|
@@ -42528,7 +42467,7 @@ var require_node4 = __commonJS({
|
|
|
42528
42467
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
42529
42468
|
}
|
|
42530
42469
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
42531
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
42470
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42532
42471
|
}
|
|
42533
42472
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
42534
42473
|
"functionDeclarations"
|
|
@@ -42549,7 +42488,7 @@ var require_node4 = __commonJS({
|
|
|
42549
42488
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
42550
42489
|
}
|
|
42551
42490
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
42552
|
-
throw new Error("parallelAiSearch parameter is
|
|
42491
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42553
42492
|
}
|
|
42554
42493
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
42555
42494
|
if (fromUrlContext != null) {
|
|
@@ -42578,7 +42517,7 @@ var require_node4 = __commonJS({
|
|
|
42578
42517
|
setValueByPath(toObject, ["computerUse"], fromComputerUse);
|
|
42579
42518
|
}
|
|
42580
42519
|
if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) {
|
|
42581
|
-
throw new Error("fileSearch parameter is
|
|
42520
|
+
throw new Error("fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
42582
42521
|
}
|
|
42583
42522
|
const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
|
|
42584
42523
|
if (fromGoogleSearch != null) {
|
|
@@ -42607,7 +42546,7 @@ var require_node4 = __commonJS({
|
|
|
42607
42546
|
let transformedList = fromFunctionDeclarations;
|
|
42608
42547
|
if (Array.isArray(transformedList)) {
|
|
42609
42548
|
transformedList = transformedList.map((item) => {
|
|
42610
|
-
return
|
|
42549
|
+
return item;
|
|
42611
42550
|
});
|
|
42612
42551
|
}
|
|
42613
42552
|
setValueByPath(toObject, ["functionDeclarations"], transformedList);
|
|
@@ -42629,7 +42568,7 @@ var require_node4 = __commonJS({
|
|
|
42629
42568
|
setValueByPath(toObject, ["urlContext"], fromUrlContext);
|
|
42630
42569
|
}
|
|
42631
42570
|
if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) {
|
|
42632
|
-
throw new Error("mcpServers parameter is
|
|
42571
|
+
throw new Error("mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
42633
42572
|
}
|
|
42634
42573
|
return toObject;
|
|
42635
42574
|
}
|
|
@@ -42740,22 +42679,22 @@ var require_node4 = __commonJS({
|
|
|
42740
42679
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
42741
42680
|
}
|
|
42742
42681
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
42743
|
-
throw new Error("apiKeyConfig parameter is
|
|
42682
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42744
42683
|
}
|
|
42745
42684
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
42746
|
-
throw new Error("authType parameter is
|
|
42685
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42747
42686
|
}
|
|
42748
42687
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
42749
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
42688
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42750
42689
|
}
|
|
42751
42690
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
42752
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
42691
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42753
42692
|
}
|
|
42754
42693
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
42755
|
-
throw new Error("oauthConfig parameter is
|
|
42694
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42756
42695
|
}
|
|
42757
42696
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
42758
|
-
throw new Error("oidcConfig parameter is
|
|
42697
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42759
42698
|
}
|
|
42760
42699
|
return toObject;
|
|
42761
42700
|
}
|
|
@@ -42766,7 +42705,7 @@ var require_node4 = __commonJS({
|
|
|
42766
42705
|
setValueByPath(toObject, ["data"], fromData);
|
|
42767
42706
|
}
|
|
42768
42707
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
42769
|
-
throw new Error("displayName parameter is
|
|
42708
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42770
42709
|
}
|
|
42771
42710
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
42772
42711
|
if (fromMimeType != null) {
|
|
@@ -42963,13 +42902,13 @@ var require_node4 = __commonJS({
|
|
|
42963
42902
|
function countTokensConfigToMldev(fromObject, _rootObject) {
|
|
42964
42903
|
const toObject = {};
|
|
42965
42904
|
if (getValueByPath(fromObject, ["systemInstruction"]) !== void 0) {
|
|
42966
|
-
throw new Error("systemInstruction parameter is
|
|
42905
|
+
throw new Error("systemInstruction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42967
42906
|
}
|
|
42968
42907
|
if (getValueByPath(fromObject, ["tools"]) !== void 0) {
|
|
42969
|
-
throw new Error("tools parameter is
|
|
42908
|
+
throw new Error("tools parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42970
42909
|
}
|
|
42971
42910
|
if (getValueByPath(fromObject, ["generationConfig"]) !== void 0) {
|
|
42972
|
-
throw new Error("generationConfig parameter is
|
|
42911
|
+
throw new Error("generationConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
42973
42912
|
}
|
|
42974
42913
|
return toObject;
|
|
42975
42914
|
}
|
|
@@ -43270,16 +43209,16 @@ var require_node4 = __commonJS({
|
|
|
43270
43209
|
setValueByPath(parentObject, ["requests[]", "outputDimensionality"], fromOutputDimensionality);
|
|
43271
43210
|
}
|
|
43272
43211
|
if (getValueByPath(fromObject, ["mimeType"]) !== void 0) {
|
|
43273
|
-
throw new Error("mimeType parameter is
|
|
43212
|
+
throw new Error("mimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43274
43213
|
}
|
|
43275
43214
|
if (getValueByPath(fromObject, ["autoTruncate"]) !== void 0) {
|
|
43276
|
-
throw new Error("autoTruncate parameter is
|
|
43215
|
+
throw new Error("autoTruncate parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43277
43216
|
}
|
|
43278
43217
|
if (getValueByPath(fromObject, ["documentOcr"]) !== void 0) {
|
|
43279
|
-
throw new Error("documentOcr parameter is
|
|
43218
|
+
throw new Error("documentOcr parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43280
43219
|
}
|
|
43281
43220
|
if (getValueByPath(fromObject, ["audioTrackExtraction"]) !== void 0) {
|
|
43282
|
-
throw new Error("audioTrackExtraction parameter is
|
|
43221
|
+
throw new Error("audioTrackExtraction parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43283
43222
|
}
|
|
43284
43223
|
return toObject;
|
|
43285
43224
|
}
|
|
@@ -43557,7 +43496,7 @@ var require_node4 = __commonJS({
|
|
|
43557
43496
|
function fileDataToMldev$1(fromObject, _rootObject) {
|
|
43558
43497
|
const toObject = {};
|
|
43559
43498
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
43560
|
-
throw new Error("displayName parameter is
|
|
43499
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43561
43500
|
}
|
|
43562
43501
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
43563
43502
|
if (fromFileUri != null) {
|
|
@@ -43584,10 +43523,10 @@ var require_node4 = __commonJS({
|
|
|
43584
43523
|
setValueByPath(toObject, ["name"], fromName);
|
|
43585
43524
|
}
|
|
43586
43525
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
43587
|
-
throw new Error("partialArgs parameter is
|
|
43526
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43588
43527
|
}
|
|
43589
43528
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
43590
|
-
throw new Error("willContinue parameter is
|
|
43529
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43591
43530
|
}
|
|
43592
43531
|
return toObject;
|
|
43593
43532
|
}
|
|
@@ -43604,42 +43543,7 @@ var require_node4 = __commonJS({
|
|
|
43604
43543
|
setValueByPath(toObject, ["mode"], fromMode);
|
|
43605
43544
|
}
|
|
43606
43545
|
if (getValueByPath(fromObject, ["streamFunctionCallArguments"]) !== void 0) {
|
|
43607
|
-
throw new Error("streamFunctionCallArguments parameter is
|
|
43608
|
-
}
|
|
43609
|
-
return toObject;
|
|
43610
|
-
}
|
|
43611
|
-
function functionDeclarationToVertex(fromObject, _rootObject) {
|
|
43612
|
-
const toObject = {};
|
|
43613
|
-
const fromDescription = getValueByPath(fromObject, ["description"]);
|
|
43614
|
-
if (fromDescription != null) {
|
|
43615
|
-
setValueByPath(toObject, ["description"], fromDescription);
|
|
43616
|
-
}
|
|
43617
|
-
const fromName = getValueByPath(fromObject, ["name"]);
|
|
43618
|
-
if (fromName != null) {
|
|
43619
|
-
setValueByPath(toObject, ["name"], fromName);
|
|
43620
|
-
}
|
|
43621
|
-
const fromParameters = getValueByPath(fromObject, ["parameters"]);
|
|
43622
|
-
if (fromParameters != null) {
|
|
43623
|
-
setValueByPath(toObject, ["parameters"], fromParameters);
|
|
43624
|
-
}
|
|
43625
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
43626
|
-
"parametersJsonSchema"
|
|
43627
|
-
]);
|
|
43628
|
-
if (fromParametersJsonSchema != null) {
|
|
43629
|
-
setValueByPath(toObject, ["parametersJsonSchema"], fromParametersJsonSchema);
|
|
43630
|
-
}
|
|
43631
|
-
const fromResponse = getValueByPath(fromObject, ["response"]);
|
|
43632
|
-
if (fromResponse != null) {
|
|
43633
|
-
setValueByPath(toObject, ["response"], fromResponse);
|
|
43634
|
-
}
|
|
43635
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
43636
|
-
"responseJsonSchema"
|
|
43637
|
-
]);
|
|
43638
|
-
if (fromResponseJsonSchema != null) {
|
|
43639
|
-
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
43640
|
-
}
|
|
43641
|
-
if (getValueByPath(fromObject, ["behavior"]) !== void 0) {
|
|
43642
|
-
throw new Error("behavior parameter is not supported in Gemini Enterprise Agent Platform (previously known as Vertex AI).");
|
|
43546
|
+
throw new Error("streamFunctionCallArguments parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43643
43547
|
}
|
|
43644
43548
|
return toObject;
|
|
43645
43549
|
}
|
|
@@ -43726,10 +43630,10 @@ var require_node4 = __commonJS({
|
|
|
43726
43630
|
setValueByPath(toObject, ["responseJsonSchema"], fromResponseJsonSchema);
|
|
43727
43631
|
}
|
|
43728
43632
|
if (getValueByPath(fromObject, ["routingConfig"]) !== void 0) {
|
|
43729
|
-
throw new Error("routingConfig parameter is
|
|
43633
|
+
throw new Error("routingConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43730
43634
|
}
|
|
43731
43635
|
if (getValueByPath(fromObject, ["modelSelectionConfig"]) !== void 0) {
|
|
43732
|
-
throw new Error("modelSelectionConfig parameter is
|
|
43636
|
+
throw new Error("modelSelectionConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43733
43637
|
}
|
|
43734
43638
|
const fromSafetySettings = getValueByPath(fromObject, [
|
|
43735
43639
|
"safetySettings"
|
|
@@ -43758,7 +43662,7 @@ var require_node4 = __commonJS({
|
|
|
43758
43662
|
setValueByPath(parentObject, ["toolConfig"], toolConfigToMldev(fromToolConfig));
|
|
43759
43663
|
}
|
|
43760
43664
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
43761
|
-
throw new Error("labels parameter is
|
|
43665
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43762
43666
|
}
|
|
43763
43667
|
const fromCachedContent = getValueByPath(fromObject, [
|
|
43764
43668
|
"cachedContent"
|
|
@@ -43783,7 +43687,7 @@ var require_node4 = __commonJS({
|
|
|
43783
43687
|
setValueByPath(toObject, ["speechConfig"], tSpeechConfig(fromSpeechConfig));
|
|
43784
43688
|
}
|
|
43785
43689
|
if (getValueByPath(fromObject, ["audioTimestamp"]) !== void 0) {
|
|
43786
|
-
throw new Error("audioTimestamp parameter is
|
|
43690
|
+
throw new Error("audioTimestamp parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43787
43691
|
}
|
|
43788
43692
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
43789
43693
|
"thinkingConfig"
|
|
@@ -43802,7 +43706,7 @@ var require_node4 = __commonJS({
|
|
|
43802
43706
|
setValueByPath(toObject, ["enableEnhancedCivicAnswers"], fromEnableEnhancedCivicAnswers);
|
|
43803
43707
|
}
|
|
43804
43708
|
if (getValueByPath(fromObject, ["modelArmorConfig"]) !== void 0) {
|
|
43805
|
-
throw new Error("modelArmorConfig parameter is
|
|
43709
|
+
throw new Error("modelArmorConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
43806
43710
|
}
|
|
43807
43711
|
const fromServiceTier = getValueByPath(fromObject, ["serviceTier"]);
|
|
43808
43712
|
if (parentObject !== void 0 && fromServiceTier != null) {
|
|
@@ -43973,7 +43877,7 @@ var require_node4 = __commonJS({
|
|
|
43973
43877
|
setValueByPath(toObject, ["imageConfig"], imageConfigToVertex(fromImageConfig));
|
|
43974
43878
|
}
|
|
43975
43879
|
if (getValueByPath(fromObject, ["enableEnhancedCivicAnswers"]) !== void 0) {
|
|
43976
|
-
throw new Error("enableEnhancedCivicAnswers parameter is
|
|
43880
|
+
throw new Error("enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
43977
43881
|
}
|
|
43978
43882
|
const fromModelArmorConfig = getValueByPath(fromObject, [
|
|
43979
43883
|
"modelArmorConfig"
|
|
@@ -44122,10 +44026,10 @@ var require_node4 = __commonJS({
|
|
|
44122
44026
|
function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
44123
44027
|
const toObject = {};
|
|
44124
44028
|
if (getValueByPath(fromObject, ["outputGcsUri"]) !== void 0) {
|
|
44125
|
-
throw new Error("outputGcsUri parameter is
|
|
44029
|
+
throw new Error("outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44126
44030
|
}
|
|
44127
44031
|
if (getValueByPath(fromObject, ["negativePrompt"]) !== void 0) {
|
|
44128
|
-
throw new Error("negativePrompt parameter is
|
|
44032
|
+
throw new Error("negativePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44129
44033
|
}
|
|
44130
44034
|
const fromNumberOfImages = getValueByPath(fromObject, [
|
|
44131
44035
|
"numberOfImages"
|
|
@@ -44144,7 +44048,7 @@ var require_node4 = __commonJS({
|
|
|
44144
44048
|
setValueByPath(parentObject, ["parameters", "guidanceScale"], fromGuidanceScale);
|
|
44145
44049
|
}
|
|
44146
44050
|
if (getValueByPath(fromObject, ["seed"]) !== void 0) {
|
|
44147
|
-
throw new Error("seed parameter is
|
|
44051
|
+
throw new Error("seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44148
44052
|
}
|
|
44149
44053
|
const fromSafetyFilterLevel = getValueByPath(fromObject, [
|
|
44150
44054
|
"safetyFilterLevel"
|
|
@@ -44187,17 +44091,17 @@ var require_node4 = __commonJS({
|
|
|
44187
44091
|
setValueByPath(parentObject, ["parameters", "outputOptions", "compressionQuality"], fromOutputCompressionQuality);
|
|
44188
44092
|
}
|
|
44189
44093
|
if (getValueByPath(fromObject, ["addWatermark"]) !== void 0) {
|
|
44190
|
-
throw new Error("addWatermark parameter is
|
|
44094
|
+
throw new Error("addWatermark parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44191
44095
|
}
|
|
44192
44096
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
44193
|
-
throw new Error("labels parameter is
|
|
44097
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44194
44098
|
}
|
|
44195
44099
|
const fromImageSize = getValueByPath(fromObject, ["imageSize"]);
|
|
44196
44100
|
if (parentObject !== void 0 && fromImageSize != null) {
|
|
44197
44101
|
setValueByPath(parentObject, ["parameters", "sampleImageSize"], fromImageSize);
|
|
44198
44102
|
}
|
|
44199
44103
|
if (getValueByPath(fromObject, ["enhancePrompt"]) !== void 0) {
|
|
44200
|
-
throw new Error("enhancePrompt parameter is
|
|
44104
|
+
throw new Error("enhancePrompt parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44201
44105
|
}
|
|
44202
44106
|
return toObject;
|
|
44203
44107
|
}
|
|
@@ -44390,10 +44294,10 @@ var require_node4 = __commonJS({
|
|
|
44390
44294
|
setValueByPath(parentObject, ["parameters", "sampleCount"], fromNumberOfVideos);
|
|
44391
44295
|
}
|
|
44392
44296
|
if (getValueByPath(fromObject, ["outputGcsUri"]) !== void 0) {
|
|
44393
|
-
throw new Error("outputGcsUri parameter is
|
|
44297
|
+
throw new Error("outputGcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44394
44298
|
}
|
|
44395
44299
|
if (getValueByPath(fromObject, ["fps"]) !== void 0) {
|
|
44396
|
-
throw new Error("fps parameter is
|
|
44300
|
+
throw new Error("fps parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44397
44301
|
}
|
|
44398
44302
|
const fromDurationSeconds = getValueByPath(fromObject, [
|
|
44399
44303
|
"durationSeconds"
|
|
@@ -44402,7 +44306,7 @@ var require_node4 = __commonJS({
|
|
|
44402
44306
|
setValueByPath(parentObject, ["parameters", "durationSeconds"], fromDurationSeconds);
|
|
44403
44307
|
}
|
|
44404
44308
|
if (getValueByPath(fromObject, ["seed"]) !== void 0) {
|
|
44405
|
-
throw new Error("seed parameter is
|
|
44309
|
+
throw new Error("seed parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44406
44310
|
}
|
|
44407
44311
|
const fromAspectRatio = getValueByPath(fromObject, ["aspectRatio"]);
|
|
44408
44312
|
if (parentObject !== void 0 && fromAspectRatio != null) {
|
|
@@ -44419,7 +44323,7 @@ var require_node4 = __commonJS({
|
|
|
44419
44323
|
setValueByPath(parentObject, ["parameters", "personGeneration"], fromPersonGeneration);
|
|
44420
44324
|
}
|
|
44421
44325
|
if (getValueByPath(fromObject, ["pubsubTopic"]) !== void 0) {
|
|
44422
|
-
throw new Error("pubsubTopic parameter is
|
|
44326
|
+
throw new Error("pubsubTopic parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44423
44327
|
}
|
|
44424
44328
|
const fromNegativePrompt = getValueByPath(fromObject, [
|
|
44425
44329
|
"negativePrompt"
|
|
@@ -44434,7 +44338,7 @@ var require_node4 = __commonJS({
|
|
|
44434
44338
|
setValueByPath(parentObject, ["parameters", "enhancePrompt"], fromEnhancePrompt);
|
|
44435
44339
|
}
|
|
44436
44340
|
if (getValueByPath(fromObject, ["generateAudio"]) !== void 0) {
|
|
44437
|
-
throw new Error("generateAudio parameter is
|
|
44341
|
+
throw new Error("generateAudio parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44438
44342
|
}
|
|
44439
44343
|
const fromLastFrame = getValueByPath(fromObject, ["lastFrame"]);
|
|
44440
44344
|
if (parentObject !== void 0 && fromLastFrame != null) {
|
|
@@ -44453,13 +44357,13 @@ var require_node4 = __commonJS({
|
|
|
44453
44357
|
setValueByPath(parentObject, ["instances[0]", "referenceImages"], transformedList);
|
|
44454
44358
|
}
|
|
44455
44359
|
if (getValueByPath(fromObject, ["mask"]) !== void 0) {
|
|
44456
|
-
throw new Error("mask parameter is
|
|
44360
|
+
throw new Error("mask parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44457
44361
|
}
|
|
44458
44362
|
if (getValueByPath(fromObject, ["compressionQuality"]) !== void 0) {
|
|
44459
|
-
throw new Error("compressionQuality parameter is
|
|
44363
|
+
throw new Error("compressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44460
44364
|
}
|
|
44461
44365
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
44462
|
-
throw new Error("labels parameter is
|
|
44366
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44463
44367
|
}
|
|
44464
44368
|
const fromWebhookConfig = getValueByPath(fromObject, [
|
|
44465
44369
|
"webhookConfig"
|
|
@@ -44468,7 +44372,7 @@ var require_node4 = __commonJS({
|
|
|
44468
44372
|
setValueByPath(parentObject, ["webhookConfig"], fromWebhookConfig);
|
|
44469
44373
|
}
|
|
44470
44374
|
if (getValueByPath(fromObject, ["resizeMode"]) !== void 0) {
|
|
44471
|
-
throw new Error("resizeMode parameter is
|
|
44375
|
+
throw new Error("resizeMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
44472
44376
|
}
|
|
44473
44377
|
return toObject;
|
|
44474
44378
|
}
|
|
@@ -44565,7 +44469,7 @@ var require_node4 = __commonJS({
|
|
|
44565
44469
|
setValueByPath(parentObject, ["labels"], fromLabels);
|
|
44566
44470
|
}
|
|
44567
44471
|
if (getValueByPath(fromObject, ["webhookConfig"]) !== void 0) {
|
|
44568
|
-
throw new Error("webhookConfig parameter is
|
|
44472
|
+
throw new Error("webhookConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
44569
44473
|
}
|
|
44570
44474
|
const fromResizeMode = getValueByPath(fromObject, ["resizeMode"]);
|
|
44571
44475
|
if (parentObject !== void 0 && fromResizeMode != null) {
|
|
@@ -44963,7 +44867,7 @@ var require_node4 = __commonJS({
|
|
|
44963
44867
|
setValueByPath(toObject, ["topP"], fromTopP);
|
|
44964
44868
|
}
|
|
44965
44869
|
if (getValueByPath(fromObject, ["enableEnhancedCivicAnswers"]) !== void 0) {
|
|
44966
|
-
throw new Error("enableEnhancedCivicAnswers parameter is
|
|
44870
|
+
throw new Error("enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
44967
44871
|
}
|
|
44968
44872
|
return toObject;
|
|
44969
44873
|
}
|
|
@@ -45002,10 +44906,10 @@ var require_node4 = __commonJS({
|
|
|
45002
44906
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
45003
44907
|
}
|
|
45004
44908
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
45005
|
-
throw new Error("blockingConfidence parameter is
|
|
44909
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45006
44910
|
}
|
|
45007
44911
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
45008
|
-
throw new Error("excludeDomains parameter is
|
|
44912
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45009
44913
|
}
|
|
45010
44914
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
45011
44915
|
"timeRangeFilter"
|
|
@@ -45026,19 +44930,19 @@ var require_node4 = __commonJS({
|
|
|
45026
44930
|
setValueByPath(toObject, ["imageSize"], fromImageSize);
|
|
45027
44931
|
}
|
|
45028
44932
|
if (getValueByPath(fromObject, ["personGeneration"]) !== void 0) {
|
|
45029
|
-
throw new Error("personGeneration parameter is
|
|
44933
|
+
throw new Error("personGeneration parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45030
44934
|
}
|
|
45031
44935
|
if (getValueByPath(fromObject, ["prominentPeople"]) !== void 0) {
|
|
45032
|
-
throw new Error("prominentPeople parameter is
|
|
44936
|
+
throw new Error("prominentPeople parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45033
44937
|
}
|
|
45034
44938
|
if (getValueByPath(fromObject, ["outputMimeType"]) !== void 0) {
|
|
45035
|
-
throw new Error("outputMimeType parameter is
|
|
44939
|
+
throw new Error("outputMimeType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45036
44940
|
}
|
|
45037
44941
|
if (getValueByPath(fromObject, ["outputCompressionQuality"]) !== void 0) {
|
|
45038
|
-
throw new Error("outputCompressionQuality parameter is
|
|
44942
|
+
throw new Error("outputCompressionQuality parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45039
44943
|
}
|
|
45040
44944
|
if (getValueByPath(fromObject, ["imageOutputOptions"]) !== void 0) {
|
|
45041
|
-
throw new Error("imageOutputOptions parameter is
|
|
44945
|
+
throw new Error("imageOutputOptions parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45042
44946
|
}
|
|
45043
44947
|
return toObject;
|
|
45044
44948
|
}
|
|
@@ -45119,7 +45023,7 @@ var require_node4 = __commonJS({
|
|
|
45119
45023
|
function imageToMldev(fromObject, _rootObject) {
|
|
45120
45024
|
const toObject = {};
|
|
45121
45025
|
if (getValueByPath(fromObject, ["gcsUri"]) !== void 0) {
|
|
45122
|
-
throw new Error("gcsUri parameter is
|
|
45026
|
+
throw new Error("gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45123
45027
|
}
|
|
45124
45028
|
const fromImageBytes = getValueByPath(fromObject, ["imageBytes"]);
|
|
45125
45029
|
if (fromImageBytes != null) {
|
|
@@ -45522,13 +45426,13 @@ var require_node4 = __commonJS({
|
|
|
45522
45426
|
setValueByPath(toObject, ["videoMetadata"], fromVideoMetadata);
|
|
45523
45427
|
}
|
|
45524
45428
|
if (getValueByPath(fromObject, ["toolCall"]) !== void 0) {
|
|
45525
|
-
throw new Error("toolCall parameter is
|
|
45429
|
+
throw new Error("toolCall parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
45526
45430
|
}
|
|
45527
45431
|
if (getValueByPath(fromObject, ["toolResponse"]) !== void 0) {
|
|
45528
|
-
throw new Error("toolResponse parameter is
|
|
45432
|
+
throw new Error("toolResponse parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
45529
45433
|
}
|
|
45530
45434
|
if (getValueByPath(fromObject, ["partMetadata"]) !== void 0) {
|
|
45531
|
-
throw new Error("partMetadata parameter is
|
|
45435
|
+
throw new Error("partMetadata parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
45532
45436
|
}
|
|
45533
45437
|
return toObject;
|
|
45534
45438
|
}
|
|
@@ -45751,7 +45655,7 @@ var require_node4 = __commonJS({
|
|
|
45751
45655
|
setValueByPath(toObject, ["category"], fromCategory);
|
|
45752
45656
|
}
|
|
45753
45657
|
if (getValueByPath(fromObject, ["method"]) !== void 0) {
|
|
45754
|
-
throw new Error("method parameter is
|
|
45658
|
+
throw new Error("method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45755
45659
|
}
|
|
45756
45660
|
const fromThreshold = getValueByPath(fromObject, ["threshold"]);
|
|
45757
45661
|
if (fromThreshold != null) {
|
|
@@ -45884,14 +45788,14 @@ var require_node4 = __commonJS({
|
|
|
45884
45788
|
setValueByPath(toObject, ["functionCallingConfig"], fromFunctionCallingConfig);
|
|
45885
45789
|
}
|
|
45886
45790
|
if (getValueByPath(fromObject, ["includeServerSideToolInvocations"]) !== void 0) {
|
|
45887
|
-
throw new Error("includeServerSideToolInvocations parameter is
|
|
45791
|
+
throw new Error("includeServerSideToolInvocations parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
45888
45792
|
}
|
|
45889
45793
|
return toObject;
|
|
45890
45794
|
}
|
|
45891
45795
|
function toolToMldev$1(fromObject, rootObject) {
|
|
45892
45796
|
const toObject = {};
|
|
45893
45797
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
45894
|
-
throw new Error("retrieval parameter is
|
|
45798
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45895
45799
|
}
|
|
45896
45800
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
45897
45801
|
if (fromComputerUse != null) {
|
|
@@ -45916,7 +45820,7 @@ var require_node4 = __commonJS({
|
|
|
45916
45820
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
45917
45821
|
}
|
|
45918
45822
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
45919
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
45823
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45920
45824
|
}
|
|
45921
45825
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
45922
45826
|
"functionDeclarations"
|
|
@@ -45937,7 +45841,7 @@ var require_node4 = __commonJS({
|
|
|
45937
45841
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
45938
45842
|
}
|
|
45939
45843
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
45940
|
-
throw new Error("parallelAiSearch parameter is
|
|
45844
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
45941
45845
|
}
|
|
45942
45846
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
45943
45847
|
if (fromUrlContext != null) {
|
|
@@ -45955,7 +45859,7 @@ var require_node4 = __commonJS({
|
|
|
45955
45859
|
}
|
|
45956
45860
|
return toObject;
|
|
45957
45861
|
}
|
|
45958
|
-
function toolToVertex(fromObject,
|
|
45862
|
+
function toolToVertex(fromObject, _rootObject) {
|
|
45959
45863
|
const toObject = {};
|
|
45960
45864
|
const fromRetrieval = getValueByPath(fromObject, ["retrieval"]);
|
|
45961
45865
|
if (fromRetrieval != null) {
|
|
@@ -45966,7 +45870,7 @@ var require_node4 = __commonJS({
|
|
|
45966
45870
|
setValueByPath(toObject, ["computerUse"], fromComputerUse);
|
|
45967
45871
|
}
|
|
45968
45872
|
if (getValueByPath(fromObject, ["fileSearch"]) !== void 0) {
|
|
45969
|
-
throw new Error("fileSearch parameter is
|
|
45873
|
+
throw new Error("fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
45970
45874
|
}
|
|
45971
45875
|
const fromGoogleSearch = getValueByPath(fromObject, ["googleSearch"]);
|
|
45972
45876
|
if (fromGoogleSearch != null) {
|
|
@@ -45995,7 +45899,7 @@ var require_node4 = __commonJS({
|
|
|
45995
45899
|
let transformedList = fromFunctionDeclarations;
|
|
45996
45900
|
if (Array.isArray(transformedList)) {
|
|
45997
45901
|
transformedList = transformedList.map((item) => {
|
|
45998
|
-
return
|
|
45902
|
+
return item;
|
|
45999
45903
|
});
|
|
46000
45904
|
}
|
|
46001
45905
|
setValueByPath(toObject, ["functionDeclarations"], transformedList);
|
|
@@ -46017,7 +45921,7 @@ var require_node4 = __commonJS({
|
|
|
46017
45921
|
setValueByPath(toObject, ["urlContext"], fromUrlContext);
|
|
46018
45922
|
}
|
|
46019
45923
|
if (getValueByPath(fromObject, ["mcpServers"]) !== void 0) {
|
|
46020
|
-
throw new Error("mcpServers parameter is
|
|
45924
|
+
throw new Error("mcpServers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
46021
45925
|
}
|
|
46022
45926
|
return toObject;
|
|
46023
45927
|
}
|
|
@@ -46568,7 +46472,7 @@ var require_node4 = __commonJS({
|
|
|
46568
46472
|
var SERVER_TIMEOUT_HEADER = "X-Server-Timeout";
|
|
46569
46473
|
var USER_AGENT_HEADER = "User-Agent";
|
|
46570
46474
|
var GOOGLE_API_CLIENT_HEADER = "x-goog-api-client";
|
|
46571
|
-
var SDK_VERSION = "2.0
|
|
46475
|
+
var SDK_VERSION = "2.4.0";
|
|
46572
46476
|
var LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
46573
46477
|
var VERTEX_AI_API_DEFAULT_VERSION = "v1beta1";
|
|
46574
46478
|
var GOOGLE_AI_API_DEFAULT_VERSION = "v1beta";
|
|
@@ -48064,7 +47968,7 @@ var require_node4 = __commonJS({
|
|
|
48064
47968
|
if (this.apiClient.isVertexAI()) {
|
|
48065
47969
|
if (!actualParams.config.queryBase) {
|
|
48066
47970
|
if ((_a2 = actualParams.config) === null || _a2 === void 0 ? void 0 : _a2.filter) {
|
|
48067
|
-
throw new Error("Filtering tuned models list
|
|
47971
|
+
throw new Error("Filtering tuned models list is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
48068
47972
|
} else {
|
|
48069
47973
|
actualParams.config.filter = "labels.tune-type:*";
|
|
48070
47974
|
}
|
|
@@ -49363,7 +49267,7 @@ var require_node4 = __commonJS({
|
|
|
49363
49267
|
function audioTranscriptionConfigToMldev(fromObject) {
|
|
49364
49268
|
const toObject = {};
|
|
49365
49269
|
if (getValueByPath(fromObject, ["languageCodes"]) !== void 0) {
|
|
49366
|
-
throw new Error("languageCodes parameter is
|
|
49270
|
+
throw new Error("languageCodes parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49367
49271
|
}
|
|
49368
49272
|
return toObject;
|
|
49369
49273
|
}
|
|
@@ -49374,22 +49278,22 @@ var require_node4 = __commonJS({
|
|
|
49374
49278
|
setValueByPath(toObject, ["apiKey"], fromApiKey);
|
|
49375
49279
|
}
|
|
49376
49280
|
if (getValueByPath(fromObject, ["apiKeyConfig"]) !== void 0) {
|
|
49377
|
-
throw new Error("apiKeyConfig parameter is
|
|
49281
|
+
throw new Error("apiKeyConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49378
49282
|
}
|
|
49379
49283
|
if (getValueByPath(fromObject, ["authType"]) !== void 0) {
|
|
49380
|
-
throw new Error("authType parameter is
|
|
49284
|
+
throw new Error("authType parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49381
49285
|
}
|
|
49382
49286
|
if (getValueByPath(fromObject, ["googleServiceAccountConfig"]) !== void 0) {
|
|
49383
|
-
throw new Error("googleServiceAccountConfig parameter is
|
|
49287
|
+
throw new Error("googleServiceAccountConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49384
49288
|
}
|
|
49385
49289
|
if (getValueByPath(fromObject, ["httpBasicAuthConfig"]) !== void 0) {
|
|
49386
|
-
throw new Error("httpBasicAuthConfig parameter is
|
|
49290
|
+
throw new Error("httpBasicAuthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49387
49291
|
}
|
|
49388
49292
|
if (getValueByPath(fromObject, ["oauthConfig"]) !== void 0) {
|
|
49389
|
-
throw new Error("oauthConfig parameter is
|
|
49293
|
+
throw new Error("oauthConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49390
49294
|
}
|
|
49391
49295
|
if (getValueByPath(fromObject, ["oidcConfig"]) !== void 0) {
|
|
49392
|
-
throw new Error("oidcConfig parameter is
|
|
49296
|
+
throw new Error("oidcConfig parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49393
49297
|
}
|
|
49394
49298
|
return toObject;
|
|
49395
49299
|
}
|
|
@@ -49400,7 +49304,7 @@ var require_node4 = __commonJS({
|
|
|
49400
49304
|
setValueByPath(toObject, ["data"], fromData);
|
|
49401
49305
|
}
|
|
49402
49306
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
49403
|
-
throw new Error("displayName parameter is
|
|
49307
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49404
49308
|
}
|
|
49405
49309
|
const fromMimeType = getValueByPath(fromObject, ["mimeType"]);
|
|
49406
49310
|
if (fromMimeType != null) {
|
|
@@ -49467,7 +49371,7 @@ var require_node4 = __commonJS({
|
|
|
49467
49371
|
function fileDataToMldev(fromObject) {
|
|
49468
49372
|
const toObject = {};
|
|
49469
49373
|
if (getValueByPath(fromObject, ["displayName"]) !== void 0) {
|
|
49470
|
-
throw new Error("displayName parameter is
|
|
49374
|
+
throw new Error("displayName parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49471
49375
|
}
|
|
49472
49376
|
const fromFileUri = getValueByPath(fromObject, ["fileUri"]);
|
|
49473
49377
|
if (fromFileUri != null) {
|
|
@@ -49494,10 +49398,10 @@ var require_node4 = __commonJS({
|
|
|
49494
49398
|
setValueByPath(toObject, ["name"], fromName);
|
|
49495
49399
|
}
|
|
49496
49400
|
if (getValueByPath(fromObject, ["partialArgs"]) !== void 0) {
|
|
49497
|
-
throw new Error("partialArgs parameter is
|
|
49401
|
+
throw new Error("partialArgs parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49498
49402
|
}
|
|
49499
49403
|
if (getValueByPath(fromObject, ["willContinue"]) !== void 0) {
|
|
49500
|
-
throw new Error("willContinue parameter is
|
|
49404
|
+
throw new Error("willContinue parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49501
49405
|
}
|
|
49502
49406
|
return toObject;
|
|
49503
49407
|
}
|
|
@@ -49520,10 +49424,10 @@ var require_node4 = __commonJS({
|
|
|
49520
49424
|
setValueByPath(toObject, ["searchTypes"], fromSearchTypes);
|
|
49521
49425
|
}
|
|
49522
49426
|
if (getValueByPath(fromObject, ["blockingConfidence"]) !== void 0) {
|
|
49523
|
-
throw new Error("blockingConfidence parameter is
|
|
49427
|
+
throw new Error("blockingConfidence parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49524
49428
|
}
|
|
49525
49429
|
if (getValueByPath(fromObject, ["excludeDomains"]) !== void 0) {
|
|
49526
|
-
throw new Error("excludeDomains parameter is
|
|
49430
|
+
throw new Error("excludeDomains parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49527
49431
|
}
|
|
49528
49432
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
49529
49433
|
"timeRangeFilter"
|
|
@@ -49642,7 +49546,7 @@ var require_node4 = __commonJS({
|
|
|
49642
49546
|
setValueByPath(parentObject, ["setup", "proactivity"], fromProactivity);
|
|
49643
49547
|
}
|
|
49644
49548
|
if (getValueByPath(fromObject, ["explicitVadSignal"]) !== void 0) {
|
|
49645
|
-
throw new Error("explicitVadSignal parameter is
|
|
49549
|
+
throw new Error("explicitVadSignal parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49646
49550
|
}
|
|
49647
49551
|
const fromAvatarConfig = getValueByPath(fromObject, ["avatarConfig"]);
|
|
49648
49552
|
if (parentObject !== void 0 && fromAvatarConfig != null) {
|
|
@@ -49660,6 +49564,12 @@ var require_node4 = __commonJS({
|
|
|
49660
49564
|
}
|
|
49661
49565
|
setValueByPath(parentObject, ["setup", "safetySettings"], transformedList);
|
|
49662
49566
|
}
|
|
49567
|
+
const fromStreamTranslationConfig = getValueByPath(fromObject, [
|
|
49568
|
+
"streamTranslationConfig"
|
|
49569
|
+
]);
|
|
49570
|
+
if (parentObject !== void 0 && fromStreamTranslationConfig != null) {
|
|
49571
|
+
setValueByPath(parentObject, ["setup", "generationConfig", "streamTranslationConfig"], fromStreamTranslationConfig);
|
|
49572
|
+
}
|
|
49663
49573
|
return toObject;
|
|
49664
49574
|
}
|
|
49665
49575
|
function liveConnectConstraintsToMldev(apiClient, fromObject) {
|
|
@@ -49753,7 +49663,7 @@ var require_node4 = __commonJS({
|
|
|
49753
49663
|
setValueByPath(toObject, ["category"], fromCategory);
|
|
49754
49664
|
}
|
|
49755
49665
|
if (getValueByPath(fromObject, ["method"]) !== void 0) {
|
|
49756
|
-
throw new Error("method parameter is
|
|
49666
|
+
throw new Error("method parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49757
49667
|
}
|
|
49758
49668
|
const fromThreshold = getValueByPath(fromObject, ["threshold"]);
|
|
49759
49669
|
if (fromThreshold != null) {
|
|
@@ -49768,14 +49678,14 @@ var require_node4 = __commonJS({
|
|
|
49768
49678
|
setValueByPath(toObject, ["handle"], fromHandle);
|
|
49769
49679
|
}
|
|
49770
49680
|
if (getValueByPath(fromObject, ["transparent"]) !== void 0) {
|
|
49771
|
-
throw new Error("transparent parameter is
|
|
49681
|
+
throw new Error("transparent parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49772
49682
|
}
|
|
49773
49683
|
return toObject;
|
|
49774
49684
|
}
|
|
49775
49685
|
function toolToMldev(fromObject) {
|
|
49776
49686
|
const toObject = {};
|
|
49777
49687
|
if (getValueByPath(fromObject, ["retrieval"]) !== void 0) {
|
|
49778
|
-
throw new Error("retrieval parameter is
|
|
49688
|
+
throw new Error("retrieval parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49779
49689
|
}
|
|
49780
49690
|
const fromComputerUse = getValueByPath(fromObject, ["computerUse"]);
|
|
49781
49691
|
if (fromComputerUse != null) {
|
|
@@ -49800,7 +49710,7 @@ var require_node4 = __commonJS({
|
|
|
49800
49710
|
setValueByPath(toObject, ["codeExecution"], fromCodeExecution);
|
|
49801
49711
|
}
|
|
49802
49712
|
if (getValueByPath(fromObject, ["enterpriseWebSearch"]) !== void 0) {
|
|
49803
|
-
throw new Error("enterpriseWebSearch parameter is
|
|
49713
|
+
throw new Error("enterpriseWebSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49804
49714
|
}
|
|
49805
49715
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
49806
49716
|
"functionDeclarations"
|
|
@@ -49821,7 +49731,7 @@ var require_node4 = __commonJS({
|
|
|
49821
49731
|
setValueByPath(toObject, ["googleSearchRetrieval"], fromGoogleSearchRetrieval);
|
|
49822
49732
|
}
|
|
49823
49733
|
if (getValueByPath(fromObject, ["parallelAiSearch"]) !== void 0) {
|
|
49824
|
-
throw new Error("parallelAiSearch parameter is
|
|
49734
|
+
throw new Error("parallelAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
49825
49735
|
}
|
|
49826
49736
|
const fromUrlContext = getValueByPath(fromObject, ["urlContext"]);
|
|
49827
49737
|
if (fromUrlContext != null) {
|
|
@@ -50613,7 +50523,9 @@ var require_node4 = __commonJS({
|
|
|
50613
50523
|
};
|
|
50614
50524
|
var APIConnectionTimeoutError = class extends APIConnectionError {
|
|
50615
50525
|
constructor({ message } = {}) {
|
|
50616
|
-
super({
|
|
50526
|
+
super({
|
|
50527
|
+
message: message !== null && message !== void 0 ? message : "Request timed out. This is a client-side timeout. You can increase the timeout by setting the `timeout` argument in your request or client http options."
|
|
50528
|
+
});
|
|
50617
50529
|
}
|
|
50618
50530
|
};
|
|
50619
50531
|
var BadRequestError = class extends APIError {
|
|
@@ -50903,109 +50815,38 @@ ${underline}`);
|
|
|
50903
50815
|
return path4;
|
|
50904
50816
|
});
|
|
50905
50817
|
var path2 = /* @__PURE__ */ createPathTagFunction(encodeURIPath);
|
|
50906
|
-
var
|
|
50907
|
-
create(params, options) {
|
|
50908
|
-
var _a2;
|
|
50909
|
-
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
50910
|
-
if ("model" in body && "agent_config" in body) {
|
|
50911
|
-
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`model\` and \`agent_config\`. If specifying \`model\`, use \`generation_config\`.`);
|
|
50912
|
-
}
|
|
50913
|
-
if ("agent" in body && "generation_config" in body) {
|
|
50914
|
-
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`agent\` and \`generation_config\`. If specifying \`agent\`, use \`agent_config\`.`);
|
|
50915
|
-
}
|
|
50916
|
-
return this._client.post(path2`/${api_version}/interactions`, Object.assign(Object.assign({ body }, options), { stream: (_a2 = params.stream) !== null && _a2 !== void 0 ? _a2 : false }));
|
|
50917
|
-
}
|
|
50918
|
-
/**
|
|
50919
|
-
* Deletes the interaction by id.
|
|
50920
|
-
*
|
|
50921
|
-
* @example
|
|
50922
|
-
* ```ts
|
|
50923
|
-
* const interaction = await client.interactions.delete('id', {
|
|
50924
|
-
* api_version: 'api_version',
|
|
50925
|
-
* });
|
|
50926
|
-
* ```
|
|
50927
|
-
*/
|
|
50928
|
-
delete(id, params = {}, options) {
|
|
50929
|
-
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
50930
|
-
return this._client.delete(path2`/${api_version}/interactions/${id}`, options);
|
|
50931
|
-
}
|
|
50818
|
+
var BaseAgents = class extends APIResource {
|
|
50932
50819
|
/**
|
|
50933
|
-
*
|
|
50934
|
-
* are still running.
|
|
50935
|
-
*
|
|
50936
|
-
* @example
|
|
50937
|
-
* ```ts
|
|
50938
|
-
* const interaction = await client.interactions.cancel('id', {
|
|
50939
|
-
* api_version: 'api_version',
|
|
50940
|
-
* });
|
|
50941
|
-
* ```
|
|
50820
|
+
* Creates a new Agent (Typed version for SDK).
|
|
50942
50821
|
*/
|
|
50943
|
-
|
|
50944
|
-
const
|
|
50945
|
-
return this._client.post(path2`/${api_version}/
|
|
50946
|
-
}
|
|
50947
|
-
get(id, params = {}, options) {
|
|
50948
|
-
var _a2;
|
|
50949
|
-
const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
|
|
50950
|
-
return this._client.get(path2`/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a2 = params === null || params === void 0 ? void 0 : params.stream) !== null && _a2 !== void 0 ? _a2 : false }));
|
|
50951
|
-
}
|
|
50952
|
-
};
|
|
50953
|
-
BaseInteractions._key = Object.freeze(["interactions"]);
|
|
50954
|
-
var Interactions = class extends BaseInteractions {
|
|
50955
|
-
};
|
|
50956
|
-
var BaseWebhooks = class extends APIResource {
|
|
50957
|
-
/**
|
|
50958
|
-
* Creates a new Webhook.
|
|
50959
|
-
*/
|
|
50960
|
-
create(params, options) {
|
|
50961
|
-
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
50962
|
-
return this._client.post(path2`/${api_version}/webhooks`, Object.assign({ body }, options));
|
|
50963
|
-
}
|
|
50964
|
-
/**
|
|
50965
|
-
* Updates an existing Webhook.
|
|
50966
|
-
*/
|
|
50967
|
-
update(id, params = {}, options) {
|
|
50968
|
-
const _a2 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion, update_mask } = _a2, body = __rest(_a2, ["api_version", "update_mask"]);
|
|
50969
|
-
return this._client.patch(path2`/${api_version}/webhooks/${id}`, Object.assign({ query: { update_mask }, body }, options));
|
|
50822
|
+
create(params = {}, options) {
|
|
50823
|
+
const _a2 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a2, body = __rest(_a2, ["api_version"]);
|
|
50824
|
+
return this._client.post(path2`/${api_version}/agents`, Object.assign({ body }, options));
|
|
50970
50825
|
}
|
|
50971
50826
|
/**
|
|
50972
|
-
* Lists all
|
|
50827
|
+
* Lists all Agents.
|
|
50973
50828
|
*/
|
|
50974
50829
|
list(params = {}, options) {
|
|
50975
50830
|
const _a2 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a2, query = __rest(_a2, ["api_version"]);
|
|
50976
|
-
return this._client.get(path2`/${api_version}/
|
|
50831
|
+
return this._client.get(path2`/${api_version}/agents`, Object.assign({ query }, options));
|
|
50977
50832
|
}
|
|
50978
50833
|
/**
|
|
50979
|
-
* Deletes
|
|
50834
|
+
* Deletes an Agent.
|
|
50980
50835
|
*/
|
|
50981
50836
|
delete(id, params = {}, options) {
|
|
50982
50837
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
50983
|
-
return this._client.delete(path2`/${api_version}/
|
|
50838
|
+
return this._client.delete(path2`/${api_version}/agents/${id}`, options);
|
|
50984
50839
|
}
|
|
50985
50840
|
/**
|
|
50986
|
-
* Gets a specific
|
|
50841
|
+
* Gets a specific Agent.
|
|
50987
50842
|
*/
|
|
50988
50843
|
get(id, params = {}, options) {
|
|
50989
50844
|
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
50990
|
-
return this._client.get(path2`/${api_version}/
|
|
50991
|
-
}
|
|
50992
|
-
/**
|
|
50993
|
-
* Sends a ping event to a Webhook.
|
|
50994
|
-
*/
|
|
50995
|
-
ping(id, params = void 0, options) {
|
|
50996
|
-
const { api_version = this._client.apiVersion, body } = params !== null && params !== void 0 ? params : {};
|
|
50997
|
-
return this._client.post(path2`/${api_version}/webhooks/${id}:ping`, Object.assign({ body }, options));
|
|
50998
|
-
}
|
|
50999
|
-
/**
|
|
51000
|
-
* Generates a new signing secret for a Webhook.
|
|
51001
|
-
*/
|
|
51002
|
-
rotateSigningSecret(id, params = {}, options) {
|
|
51003
|
-
const _a2 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a2, body = __rest(_a2, ["api_version"]);
|
|
51004
|
-
return this._client.post(path2`/${api_version}/webhooks/${id}:rotateSigningSecret`, Object.assign({ body }, options));
|
|
50845
|
+
return this._client.get(path2`/${api_version}/agents/${id}`, options);
|
|
51005
50846
|
}
|
|
51006
50847
|
};
|
|
51007
|
-
|
|
51008
|
-
var
|
|
50848
|
+
BaseAgents._key = Object.freeze(["agents"]);
|
|
50849
|
+
var Agents = class extends BaseAgents {
|
|
51009
50850
|
};
|
|
51010
50851
|
function concatBytes(buffers) {
|
|
51011
50852
|
let length = 0;
|
|
@@ -51472,6 +51313,267 @@ ${underline}`);
|
|
|
51472
51313
|
}
|
|
51473
51314
|
return [str, "", ""];
|
|
51474
51315
|
}
|
|
51316
|
+
var LEGACY_LYRIA_MODELS = /* @__PURE__ */ new Set([
|
|
51317
|
+
"lyria-3-pro-preview",
|
|
51318
|
+
"lyria-3-clip-preview"
|
|
51319
|
+
]);
|
|
51320
|
+
var LEGACY_EVENT_TYPE_RENAMES = {
|
|
51321
|
+
"interaction.start": "interaction.created",
|
|
51322
|
+
"content.start": "step.start",
|
|
51323
|
+
"content.delta": "step.delta",
|
|
51324
|
+
"content.stop": "step.stop",
|
|
51325
|
+
"interaction.complete": "interaction.completed"
|
|
51326
|
+
};
|
|
51327
|
+
function isLegacyLyriaRequest({ isVertex, model }) {
|
|
51328
|
+
return Boolean(isVertex) && typeof model === "string" && LEGACY_LYRIA_MODELS.has(model);
|
|
51329
|
+
}
|
|
51330
|
+
function isVertexClient(client) {
|
|
51331
|
+
const adapter = client.clientAdapter;
|
|
51332
|
+
return Boolean(adapter && adapter.isVertexAI());
|
|
51333
|
+
}
|
|
51334
|
+
function isPlainObject(value) {
|
|
51335
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
51336
|
+
}
|
|
51337
|
+
function wrapOutputsAsSteps(data) {
|
|
51338
|
+
if (!("outputs" in data) || "steps" in data) {
|
|
51339
|
+
return data;
|
|
51340
|
+
}
|
|
51341
|
+
const { outputs } = data, rest = __rest(data, ["outputs"]);
|
|
51342
|
+
return Object.assign(Object.assign({}, rest), { steps: [{ type: "model_output", content: outputs }] });
|
|
51343
|
+
}
|
|
51344
|
+
function coerceLegacyInteractionResponse(data) {
|
|
51345
|
+
if (!isPlainObject(data))
|
|
51346
|
+
return data;
|
|
51347
|
+
return wrapOutputsAsSteps(data);
|
|
51348
|
+
}
|
|
51349
|
+
function maybeRemapLegacyStreamEvent(data) {
|
|
51350
|
+
if (!isPlainObject(data))
|
|
51351
|
+
return data;
|
|
51352
|
+
const eventType = data["event_type"];
|
|
51353
|
+
if (typeof eventType !== "string" || !(eventType in LEGACY_EVENT_TYPE_RENAMES)) {
|
|
51354
|
+
return data;
|
|
51355
|
+
}
|
|
51356
|
+
const renamed = Object.assign(Object.assign({}, data), { event_type: LEGACY_EVENT_TYPE_RENAMES[eventType] });
|
|
51357
|
+
if (eventType === "content.start") {
|
|
51358
|
+
const { content } = renamed, rest = __rest(renamed, ["content"]);
|
|
51359
|
+
let stepContent;
|
|
51360
|
+
if (content == null) {
|
|
51361
|
+
stepContent = [];
|
|
51362
|
+
} else if (Array.isArray(content)) {
|
|
51363
|
+
stepContent = content;
|
|
51364
|
+
} else {
|
|
51365
|
+
stepContent = [content];
|
|
51366
|
+
}
|
|
51367
|
+
return Object.assign(Object.assign({}, rest), { step: { type: "model_output", content: stepContent } });
|
|
51368
|
+
}
|
|
51369
|
+
if (eventType === "interaction.start" || eventType === "interaction.complete") {
|
|
51370
|
+
const inner = renamed["interaction"];
|
|
51371
|
+
if (isPlainObject(inner)) {
|
|
51372
|
+
renamed["interaction"] = wrapOutputsAsSteps(inner);
|
|
51373
|
+
}
|
|
51374
|
+
}
|
|
51375
|
+
return renamed;
|
|
51376
|
+
}
|
|
51377
|
+
var LegacyLyriaStream = class _LegacyLyriaStream extends Stream3 {
|
|
51378
|
+
static fromSSEResponse(response, controller, client) {
|
|
51379
|
+
const base = Stream3.fromSSEResponse(response, controller, client);
|
|
51380
|
+
function wrappedIterator() {
|
|
51381
|
+
return __asyncGenerator(this, arguments, function* wrappedIterator_1() {
|
|
51382
|
+
var _a2, e_1, _b, _c;
|
|
51383
|
+
try {
|
|
51384
|
+
for (var _d = true, base_1 = __asyncValues(base), base_1_1; base_1_1 = yield __await(base_1.next()), _a2 = base_1_1.done, !_a2; _d = true) {
|
|
51385
|
+
_c = base_1_1.value;
|
|
51386
|
+
_d = false;
|
|
51387
|
+
const item = _c;
|
|
51388
|
+
yield yield __await(maybeRemapLegacyStreamEvent(item));
|
|
51389
|
+
}
|
|
51390
|
+
} catch (e_1_1) {
|
|
51391
|
+
e_1 = { error: e_1_1 };
|
|
51392
|
+
} finally {
|
|
51393
|
+
try {
|
|
51394
|
+
if (!_d && !_a2 && (_b = base_1.return)) yield __await(_b.call(base_1));
|
|
51395
|
+
} finally {
|
|
51396
|
+
if (e_1) throw e_1.error;
|
|
51397
|
+
}
|
|
51398
|
+
}
|
|
51399
|
+
});
|
|
51400
|
+
}
|
|
51401
|
+
return new _LegacyLyriaStream(wrappedIterator, controller, client);
|
|
51402
|
+
}
|
|
51403
|
+
};
|
|
51404
|
+
var BaseInteractions = class extends APIResource {
|
|
51405
|
+
create(params, options) {
|
|
51406
|
+
var _a2;
|
|
51407
|
+
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
51408
|
+
if ("model" in body && "agent_config" in body) {
|
|
51409
|
+
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`model\` and \`agent_config\`. If specifying \`model\`, use \`generation_config\`.`);
|
|
51410
|
+
}
|
|
51411
|
+
if ("agent" in body && "generation_config" in body) {
|
|
51412
|
+
throw new GeminiNextGenAPIClientError(`Invalid request: specified \`agent\` and \`generation_config\`. If specifying \`agent\`, use \`agent_config\`.`);
|
|
51413
|
+
}
|
|
51414
|
+
const needsLegacyLyriaShim = isLegacyLyriaRequest({
|
|
51415
|
+
isVertex: isVertexClient(this._client),
|
|
51416
|
+
model: "model" in body ? body.model : void 0
|
|
51417
|
+
});
|
|
51418
|
+
const isStreaming = (_a2 = params.stream) !== null && _a2 !== void 0 ? _a2 : false;
|
|
51419
|
+
const promise = this._client.post(path2`/${api_version}/interactions`, Object.assign(Object.assign(Object.assign({ body }, options), { stream: isStreaming }), needsLegacyLyriaShim && isStreaming ? { __streamClass: LegacyLyriaStream } : {}));
|
|
51420
|
+
if (isStreaming) {
|
|
51421
|
+
return promise;
|
|
51422
|
+
}
|
|
51423
|
+
let nonStreaming = promise;
|
|
51424
|
+
if (needsLegacyLyriaShim) {
|
|
51425
|
+
nonStreaming = nonStreaming._thenUnwrap((data) => coerceLegacyInteractionResponse(data));
|
|
51426
|
+
}
|
|
51427
|
+
return nonStreaming._thenUnwrap(addOutputProperties);
|
|
51428
|
+
}
|
|
51429
|
+
/**
|
|
51430
|
+
* Deletes the interaction by id.
|
|
51431
|
+
*
|
|
51432
|
+
* @example
|
|
51433
|
+
* ```ts
|
|
51434
|
+
* const interaction = await client.interactions.delete('id', {
|
|
51435
|
+
* api_version: 'api_version',
|
|
51436
|
+
* });
|
|
51437
|
+
* ```
|
|
51438
|
+
*/
|
|
51439
|
+
delete(id, params = {}, options) {
|
|
51440
|
+
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
51441
|
+
return this._client.delete(path2`/${api_version}/interactions/${id}`, options);
|
|
51442
|
+
}
|
|
51443
|
+
/**
|
|
51444
|
+
* Cancels an interaction by id. This only applies to background interactions that
|
|
51445
|
+
* are still running.
|
|
51446
|
+
*
|
|
51447
|
+
* @example
|
|
51448
|
+
* ```ts
|
|
51449
|
+
* const interaction = await client.interactions.cancel('id', {
|
|
51450
|
+
* api_version: 'api_version',
|
|
51451
|
+
* });
|
|
51452
|
+
* ```
|
|
51453
|
+
*/
|
|
51454
|
+
cancel(id, params = {}, options) {
|
|
51455
|
+
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
51456
|
+
return this._client.post(path2`/${api_version}/interactions/${id}/cancel`, options)._thenUnwrap(addOutputProperties);
|
|
51457
|
+
}
|
|
51458
|
+
get(id, params = {}, options) {
|
|
51459
|
+
var _a2;
|
|
51460
|
+
const _b = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _b, query = __rest(_b, ["api_version"]);
|
|
51461
|
+
const response = this._client.get(path2`/${api_version}/interactions/${id}`, Object.assign(Object.assign({ query }, options), { stream: (_a2 = params === null || params === void 0 ? void 0 : params.stream) !== null && _a2 !== void 0 ? _a2 : false }));
|
|
51462
|
+
if (params === null || params === void 0 ? void 0 : params.stream) {
|
|
51463
|
+
return response;
|
|
51464
|
+
}
|
|
51465
|
+
return response._thenUnwrap(addOutputProperties);
|
|
51466
|
+
}
|
|
51467
|
+
};
|
|
51468
|
+
BaseInteractions._key = Object.freeze(["interactions"]);
|
|
51469
|
+
var Interactions = class extends BaseInteractions {
|
|
51470
|
+
};
|
|
51471
|
+
function addOutputProperties(interaction) {
|
|
51472
|
+
var _a2, _b;
|
|
51473
|
+
const steps = (_a2 = interaction.steps) !== null && _a2 !== void 0 ? _a2 : [];
|
|
51474
|
+
const textParts = [];
|
|
51475
|
+
let collecting = false;
|
|
51476
|
+
outer: for (let i2 = steps.length - 1; i2 >= 0; i2--) {
|
|
51477
|
+
const step = steps[i2];
|
|
51478
|
+
if (step.type === "user_input")
|
|
51479
|
+
break;
|
|
51480
|
+
if (step.type !== "model_output" || !step.content) {
|
|
51481
|
+
if (collecting)
|
|
51482
|
+
break outer;
|
|
51483
|
+
continue;
|
|
51484
|
+
}
|
|
51485
|
+
const content = step.content;
|
|
51486
|
+
for (let j = content.length - 1; j >= 0; j--) {
|
|
51487
|
+
const item = content[j];
|
|
51488
|
+
if (item.type === "text") {
|
|
51489
|
+
collecting = true;
|
|
51490
|
+
textParts.push((_b = item.text) !== null && _b !== void 0 ? _b : "");
|
|
51491
|
+
} else if (collecting) {
|
|
51492
|
+
break outer;
|
|
51493
|
+
}
|
|
51494
|
+
}
|
|
51495
|
+
}
|
|
51496
|
+
const output_text = textParts.reverse().join("");
|
|
51497
|
+
let output_image;
|
|
51498
|
+
let output_audio;
|
|
51499
|
+
let output_video;
|
|
51500
|
+
for (let i2 = steps.length - 1; i2 >= 0; i2--) {
|
|
51501
|
+
const step = steps[i2];
|
|
51502
|
+
const anyStep = step;
|
|
51503
|
+
if (anyStep.type === "user_input") {
|
|
51504
|
+
break;
|
|
51505
|
+
}
|
|
51506
|
+
if (anyStep.type === "model_output" && anyStep.content) {
|
|
51507
|
+
for (let j = anyStep.content.length - 1; j >= 0; j--) {
|
|
51508
|
+
const content = anyStep.content[j];
|
|
51509
|
+
if (content.type === "image" && !output_image) {
|
|
51510
|
+
output_image = content;
|
|
51511
|
+
}
|
|
51512
|
+
if (content.type === "audio" && !output_audio) {
|
|
51513
|
+
output_audio = content;
|
|
51514
|
+
}
|
|
51515
|
+
if (content.type === "video" && !output_video) {
|
|
51516
|
+
output_video = content;
|
|
51517
|
+
}
|
|
51518
|
+
}
|
|
51519
|
+
}
|
|
51520
|
+
}
|
|
51521
|
+
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 });
|
|
51522
|
+
}
|
|
51523
|
+
var BaseWebhooks = class extends APIResource {
|
|
51524
|
+
/**
|
|
51525
|
+
* Creates a new Webhook.
|
|
51526
|
+
*/
|
|
51527
|
+
create(params, options) {
|
|
51528
|
+
const { api_version = this._client.apiVersion } = params, body = __rest(params, ["api_version"]);
|
|
51529
|
+
return this._client.post(path2`/${api_version}/webhooks`, Object.assign({ body }, options));
|
|
51530
|
+
}
|
|
51531
|
+
/**
|
|
51532
|
+
* Updates an existing Webhook.
|
|
51533
|
+
*/
|
|
51534
|
+
update(id, params = {}, options) {
|
|
51535
|
+
const _a2 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion, update_mask } = _a2, body = __rest(_a2, ["api_version", "update_mask"]);
|
|
51536
|
+
return this._client.patch(path2`/${api_version}/webhooks/${id}`, Object.assign({ query: { update_mask }, body }, options));
|
|
51537
|
+
}
|
|
51538
|
+
/**
|
|
51539
|
+
* Lists all Webhooks.
|
|
51540
|
+
*/
|
|
51541
|
+
list(params = {}, options) {
|
|
51542
|
+
const _a2 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a2, query = __rest(_a2, ["api_version"]);
|
|
51543
|
+
return this._client.get(path2`/${api_version}/webhooks`, Object.assign({ query }, options));
|
|
51544
|
+
}
|
|
51545
|
+
/**
|
|
51546
|
+
* Deletes a Webhook.
|
|
51547
|
+
*/
|
|
51548
|
+
delete(id, params = {}, options) {
|
|
51549
|
+
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
51550
|
+
return this._client.delete(path2`/${api_version}/webhooks/${id}`, options);
|
|
51551
|
+
}
|
|
51552
|
+
/**
|
|
51553
|
+
* Gets a specific Webhook.
|
|
51554
|
+
*/
|
|
51555
|
+
get(id, params = {}, options) {
|
|
51556
|
+
const { api_version = this._client.apiVersion } = params !== null && params !== void 0 ? params : {};
|
|
51557
|
+
return this._client.get(path2`/${api_version}/webhooks/${id}`, options);
|
|
51558
|
+
}
|
|
51559
|
+
/**
|
|
51560
|
+
* Sends a ping event to a Webhook.
|
|
51561
|
+
*/
|
|
51562
|
+
ping(id, params = void 0, options) {
|
|
51563
|
+
const { api_version = this._client.apiVersion, body } = params !== null && params !== void 0 ? params : {};
|
|
51564
|
+
return this._client.post(path2`/${api_version}/webhooks/${id}:ping`, Object.assign({ body }, options));
|
|
51565
|
+
}
|
|
51566
|
+
/**
|
|
51567
|
+
* Generates a new signing secret for a Webhook.
|
|
51568
|
+
*/
|
|
51569
|
+
rotateSigningSecret(id, params = {}, options) {
|
|
51570
|
+
const _a2 = params !== null && params !== void 0 ? params : {}, { api_version = this._client.apiVersion } = _a2, body = __rest(_a2, ["api_version"]);
|
|
51571
|
+
return this._client.post(path2`/${api_version}/webhooks/${id}:rotateSigningSecret`, Object.assign({ body }, options));
|
|
51572
|
+
}
|
|
51573
|
+
};
|
|
51574
|
+
BaseWebhooks._key = Object.freeze(["webhooks"]);
|
|
51575
|
+
var Webhooks = class extends BaseWebhooks {
|
|
51576
|
+
};
|
|
51475
51577
|
async function defaultParseResponse(client, props) {
|
|
51476
51578
|
const { response, requestLogID, retryOfRequestLogID, startTime } = props;
|
|
51477
51579
|
const body = await (async () => {
|
|
@@ -52019,6 +52121,7 @@ ${underline}`);
|
|
|
52019
52121
|
super(...arguments);
|
|
52020
52122
|
this.interactions = new Interactions(this);
|
|
52021
52123
|
this.webhooks = new Webhooks(this);
|
|
52124
|
+
this.agents = new Agents(this);
|
|
52022
52125
|
}
|
|
52023
52126
|
};
|
|
52024
52127
|
_a = GeminiNextGenAPIClient;
|
|
@@ -52039,6 +52142,7 @@ ${underline}`);
|
|
|
52039
52142
|
GeminiNextGenAPIClient.toFile = toFile;
|
|
52040
52143
|
GeminiNextGenAPIClient.Interactions = Interactions;
|
|
52041
52144
|
GeminiNextGenAPIClient.Webhooks = Webhooks;
|
|
52145
|
+
GeminiNextGenAPIClient.Agents = Agents;
|
|
52042
52146
|
var GOOGLE_API_KEY_HEADER = "x-goog-api-key";
|
|
52043
52147
|
var REQUIRED_VERTEX_AI_SCOPE = "https://www.googleapis.com/auth/cloud-platform";
|
|
52044
52148
|
var NodeAuth = class {
|
|
@@ -52222,7 +52326,7 @@ ${underline}`);
|
|
|
52222
52326
|
function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
52223
52327
|
const toObject = {};
|
|
52224
52328
|
if (getValueByPath(fromObject, ["validationDataset"]) !== void 0) {
|
|
52225
|
-
throw new Error("validationDataset parameter is
|
|
52329
|
+
throw new Error("validationDataset parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52226
52330
|
}
|
|
52227
52331
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
52228
52332
|
"tunedModelDisplayName"
|
|
@@ -52231,7 +52335,7 @@ ${underline}`);
|
|
|
52231
52335
|
setValueByPath(parentObject, ["displayName"], fromTunedModelDisplayName);
|
|
52232
52336
|
}
|
|
52233
52337
|
if (getValueByPath(fromObject, ["description"]) !== void 0) {
|
|
52234
|
-
throw new Error("description parameter is
|
|
52338
|
+
throw new Error("description parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52235
52339
|
}
|
|
52236
52340
|
const fromEpochCount = getValueByPath(fromObject, ["epochCount"]);
|
|
52237
52341
|
if (parentObject !== void 0 && fromEpochCount != null) {
|
|
@@ -52244,19 +52348,19 @@ ${underline}`);
|
|
|
52244
52348
|
setValueByPath(toObject, ["tuningTask", "hyperparameters", "learningRateMultiplier"], fromLearningRateMultiplier);
|
|
52245
52349
|
}
|
|
52246
52350
|
if (getValueByPath(fromObject, ["exportLastCheckpointOnly"]) !== void 0) {
|
|
52247
|
-
throw new Error("exportLastCheckpointOnly parameter is
|
|
52351
|
+
throw new Error("exportLastCheckpointOnly parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52248
52352
|
}
|
|
52249
52353
|
if (getValueByPath(fromObject, ["preTunedModelCheckpointId"]) !== void 0) {
|
|
52250
|
-
throw new Error("preTunedModelCheckpointId parameter is
|
|
52354
|
+
throw new Error("preTunedModelCheckpointId parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52251
52355
|
}
|
|
52252
52356
|
if (getValueByPath(fromObject, ["adapterSize"]) !== void 0) {
|
|
52253
|
-
throw new Error("adapterSize parameter is
|
|
52357
|
+
throw new Error("adapterSize parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52254
52358
|
}
|
|
52255
52359
|
if (getValueByPath(fromObject, ["tuningMode"]) !== void 0) {
|
|
52256
|
-
throw new Error("tuningMode parameter is
|
|
52360
|
+
throw new Error("tuningMode parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52257
52361
|
}
|
|
52258
52362
|
if (getValueByPath(fromObject, ["customBaseModel"]) !== void 0) {
|
|
52259
|
-
throw new Error("customBaseModel parameter is
|
|
52363
|
+
throw new Error("customBaseModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52260
52364
|
}
|
|
52261
52365
|
const fromBatchSize = getValueByPath(fromObject, ["batchSize"]);
|
|
52262
52366
|
if (parentObject !== void 0 && fromBatchSize != null) {
|
|
@@ -52267,25 +52371,25 @@ ${underline}`);
|
|
|
52267
52371
|
setValueByPath(parentObject, ["tuningTask", "hyperparameters", "learningRate"], fromLearningRate);
|
|
52268
52372
|
}
|
|
52269
52373
|
if (getValueByPath(fromObject, ["labels"]) !== void 0) {
|
|
52270
|
-
throw new Error("labels parameter is
|
|
52374
|
+
throw new Error("labels parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52271
52375
|
}
|
|
52272
52376
|
if (getValueByPath(fromObject, ["beta"]) !== void 0) {
|
|
52273
|
-
throw new Error("beta parameter is
|
|
52377
|
+
throw new Error("beta parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52274
52378
|
}
|
|
52275
52379
|
if (getValueByPath(fromObject, ["baseTeacherModel"]) !== void 0) {
|
|
52276
|
-
throw new Error("baseTeacherModel parameter is
|
|
52380
|
+
throw new Error("baseTeacherModel parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52277
52381
|
}
|
|
52278
52382
|
if (getValueByPath(fromObject, ["tunedTeacherModelSource"]) !== void 0) {
|
|
52279
|
-
throw new Error("tunedTeacherModelSource parameter is
|
|
52383
|
+
throw new Error("tunedTeacherModelSource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52280
52384
|
}
|
|
52281
52385
|
if (getValueByPath(fromObject, ["sftLossWeightMultiplier"]) !== void 0) {
|
|
52282
|
-
throw new Error("sftLossWeightMultiplier parameter is
|
|
52386
|
+
throw new Error("sftLossWeightMultiplier parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52283
52387
|
}
|
|
52284
52388
|
if (getValueByPath(fromObject, ["outputUri"]) !== void 0) {
|
|
52285
|
-
throw new Error("outputUri parameter is
|
|
52389
|
+
throw new Error("outputUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52286
52390
|
}
|
|
52287
52391
|
if (getValueByPath(fromObject, ["encryptionSpec"]) !== void 0) {
|
|
52288
|
-
throw new Error("encryptionSpec parameter is
|
|
52392
|
+
throw new Error("encryptionSpec parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52289
52393
|
}
|
|
52290
52394
|
return toObject;
|
|
52291
52395
|
}
|
|
@@ -52666,10 +52770,10 @@ ${underline}`);
|
|
|
52666
52770
|
function tuningDatasetToMldev(fromObject, _rootObject) {
|
|
52667
52771
|
const toObject = {};
|
|
52668
52772
|
if (getValueByPath(fromObject, ["gcsUri"]) !== void 0) {
|
|
52669
|
-
throw new Error("gcsUri parameter is
|
|
52773
|
+
throw new Error("gcsUri parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52670
52774
|
}
|
|
52671
52775
|
if (getValueByPath(fromObject, ["vertexDatasetResource"]) !== void 0) {
|
|
52672
|
-
throw new Error("vertexDatasetResource parameter is
|
|
52776
|
+
throw new Error("vertexDatasetResource parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.");
|
|
52673
52777
|
}
|
|
52674
52778
|
const fromExamples = getValueByPath(fromObject, ["examples"]);
|
|
52675
52779
|
if (fromExamples != null) {
|
|
@@ -52738,7 +52842,7 @@ ${underline}`);
|
|
|
52738
52842
|
}
|
|
52739
52843
|
}
|
|
52740
52844
|
if (getValueByPath(fromObject, ["examples"]) !== void 0) {
|
|
52741
|
-
throw new Error("examples parameter is
|
|
52845
|
+
throw new Error("examples parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.");
|
|
52742
52846
|
}
|
|
52743
52847
|
return toObject;
|
|
52744
52848
|
}
|
|
@@ -53650,6 +53754,7 @@ ${underline}`);
|
|
|
53650
53754
|
if (this._interactions !== void 0) {
|
|
53651
53755
|
return this._interactions;
|
|
53652
53756
|
}
|
|
53757
|
+
console.warn("GoogleGenAI.interactions: Interactions usage is experimental and may change in future versions.");
|
|
53653
53758
|
this._interactions = this.getNextGenClient().interactions;
|
|
53654
53759
|
return this._interactions;
|
|
53655
53760
|
}
|
|
@@ -53660,6 +53765,14 @@ ${underline}`);
|
|
|
53660
53765
|
this._webhooks = this.getNextGenClient().webhooks;
|
|
53661
53766
|
return this._webhooks;
|
|
53662
53767
|
}
|
|
53768
|
+
get agents() {
|
|
53769
|
+
if (this._agents !== void 0) {
|
|
53770
|
+
return this._agents;
|
|
53771
|
+
}
|
|
53772
|
+
console.warn("GoogleGenAI.agents: Agents usage is experimental and may change in future versions.");
|
|
53773
|
+
this._agents = this.getNextGenClient().agents;
|
|
53774
|
+
return this._agents;
|
|
53775
|
+
}
|
|
53663
53776
|
constructor(options) {
|
|
53664
53777
|
var _a2, _b, _c, _d;
|
|
53665
53778
|
if ((options.project || options.location) && options.apiKey) {
|
|
@@ -54916,7 +55029,7 @@ var path = require("path");
|
|
|
54916
55029
|
var args = process.argv.slice(2);
|
|
54917
55030
|
if (args.length === 0) {
|
|
54918
55031
|
console.log(`
|
|
54919
|
-
Sesi Programming Language v1.2.
|
|
55032
|
+
Sesi Programming Language v1.2.1
|
|
54920
55033
|
|
|
54921
55034
|
Usage:
|
|
54922
55035
|
sesi <file> Run a Sesi program
|
|
@@ -54942,11 +55055,11 @@ if (args[0] === "--help" || args[0] === "-help" || args[0] === "-h") {
|
|
|
54942
55055
|
fs2.writeFileSync("query.txt", queryText, "utf-8");
|
|
54943
55056
|
const copilotPath = path.join(__dirname, "../main/sesi_db_chatbot.sesi");
|
|
54944
55057
|
runSesiFile(copilotPath).catch((error) => {
|
|
54945
|
-
console.error("Fatal error in
|
|
55058
|
+
console.error("Fatal error in Sesi Co-Pilot:", error.message);
|
|
54946
55059
|
process.exit(1);
|
|
54947
55060
|
});
|
|
54948
55061
|
} else if (args[0] === "--version") {
|
|
54949
|
-
console.log("Sesi v1.2.
|
|
55062
|
+
console.log("Sesi v1.2.1");
|
|
54950
55063
|
process.exit(0);
|
|
54951
55064
|
} else {
|
|
54952
55065
|
const filePath = args[0];
|