@google/genai 1.42.0 → 1.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/genai.d.ts +910 -378
- package/dist/index.cjs +651 -402
- package/dist/index.mjs +651 -403
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +652 -403
- package/dist/node/index.mjs +652 -404
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +910 -378
- package/dist/tokenizer/node.cjs +207 -87
- package/dist/tokenizer/node.d.ts +144 -86
- package/dist/tokenizer/node.mjs +207 -87
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/web/index.mjs +651 -403
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +910 -378
- package/package.json +5 -1
package/dist/node/index.mjs
CHANGED
|
@@ -646,7 +646,7 @@ var FunctionResponseScheduling;
|
|
|
646
646
|
*/
|
|
647
647
|
FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
|
|
648
648
|
})(FunctionResponseScheduling || (FunctionResponseScheduling = {}));
|
|
649
|
-
/**
|
|
649
|
+
/** Data type of the schema field. */
|
|
650
650
|
var Type;
|
|
651
651
|
(function (Type) {
|
|
652
652
|
/**
|
|
@@ -682,22 +682,38 @@ var Type;
|
|
|
682
682
|
*/
|
|
683
683
|
Type["NULL"] = "NULL";
|
|
684
684
|
})(Type || (Type = {}));
|
|
685
|
-
/**
|
|
686
|
-
var
|
|
687
|
-
(function (
|
|
685
|
+
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
686
|
+
var PhishBlockThreshold;
|
|
687
|
+
(function (PhishBlockThreshold) {
|
|
688
688
|
/**
|
|
689
|
-
*
|
|
689
|
+
* Defaults to unspecified.
|
|
690
690
|
*/
|
|
691
|
-
|
|
691
|
+
PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
692
692
|
/**
|
|
693
|
-
*
|
|
693
|
+
* Blocks Low and above confidence URL that is risky.
|
|
694
694
|
*/
|
|
695
|
-
|
|
695
|
+
PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
696
696
|
/**
|
|
697
|
-
*
|
|
697
|
+
* Blocks Medium and above confidence URL that is risky.
|
|
698
698
|
*/
|
|
699
|
-
|
|
700
|
-
|
|
699
|
+
PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
700
|
+
/**
|
|
701
|
+
* Blocks High and above confidence URL that is risky.
|
|
702
|
+
*/
|
|
703
|
+
PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
|
|
704
|
+
/**
|
|
705
|
+
* Blocks Higher and above confidence URL that is risky.
|
|
706
|
+
*/
|
|
707
|
+
PhishBlockThreshold["BLOCK_HIGHER_AND_ABOVE"] = "BLOCK_HIGHER_AND_ABOVE";
|
|
708
|
+
/**
|
|
709
|
+
* Blocks Very high and above confidence URL that is risky.
|
|
710
|
+
*/
|
|
711
|
+
PhishBlockThreshold["BLOCK_VERY_HIGH_AND_ABOVE"] = "BLOCK_VERY_HIGH_AND_ABOVE";
|
|
712
|
+
/**
|
|
713
|
+
* Blocks Extremely high confidence URL that is risky.
|
|
714
|
+
*/
|
|
715
|
+
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
716
|
+
})(PhishBlockThreshold || (PhishBlockThreshold = {}));
|
|
701
717
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
702
718
|
var AuthType;
|
|
703
719
|
(function (AuthType) {
|
|
@@ -752,38 +768,22 @@ var HttpElementLocation;
|
|
|
752
768
|
*/
|
|
753
769
|
HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
|
|
754
770
|
})(HttpElementLocation || (HttpElementLocation = {}));
|
|
755
|
-
/**
|
|
756
|
-
var
|
|
757
|
-
(function (
|
|
758
|
-
/**
|
|
759
|
-
* Defaults to unspecified.
|
|
760
|
-
*/
|
|
761
|
-
PhishBlockThreshold["PHISH_BLOCK_THRESHOLD_UNSPECIFIED"] = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
762
|
-
/**
|
|
763
|
-
* Blocks Low and above confidence URL that is risky.
|
|
764
|
-
*/
|
|
765
|
-
PhishBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
766
|
-
/**
|
|
767
|
-
* Blocks Medium and above confidence URL that is risky.
|
|
768
|
-
*/
|
|
769
|
-
PhishBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
770
|
-
/**
|
|
771
|
-
* Blocks High and above confidence URL that is risky.
|
|
772
|
-
*/
|
|
773
|
-
PhishBlockThreshold["BLOCK_HIGH_AND_ABOVE"] = "BLOCK_HIGH_AND_ABOVE";
|
|
771
|
+
/** The API spec that the external API implements. This enum is not supported in Gemini API. */
|
|
772
|
+
var ApiSpec;
|
|
773
|
+
(function (ApiSpec) {
|
|
774
774
|
/**
|
|
775
|
-
*
|
|
775
|
+
* Unspecified API spec. This value should not be used.
|
|
776
776
|
*/
|
|
777
|
-
|
|
777
|
+
ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
|
|
778
778
|
/**
|
|
779
|
-
*
|
|
779
|
+
* Simple search API spec.
|
|
780
780
|
*/
|
|
781
|
-
|
|
781
|
+
ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
|
|
782
782
|
/**
|
|
783
|
-
*
|
|
783
|
+
* Elastic search API spec.
|
|
784
784
|
*/
|
|
785
|
-
|
|
786
|
-
})(
|
|
785
|
+
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
786
|
+
})(ApiSpec || (ApiSpec = {}));
|
|
787
787
|
/** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
|
|
788
788
|
var Behavior;
|
|
789
789
|
(function (Behavior) {
|
|
@@ -860,27 +860,43 @@ var ThinkingLevel;
|
|
|
860
860
|
*/
|
|
861
861
|
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
862
862
|
})(ThinkingLevel || (ThinkingLevel = {}));
|
|
863
|
-
/**
|
|
863
|
+
/** Enum that controls the generation of people. */
|
|
864
|
+
var PersonGeneration;
|
|
865
|
+
(function (PersonGeneration) {
|
|
866
|
+
/**
|
|
867
|
+
* Block generation of images of people.
|
|
868
|
+
*/
|
|
869
|
+
PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
|
|
870
|
+
/**
|
|
871
|
+
* Generate images of adults, but not children.
|
|
872
|
+
*/
|
|
873
|
+
PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
|
|
874
|
+
/**
|
|
875
|
+
* Generate images that include adults and children.
|
|
876
|
+
*/
|
|
877
|
+
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
878
|
+
})(PersonGeneration || (PersonGeneration = {}));
|
|
879
|
+
/** The harm category to be blocked. */
|
|
864
880
|
var HarmCategory;
|
|
865
881
|
(function (HarmCategory) {
|
|
866
882
|
/**
|
|
867
|
-
*
|
|
883
|
+
* Default value. This value is unused.
|
|
868
884
|
*/
|
|
869
885
|
HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
|
|
870
886
|
/**
|
|
871
|
-
*
|
|
887
|
+
* Abusive, threatening, or content intended to bully, torment, or ridicule.
|
|
872
888
|
*/
|
|
873
889
|
HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
|
|
874
890
|
/**
|
|
875
|
-
*
|
|
891
|
+
* Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
|
|
876
892
|
*/
|
|
877
893
|
HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
|
|
878
894
|
/**
|
|
879
|
-
*
|
|
895
|
+
* Content that contains sexually explicit material.
|
|
880
896
|
*/
|
|
881
897
|
HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
882
898
|
/**
|
|
883
|
-
*
|
|
899
|
+
* Content that promotes, facilitates, or enables dangerous activities.
|
|
884
900
|
*/
|
|
885
901
|
HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
886
902
|
/**
|
|
@@ -888,27 +904,27 @@ var HarmCategory;
|
|
|
888
904
|
*/
|
|
889
905
|
HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
|
|
890
906
|
/**
|
|
891
|
-
*
|
|
907
|
+
* Images that contain hate speech. This enum value is not supported in Gemini API.
|
|
892
908
|
*/
|
|
893
909
|
HarmCategory["HARM_CATEGORY_IMAGE_HATE"] = "HARM_CATEGORY_IMAGE_HATE";
|
|
894
910
|
/**
|
|
895
|
-
*
|
|
911
|
+
* Images that contain dangerous content. This enum value is not supported in Gemini API.
|
|
896
912
|
*/
|
|
897
913
|
HarmCategory["HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT"] = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT";
|
|
898
914
|
/**
|
|
899
|
-
*
|
|
915
|
+
* Images that contain harassment. This enum value is not supported in Gemini API.
|
|
900
916
|
*/
|
|
901
917
|
HarmCategory["HARM_CATEGORY_IMAGE_HARASSMENT"] = "HARM_CATEGORY_IMAGE_HARASSMENT";
|
|
902
918
|
/**
|
|
903
|
-
*
|
|
919
|
+
* Images that contain sexually explicit content. This enum value is not supported in Gemini API.
|
|
904
920
|
*/
|
|
905
921
|
HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
|
|
906
922
|
/**
|
|
907
|
-
*
|
|
923
|
+
* Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
|
|
908
924
|
*/
|
|
909
925
|
HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
|
|
910
926
|
})(HarmCategory || (HarmCategory = {}));
|
|
911
|
-
/**
|
|
927
|
+
/** The method for blocking content. If not specified, the default behavior is to use the probability score. This enum is not supported in Gemini API. */
|
|
912
928
|
var HarmBlockMethod;
|
|
913
929
|
(function (HarmBlockMethod) {
|
|
914
930
|
/**
|
|
@@ -924,31 +940,31 @@ var HarmBlockMethod;
|
|
|
924
940
|
*/
|
|
925
941
|
HarmBlockMethod["PROBABILITY"] = "PROBABILITY";
|
|
926
942
|
})(HarmBlockMethod || (HarmBlockMethod = {}));
|
|
927
|
-
/** The harm
|
|
943
|
+
/** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
928
944
|
var HarmBlockThreshold;
|
|
929
945
|
(function (HarmBlockThreshold) {
|
|
930
946
|
/**
|
|
931
|
-
*
|
|
947
|
+
* The harm block threshold is unspecified.
|
|
932
948
|
*/
|
|
933
949
|
HarmBlockThreshold["HARM_BLOCK_THRESHOLD_UNSPECIFIED"] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
934
950
|
/**
|
|
935
|
-
* Block
|
|
951
|
+
* Block content with a low harm probability or higher.
|
|
936
952
|
*/
|
|
937
953
|
HarmBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
938
954
|
/**
|
|
939
|
-
* Block medium
|
|
955
|
+
* Block content with a medium harm probability or higher.
|
|
940
956
|
*/
|
|
941
957
|
HarmBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
942
958
|
/**
|
|
943
|
-
* Block
|
|
959
|
+
* Block content with a high harm probability.
|
|
944
960
|
*/
|
|
945
961
|
HarmBlockThreshold["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
|
|
946
962
|
/**
|
|
947
|
-
*
|
|
963
|
+
* Do not block any content, regardless of its harm probability.
|
|
948
964
|
*/
|
|
949
965
|
HarmBlockThreshold["BLOCK_NONE"] = "BLOCK_NONE";
|
|
950
966
|
/**
|
|
951
|
-
* Turn off the safety filter.
|
|
967
|
+
* Turn off the safety filter entirely.
|
|
952
968
|
*/
|
|
953
969
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
954
970
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
@@ -1026,55 +1042,55 @@ var FinishReason;
|
|
|
1026
1042
|
*/
|
|
1027
1043
|
FinishReason["IMAGE_OTHER"] = "IMAGE_OTHER";
|
|
1028
1044
|
})(FinishReason || (FinishReason = {}));
|
|
1029
|
-
/** Output only.
|
|
1045
|
+
/** Output only. The probability of harm for this category. */
|
|
1030
1046
|
var HarmProbability;
|
|
1031
1047
|
(function (HarmProbability) {
|
|
1032
1048
|
/**
|
|
1033
|
-
*
|
|
1049
|
+
* The harm probability is unspecified.
|
|
1034
1050
|
*/
|
|
1035
1051
|
HarmProbability["HARM_PROBABILITY_UNSPECIFIED"] = "HARM_PROBABILITY_UNSPECIFIED";
|
|
1036
1052
|
/**
|
|
1037
|
-
*
|
|
1053
|
+
* The harm probability is negligible.
|
|
1038
1054
|
*/
|
|
1039
1055
|
HarmProbability["NEGLIGIBLE"] = "NEGLIGIBLE";
|
|
1040
1056
|
/**
|
|
1041
|
-
*
|
|
1057
|
+
* The harm probability is low.
|
|
1042
1058
|
*/
|
|
1043
1059
|
HarmProbability["LOW"] = "LOW";
|
|
1044
1060
|
/**
|
|
1045
|
-
*
|
|
1061
|
+
* The harm probability is medium.
|
|
1046
1062
|
*/
|
|
1047
1063
|
HarmProbability["MEDIUM"] = "MEDIUM";
|
|
1048
1064
|
/**
|
|
1049
|
-
*
|
|
1065
|
+
* The harm probability is high.
|
|
1050
1066
|
*/
|
|
1051
1067
|
HarmProbability["HIGH"] = "HIGH";
|
|
1052
1068
|
})(HarmProbability || (HarmProbability = {}));
|
|
1053
|
-
/** Output only.
|
|
1069
|
+
/** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
|
|
1054
1070
|
var HarmSeverity;
|
|
1055
1071
|
(function (HarmSeverity) {
|
|
1056
1072
|
/**
|
|
1057
|
-
*
|
|
1073
|
+
* The harm severity is unspecified.
|
|
1058
1074
|
*/
|
|
1059
1075
|
HarmSeverity["HARM_SEVERITY_UNSPECIFIED"] = "HARM_SEVERITY_UNSPECIFIED";
|
|
1060
1076
|
/**
|
|
1061
|
-
*
|
|
1077
|
+
* The harm severity is negligible.
|
|
1062
1078
|
*/
|
|
1063
1079
|
HarmSeverity["HARM_SEVERITY_NEGLIGIBLE"] = "HARM_SEVERITY_NEGLIGIBLE";
|
|
1064
1080
|
/**
|
|
1065
|
-
*
|
|
1081
|
+
* The harm severity is low.
|
|
1066
1082
|
*/
|
|
1067
1083
|
HarmSeverity["HARM_SEVERITY_LOW"] = "HARM_SEVERITY_LOW";
|
|
1068
1084
|
/**
|
|
1069
|
-
*
|
|
1085
|
+
* The harm severity is medium.
|
|
1070
1086
|
*/
|
|
1071
1087
|
HarmSeverity["HARM_SEVERITY_MEDIUM"] = "HARM_SEVERITY_MEDIUM";
|
|
1072
1088
|
/**
|
|
1073
|
-
*
|
|
1089
|
+
* The harm severity is high.
|
|
1074
1090
|
*/
|
|
1075
1091
|
HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
|
|
1076
1092
|
})(HarmSeverity || (HarmSeverity = {}));
|
|
1077
|
-
/**
|
|
1093
|
+
/** The status of the URL retrieval. */
|
|
1078
1094
|
var UrlRetrievalStatus;
|
|
1079
1095
|
(function (UrlRetrievalStatus) {
|
|
1080
1096
|
/**
|
|
@@ -1082,11 +1098,11 @@ var UrlRetrievalStatus;
|
|
|
1082
1098
|
*/
|
|
1083
1099
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_UNSPECIFIED"] = "URL_RETRIEVAL_STATUS_UNSPECIFIED";
|
|
1084
1100
|
/**
|
|
1085
|
-
*
|
|
1101
|
+
* The URL was retrieved successfully.
|
|
1086
1102
|
*/
|
|
1087
1103
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_SUCCESS"] = "URL_RETRIEVAL_STATUS_SUCCESS";
|
|
1088
1104
|
/**
|
|
1089
|
-
*
|
|
1105
|
+
* The URL retrieval failed.
|
|
1090
1106
|
*/
|
|
1091
1107
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_ERROR"] = "URL_RETRIEVAL_STATUS_ERROR";
|
|
1092
1108
|
/**
|
|
@@ -1145,6 +1161,14 @@ var TrafficType;
|
|
|
1145
1161
|
* The request was processed using Pay-As-You-Go quota.
|
|
1146
1162
|
*/
|
|
1147
1163
|
TrafficType["ON_DEMAND"] = "ON_DEMAND";
|
|
1164
|
+
/**
|
|
1165
|
+
* Type for Priority Pay-As-You-Go traffic.
|
|
1166
|
+
*/
|
|
1167
|
+
TrafficType["ON_DEMAND_PRIORITY"] = "ON_DEMAND_PRIORITY";
|
|
1168
|
+
/**
|
|
1169
|
+
* Type for Flex traffic.
|
|
1170
|
+
*/
|
|
1171
|
+
TrafficType["ON_DEMAND_FLEX"] = "ON_DEMAND_FLEX";
|
|
1148
1172
|
/**
|
|
1149
1173
|
* Type for Provisioned Throughput traffic.
|
|
1150
1174
|
*/
|
|
@@ -1290,6 +1314,102 @@ var JobState;
|
|
|
1290
1314
|
*/
|
|
1291
1315
|
JobState["JOB_STATE_PARTIALLY_SUCCEEDED"] = "JOB_STATE_PARTIALLY_SUCCEEDED";
|
|
1292
1316
|
})(JobState || (JobState = {}));
|
|
1317
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
|
|
1318
|
+
var TuningJobState;
|
|
1319
|
+
(function (TuningJobState) {
|
|
1320
|
+
/**
|
|
1321
|
+
* Default tuning job state.
|
|
1322
|
+
*/
|
|
1323
|
+
TuningJobState["TUNING_JOB_STATE_UNSPECIFIED"] = "TUNING_JOB_STATE_UNSPECIFIED";
|
|
1324
|
+
/**
|
|
1325
|
+
* Tuning job is waiting for job quota.
|
|
1326
|
+
*/
|
|
1327
|
+
TuningJobState["TUNING_JOB_STATE_WAITING_FOR_QUOTA"] = "TUNING_JOB_STATE_WAITING_FOR_QUOTA";
|
|
1328
|
+
/**
|
|
1329
|
+
* Tuning job is validating the dataset.
|
|
1330
|
+
*/
|
|
1331
|
+
TuningJobState["TUNING_JOB_STATE_PROCESSING_DATASET"] = "TUNING_JOB_STATE_PROCESSING_DATASET";
|
|
1332
|
+
/**
|
|
1333
|
+
* Tuning job is waiting for hardware capacity.
|
|
1334
|
+
*/
|
|
1335
|
+
TuningJobState["TUNING_JOB_STATE_WAITING_FOR_CAPACITY"] = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY";
|
|
1336
|
+
/**
|
|
1337
|
+
* Tuning job is running.
|
|
1338
|
+
*/
|
|
1339
|
+
TuningJobState["TUNING_JOB_STATE_TUNING"] = "TUNING_JOB_STATE_TUNING";
|
|
1340
|
+
/**
|
|
1341
|
+
* Tuning job is doing some post processing steps.
|
|
1342
|
+
*/
|
|
1343
|
+
TuningJobState["TUNING_JOB_STATE_POST_PROCESSING"] = "TUNING_JOB_STATE_POST_PROCESSING";
|
|
1344
|
+
})(TuningJobState || (TuningJobState = {}));
|
|
1345
|
+
/** Aggregation metric. This enum is not supported in Gemini API. */
|
|
1346
|
+
var AggregationMetric;
|
|
1347
|
+
(function (AggregationMetric) {
|
|
1348
|
+
/**
|
|
1349
|
+
* Unspecified aggregation metric.
|
|
1350
|
+
*/
|
|
1351
|
+
AggregationMetric["AGGREGATION_METRIC_UNSPECIFIED"] = "AGGREGATION_METRIC_UNSPECIFIED";
|
|
1352
|
+
/**
|
|
1353
|
+
* Average aggregation metric. Not supported for Pairwise metric.
|
|
1354
|
+
*/
|
|
1355
|
+
AggregationMetric["AVERAGE"] = "AVERAGE";
|
|
1356
|
+
/**
|
|
1357
|
+
* Mode aggregation metric.
|
|
1358
|
+
*/
|
|
1359
|
+
AggregationMetric["MODE"] = "MODE";
|
|
1360
|
+
/**
|
|
1361
|
+
* Standard deviation aggregation metric. Not supported for pairwise metric.
|
|
1362
|
+
*/
|
|
1363
|
+
AggregationMetric["STANDARD_DEVIATION"] = "STANDARD_DEVIATION";
|
|
1364
|
+
/**
|
|
1365
|
+
* Variance aggregation metric. Not supported for pairwise metric.
|
|
1366
|
+
*/
|
|
1367
|
+
AggregationMetric["VARIANCE"] = "VARIANCE";
|
|
1368
|
+
/**
|
|
1369
|
+
* Minimum aggregation metric. Not supported for pairwise metric.
|
|
1370
|
+
*/
|
|
1371
|
+
AggregationMetric["MINIMUM"] = "MINIMUM";
|
|
1372
|
+
/**
|
|
1373
|
+
* Maximum aggregation metric. Not supported for pairwise metric.
|
|
1374
|
+
*/
|
|
1375
|
+
AggregationMetric["MAXIMUM"] = "MAXIMUM";
|
|
1376
|
+
/**
|
|
1377
|
+
* Median aggregation metric. Not supported for pairwise metric.
|
|
1378
|
+
*/
|
|
1379
|
+
AggregationMetric["MEDIAN"] = "MEDIAN";
|
|
1380
|
+
/**
|
|
1381
|
+
* 90th percentile aggregation metric. Not supported for pairwise metric.
|
|
1382
|
+
*/
|
|
1383
|
+
AggregationMetric["PERCENTILE_P90"] = "PERCENTILE_P90";
|
|
1384
|
+
/**
|
|
1385
|
+
* 95th percentile aggregation metric. Not supported for pairwise metric.
|
|
1386
|
+
*/
|
|
1387
|
+
AggregationMetric["PERCENTILE_P95"] = "PERCENTILE_P95";
|
|
1388
|
+
/**
|
|
1389
|
+
* 99th percentile aggregation metric. Not supported for pairwise metric.
|
|
1390
|
+
*/
|
|
1391
|
+
AggregationMetric["PERCENTILE_P99"] = "PERCENTILE_P99";
|
|
1392
|
+
})(AggregationMetric || (AggregationMetric = {}));
|
|
1393
|
+
/** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
|
|
1394
|
+
var PairwiseChoice;
|
|
1395
|
+
(function (PairwiseChoice) {
|
|
1396
|
+
/**
|
|
1397
|
+
* Unspecified prediction choice.
|
|
1398
|
+
*/
|
|
1399
|
+
PairwiseChoice["PAIRWISE_CHOICE_UNSPECIFIED"] = "PAIRWISE_CHOICE_UNSPECIFIED";
|
|
1400
|
+
/**
|
|
1401
|
+
* Baseline prediction wins
|
|
1402
|
+
*/
|
|
1403
|
+
PairwiseChoice["BASELINE"] = "BASELINE";
|
|
1404
|
+
/**
|
|
1405
|
+
* Candidate prediction wins
|
|
1406
|
+
*/
|
|
1407
|
+
PairwiseChoice["CANDIDATE"] = "CANDIDATE";
|
|
1408
|
+
/**
|
|
1409
|
+
* Winner cannot be determined
|
|
1410
|
+
*/
|
|
1411
|
+
PairwiseChoice["TIE"] = "TIE";
|
|
1412
|
+
})(PairwiseChoice || (PairwiseChoice = {}));
|
|
1293
1413
|
/** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
|
|
1294
1414
|
var TuningTask;
|
|
1295
1415
|
(function (TuningTask) {
|
|
@@ -1366,6 +1486,22 @@ var Environment;
|
|
|
1366
1486
|
*/
|
|
1367
1487
|
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
1368
1488
|
})(Environment || (Environment = {}));
|
|
1489
|
+
/** Enum for controlling whether the model can generate images of prominent people (celebrities). */
|
|
1490
|
+
var ProminentPeople;
|
|
1491
|
+
(function (ProminentPeople) {
|
|
1492
|
+
/**
|
|
1493
|
+
* Unspecified value. The model will proceed with the default behavior, which is to allow generation of prominent people.
|
|
1494
|
+
*/
|
|
1495
|
+
ProminentPeople["PROMINENT_PEOPLE_UNSPECIFIED"] = "PROMINENT_PEOPLE_UNSPECIFIED";
|
|
1496
|
+
/**
|
|
1497
|
+
* Allows the model to generate images of prominent people.
|
|
1498
|
+
*/
|
|
1499
|
+
ProminentPeople["ALLOW_PROMINENT_PEOPLE"] = "ALLOW_PROMINENT_PEOPLE";
|
|
1500
|
+
/**
|
|
1501
|
+
* Prevents the model from generating images of prominent people.
|
|
1502
|
+
*/
|
|
1503
|
+
ProminentPeople["BLOCK_PROMINENT_PEOPLE"] = "BLOCK_PROMINENT_PEOPLE";
|
|
1504
|
+
})(ProminentPeople || (ProminentPeople = {}));
|
|
1369
1505
|
/** Enum representing the Vertex embedding API to use. */
|
|
1370
1506
|
var EmbeddingApiType;
|
|
1371
1507
|
(function (EmbeddingApiType) {
|
|
@@ -1386,22 +1522,6 @@ var SafetyFilterLevel;
|
|
|
1386
1522
|
SafetyFilterLevel["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
|
|
1387
1523
|
SafetyFilterLevel["BLOCK_NONE"] = "BLOCK_NONE";
|
|
1388
1524
|
})(SafetyFilterLevel || (SafetyFilterLevel = {}));
|
|
1389
|
-
/** Enum that controls the generation of people. */
|
|
1390
|
-
var PersonGeneration;
|
|
1391
|
-
(function (PersonGeneration) {
|
|
1392
|
-
/**
|
|
1393
|
-
* Block generation of images of people.
|
|
1394
|
-
*/
|
|
1395
|
-
PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
|
|
1396
|
-
/**
|
|
1397
|
-
* Generate images of adults, but not children.
|
|
1398
|
-
*/
|
|
1399
|
-
PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
|
|
1400
|
-
/**
|
|
1401
|
-
* Generate images that include adults and children.
|
|
1402
|
-
*/
|
|
1403
|
-
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
1404
|
-
})(PersonGeneration || (PersonGeneration = {}));
|
|
1405
1525
|
/** Enum that specifies the language of the text in the prompt. */
|
|
1406
1526
|
var ImagePromptLanguage;
|
|
1407
1527
|
(function (ImagePromptLanguage) {
|
|
@@ -2300,6 +2420,9 @@ class GenerateVideosOperation {
|
|
|
2300
2420
|
return operation;
|
|
2301
2421
|
}
|
|
2302
2422
|
}
|
|
2423
|
+
/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
|
|
2424
|
+
class EvaluateDatasetResponse {
|
|
2425
|
+
}
|
|
2303
2426
|
/** Response for the list tuning jobs method. */
|
|
2304
2427
|
class ListTuningJobsResponse {
|
|
2305
2428
|
}
|
|
@@ -3419,6 +3542,33 @@ function tIsVertexEmbedContentModel(model) {
|
|
|
3419
3542
|
* Copyright 2025 Google LLC
|
|
3420
3543
|
* SPDX-License-Identifier: Apache-2.0
|
|
3421
3544
|
*/
|
|
3545
|
+
function authConfigToMldev$4(fromObject) {
|
|
3546
|
+
const toObject = {};
|
|
3547
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
3548
|
+
if (fromApiKey != null) {
|
|
3549
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
3550
|
+
}
|
|
3551
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
3552
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
3553
|
+
}
|
|
3554
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
3555
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
3556
|
+
}
|
|
3557
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
3558
|
+
undefined) {
|
|
3559
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
3560
|
+
}
|
|
3561
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
3562
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
3563
|
+
}
|
|
3564
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
3565
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
3566
|
+
}
|
|
3567
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
3568
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
3569
|
+
}
|
|
3570
|
+
return toObject;
|
|
3571
|
+
}
|
|
3422
3572
|
function batchJobDestinationFromMldev(fromObject) {
|
|
3423
3573
|
const toObject = {};
|
|
3424
3574
|
const fromFileName = getValueByPath(fromObject, ['responsesFile']);
|
|
@@ -3724,16 +3874,16 @@ function candidateFromMldev$1(fromObject) {
|
|
|
3724
3874
|
if (fromFinishReason != null) {
|
|
3725
3875
|
setValueByPath(toObject, ['finishReason'], fromFinishReason);
|
|
3726
3876
|
}
|
|
3727
|
-
const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
|
|
3728
|
-
if (fromAvgLogprobs != null) {
|
|
3729
|
-
setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
|
|
3730
|
-
}
|
|
3731
3877
|
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
3732
3878
|
'groundingMetadata',
|
|
3733
3879
|
]);
|
|
3734
3880
|
if (fromGroundingMetadata != null) {
|
|
3735
3881
|
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
3736
3882
|
}
|
|
3883
|
+
const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
|
|
3884
|
+
if (fromAvgLogprobs != null) {
|
|
3885
|
+
setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
|
|
3886
|
+
}
|
|
3737
3887
|
const fromIndex = getValueByPath(fromObject, ['index']);
|
|
3738
3888
|
if (fromIndex != null) {
|
|
3739
3889
|
setValueByPath(toObject, ['index'], fromIndex);
|
|
@@ -4268,8 +4418,9 @@ function getBatchJobParametersToVertex(apiClient, fromObject) {
|
|
|
4268
4418
|
}
|
|
4269
4419
|
function googleMapsToMldev$4(fromObject) {
|
|
4270
4420
|
const toObject = {};
|
|
4271
|
-
|
|
4272
|
-
|
|
4421
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
4422
|
+
if (fromAuthConfig != null) {
|
|
4423
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$4(fromAuthConfig));
|
|
4273
4424
|
}
|
|
4274
4425
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
4275
4426
|
if (fromEnableWidget != null) {
|
|
@@ -4279,12 +4430,16 @@ function googleMapsToMldev$4(fromObject) {
|
|
|
4279
4430
|
}
|
|
4280
4431
|
function googleSearchToMldev$4(fromObject) {
|
|
4281
4432
|
const toObject = {};
|
|
4282
|
-
|
|
4283
|
-
|
|
4433
|
+
const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
|
|
4434
|
+
if (fromSearchTypes != null) {
|
|
4435
|
+
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
4284
4436
|
}
|
|
4285
4437
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
4286
4438
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
4287
4439
|
}
|
|
4440
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4441
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
4442
|
+
}
|
|
4288
4443
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
4289
4444
|
'timeRangeFilter',
|
|
4290
4445
|
]);
|
|
@@ -4306,6 +4461,9 @@ function imageConfigToMldev$1(fromObject) {
|
|
|
4306
4461
|
if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
|
|
4307
4462
|
throw new Error('personGeneration parameter is not supported in Gemini API.');
|
|
4308
4463
|
}
|
|
4464
|
+
if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
|
|
4465
|
+
throw new Error('prominentPeople parameter is not supported in Gemini API.');
|
|
4466
|
+
}
|
|
4309
4467
|
if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
|
|
4310
4468
|
throw new Error('outputMimeType parameter is not supported in Gemini API.');
|
|
4311
4469
|
}
|
|
@@ -4313,6 +4471,9 @@ function imageConfigToMldev$1(fromObject) {
|
|
|
4313
4471
|
undefined) {
|
|
4314
4472
|
throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
|
|
4315
4473
|
}
|
|
4474
|
+
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
4475
|
+
throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
|
|
4476
|
+
}
|
|
4316
4477
|
return toObject;
|
|
4317
4478
|
}
|
|
4318
4479
|
function inlinedRequestToMldev(apiClient, fromObject) {
|
|
@@ -4562,6 +4723,14 @@ function toolToMldev$4(fromObject) {
|
|
|
4562
4723
|
if (fromFileSearch != null) {
|
|
4563
4724
|
setValueByPath(toObject, ['fileSearch'], fromFileSearch);
|
|
4564
4725
|
}
|
|
4726
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
4727
|
+
if (fromGoogleSearch != null) {
|
|
4728
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
|
|
4729
|
+
}
|
|
4730
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
4731
|
+
if (fromGoogleMaps != null) {
|
|
4732
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
|
|
4733
|
+
}
|
|
4565
4734
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
4566
4735
|
'codeExecution',
|
|
4567
4736
|
]);
|
|
@@ -4583,24 +4752,29 @@ function toolToMldev$4(fromObject) {
|
|
|
4583
4752
|
}
|
|
4584
4753
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
4585
4754
|
}
|
|
4586
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
4587
|
-
if (fromGoogleMaps != null) {
|
|
4588
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
|
|
4589
|
-
}
|
|
4590
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
4591
|
-
if (fromGoogleSearch != null) {
|
|
4592
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
|
|
4593
|
-
}
|
|
4594
4755
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
4595
4756
|
'googleSearchRetrieval',
|
|
4596
4757
|
]);
|
|
4597
4758
|
if (fromGoogleSearchRetrieval != null) {
|
|
4598
4759
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
4599
4760
|
}
|
|
4761
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
4762
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
4763
|
+
}
|
|
4600
4764
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
4601
4765
|
if (fromUrlContext != null) {
|
|
4602
4766
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
4603
4767
|
}
|
|
4768
|
+
const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
|
|
4769
|
+
if (fromMcpServers != null) {
|
|
4770
|
+
let transformedList = fromMcpServers;
|
|
4771
|
+
if (Array.isArray(transformedList)) {
|
|
4772
|
+
transformedList = transformedList.map((item) => {
|
|
4773
|
+
return item;
|
|
4774
|
+
});
|
|
4775
|
+
}
|
|
4776
|
+
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
4777
|
+
}
|
|
4604
4778
|
return toObject;
|
|
4605
4779
|
}
|
|
4606
4780
|
|
|
@@ -5296,6 +5470,33 @@ class Batches extends BaseModule {
|
|
|
5296
5470
|
* Copyright 2025 Google LLC
|
|
5297
5471
|
* SPDX-License-Identifier: Apache-2.0
|
|
5298
5472
|
*/
|
|
5473
|
+
function authConfigToMldev$3(fromObject) {
|
|
5474
|
+
const toObject = {};
|
|
5475
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
5476
|
+
if (fromApiKey != null) {
|
|
5477
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
5478
|
+
}
|
|
5479
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
5480
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
5481
|
+
}
|
|
5482
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
5483
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
5484
|
+
}
|
|
5485
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
5486
|
+
undefined) {
|
|
5487
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
5488
|
+
}
|
|
5489
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
5490
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
5491
|
+
}
|
|
5492
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
5493
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
5494
|
+
}
|
|
5495
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
5496
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
5497
|
+
}
|
|
5498
|
+
return toObject;
|
|
5499
|
+
}
|
|
5299
5500
|
function blobToMldev$3(fromObject) {
|
|
5300
5501
|
const toObject = {};
|
|
5301
5502
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -5596,8 +5797,9 @@ function getCachedContentParametersToVertex(apiClient, fromObject) {
|
|
|
5596
5797
|
}
|
|
5597
5798
|
function googleMapsToMldev$3(fromObject) {
|
|
5598
5799
|
const toObject = {};
|
|
5599
|
-
|
|
5600
|
-
|
|
5800
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
5801
|
+
if (fromAuthConfig != null) {
|
|
5802
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$3(fromAuthConfig));
|
|
5601
5803
|
}
|
|
5602
5804
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
5603
5805
|
if (fromEnableWidget != null) {
|
|
@@ -5607,12 +5809,16 @@ function googleMapsToMldev$3(fromObject) {
|
|
|
5607
5809
|
}
|
|
5608
5810
|
function googleSearchToMldev$3(fromObject) {
|
|
5609
5811
|
const toObject = {};
|
|
5610
|
-
|
|
5611
|
-
|
|
5812
|
+
const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
|
|
5813
|
+
if (fromSearchTypes != null) {
|
|
5814
|
+
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
5612
5815
|
}
|
|
5613
5816
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
5614
5817
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
5615
5818
|
}
|
|
5819
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
5820
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
5821
|
+
}
|
|
5616
5822
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
5617
5823
|
'timeRangeFilter',
|
|
5618
5824
|
]);
|
|
@@ -5806,6 +6012,14 @@ function toolToMldev$3(fromObject) {
|
|
|
5806
6012
|
if (fromFileSearch != null) {
|
|
5807
6013
|
setValueByPath(toObject, ['fileSearch'], fromFileSearch);
|
|
5808
6014
|
}
|
|
6015
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
6016
|
+
if (fromGoogleSearch != null) {
|
|
6017
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
|
|
6018
|
+
}
|
|
6019
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
6020
|
+
if (fromGoogleMaps != null) {
|
|
6021
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
|
|
6022
|
+
}
|
|
5809
6023
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5810
6024
|
'codeExecution',
|
|
5811
6025
|
]);
|
|
@@ -5827,24 +6041,29 @@ function toolToMldev$3(fromObject) {
|
|
|
5827
6041
|
}
|
|
5828
6042
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
5829
6043
|
}
|
|
5830
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5831
|
-
if (fromGoogleMaps != null) {
|
|
5832
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
|
|
5833
|
-
}
|
|
5834
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
5835
|
-
if (fromGoogleSearch != null) {
|
|
5836
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
|
|
5837
|
-
}
|
|
5838
6044
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5839
6045
|
'googleSearchRetrieval',
|
|
5840
6046
|
]);
|
|
5841
6047
|
if (fromGoogleSearchRetrieval != null) {
|
|
5842
6048
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5843
6049
|
}
|
|
6050
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
6051
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
6052
|
+
}
|
|
5844
6053
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5845
6054
|
if (fromUrlContext != null) {
|
|
5846
6055
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
5847
6056
|
}
|
|
6057
|
+
const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
|
|
6058
|
+
if (fromMcpServers != null) {
|
|
6059
|
+
let transformedList = fromMcpServers;
|
|
6060
|
+
if (Array.isArray(transformedList)) {
|
|
6061
|
+
transformedList = transformedList.map((item) => {
|
|
6062
|
+
return item;
|
|
6063
|
+
});
|
|
6064
|
+
}
|
|
6065
|
+
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6066
|
+
}
|
|
5848
6067
|
return toObject;
|
|
5849
6068
|
}
|
|
5850
6069
|
function toolToVertex$2(fromObject) {
|
|
@@ -5860,6 +6079,14 @@ function toolToVertex$2(fromObject) {
|
|
|
5860
6079
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
5861
6080
|
throw new Error('fileSearch parameter is not supported in Vertex AI.');
|
|
5862
6081
|
}
|
|
6082
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
6083
|
+
if (fromGoogleSearch != null) {
|
|
6084
|
+
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
6085
|
+
}
|
|
6086
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
6087
|
+
if (fromGoogleMaps != null) {
|
|
6088
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
6089
|
+
}
|
|
5863
6090
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5864
6091
|
'codeExecution',
|
|
5865
6092
|
]);
|
|
@@ -5884,24 +6111,25 @@ function toolToVertex$2(fromObject) {
|
|
|
5884
6111
|
}
|
|
5885
6112
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
5886
6113
|
}
|
|
5887
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5888
|
-
if (fromGoogleMaps != null) {
|
|
5889
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
5890
|
-
}
|
|
5891
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
5892
|
-
if (fromGoogleSearch != null) {
|
|
5893
|
-
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
5894
|
-
}
|
|
5895
6114
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5896
6115
|
'googleSearchRetrieval',
|
|
5897
6116
|
]);
|
|
5898
6117
|
if (fromGoogleSearchRetrieval != null) {
|
|
5899
6118
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5900
6119
|
}
|
|
6120
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
6121
|
+
'parallelAiSearch',
|
|
6122
|
+
]);
|
|
6123
|
+
if (fromParallelAiSearch != null) {
|
|
6124
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
6125
|
+
}
|
|
5901
6126
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5902
6127
|
if (fromUrlContext != null) {
|
|
5903
6128
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
5904
6129
|
}
|
|
6130
|
+
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
6131
|
+
throw new Error('mcpServers parameter is not supported in Vertex AI.');
|
|
6132
|
+
}
|
|
5905
6133
|
return toObject;
|
|
5906
6134
|
}
|
|
5907
6135
|
function updateCachedContentConfigToMldev(fromObject, parentObject) {
|
|
@@ -7189,6 +7417,33 @@ class Files extends BaseModule {
|
|
|
7189
7417
|
* Copyright 2025 Google LLC
|
|
7190
7418
|
* SPDX-License-Identifier: Apache-2.0
|
|
7191
7419
|
*/
|
|
7420
|
+
function authConfigToMldev$2(fromObject) {
|
|
7421
|
+
const toObject = {};
|
|
7422
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
7423
|
+
if (fromApiKey != null) {
|
|
7424
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
7425
|
+
}
|
|
7426
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
7427
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
7428
|
+
}
|
|
7429
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
7430
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
7431
|
+
}
|
|
7432
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
7433
|
+
undefined) {
|
|
7434
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
7435
|
+
}
|
|
7436
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
7437
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
7438
|
+
}
|
|
7439
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
7440
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
7441
|
+
}
|
|
7442
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
7443
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
7444
|
+
}
|
|
7445
|
+
return toObject;
|
|
7446
|
+
}
|
|
7192
7447
|
function blobToMldev$2(fromObject) {
|
|
7193
7448
|
const toObject = {};
|
|
7194
7449
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -7424,8 +7679,9 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
7424
7679
|
}
|
|
7425
7680
|
function googleMapsToMldev$2(fromObject) {
|
|
7426
7681
|
const toObject = {};
|
|
7427
|
-
|
|
7428
|
-
|
|
7682
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7683
|
+
if (fromAuthConfig != null) {
|
|
7684
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$2(fromAuthConfig));
|
|
7429
7685
|
}
|
|
7430
7686
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
7431
7687
|
if (fromEnableWidget != null) {
|
|
@@ -7435,12 +7691,16 @@ function googleMapsToMldev$2(fromObject) {
|
|
|
7435
7691
|
}
|
|
7436
7692
|
function googleSearchToMldev$2(fromObject) {
|
|
7437
7693
|
const toObject = {};
|
|
7438
|
-
|
|
7439
|
-
|
|
7694
|
+
const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
|
|
7695
|
+
if (fromSearchTypes != null) {
|
|
7696
|
+
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
7440
7697
|
}
|
|
7441
7698
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
7442
7699
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
7443
7700
|
}
|
|
7701
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
7702
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
7703
|
+
}
|
|
7444
7704
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7445
7705
|
'timeRangeFilter',
|
|
7446
7706
|
]);
|
|
@@ -7950,6 +8210,14 @@ function toolToMldev$2(fromObject) {
|
|
|
7950
8210
|
if (fromFileSearch != null) {
|
|
7951
8211
|
setValueByPath(toObject, ['fileSearch'], fromFileSearch);
|
|
7952
8212
|
}
|
|
8213
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
8214
|
+
if (fromGoogleSearch != null) {
|
|
8215
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
|
|
8216
|
+
}
|
|
8217
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8218
|
+
if (fromGoogleMaps != null) {
|
|
8219
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
|
|
8220
|
+
}
|
|
7953
8221
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
7954
8222
|
'codeExecution',
|
|
7955
8223
|
]);
|
|
@@ -7971,24 +8239,29 @@ function toolToMldev$2(fromObject) {
|
|
|
7971
8239
|
}
|
|
7972
8240
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
7973
8241
|
}
|
|
7974
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
7975
|
-
if (fromGoogleMaps != null) {
|
|
7976
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
|
|
7977
|
-
}
|
|
7978
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
7979
|
-
if (fromGoogleSearch != null) {
|
|
7980
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
|
|
7981
|
-
}
|
|
7982
8242
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
7983
8243
|
'googleSearchRetrieval',
|
|
7984
8244
|
]);
|
|
7985
8245
|
if (fromGoogleSearchRetrieval != null) {
|
|
7986
8246
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
7987
8247
|
}
|
|
8248
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
8249
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
8250
|
+
}
|
|
7988
8251
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
7989
8252
|
if (fromUrlContext != null) {
|
|
7990
8253
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
7991
8254
|
}
|
|
8255
|
+
const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
|
|
8256
|
+
if (fromMcpServers != null) {
|
|
8257
|
+
let transformedList = fromMcpServers;
|
|
8258
|
+
if (Array.isArray(transformedList)) {
|
|
8259
|
+
transformedList = transformedList.map((item) => {
|
|
8260
|
+
return item;
|
|
8261
|
+
});
|
|
8262
|
+
}
|
|
8263
|
+
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
8264
|
+
}
|
|
7992
8265
|
return toObject;
|
|
7993
8266
|
}
|
|
7994
8267
|
function toolToVertex$1(fromObject) {
|
|
@@ -8004,6 +8277,14 @@ function toolToVertex$1(fromObject) {
|
|
|
8004
8277
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
8005
8278
|
throw new Error('fileSearch parameter is not supported in Vertex AI.');
|
|
8006
8279
|
}
|
|
8280
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
8281
|
+
if (fromGoogleSearch != null) {
|
|
8282
|
+
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
8283
|
+
}
|
|
8284
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8285
|
+
if (fromGoogleMaps != null) {
|
|
8286
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
8287
|
+
}
|
|
8007
8288
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
8008
8289
|
'codeExecution',
|
|
8009
8290
|
]);
|
|
@@ -8028,24 +8309,25 @@ function toolToVertex$1(fromObject) {
|
|
|
8028
8309
|
}
|
|
8029
8310
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
8030
8311
|
}
|
|
8031
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8032
|
-
if (fromGoogleMaps != null) {
|
|
8033
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
8034
|
-
}
|
|
8035
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
8036
|
-
if (fromGoogleSearch != null) {
|
|
8037
|
-
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
8038
|
-
}
|
|
8039
8312
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
8040
8313
|
'googleSearchRetrieval',
|
|
8041
8314
|
]);
|
|
8042
8315
|
if (fromGoogleSearchRetrieval != null) {
|
|
8043
8316
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
8044
8317
|
}
|
|
8318
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
8319
|
+
'parallelAiSearch',
|
|
8320
|
+
]);
|
|
8321
|
+
if (fromParallelAiSearch != null) {
|
|
8322
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
8323
|
+
}
|
|
8045
8324
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
8046
8325
|
if (fromUrlContext != null) {
|
|
8047
8326
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
8048
8327
|
}
|
|
8328
|
+
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
8329
|
+
throw new Error('mcpServers parameter is not supported in Vertex AI.');
|
|
8330
|
+
}
|
|
8049
8331
|
return toObject;
|
|
8050
8332
|
}
|
|
8051
8333
|
function usageMetadataFromVertex(fromObject) {
|
|
@@ -8154,6 +8436,33 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
8154
8436
|
* Copyright 2025 Google LLC
|
|
8155
8437
|
* SPDX-License-Identifier: Apache-2.0
|
|
8156
8438
|
*/
|
|
8439
|
+
function authConfigToMldev$1(fromObject, _rootObject) {
|
|
8440
|
+
const toObject = {};
|
|
8441
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
8442
|
+
if (fromApiKey != null) {
|
|
8443
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
8444
|
+
}
|
|
8445
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
8446
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
8447
|
+
}
|
|
8448
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
8449
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
8450
|
+
}
|
|
8451
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
8452
|
+
undefined) {
|
|
8453
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
8454
|
+
}
|
|
8455
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
8456
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
8457
|
+
}
|
|
8458
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
8459
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
8460
|
+
}
|
|
8461
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
8462
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
8463
|
+
}
|
|
8464
|
+
return toObject;
|
|
8465
|
+
}
|
|
8157
8466
|
function blobToMldev$1(fromObject, _rootObject) {
|
|
8158
8467
|
const toObject = {};
|
|
8159
8468
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -8189,16 +8498,16 @@ function candidateFromMldev(fromObject, rootObject) {
|
|
|
8189
8498
|
if (fromFinishReason != null) {
|
|
8190
8499
|
setValueByPath(toObject, ['finishReason'], fromFinishReason);
|
|
8191
8500
|
}
|
|
8192
|
-
const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
|
|
8193
|
-
if (fromAvgLogprobs != null) {
|
|
8194
|
-
setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
|
|
8195
|
-
}
|
|
8196
8501
|
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
8197
8502
|
'groundingMetadata',
|
|
8198
8503
|
]);
|
|
8199
8504
|
if (fromGroundingMetadata != null) {
|
|
8200
8505
|
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
8201
8506
|
}
|
|
8507
|
+
const fromAvgLogprobs = getValueByPath(fromObject, ['avgLogprobs']);
|
|
8508
|
+
if (fromAvgLogprobs != null) {
|
|
8509
|
+
setValueByPath(toObject, ['avgLogprobs'], fromAvgLogprobs);
|
|
8510
|
+
}
|
|
8202
8511
|
const fromIndex = getValueByPath(fromObject, ['index']);
|
|
8203
8512
|
if (fromIndex != null) {
|
|
8204
8513
|
setValueByPath(toObject, ['index'], fromIndex);
|
|
@@ -10302,10 +10611,11 @@ function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
|
10302
10611
|
}
|
|
10303
10612
|
return toObject;
|
|
10304
10613
|
}
|
|
10305
|
-
function googleMapsToMldev$1(fromObject,
|
|
10614
|
+
function googleMapsToMldev$1(fromObject, rootObject) {
|
|
10306
10615
|
const toObject = {};
|
|
10307
|
-
|
|
10308
|
-
|
|
10616
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
10617
|
+
if (fromAuthConfig != null) {
|
|
10618
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$1(fromAuthConfig));
|
|
10309
10619
|
}
|
|
10310
10620
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
10311
10621
|
if (fromEnableWidget != null) {
|
|
@@ -10315,12 +10625,16 @@ function googleMapsToMldev$1(fromObject, _rootObject) {
|
|
|
10315
10625
|
}
|
|
10316
10626
|
function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
10317
10627
|
const toObject = {};
|
|
10318
|
-
|
|
10319
|
-
|
|
10628
|
+
const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
|
|
10629
|
+
if (fromSearchTypes != null) {
|
|
10630
|
+
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
10320
10631
|
}
|
|
10321
10632
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
10322
10633
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
10323
10634
|
}
|
|
10635
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
10636
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
10637
|
+
}
|
|
10324
10638
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
10325
10639
|
'timeRangeFilter',
|
|
10326
10640
|
]);
|
|
@@ -10342,6 +10656,9 @@ function imageConfigToMldev(fromObject, _rootObject) {
|
|
|
10342
10656
|
if (getValueByPath(fromObject, ['personGeneration']) !== undefined) {
|
|
10343
10657
|
throw new Error('personGeneration parameter is not supported in Gemini API.');
|
|
10344
10658
|
}
|
|
10659
|
+
if (getValueByPath(fromObject, ['prominentPeople']) !== undefined) {
|
|
10660
|
+
throw new Error('prominentPeople parameter is not supported in Gemini API.');
|
|
10661
|
+
}
|
|
10345
10662
|
if (getValueByPath(fromObject, ['outputMimeType']) !== undefined) {
|
|
10346
10663
|
throw new Error('outputMimeType parameter is not supported in Gemini API.');
|
|
10347
10664
|
}
|
|
@@ -10349,6 +10666,9 @@ function imageConfigToMldev(fromObject, _rootObject) {
|
|
|
10349
10666
|
undefined) {
|
|
10350
10667
|
throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
|
|
10351
10668
|
}
|
|
10669
|
+
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
10670
|
+
throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
|
|
10671
|
+
}
|
|
10352
10672
|
return toObject;
|
|
10353
10673
|
}
|
|
10354
10674
|
function imageConfigToVertex(fromObject, _rootObject) {
|
|
@@ -10367,6 +10687,12 @@ function imageConfigToVertex(fromObject, _rootObject) {
|
|
|
10367
10687
|
if (fromPersonGeneration != null) {
|
|
10368
10688
|
setValueByPath(toObject, ['personGeneration'], fromPersonGeneration);
|
|
10369
10689
|
}
|
|
10690
|
+
const fromProminentPeople = getValueByPath(fromObject, [
|
|
10691
|
+
'prominentPeople',
|
|
10692
|
+
]);
|
|
10693
|
+
if (fromProminentPeople != null) {
|
|
10694
|
+
setValueByPath(toObject, ['prominentPeople'], fromProminentPeople);
|
|
10695
|
+
}
|
|
10370
10696
|
const fromOutputMimeType = getValueByPath(fromObject, [
|
|
10371
10697
|
'outputMimeType',
|
|
10372
10698
|
]);
|
|
@@ -10379,6 +10705,12 @@ function imageConfigToVertex(fromObject, _rootObject) {
|
|
|
10379
10705
|
if (fromOutputCompressionQuality != null) {
|
|
10380
10706
|
setValueByPath(toObject, ['imageOutputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
10381
10707
|
}
|
|
10708
|
+
const fromImageOutputOptions = getValueByPath(fromObject, [
|
|
10709
|
+
'imageOutputOptions',
|
|
10710
|
+
]);
|
|
10711
|
+
if (fromImageOutputOptions != null) {
|
|
10712
|
+
setValueByPath(toObject, ['imageOutputOptions'], fromImageOutputOptions);
|
|
10713
|
+
}
|
|
10382
10714
|
return toObject;
|
|
10383
10715
|
}
|
|
10384
10716
|
function imageFromMldev(fromObject, _rootObject) {
|
|
@@ -11094,6 +11426,14 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
11094
11426
|
if (fromFileSearch != null) {
|
|
11095
11427
|
setValueByPath(toObject, ['fileSearch'], fromFileSearch);
|
|
11096
11428
|
}
|
|
11429
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
11430
|
+
if (fromGoogleSearch != null) {
|
|
11431
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
|
|
11432
|
+
}
|
|
11433
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11434
|
+
if (fromGoogleMaps != null) {
|
|
11435
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
|
|
11436
|
+
}
|
|
11097
11437
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
11098
11438
|
'codeExecution',
|
|
11099
11439
|
]);
|
|
@@ -11115,24 +11455,29 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
11115
11455
|
}
|
|
11116
11456
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
11117
11457
|
}
|
|
11118
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11119
|
-
if (fromGoogleMaps != null) {
|
|
11120
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
|
|
11121
|
-
}
|
|
11122
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
11123
|
-
if (fromGoogleSearch != null) {
|
|
11124
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
|
|
11125
|
-
}
|
|
11126
11458
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
11127
11459
|
'googleSearchRetrieval',
|
|
11128
11460
|
]);
|
|
11129
11461
|
if (fromGoogleSearchRetrieval != null) {
|
|
11130
11462
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
11131
11463
|
}
|
|
11464
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
11465
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
11466
|
+
}
|
|
11132
11467
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
11133
11468
|
if (fromUrlContext != null) {
|
|
11134
11469
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
11135
11470
|
}
|
|
11471
|
+
const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
|
|
11472
|
+
if (fromMcpServers != null) {
|
|
11473
|
+
let transformedList = fromMcpServers;
|
|
11474
|
+
if (Array.isArray(transformedList)) {
|
|
11475
|
+
transformedList = transformedList.map((item) => {
|
|
11476
|
+
return item;
|
|
11477
|
+
});
|
|
11478
|
+
}
|
|
11479
|
+
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
11480
|
+
}
|
|
11136
11481
|
return toObject;
|
|
11137
11482
|
}
|
|
11138
11483
|
function toolToVertex(fromObject, rootObject) {
|
|
@@ -11148,6 +11493,14 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
11148
11493
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
11149
11494
|
throw new Error('fileSearch parameter is not supported in Vertex AI.');
|
|
11150
11495
|
}
|
|
11496
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
11497
|
+
if (fromGoogleSearch != null) {
|
|
11498
|
+
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
11499
|
+
}
|
|
11500
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11501
|
+
if (fromGoogleMaps != null) {
|
|
11502
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
11503
|
+
}
|
|
11151
11504
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
11152
11505
|
'codeExecution',
|
|
11153
11506
|
]);
|
|
@@ -11172,24 +11525,25 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
11172
11525
|
}
|
|
11173
11526
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
11174
11527
|
}
|
|
11175
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11176
|
-
if (fromGoogleMaps != null) {
|
|
11177
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
11178
|
-
}
|
|
11179
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
11180
|
-
if (fromGoogleSearch != null) {
|
|
11181
|
-
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
11182
|
-
}
|
|
11183
11528
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
11184
11529
|
'googleSearchRetrieval',
|
|
11185
11530
|
]);
|
|
11186
11531
|
if (fromGoogleSearchRetrieval != null) {
|
|
11187
11532
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
11188
11533
|
}
|
|
11534
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
11535
|
+
'parallelAiSearch',
|
|
11536
|
+
]);
|
|
11537
|
+
if (fromParallelAiSearch != null) {
|
|
11538
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
11539
|
+
}
|
|
11189
11540
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
11190
11541
|
if (fromUrlContext != null) {
|
|
11191
11542
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
11192
11543
|
}
|
|
11544
|
+
if (getValueByPath(fromObject, ['mcpServers']) !== undefined) {
|
|
11545
|
+
throw new Error('mcpServers parameter is not supported in Vertex AI.');
|
|
11546
|
+
}
|
|
11193
11547
|
return toObject;
|
|
11194
11548
|
}
|
|
11195
11549
|
function tunedModelInfoFromMldev(fromObject, _rootObject) {
|
|
@@ -11746,7 +12100,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
11746
12100
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
11747
12101
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
11748
12102
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
11749
|
-
const SDK_VERSION = '1.
|
|
12103
|
+
const SDK_VERSION = '1.44.0'; // x-release-please-version
|
|
11750
12104
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
11751
12105
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
11752
12106
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -11765,6 +12119,9 @@ const DEFAULT_RETRY_HTTP_STATUS_CODES = [
|
|
|
11765
12119
|
/**
|
|
11766
12120
|
* The ApiClient class is used to send requests to the Gemini API or Vertex AI
|
|
11767
12121
|
* endpoints.
|
|
12122
|
+
*
|
|
12123
|
+
* WARNING: This is an internal API and may change without notice. Direct usage
|
|
12124
|
+
* is not supported and may break your application.
|
|
11768
12125
|
*/
|
|
11769
12126
|
class ApiClient {
|
|
11770
12127
|
constructor(opts) {
|
|
@@ -11812,10 +12169,7 @@ class ApiClient {
|
|
|
11812
12169
|
else {
|
|
11813
12170
|
// Gemini API
|
|
11814
12171
|
if (!this.clientOptions.apiKey) {
|
|
11815
|
-
|
|
11816
|
-
message: 'API key must be set when using the Gemini API.',
|
|
11817
|
-
status: 403,
|
|
11818
|
-
});
|
|
12172
|
+
console.warn('API key should be set when using the Gemini API.');
|
|
11819
12173
|
}
|
|
11820
12174
|
initHttpOptions.apiVersion =
|
|
11821
12175
|
(_c = this.clientOptions.apiVersion) !== null && _c !== void 0 ? _c : GOOGLE_AI_API_DEFAULT_VERSION;
|
|
@@ -15078,6 +15432,33 @@ class Operations extends BaseModule {
|
|
|
15078
15432
|
* Copyright 2025 Google LLC
|
|
15079
15433
|
* SPDX-License-Identifier: Apache-2.0
|
|
15080
15434
|
*/
|
|
15435
|
+
function authConfigToMldev(fromObject) {
|
|
15436
|
+
const toObject = {};
|
|
15437
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
15438
|
+
if (fromApiKey != null) {
|
|
15439
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
15440
|
+
}
|
|
15441
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
15442
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
15443
|
+
}
|
|
15444
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
15445
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
15446
|
+
}
|
|
15447
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
15448
|
+
undefined) {
|
|
15449
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
15450
|
+
}
|
|
15451
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
15452
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
15453
|
+
}
|
|
15454
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
15455
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
15456
|
+
}
|
|
15457
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
15458
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
15459
|
+
}
|
|
15460
|
+
return toObject;
|
|
15461
|
+
}
|
|
15081
15462
|
function blobToMldev(fromObject) {
|
|
15082
15463
|
const toObject = {};
|
|
15083
15464
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -15188,8 +15569,9 @@ function functionCallToMldev(fromObject) {
|
|
|
15188
15569
|
}
|
|
15189
15570
|
function googleMapsToMldev(fromObject) {
|
|
15190
15571
|
const toObject = {};
|
|
15191
|
-
|
|
15192
|
-
|
|
15572
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
15573
|
+
if (fromAuthConfig != null) {
|
|
15574
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev(fromAuthConfig));
|
|
15193
15575
|
}
|
|
15194
15576
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
15195
15577
|
if (fromEnableWidget != null) {
|
|
@@ -15199,12 +15581,16 @@ function googleMapsToMldev(fromObject) {
|
|
|
15199
15581
|
}
|
|
15200
15582
|
function googleSearchToMldev(fromObject) {
|
|
15201
15583
|
const toObject = {};
|
|
15202
|
-
|
|
15203
|
-
|
|
15584
|
+
const fromSearchTypes = getValueByPath(fromObject, ['searchTypes']);
|
|
15585
|
+
if (fromSearchTypes != null) {
|
|
15586
|
+
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
15204
15587
|
}
|
|
15205
15588
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
15206
15589
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
15207
15590
|
}
|
|
15591
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
15592
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
15593
|
+
}
|
|
15208
15594
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
15209
15595
|
'timeRangeFilter',
|
|
15210
15596
|
]);
|
|
@@ -15422,6 +15808,14 @@ function toolToMldev(fromObject) {
|
|
|
15422
15808
|
if (fromFileSearch != null) {
|
|
15423
15809
|
setValueByPath(toObject, ['fileSearch'], fromFileSearch);
|
|
15424
15810
|
}
|
|
15811
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
15812
|
+
if (fromGoogleSearch != null) {
|
|
15813
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
|
|
15814
|
+
}
|
|
15815
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
15816
|
+
if (fromGoogleMaps != null) {
|
|
15817
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
|
|
15818
|
+
}
|
|
15425
15819
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
15426
15820
|
'codeExecution',
|
|
15427
15821
|
]);
|
|
@@ -15443,24 +15837,29 @@ function toolToMldev(fromObject) {
|
|
|
15443
15837
|
}
|
|
15444
15838
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
15445
15839
|
}
|
|
15446
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
15447
|
-
if (fromGoogleMaps != null) {
|
|
15448
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
|
|
15449
|
-
}
|
|
15450
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
15451
|
-
if (fromGoogleSearch != null) {
|
|
15452
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
|
|
15453
|
-
}
|
|
15454
15840
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
15455
15841
|
'googleSearchRetrieval',
|
|
15456
15842
|
]);
|
|
15457
15843
|
if (fromGoogleSearchRetrieval != null) {
|
|
15458
15844
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
15459
15845
|
}
|
|
15846
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
15847
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
15848
|
+
}
|
|
15460
15849
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
15461
15850
|
if (fromUrlContext != null) {
|
|
15462
15851
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
15463
15852
|
}
|
|
15853
|
+
const fromMcpServers = getValueByPath(fromObject, ['mcpServers']);
|
|
15854
|
+
if (fromMcpServers != null) {
|
|
15855
|
+
let transformedList = fromMcpServers;
|
|
15856
|
+
if (Array.isArray(transformedList)) {
|
|
15857
|
+
transformedList = transformedList.map((item) => {
|
|
15858
|
+
return item;
|
|
15859
|
+
});
|
|
15860
|
+
}
|
|
15861
|
+
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
15862
|
+
}
|
|
15464
15863
|
return toObject;
|
|
15465
15864
|
}
|
|
15466
15865
|
|
|
@@ -16447,166 +16846,6 @@ const safeJSON = (text) => {
|
|
|
16447
16846
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
16448
16847
|
const sleep$1 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
16449
16848
|
|
|
16450
|
-
/**
|
|
16451
|
-
* @license
|
|
16452
|
-
* Copyright 2025 Google LLC
|
|
16453
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
16454
|
-
*/
|
|
16455
|
-
const VERSION = '0.0.1';
|
|
16456
|
-
|
|
16457
|
-
/**
|
|
16458
|
-
* @license
|
|
16459
|
-
* Copyright 2025 Google LLC
|
|
16460
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
16461
|
-
*/
|
|
16462
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
16463
|
-
/**
|
|
16464
|
-
* Note this does not detect 'browser'; for that, use getBrowserInfo().
|
|
16465
|
-
*/
|
|
16466
|
-
function getDetectedPlatform() {
|
|
16467
|
-
if (typeof Deno !== 'undefined' && Deno.build != null) {
|
|
16468
|
-
return 'deno';
|
|
16469
|
-
}
|
|
16470
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
16471
|
-
return 'edge';
|
|
16472
|
-
}
|
|
16473
|
-
if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') {
|
|
16474
|
-
return 'node';
|
|
16475
|
-
}
|
|
16476
|
-
return 'unknown';
|
|
16477
|
-
}
|
|
16478
|
-
const getPlatformProperties = () => {
|
|
16479
|
-
var _a, _b, _c, _d, _e;
|
|
16480
|
-
const detectedPlatform = getDetectedPlatform();
|
|
16481
|
-
if (detectedPlatform === 'deno') {
|
|
16482
|
-
return {
|
|
16483
|
-
'X-Stainless-Lang': 'js',
|
|
16484
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16485
|
-
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
16486
|
-
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
16487
|
-
'X-Stainless-Runtime': 'deno',
|
|
16488
|
-
'X-Stainless-Runtime-Version': typeof Deno.version === 'string' ? Deno.version : (_b = (_a = Deno.version) === null || _a === void 0 ? void 0 : _a.deno) !== null && _b !== void 0 ? _b : 'unknown',
|
|
16489
|
-
};
|
|
16490
|
-
}
|
|
16491
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
16492
|
-
return {
|
|
16493
|
-
'X-Stainless-Lang': 'js',
|
|
16494
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16495
|
-
'X-Stainless-OS': 'Unknown',
|
|
16496
|
-
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
16497
|
-
'X-Stainless-Runtime': 'edge',
|
|
16498
|
-
'X-Stainless-Runtime-Version': globalThis.process.version,
|
|
16499
|
-
};
|
|
16500
|
-
}
|
|
16501
|
-
// Check if Node.js
|
|
16502
|
-
if (detectedPlatform === 'node') {
|
|
16503
|
-
return {
|
|
16504
|
-
'X-Stainless-Lang': 'js',
|
|
16505
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16506
|
-
'X-Stainless-OS': normalizePlatform((_c = globalThis.process.platform) !== null && _c !== void 0 ? _c : 'unknown'),
|
|
16507
|
-
'X-Stainless-Arch': normalizeArch((_d = globalThis.process.arch) !== null && _d !== void 0 ? _d : 'unknown'),
|
|
16508
|
-
'X-Stainless-Runtime': 'node',
|
|
16509
|
-
'X-Stainless-Runtime-Version': (_e = globalThis.process.version) !== null && _e !== void 0 ? _e : 'unknown',
|
|
16510
|
-
};
|
|
16511
|
-
}
|
|
16512
|
-
const browserInfo = getBrowserInfo();
|
|
16513
|
-
if (browserInfo) {
|
|
16514
|
-
return {
|
|
16515
|
-
'X-Stainless-Lang': 'js',
|
|
16516
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16517
|
-
'X-Stainless-OS': 'Unknown',
|
|
16518
|
-
'X-Stainless-Arch': 'unknown',
|
|
16519
|
-
'X-Stainless-Runtime': `browser:${browserInfo.browser}`,
|
|
16520
|
-
'X-Stainless-Runtime-Version': browserInfo.version,
|
|
16521
|
-
};
|
|
16522
|
-
}
|
|
16523
|
-
// TODO add support for Cloudflare workers, etc.
|
|
16524
|
-
return {
|
|
16525
|
-
'X-Stainless-Lang': 'js',
|
|
16526
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16527
|
-
'X-Stainless-OS': 'Unknown',
|
|
16528
|
-
'X-Stainless-Arch': 'unknown',
|
|
16529
|
-
'X-Stainless-Runtime': 'unknown',
|
|
16530
|
-
'X-Stainless-Runtime-Version': 'unknown',
|
|
16531
|
-
};
|
|
16532
|
-
};
|
|
16533
|
-
// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
|
|
16534
|
-
function getBrowserInfo() {
|
|
16535
|
-
if (typeof navigator === 'undefined' || !navigator) {
|
|
16536
|
-
return null;
|
|
16537
|
-
}
|
|
16538
|
-
// NOTE: The order matters here!
|
|
16539
|
-
const browserPatterns = [
|
|
16540
|
-
{ key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16541
|
-
{ key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16542
|
-
{ key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16543
|
-
{ key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16544
|
-
{ key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16545
|
-
{ key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ },
|
|
16546
|
-
];
|
|
16547
|
-
// Find the FIRST matching browser
|
|
16548
|
-
for (const { key, pattern } of browserPatterns) {
|
|
16549
|
-
const match = pattern.exec(navigator.userAgent);
|
|
16550
|
-
if (match) {
|
|
16551
|
-
const major = match[1] || 0;
|
|
16552
|
-
const minor = match[2] || 0;
|
|
16553
|
-
const patch = match[3] || 0;
|
|
16554
|
-
return { browser: key, version: `${major}.${minor}.${patch}` };
|
|
16555
|
-
}
|
|
16556
|
-
}
|
|
16557
|
-
return null;
|
|
16558
|
-
}
|
|
16559
|
-
const normalizeArch = (arch) => {
|
|
16560
|
-
// Node docs:
|
|
16561
|
-
// - https://nodejs.org/api/process.html#processarch
|
|
16562
|
-
// Deno docs:
|
|
16563
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
16564
|
-
if (arch === 'x32')
|
|
16565
|
-
return 'x32';
|
|
16566
|
-
if (arch === 'x86_64' || arch === 'x64')
|
|
16567
|
-
return 'x64';
|
|
16568
|
-
if (arch === 'arm')
|
|
16569
|
-
return 'arm';
|
|
16570
|
-
if (arch === 'aarch64' || arch === 'arm64')
|
|
16571
|
-
return 'arm64';
|
|
16572
|
-
if (arch)
|
|
16573
|
-
return `other:${arch}`;
|
|
16574
|
-
return 'unknown';
|
|
16575
|
-
};
|
|
16576
|
-
const normalizePlatform = (platform) => {
|
|
16577
|
-
// Node platforms:
|
|
16578
|
-
// - https://nodejs.org/api/process.html#processplatform
|
|
16579
|
-
// Deno platforms:
|
|
16580
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
16581
|
-
// - https://github.com/denoland/deno/issues/14799
|
|
16582
|
-
platform = platform.toLowerCase();
|
|
16583
|
-
// NOTE: this iOS check is untested and may not work
|
|
16584
|
-
// Node does not work natively on IOS, there is a fork at
|
|
16585
|
-
// https://github.com/nodejs-mobile/nodejs-mobile
|
|
16586
|
-
// however it is unknown at the time of writing how to detect if it is running
|
|
16587
|
-
if (platform.includes('ios'))
|
|
16588
|
-
return 'iOS';
|
|
16589
|
-
if (platform === 'android')
|
|
16590
|
-
return 'Android';
|
|
16591
|
-
if (platform === 'darwin')
|
|
16592
|
-
return 'MacOS';
|
|
16593
|
-
if (platform === 'win32')
|
|
16594
|
-
return 'Windows';
|
|
16595
|
-
if (platform === 'freebsd')
|
|
16596
|
-
return 'FreeBSD';
|
|
16597
|
-
if (platform === 'openbsd')
|
|
16598
|
-
return 'OpenBSD';
|
|
16599
|
-
if (platform === 'linux')
|
|
16600
|
-
return 'Linux';
|
|
16601
|
-
if (platform)
|
|
16602
|
-
return `Other:${platform}`;
|
|
16603
|
-
return 'Unknown';
|
|
16604
|
-
};
|
|
16605
|
-
let _platformHeaders;
|
|
16606
|
-
const getPlatformHeaders = () => {
|
|
16607
|
-
return (_platformHeaders !== null && _platformHeaders !== void 0 ? _platformHeaders : (_platformHeaders = getPlatformProperties()));
|
|
16608
|
-
};
|
|
16609
|
-
|
|
16610
16849
|
/**
|
|
16611
16850
|
* @license
|
|
16612
16851
|
* Copyright 2025 Google LLC
|
|
@@ -16712,6 +16951,13 @@ const FallbackEncoder = ({ headers, body }) => {
|
|
|
16712
16951
|
};
|
|
16713
16952
|
};
|
|
16714
16953
|
|
|
16954
|
+
/**
|
|
16955
|
+
* @license
|
|
16956
|
+
* Copyright 2025 Google LLC
|
|
16957
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
16958
|
+
*/
|
|
16959
|
+
const VERSION = '0.0.1';
|
|
16960
|
+
|
|
16715
16961
|
/**
|
|
16716
16962
|
* @license
|
|
16717
16963
|
* Copyright 2025 Google LLC
|
|
@@ -16918,14 +17164,17 @@ const createPathTagFunction = (pathEncoder = encodeURIPath) => (function path(st
|
|
|
16918
17164
|
return previousValue + currentValue + (index === params.length ? '' : encoded);
|
|
16919
17165
|
}, '');
|
|
16920
17166
|
const pathOnly = path.split(/[?#]/, 1)[0];
|
|
16921
|
-
const invalidSegmentPattern = /(
|
|
17167
|
+
const invalidSegmentPattern = /(^|\/)(?:\.|%2e){1,2}(?=\/|$)/gi;
|
|
16922
17168
|
let match;
|
|
16923
17169
|
// Find all invalid segments
|
|
16924
17170
|
while ((match = invalidSegmentPattern.exec(pathOnly)) !== null) {
|
|
17171
|
+
const hasLeadingSlash = match[0].startsWith('/');
|
|
17172
|
+
const offset = hasLeadingSlash ? 1 : 0;
|
|
17173
|
+
const cleanMatch = hasLeadingSlash ? match[0].slice(1) : match[0];
|
|
16925
17174
|
invalidSegments.push({
|
|
16926
|
-
start: match.index,
|
|
16927
|
-
length:
|
|
16928
|
-
error: `Value "${
|
|
17175
|
+
start: match.index + offset,
|
|
17176
|
+
length: cleanMatch.length,
|
|
17177
|
+
error: `Value "${cleanMatch}" can\'t be safely passed as a path parameter`,
|
|
16929
17178
|
});
|
|
16930
17179
|
}
|
|
16931
17180
|
invalidSegments.sort((a, b) => a.start - b.start);
|
|
@@ -17047,8 +17296,10 @@ class LineDecoder {
|
|
|
17047
17296
|
constructor() {
|
|
17048
17297
|
this.buffer = new Uint8Array();
|
|
17049
17298
|
this.carriageReturnIndex = null;
|
|
17299
|
+
this.searchIndex = 0;
|
|
17050
17300
|
}
|
|
17051
17301
|
decode(chunk) {
|
|
17302
|
+
var _a;
|
|
17052
17303
|
if (chunk == null) {
|
|
17053
17304
|
return [];
|
|
17054
17305
|
}
|
|
@@ -17058,7 +17309,7 @@ class LineDecoder {
|
|
|
17058
17309
|
this.buffer = concatBytes([this.buffer, binaryChunk]);
|
|
17059
17310
|
const lines = [];
|
|
17060
17311
|
let patternIndex;
|
|
17061
|
-
while ((patternIndex = findNewlineIndex(this.buffer, this.carriageReturnIndex)) != null) {
|
|
17312
|
+
while ((patternIndex = findNewlineIndex(this.buffer, (_a = this.carriageReturnIndex) !== null && _a !== void 0 ? _a : this.searchIndex)) != null) {
|
|
17062
17313
|
if (patternIndex.carriage && this.carriageReturnIndex == null) {
|
|
17063
17314
|
// skip until we either get a corresponding `\n`, a new `\r` or nothing
|
|
17064
17315
|
this.carriageReturnIndex = patternIndex.index;
|
|
@@ -17070,6 +17321,7 @@ class LineDecoder {
|
|
|
17070
17321
|
lines.push(decodeUTF8(this.buffer.subarray(0, this.carriageReturnIndex - 1)));
|
|
17071
17322
|
this.buffer = this.buffer.subarray(this.carriageReturnIndex);
|
|
17072
17323
|
this.carriageReturnIndex = null;
|
|
17324
|
+
this.searchIndex = 0;
|
|
17073
17325
|
continue;
|
|
17074
17326
|
}
|
|
17075
17327
|
const endIndex = this.carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
|
@@ -17077,7 +17329,9 @@ class LineDecoder {
|
|
|
17077
17329
|
lines.push(line);
|
|
17078
17330
|
this.buffer = this.buffer.subarray(patternIndex.index);
|
|
17079
17331
|
this.carriageReturnIndex = null;
|
|
17332
|
+
this.searchIndex = 0;
|
|
17080
17333
|
}
|
|
17334
|
+
this.searchIndex = Math.max(0, this.buffer.length - 1);
|
|
17081
17335
|
return lines;
|
|
17082
17336
|
}
|
|
17083
17337
|
flush() {
|
|
@@ -17102,41 +17356,23 @@ LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
|
|
17102
17356
|
function findNewlineIndex(buffer, startIndex) {
|
|
17103
17357
|
const newline = 0x0a; // \n
|
|
17104
17358
|
const carriage = 0x0d; // \r
|
|
17105
|
-
|
|
17106
|
-
|
|
17107
|
-
|
|
17108
|
-
|
|
17109
|
-
|
|
17110
|
-
return { preceding: i, index: i + 1, carriage: true };
|
|
17111
|
-
}
|
|
17359
|
+
const start = startIndex !== null && startIndex !== void 0 ? startIndex : 0;
|
|
17360
|
+
const nextNewline = buffer.indexOf(newline, start);
|
|
17361
|
+
const nextCarriage = buffer.indexOf(carriage, start);
|
|
17362
|
+
if (nextNewline === -1 && nextCarriage === -1) {
|
|
17363
|
+
return null;
|
|
17112
17364
|
}
|
|
17113
|
-
|
|
17114
|
-
|
|
17115
|
-
|
|
17116
|
-
// This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n)
|
|
17117
|
-
// and returns the index right after the first occurrence of any pattern,
|
|
17118
|
-
// or -1 if none of the patterns are found.
|
|
17119
|
-
const newline = 0x0a; // \n
|
|
17120
|
-
const carriage = 0x0d; // \r
|
|
17121
|
-
for (let i = 0; i < buffer.length - 1; i++) {
|
|
17122
|
-
if (buffer[i] === newline && buffer[i + 1] === newline) {
|
|
17123
|
-
// \n\n
|
|
17124
|
-
return i + 2;
|
|
17125
|
-
}
|
|
17126
|
-
if (buffer[i] === carriage && buffer[i + 1] === carriage) {
|
|
17127
|
-
// \r\r
|
|
17128
|
-
return i + 2;
|
|
17129
|
-
}
|
|
17130
|
-
if (buffer[i] === carriage &&
|
|
17131
|
-
buffer[i + 1] === newline &&
|
|
17132
|
-
i + 3 < buffer.length &&
|
|
17133
|
-
buffer[i + 2] === carriage &&
|
|
17134
|
-
buffer[i + 3] === newline) {
|
|
17135
|
-
// \r\n\r\n
|
|
17136
|
-
return i + 4;
|
|
17137
|
-
}
|
|
17365
|
+
let i;
|
|
17366
|
+
if (nextNewline !== -1 && nextCarriage !== -1) {
|
|
17367
|
+
i = Math.min(nextNewline, nextCarriage);
|
|
17138
17368
|
}
|
|
17139
|
-
|
|
17369
|
+
else {
|
|
17370
|
+
i = nextNewline !== -1 ? nextNewline : nextCarriage;
|
|
17371
|
+
}
|
|
17372
|
+
if (buffer[i] === newline) {
|
|
17373
|
+
return { preceding: i, index: i + 1, carriage: false };
|
|
17374
|
+
}
|
|
17375
|
+
return { preceding: i, index: i + 1, carriage: true };
|
|
17140
17376
|
}
|
|
17141
17377
|
|
|
17142
17378
|
/**
|
|
@@ -17447,7 +17683,7 @@ function _iterSSEMessages(response, controller) {
|
|
|
17447
17683
|
const lineDecoder = new LineDecoder();
|
|
17448
17684
|
const iter = ReadableStreamToAsyncIterable(response.body);
|
|
17449
17685
|
try {
|
|
17450
|
-
for (var _d = true, _e = __asyncValues(
|
|
17686
|
+
for (var _d = true, _e = __asyncValues(iterBinaryChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
17451
17687
|
_c = _f.value;
|
|
17452
17688
|
_d = false;
|
|
17453
17689
|
const sseChunk = _c;
|
|
@@ -17473,13 +17709,12 @@ function _iterSSEMessages(response, controller) {
|
|
|
17473
17709
|
});
|
|
17474
17710
|
}
|
|
17475
17711
|
/**
|
|
17476
|
-
* Given an async iterable iterator,
|
|
17477
|
-
*
|
|
17712
|
+
* Given an async iterable iterator, normalizes each chunk to a
|
|
17713
|
+
* Uint8Array and yields it.
|
|
17478
17714
|
*/
|
|
17479
|
-
function
|
|
17480
|
-
return __asyncGenerator(this, arguments, function*
|
|
17715
|
+
function iterBinaryChunks(iterator) {
|
|
17716
|
+
return __asyncGenerator(this, arguments, function* iterBinaryChunks_1() {
|
|
17481
17717
|
var _a, e_5, _b, _c;
|
|
17482
|
-
let data = new Uint8Array();
|
|
17483
17718
|
try {
|
|
17484
17719
|
for (var _d = true, iterator_3 = __asyncValues(iterator), iterator_3_1; iterator_3_1 = yield __await(iterator_3.next()), _a = iterator_3_1.done, !_a; _d = true) {
|
|
17485
17720
|
_c = iterator_3_1.value;
|
|
@@ -17491,15 +17726,7 @@ function iterSSEChunks(iterator) {
|
|
|
17491
17726
|
const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk)
|
|
17492
17727
|
: typeof chunk === 'string' ? encodeUTF8(chunk)
|
|
17493
17728
|
: chunk;
|
|
17494
|
-
|
|
17495
|
-
newData.set(data);
|
|
17496
|
-
newData.set(binaryChunk, data.length);
|
|
17497
|
-
data = newData;
|
|
17498
|
-
let patternIndex;
|
|
17499
|
-
while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {
|
|
17500
|
-
yield yield __await(data.slice(0, patternIndex));
|
|
17501
|
-
data = data.slice(patternIndex);
|
|
17502
|
-
}
|
|
17729
|
+
yield yield __await(binaryChunk);
|
|
17503
17730
|
}
|
|
17504
17731
|
}
|
|
17505
17732
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
@@ -17509,9 +17736,6 @@ function iterSSEChunks(iterator) {
|
|
|
17509
17736
|
}
|
|
17510
17737
|
finally { if (e_5) throw e_5.error; }
|
|
17511
17738
|
}
|
|
17512
|
-
if (data.length > 0) {
|
|
17513
|
-
yield yield __await(data);
|
|
17514
|
-
}
|
|
17515
17739
|
});
|
|
17516
17740
|
}
|
|
17517
17741
|
class SSEDecoder {
|
|
@@ -18163,7 +18387,7 @@ class BaseGeminiNextGenAPIClient {
|
|
|
18163
18387
|
const authHeaders = await this.authHeaders(options);
|
|
18164
18388
|
let headers = buildHeaders([
|
|
18165
18389
|
idempotencyHeaders,
|
|
18166
|
-
|
|
18390
|
+
{ Accept: 'application/json', 'User-Agent': this.getUserAgent() },
|
|
18167
18391
|
this._options.defaultHeaders,
|
|
18168
18392
|
bodyHeaders,
|
|
18169
18393
|
options.headers,
|
|
@@ -19186,10 +19410,28 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19186
19410
|
if (fromCustomBaseModel != null) {
|
|
19187
19411
|
setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
|
|
19188
19412
|
}
|
|
19413
|
+
const fromEvaluateDatasetRuns = getValueByPath(fromObject, [
|
|
19414
|
+
'evaluateDatasetRuns',
|
|
19415
|
+
]);
|
|
19416
|
+
if (fromEvaluateDatasetRuns != null) {
|
|
19417
|
+
let transformedList = fromEvaluateDatasetRuns;
|
|
19418
|
+
if (Array.isArray(transformedList)) {
|
|
19419
|
+
transformedList = transformedList.map((item) => {
|
|
19420
|
+
return item;
|
|
19421
|
+
});
|
|
19422
|
+
}
|
|
19423
|
+
setValueByPath(toObject, ['evaluateDatasetRuns'], transformedList);
|
|
19424
|
+
}
|
|
19189
19425
|
const fromExperiment = getValueByPath(fromObject, ['experiment']);
|
|
19190
19426
|
if (fromExperiment != null) {
|
|
19191
19427
|
setValueByPath(toObject, ['experiment'], fromExperiment);
|
|
19192
19428
|
}
|
|
19429
|
+
const fromFullFineTuningSpec = getValueByPath(fromObject, [
|
|
19430
|
+
'fullFineTuningSpec',
|
|
19431
|
+
]);
|
|
19432
|
+
if (fromFullFineTuningSpec != null) {
|
|
19433
|
+
setValueByPath(toObject, ['fullFineTuningSpec'], fromFullFineTuningSpec);
|
|
19434
|
+
}
|
|
19193
19435
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19194
19436
|
if (fromLabels != null) {
|
|
19195
19437
|
setValueByPath(toObject, ['labels'], fromLabels);
|
|
@@ -19214,6 +19456,12 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19214
19456
|
if (fromTunedModelDisplayName != null) {
|
|
19215
19457
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19216
19458
|
}
|
|
19459
|
+
const fromTuningJobState = getValueByPath(fromObject, [
|
|
19460
|
+
'tuningJobState',
|
|
19461
|
+
]);
|
|
19462
|
+
if (fromTuningJobState != null) {
|
|
19463
|
+
setValueByPath(toObject, ['tuningJobState'], fromTuningJobState);
|
|
19464
|
+
}
|
|
19217
19465
|
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19218
19466
|
'veoTuningSpec',
|
|
19219
19467
|
]);
|
|
@@ -20066,7 +20314,7 @@ class GoogleGenAI {
|
|
|
20066
20314
|
this.project = (_d = options.project) !== null && _d !== void 0 ? _d : envProject;
|
|
20067
20315
|
this.location = (_e = options.location) !== null && _e !== void 0 ? _e : envLocation;
|
|
20068
20316
|
if (!this.vertexai && !this.apiKey) {
|
|
20069
|
-
|
|
20317
|
+
console.warn('API key should be set when using the Gemini API.');
|
|
20070
20318
|
}
|
|
20071
20319
|
// Handle when to use Vertex AI in express mode (api key)
|
|
20072
20320
|
if (options.vertexai) {
|
|
@@ -20161,5 +20409,5 @@ function getApiKeyFromEnv() {
|
|
|
20161
20409
|
return envGoogleApiKey || envGeminiApiKey || undefined;
|
|
20162
20410
|
}
|
|
20163
20411
|
|
|
20164
|
-
export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, TrafficType, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
20412
|
+
export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
20165
20413
|
//# sourceMappingURL=index.mjs.map
|