@google/genai 1.43.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 +643 -221
- package/dist/index.cjs +482 -343
- package/dist/index.mjs +482 -344
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +483 -344
- package/dist/node/index.mjs +483 -345
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +643 -221
- package/dist/tokenizer/node.cjs +171 -67
- package/dist/tokenizer/node.d.ts +96 -83
- package/dist/tokenizer/node.mjs +171 -67
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/web/index.mjs +482 -344
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +643 -221
- 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
|
/**
|
|
@@ -714,22 +714,6 @@ var PhishBlockThreshold;
|
|
|
714
714
|
*/
|
|
715
715
|
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
716
716
|
})(PhishBlockThreshold || (PhishBlockThreshold = {}));
|
|
717
|
-
/** The API spec that the external API implements. This enum is not supported in Gemini API. */
|
|
718
|
-
var ApiSpec;
|
|
719
|
-
(function (ApiSpec) {
|
|
720
|
-
/**
|
|
721
|
-
* Unspecified API spec. This value should not be used.
|
|
722
|
-
*/
|
|
723
|
-
ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
|
|
724
|
-
/**
|
|
725
|
-
* Simple search API spec.
|
|
726
|
-
*/
|
|
727
|
-
ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
|
|
728
|
-
/**
|
|
729
|
-
* Elastic search API spec.
|
|
730
|
-
*/
|
|
731
|
-
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
732
|
-
})(ApiSpec || (ApiSpec = {}));
|
|
733
717
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
734
718
|
var AuthType;
|
|
735
719
|
(function (AuthType) {
|
|
@@ -784,6 +768,22 @@ var HttpElementLocation;
|
|
|
784
768
|
*/
|
|
785
769
|
HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
|
|
786
770
|
})(HttpElementLocation || (HttpElementLocation = {}));
|
|
771
|
+
/** The API spec that the external API implements. This enum is not supported in Gemini API. */
|
|
772
|
+
var ApiSpec;
|
|
773
|
+
(function (ApiSpec) {
|
|
774
|
+
/**
|
|
775
|
+
* Unspecified API spec. This value should not be used.
|
|
776
|
+
*/
|
|
777
|
+
ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
|
|
778
|
+
/**
|
|
779
|
+
* Simple search API spec.
|
|
780
|
+
*/
|
|
781
|
+
ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
|
|
782
|
+
/**
|
|
783
|
+
* Elastic search API spec.
|
|
784
|
+
*/
|
|
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) {
|
|
@@ -1402,22 +1522,6 @@ var SafetyFilterLevel;
|
|
|
1402
1522
|
SafetyFilterLevel["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
|
|
1403
1523
|
SafetyFilterLevel["BLOCK_NONE"] = "BLOCK_NONE";
|
|
1404
1524
|
})(SafetyFilterLevel || (SafetyFilterLevel = {}));
|
|
1405
|
-
/** Enum that controls the generation of people. */
|
|
1406
|
-
var PersonGeneration;
|
|
1407
|
-
(function (PersonGeneration) {
|
|
1408
|
-
/**
|
|
1409
|
-
* Block generation of images of people.
|
|
1410
|
-
*/
|
|
1411
|
-
PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
|
|
1412
|
-
/**
|
|
1413
|
-
* Generate images of adults, but not children.
|
|
1414
|
-
*/
|
|
1415
|
-
PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
|
|
1416
|
-
/**
|
|
1417
|
-
* Generate images that include adults and children.
|
|
1418
|
-
*/
|
|
1419
|
-
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
1420
|
-
})(PersonGeneration || (PersonGeneration = {}));
|
|
1421
1525
|
/** Enum that specifies the language of the text in the prompt. */
|
|
1422
1526
|
var ImagePromptLanguage;
|
|
1423
1527
|
(function (ImagePromptLanguage) {
|
|
@@ -2316,6 +2420,9 @@ class GenerateVideosOperation {
|
|
|
2316
2420
|
return operation;
|
|
2317
2421
|
}
|
|
2318
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
|
+
}
|
|
2319
2426
|
/** Response for the list tuning jobs method. */
|
|
2320
2427
|
class ListTuningJobsResponse {
|
|
2321
2428
|
}
|
|
@@ -3435,6 +3542,33 @@ function tIsVertexEmbedContentModel(model) {
|
|
|
3435
3542
|
* Copyright 2025 Google LLC
|
|
3436
3543
|
* SPDX-License-Identifier: Apache-2.0
|
|
3437
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
|
+
}
|
|
3438
3572
|
function batchJobDestinationFromMldev(fromObject) {
|
|
3439
3573
|
const toObject = {};
|
|
3440
3574
|
const fromFileName = getValueByPath(fromObject, ['responsesFile']);
|
|
@@ -4284,8 +4418,9 @@ function getBatchJobParametersToVertex(apiClient, fromObject) {
|
|
|
4284
4418
|
}
|
|
4285
4419
|
function googleMapsToMldev$4(fromObject) {
|
|
4286
4420
|
const toObject = {};
|
|
4287
|
-
|
|
4288
|
-
|
|
4421
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
4422
|
+
if (fromAuthConfig != null) {
|
|
4423
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$4(fromAuthConfig));
|
|
4289
4424
|
}
|
|
4290
4425
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
4291
4426
|
if (fromEnableWidget != null) {
|
|
@@ -4299,12 +4434,12 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
4299
4434
|
if (fromSearchTypes != null) {
|
|
4300
4435
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
4301
4436
|
}
|
|
4302
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4303
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
4304
|
-
}
|
|
4305
4437
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
4306
4438
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
4307
4439
|
}
|
|
4440
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4441
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
4442
|
+
}
|
|
4308
4443
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
4309
4444
|
'timeRangeFilter',
|
|
4310
4445
|
]);
|
|
@@ -4336,6 +4471,9 @@ function imageConfigToMldev$1(fromObject) {
|
|
|
4336
4471
|
undefined) {
|
|
4337
4472
|
throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
|
|
4338
4473
|
}
|
|
4474
|
+
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
4475
|
+
throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
|
|
4476
|
+
}
|
|
4339
4477
|
return toObject;
|
|
4340
4478
|
}
|
|
4341
4479
|
function inlinedRequestToMldev(apiClient, fromObject) {
|
|
@@ -4589,6 +4727,10 @@ function toolToMldev$4(fromObject) {
|
|
|
4589
4727
|
if (fromGoogleSearch != null) {
|
|
4590
4728
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
|
|
4591
4729
|
}
|
|
4730
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
4731
|
+
if (fromGoogleMaps != null) {
|
|
4732
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
|
|
4733
|
+
}
|
|
4592
4734
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
4593
4735
|
'codeExecution',
|
|
4594
4736
|
]);
|
|
@@ -4610,16 +4752,15 @@ function toolToMldev$4(fromObject) {
|
|
|
4610
4752
|
}
|
|
4611
4753
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
4612
4754
|
}
|
|
4613
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
4614
|
-
if (fromGoogleMaps != null) {
|
|
4615
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
|
|
4616
|
-
}
|
|
4617
4755
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
4618
4756
|
'googleSearchRetrieval',
|
|
4619
4757
|
]);
|
|
4620
4758
|
if (fromGoogleSearchRetrieval != null) {
|
|
4621
4759
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
4622
4760
|
}
|
|
4761
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
4762
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
4763
|
+
}
|
|
4623
4764
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
4624
4765
|
if (fromUrlContext != null) {
|
|
4625
4766
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -5329,6 +5470,33 @@ class Batches extends BaseModule {
|
|
|
5329
5470
|
* Copyright 2025 Google LLC
|
|
5330
5471
|
* SPDX-License-Identifier: Apache-2.0
|
|
5331
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
|
+
}
|
|
5332
5500
|
function blobToMldev$3(fromObject) {
|
|
5333
5501
|
const toObject = {};
|
|
5334
5502
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -5629,8 +5797,9 @@ function getCachedContentParametersToVertex(apiClient, fromObject) {
|
|
|
5629
5797
|
}
|
|
5630
5798
|
function googleMapsToMldev$3(fromObject) {
|
|
5631
5799
|
const toObject = {};
|
|
5632
|
-
|
|
5633
|
-
|
|
5800
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
5801
|
+
if (fromAuthConfig != null) {
|
|
5802
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$3(fromAuthConfig));
|
|
5634
5803
|
}
|
|
5635
5804
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
5636
5805
|
if (fromEnableWidget != null) {
|
|
@@ -5644,12 +5813,12 @@ function googleSearchToMldev$3(fromObject) {
|
|
|
5644
5813
|
if (fromSearchTypes != null) {
|
|
5645
5814
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
5646
5815
|
}
|
|
5647
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
5648
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
5649
|
-
}
|
|
5650
5816
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
5651
5817
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
5652
5818
|
}
|
|
5819
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
5820
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
5821
|
+
}
|
|
5653
5822
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
5654
5823
|
'timeRangeFilter',
|
|
5655
5824
|
]);
|
|
@@ -5847,6 +6016,10 @@ function toolToMldev$3(fromObject) {
|
|
|
5847
6016
|
if (fromGoogleSearch != null) {
|
|
5848
6017
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
|
|
5849
6018
|
}
|
|
6019
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
6020
|
+
if (fromGoogleMaps != null) {
|
|
6021
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
|
|
6022
|
+
}
|
|
5850
6023
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5851
6024
|
'codeExecution',
|
|
5852
6025
|
]);
|
|
@@ -5868,16 +6041,15 @@ function toolToMldev$3(fromObject) {
|
|
|
5868
6041
|
}
|
|
5869
6042
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
5870
6043
|
}
|
|
5871
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5872
|
-
if (fromGoogleMaps != null) {
|
|
5873
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
|
|
5874
|
-
}
|
|
5875
6044
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5876
6045
|
'googleSearchRetrieval',
|
|
5877
6046
|
]);
|
|
5878
6047
|
if (fromGoogleSearchRetrieval != null) {
|
|
5879
6048
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5880
6049
|
}
|
|
6050
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
6051
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
6052
|
+
}
|
|
5881
6053
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5882
6054
|
if (fromUrlContext != null) {
|
|
5883
6055
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -5911,6 +6083,10 @@ function toolToVertex$2(fromObject) {
|
|
|
5911
6083
|
if (fromGoogleSearch != null) {
|
|
5912
6084
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
5913
6085
|
}
|
|
6086
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
6087
|
+
if (fromGoogleMaps != null) {
|
|
6088
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
6089
|
+
}
|
|
5914
6090
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5915
6091
|
'codeExecution',
|
|
5916
6092
|
]);
|
|
@@ -5935,16 +6111,18 @@ function toolToVertex$2(fromObject) {
|
|
|
5935
6111
|
}
|
|
5936
6112
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
5937
6113
|
}
|
|
5938
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5939
|
-
if (fromGoogleMaps != null) {
|
|
5940
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
5941
|
-
}
|
|
5942
6114
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5943
6115
|
'googleSearchRetrieval',
|
|
5944
6116
|
]);
|
|
5945
6117
|
if (fromGoogleSearchRetrieval != null) {
|
|
5946
6118
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5947
6119
|
}
|
|
6120
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
6121
|
+
'parallelAiSearch',
|
|
6122
|
+
]);
|
|
6123
|
+
if (fromParallelAiSearch != null) {
|
|
6124
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
6125
|
+
}
|
|
5948
6126
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5949
6127
|
if (fromUrlContext != null) {
|
|
5950
6128
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -7239,6 +7417,33 @@ class Files extends BaseModule {
|
|
|
7239
7417
|
* Copyright 2025 Google LLC
|
|
7240
7418
|
* SPDX-License-Identifier: Apache-2.0
|
|
7241
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
|
+
}
|
|
7242
7447
|
function blobToMldev$2(fromObject) {
|
|
7243
7448
|
const toObject = {};
|
|
7244
7449
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -7474,8 +7679,9 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
7474
7679
|
}
|
|
7475
7680
|
function googleMapsToMldev$2(fromObject) {
|
|
7476
7681
|
const toObject = {};
|
|
7477
|
-
|
|
7478
|
-
|
|
7682
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7683
|
+
if (fromAuthConfig != null) {
|
|
7684
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$2(fromAuthConfig));
|
|
7479
7685
|
}
|
|
7480
7686
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
7481
7687
|
if (fromEnableWidget != null) {
|
|
@@ -7489,12 +7695,12 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
7489
7695
|
if (fromSearchTypes != null) {
|
|
7490
7696
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
7491
7697
|
}
|
|
7492
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
7493
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
7494
|
-
}
|
|
7495
7698
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
7496
7699
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
7497
7700
|
}
|
|
7701
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
7702
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
7703
|
+
}
|
|
7498
7704
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7499
7705
|
'timeRangeFilter',
|
|
7500
7706
|
]);
|
|
@@ -8008,6 +8214,10 @@ function toolToMldev$2(fromObject) {
|
|
|
8008
8214
|
if (fromGoogleSearch != null) {
|
|
8009
8215
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
|
|
8010
8216
|
}
|
|
8217
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8218
|
+
if (fromGoogleMaps != null) {
|
|
8219
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
|
|
8220
|
+
}
|
|
8011
8221
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
8012
8222
|
'codeExecution',
|
|
8013
8223
|
]);
|
|
@@ -8029,16 +8239,15 @@ function toolToMldev$2(fromObject) {
|
|
|
8029
8239
|
}
|
|
8030
8240
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
8031
8241
|
}
|
|
8032
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8033
|
-
if (fromGoogleMaps != null) {
|
|
8034
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
|
|
8035
|
-
}
|
|
8036
8242
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
8037
8243
|
'googleSearchRetrieval',
|
|
8038
8244
|
]);
|
|
8039
8245
|
if (fromGoogleSearchRetrieval != null) {
|
|
8040
8246
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
8041
8247
|
}
|
|
8248
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
8249
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
8250
|
+
}
|
|
8042
8251
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
8043
8252
|
if (fromUrlContext != null) {
|
|
8044
8253
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -8072,6 +8281,10 @@ function toolToVertex$1(fromObject) {
|
|
|
8072
8281
|
if (fromGoogleSearch != null) {
|
|
8073
8282
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
8074
8283
|
}
|
|
8284
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8285
|
+
if (fromGoogleMaps != null) {
|
|
8286
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
8287
|
+
}
|
|
8075
8288
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
8076
8289
|
'codeExecution',
|
|
8077
8290
|
]);
|
|
@@ -8096,16 +8309,18 @@ function toolToVertex$1(fromObject) {
|
|
|
8096
8309
|
}
|
|
8097
8310
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
8098
8311
|
}
|
|
8099
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8100
|
-
if (fromGoogleMaps != null) {
|
|
8101
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
8102
|
-
}
|
|
8103
8312
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
8104
8313
|
'googleSearchRetrieval',
|
|
8105
8314
|
]);
|
|
8106
8315
|
if (fromGoogleSearchRetrieval != null) {
|
|
8107
8316
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
8108
8317
|
}
|
|
8318
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
8319
|
+
'parallelAiSearch',
|
|
8320
|
+
]);
|
|
8321
|
+
if (fromParallelAiSearch != null) {
|
|
8322
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
8323
|
+
}
|
|
8109
8324
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
8110
8325
|
if (fromUrlContext != null) {
|
|
8111
8326
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -8221,6 +8436,33 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
8221
8436
|
* Copyright 2025 Google LLC
|
|
8222
8437
|
* SPDX-License-Identifier: Apache-2.0
|
|
8223
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
|
+
}
|
|
8224
8466
|
function blobToMldev$1(fromObject, _rootObject) {
|
|
8225
8467
|
const toObject = {};
|
|
8226
8468
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -10369,10 +10611,11 @@ function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
|
10369
10611
|
}
|
|
10370
10612
|
return toObject;
|
|
10371
10613
|
}
|
|
10372
|
-
function googleMapsToMldev$1(fromObject,
|
|
10614
|
+
function googleMapsToMldev$1(fromObject, rootObject) {
|
|
10373
10615
|
const toObject = {};
|
|
10374
|
-
|
|
10375
|
-
|
|
10616
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
10617
|
+
if (fromAuthConfig != null) {
|
|
10618
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$1(fromAuthConfig));
|
|
10376
10619
|
}
|
|
10377
10620
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
10378
10621
|
if (fromEnableWidget != null) {
|
|
@@ -10386,12 +10629,12 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
|
10386
10629
|
if (fromSearchTypes != null) {
|
|
10387
10630
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
10388
10631
|
}
|
|
10389
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
10390
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
10391
|
-
}
|
|
10392
10632
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
10393
10633
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
10394
10634
|
}
|
|
10635
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
10636
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
10637
|
+
}
|
|
10395
10638
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
10396
10639
|
'timeRangeFilter',
|
|
10397
10640
|
]);
|
|
@@ -10423,6 +10666,9 @@ function imageConfigToMldev(fromObject, _rootObject) {
|
|
|
10423
10666
|
undefined) {
|
|
10424
10667
|
throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
|
|
10425
10668
|
}
|
|
10669
|
+
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
10670
|
+
throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
|
|
10671
|
+
}
|
|
10426
10672
|
return toObject;
|
|
10427
10673
|
}
|
|
10428
10674
|
function imageConfigToVertex(fromObject, _rootObject) {
|
|
@@ -10459,6 +10705,12 @@ function imageConfigToVertex(fromObject, _rootObject) {
|
|
|
10459
10705
|
if (fromOutputCompressionQuality != null) {
|
|
10460
10706
|
setValueByPath(toObject, ['imageOutputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
10461
10707
|
}
|
|
10708
|
+
const fromImageOutputOptions = getValueByPath(fromObject, [
|
|
10709
|
+
'imageOutputOptions',
|
|
10710
|
+
]);
|
|
10711
|
+
if (fromImageOutputOptions != null) {
|
|
10712
|
+
setValueByPath(toObject, ['imageOutputOptions'], fromImageOutputOptions);
|
|
10713
|
+
}
|
|
10462
10714
|
return toObject;
|
|
10463
10715
|
}
|
|
10464
10716
|
function imageFromMldev(fromObject, _rootObject) {
|
|
@@ -11178,6 +11430,10 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
11178
11430
|
if (fromGoogleSearch != null) {
|
|
11179
11431
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
|
|
11180
11432
|
}
|
|
11433
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11434
|
+
if (fromGoogleMaps != null) {
|
|
11435
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
|
|
11436
|
+
}
|
|
11181
11437
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
11182
11438
|
'codeExecution',
|
|
11183
11439
|
]);
|
|
@@ -11199,16 +11455,15 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
11199
11455
|
}
|
|
11200
11456
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
11201
11457
|
}
|
|
11202
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11203
|
-
if (fromGoogleMaps != null) {
|
|
11204
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
|
|
11205
|
-
}
|
|
11206
11458
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
11207
11459
|
'googleSearchRetrieval',
|
|
11208
11460
|
]);
|
|
11209
11461
|
if (fromGoogleSearchRetrieval != null) {
|
|
11210
11462
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
11211
11463
|
}
|
|
11464
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
11465
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
11466
|
+
}
|
|
11212
11467
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
11213
11468
|
if (fromUrlContext != null) {
|
|
11214
11469
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -11242,6 +11497,10 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
11242
11497
|
if (fromGoogleSearch != null) {
|
|
11243
11498
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
11244
11499
|
}
|
|
11500
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11501
|
+
if (fromGoogleMaps != null) {
|
|
11502
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
11503
|
+
}
|
|
11245
11504
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
11246
11505
|
'codeExecution',
|
|
11247
11506
|
]);
|
|
@@ -11266,16 +11525,18 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
11266
11525
|
}
|
|
11267
11526
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
11268
11527
|
}
|
|
11269
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11270
|
-
if (fromGoogleMaps != null) {
|
|
11271
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
11272
|
-
}
|
|
11273
11528
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
11274
11529
|
'googleSearchRetrieval',
|
|
11275
11530
|
]);
|
|
11276
11531
|
if (fromGoogleSearchRetrieval != null) {
|
|
11277
11532
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
11278
11533
|
}
|
|
11534
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
11535
|
+
'parallelAiSearch',
|
|
11536
|
+
]);
|
|
11537
|
+
if (fromParallelAiSearch != null) {
|
|
11538
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
11539
|
+
}
|
|
11279
11540
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
11280
11541
|
if (fromUrlContext != null) {
|
|
11281
11542
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -11839,7 +12100,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
11839
12100
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
11840
12101
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
11841
12102
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
11842
|
-
const SDK_VERSION = '1.
|
|
12103
|
+
const SDK_VERSION = '1.44.0'; // x-release-please-version
|
|
11843
12104
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
11844
12105
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
11845
12106
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -11858,6 +12119,9 @@ const DEFAULT_RETRY_HTTP_STATUS_CODES = [
|
|
|
11858
12119
|
/**
|
|
11859
12120
|
* The ApiClient class is used to send requests to the Gemini API or Vertex AI
|
|
11860
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.
|
|
11861
12125
|
*/
|
|
11862
12126
|
class ApiClient {
|
|
11863
12127
|
constructor(opts) {
|
|
@@ -11905,10 +12169,7 @@ class ApiClient {
|
|
|
11905
12169
|
else {
|
|
11906
12170
|
// Gemini API
|
|
11907
12171
|
if (!this.clientOptions.apiKey) {
|
|
11908
|
-
|
|
11909
|
-
message: 'API key must be set when using the Gemini API.',
|
|
11910
|
-
status: 403,
|
|
11911
|
-
});
|
|
12172
|
+
console.warn('API key should be set when using the Gemini API.');
|
|
11912
12173
|
}
|
|
11913
12174
|
initHttpOptions.apiVersion =
|
|
11914
12175
|
(_c = this.clientOptions.apiVersion) !== null && _c !== void 0 ? _c : GOOGLE_AI_API_DEFAULT_VERSION;
|
|
@@ -15171,6 +15432,33 @@ class Operations extends BaseModule {
|
|
|
15171
15432
|
* Copyright 2025 Google LLC
|
|
15172
15433
|
* SPDX-License-Identifier: Apache-2.0
|
|
15173
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
|
+
}
|
|
15174
15462
|
function blobToMldev(fromObject) {
|
|
15175
15463
|
const toObject = {};
|
|
15176
15464
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -15281,8 +15569,9 @@ function functionCallToMldev(fromObject) {
|
|
|
15281
15569
|
}
|
|
15282
15570
|
function googleMapsToMldev(fromObject) {
|
|
15283
15571
|
const toObject = {};
|
|
15284
|
-
|
|
15285
|
-
|
|
15572
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
15573
|
+
if (fromAuthConfig != null) {
|
|
15574
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev(fromAuthConfig));
|
|
15286
15575
|
}
|
|
15287
15576
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
15288
15577
|
if (fromEnableWidget != null) {
|
|
@@ -15296,12 +15585,12 @@ function googleSearchToMldev(fromObject) {
|
|
|
15296
15585
|
if (fromSearchTypes != null) {
|
|
15297
15586
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
15298
15587
|
}
|
|
15299
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
15300
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
15301
|
-
}
|
|
15302
15588
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
15303
15589
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
15304
15590
|
}
|
|
15591
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
15592
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
15593
|
+
}
|
|
15305
15594
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
15306
15595
|
'timeRangeFilter',
|
|
15307
15596
|
]);
|
|
@@ -15523,6 +15812,10 @@ function toolToMldev(fromObject) {
|
|
|
15523
15812
|
if (fromGoogleSearch != null) {
|
|
15524
15813
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
|
|
15525
15814
|
}
|
|
15815
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
15816
|
+
if (fromGoogleMaps != null) {
|
|
15817
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
|
|
15818
|
+
}
|
|
15526
15819
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
15527
15820
|
'codeExecution',
|
|
15528
15821
|
]);
|
|
@@ -15544,16 +15837,15 @@ function toolToMldev(fromObject) {
|
|
|
15544
15837
|
}
|
|
15545
15838
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
15546
15839
|
}
|
|
15547
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
15548
|
-
if (fromGoogleMaps != null) {
|
|
15549
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
|
|
15550
|
-
}
|
|
15551
15840
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
15552
15841
|
'googleSearchRetrieval',
|
|
15553
15842
|
]);
|
|
15554
15843
|
if (fromGoogleSearchRetrieval != null) {
|
|
15555
15844
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
15556
15845
|
}
|
|
15846
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
15847
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
15848
|
+
}
|
|
15557
15849
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
15558
15850
|
if (fromUrlContext != null) {
|
|
15559
15851
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -16554,166 +16846,6 @@ const safeJSON = (text) => {
|
|
|
16554
16846
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
16555
16847
|
const sleep$1 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
16556
16848
|
|
|
16557
|
-
/**
|
|
16558
|
-
* @license
|
|
16559
|
-
* Copyright 2025 Google LLC
|
|
16560
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
16561
|
-
*/
|
|
16562
|
-
const VERSION = '0.0.1';
|
|
16563
|
-
|
|
16564
|
-
/**
|
|
16565
|
-
* @license
|
|
16566
|
-
* Copyright 2025 Google LLC
|
|
16567
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
16568
|
-
*/
|
|
16569
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
16570
|
-
/**
|
|
16571
|
-
* Note this does not detect 'browser'; for that, use getBrowserInfo().
|
|
16572
|
-
*/
|
|
16573
|
-
function getDetectedPlatform() {
|
|
16574
|
-
if (typeof Deno !== 'undefined' && Deno.build != null) {
|
|
16575
|
-
return 'deno';
|
|
16576
|
-
}
|
|
16577
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
16578
|
-
return 'edge';
|
|
16579
|
-
}
|
|
16580
|
-
if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') {
|
|
16581
|
-
return 'node';
|
|
16582
|
-
}
|
|
16583
|
-
return 'unknown';
|
|
16584
|
-
}
|
|
16585
|
-
const getPlatformProperties = () => {
|
|
16586
|
-
var _a, _b, _c, _d, _e;
|
|
16587
|
-
const detectedPlatform = getDetectedPlatform();
|
|
16588
|
-
if (detectedPlatform === 'deno') {
|
|
16589
|
-
return {
|
|
16590
|
-
'X-Stainless-Lang': 'js',
|
|
16591
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16592
|
-
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
16593
|
-
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
16594
|
-
'X-Stainless-Runtime': 'deno',
|
|
16595
|
-
'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',
|
|
16596
|
-
};
|
|
16597
|
-
}
|
|
16598
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
16599
|
-
return {
|
|
16600
|
-
'X-Stainless-Lang': 'js',
|
|
16601
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16602
|
-
'X-Stainless-OS': 'Unknown',
|
|
16603
|
-
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
16604
|
-
'X-Stainless-Runtime': 'edge',
|
|
16605
|
-
'X-Stainless-Runtime-Version': globalThis.process.version,
|
|
16606
|
-
};
|
|
16607
|
-
}
|
|
16608
|
-
// Check if Node.js
|
|
16609
|
-
if (detectedPlatform === 'node') {
|
|
16610
|
-
return {
|
|
16611
|
-
'X-Stainless-Lang': 'js',
|
|
16612
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16613
|
-
'X-Stainless-OS': normalizePlatform((_c = globalThis.process.platform) !== null && _c !== void 0 ? _c : 'unknown'),
|
|
16614
|
-
'X-Stainless-Arch': normalizeArch((_d = globalThis.process.arch) !== null && _d !== void 0 ? _d : 'unknown'),
|
|
16615
|
-
'X-Stainless-Runtime': 'node',
|
|
16616
|
-
'X-Stainless-Runtime-Version': (_e = globalThis.process.version) !== null && _e !== void 0 ? _e : 'unknown',
|
|
16617
|
-
};
|
|
16618
|
-
}
|
|
16619
|
-
const browserInfo = getBrowserInfo();
|
|
16620
|
-
if (browserInfo) {
|
|
16621
|
-
return {
|
|
16622
|
-
'X-Stainless-Lang': 'js',
|
|
16623
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16624
|
-
'X-Stainless-OS': 'Unknown',
|
|
16625
|
-
'X-Stainless-Arch': 'unknown',
|
|
16626
|
-
'X-Stainless-Runtime': `browser:${browserInfo.browser}`,
|
|
16627
|
-
'X-Stainless-Runtime-Version': browserInfo.version,
|
|
16628
|
-
};
|
|
16629
|
-
}
|
|
16630
|
-
// TODO add support for Cloudflare workers, etc.
|
|
16631
|
-
return {
|
|
16632
|
-
'X-Stainless-Lang': 'js',
|
|
16633
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16634
|
-
'X-Stainless-OS': 'Unknown',
|
|
16635
|
-
'X-Stainless-Arch': 'unknown',
|
|
16636
|
-
'X-Stainless-Runtime': 'unknown',
|
|
16637
|
-
'X-Stainless-Runtime-Version': 'unknown',
|
|
16638
|
-
};
|
|
16639
|
-
};
|
|
16640
|
-
// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
|
|
16641
|
-
function getBrowserInfo() {
|
|
16642
|
-
if (typeof navigator === 'undefined' || !navigator) {
|
|
16643
|
-
return null;
|
|
16644
|
-
}
|
|
16645
|
-
// NOTE: The order matters here!
|
|
16646
|
-
const browserPatterns = [
|
|
16647
|
-
{ key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16648
|
-
{ key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16649
|
-
{ key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16650
|
-
{ key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16651
|
-
{ key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16652
|
-
{ key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ },
|
|
16653
|
-
];
|
|
16654
|
-
// Find the FIRST matching browser
|
|
16655
|
-
for (const { key, pattern } of browserPatterns) {
|
|
16656
|
-
const match = pattern.exec(navigator.userAgent);
|
|
16657
|
-
if (match) {
|
|
16658
|
-
const major = match[1] || 0;
|
|
16659
|
-
const minor = match[2] || 0;
|
|
16660
|
-
const patch = match[3] || 0;
|
|
16661
|
-
return { browser: key, version: `${major}.${minor}.${patch}` };
|
|
16662
|
-
}
|
|
16663
|
-
}
|
|
16664
|
-
return null;
|
|
16665
|
-
}
|
|
16666
|
-
const normalizeArch = (arch) => {
|
|
16667
|
-
// Node docs:
|
|
16668
|
-
// - https://nodejs.org/api/process.html#processarch
|
|
16669
|
-
// Deno docs:
|
|
16670
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
16671
|
-
if (arch === 'x32')
|
|
16672
|
-
return 'x32';
|
|
16673
|
-
if (arch === 'x86_64' || arch === 'x64')
|
|
16674
|
-
return 'x64';
|
|
16675
|
-
if (arch === 'arm')
|
|
16676
|
-
return 'arm';
|
|
16677
|
-
if (arch === 'aarch64' || arch === 'arm64')
|
|
16678
|
-
return 'arm64';
|
|
16679
|
-
if (arch)
|
|
16680
|
-
return `other:${arch}`;
|
|
16681
|
-
return 'unknown';
|
|
16682
|
-
};
|
|
16683
|
-
const normalizePlatform = (platform) => {
|
|
16684
|
-
// Node platforms:
|
|
16685
|
-
// - https://nodejs.org/api/process.html#processplatform
|
|
16686
|
-
// Deno platforms:
|
|
16687
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
16688
|
-
// - https://github.com/denoland/deno/issues/14799
|
|
16689
|
-
platform = platform.toLowerCase();
|
|
16690
|
-
// NOTE: this iOS check is untested and may not work
|
|
16691
|
-
// Node does not work natively on IOS, there is a fork at
|
|
16692
|
-
// https://github.com/nodejs-mobile/nodejs-mobile
|
|
16693
|
-
// however it is unknown at the time of writing how to detect if it is running
|
|
16694
|
-
if (platform.includes('ios'))
|
|
16695
|
-
return 'iOS';
|
|
16696
|
-
if (platform === 'android')
|
|
16697
|
-
return 'Android';
|
|
16698
|
-
if (platform === 'darwin')
|
|
16699
|
-
return 'MacOS';
|
|
16700
|
-
if (platform === 'win32')
|
|
16701
|
-
return 'Windows';
|
|
16702
|
-
if (platform === 'freebsd')
|
|
16703
|
-
return 'FreeBSD';
|
|
16704
|
-
if (platform === 'openbsd')
|
|
16705
|
-
return 'OpenBSD';
|
|
16706
|
-
if (platform === 'linux')
|
|
16707
|
-
return 'Linux';
|
|
16708
|
-
if (platform)
|
|
16709
|
-
return `Other:${platform}`;
|
|
16710
|
-
return 'Unknown';
|
|
16711
|
-
};
|
|
16712
|
-
let _platformHeaders;
|
|
16713
|
-
const getPlatformHeaders = () => {
|
|
16714
|
-
return (_platformHeaders !== null && _platformHeaders !== void 0 ? _platformHeaders : (_platformHeaders = getPlatformProperties()));
|
|
16715
|
-
};
|
|
16716
|
-
|
|
16717
16849
|
/**
|
|
16718
16850
|
* @license
|
|
16719
16851
|
* Copyright 2025 Google LLC
|
|
@@ -16819,6 +16951,13 @@ const FallbackEncoder = ({ headers, body }) => {
|
|
|
16819
16951
|
};
|
|
16820
16952
|
};
|
|
16821
16953
|
|
|
16954
|
+
/**
|
|
16955
|
+
* @license
|
|
16956
|
+
* Copyright 2025 Google LLC
|
|
16957
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
16958
|
+
*/
|
|
16959
|
+
const VERSION = '0.0.1';
|
|
16960
|
+
|
|
16822
16961
|
/**
|
|
16823
16962
|
* @license
|
|
16824
16963
|
* Copyright 2025 Google LLC
|
|
@@ -17157,8 +17296,10 @@ class LineDecoder {
|
|
|
17157
17296
|
constructor() {
|
|
17158
17297
|
this.buffer = new Uint8Array();
|
|
17159
17298
|
this.carriageReturnIndex = null;
|
|
17299
|
+
this.searchIndex = 0;
|
|
17160
17300
|
}
|
|
17161
17301
|
decode(chunk) {
|
|
17302
|
+
var _a;
|
|
17162
17303
|
if (chunk == null) {
|
|
17163
17304
|
return [];
|
|
17164
17305
|
}
|
|
@@ -17168,7 +17309,7 @@ class LineDecoder {
|
|
|
17168
17309
|
this.buffer = concatBytes([this.buffer, binaryChunk]);
|
|
17169
17310
|
const lines = [];
|
|
17170
17311
|
let patternIndex;
|
|
17171
|
-
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) {
|
|
17172
17313
|
if (patternIndex.carriage && this.carriageReturnIndex == null) {
|
|
17173
17314
|
// skip until we either get a corresponding `\n`, a new `\r` or nothing
|
|
17174
17315
|
this.carriageReturnIndex = patternIndex.index;
|
|
@@ -17180,6 +17321,7 @@ class LineDecoder {
|
|
|
17180
17321
|
lines.push(decodeUTF8(this.buffer.subarray(0, this.carriageReturnIndex - 1)));
|
|
17181
17322
|
this.buffer = this.buffer.subarray(this.carriageReturnIndex);
|
|
17182
17323
|
this.carriageReturnIndex = null;
|
|
17324
|
+
this.searchIndex = 0;
|
|
17183
17325
|
continue;
|
|
17184
17326
|
}
|
|
17185
17327
|
const endIndex = this.carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
|
@@ -17187,7 +17329,9 @@ class LineDecoder {
|
|
|
17187
17329
|
lines.push(line);
|
|
17188
17330
|
this.buffer = this.buffer.subarray(patternIndex.index);
|
|
17189
17331
|
this.carriageReturnIndex = null;
|
|
17332
|
+
this.searchIndex = 0;
|
|
17190
17333
|
}
|
|
17334
|
+
this.searchIndex = Math.max(0, this.buffer.length - 1);
|
|
17191
17335
|
return lines;
|
|
17192
17336
|
}
|
|
17193
17337
|
flush() {
|
|
@@ -17212,41 +17356,23 @@ LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
|
|
17212
17356
|
function findNewlineIndex(buffer, startIndex) {
|
|
17213
17357
|
const newline = 0x0a; // \n
|
|
17214
17358
|
const carriage = 0x0d; // \r
|
|
17215
|
-
|
|
17216
|
-
|
|
17217
|
-
|
|
17218
|
-
|
|
17219
|
-
|
|
17220
|
-
return { preceding: i, index: i + 1, carriage: true };
|
|
17221
|
-
}
|
|
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;
|
|
17222
17364
|
}
|
|
17223
|
-
|
|
17224
|
-
|
|
17225
|
-
|
|
17226
|
-
// This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n)
|
|
17227
|
-
// and returns the index right after the first occurrence of any pattern,
|
|
17228
|
-
// or -1 if none of the patterns are found.
|
|
17229
|
-
const newline = 0x0a; // \n
|
|
17230
|
-
const carriage = 0x0d; // \r
|
|
17231
|
-
for (let i = 0; i < buffer.length - 1; i++) {
|
|
17232
|
-
if (buffer[i] === newline && buffer[i + 1] === newline) {
|
|
17233
|
-
// \n\n
|
|
17234
|
-
return i + 2;
|
|
17235
|
-
}
|
|
17236
|
-
if (buffer[i] === carriage && buffer[i + 1] === carriage) {
|
|
17237
|
-
// \r\r
|
|
17238
|
-
return i + 2;
|
|
17239
|
-
}
|
|
17240
|
-
if (buffer[i] === carriage &&
|
|
17241
|
-
buffer[i + 1] === newline &&
|
|
17242
|
-
i + 3 < buffer.length &&
|
|
17243
|
-
buffer[i + 2] === carriage &&
|
|
17244
|
-
buffer[i + 3] === newline) {
|
|
17245
|
-
// \r\n\r\n
|
|
17246
|
-
return i + 4;
|
|
17247
|
-
}
|
|
17365
|
+
let i;
|
|
17366
|
+
if (nextNewline !== -1 && nextCarriage !== -1) {
|
|
17367
|
+
i = Math.min(nextNewline, nextCarriage);
|
|
17248
17368
|
}
|
|
17249
|
-
|
|
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 };
|
|
17250
17376
|
}
|
|
17251
17377
|
|
|
17252
17378
|
/**
|
|
@@ -17557,7 +17683,7 @@ function _iterSSEMessages(response, controller) {
|
|
|
17557
17683
|
const lineDecoder = new LineDecoder();
|
|
17558
17684
|
const iter = ReadableStreamToAsyncIterable(response.body);
|
|
17559
17685
|
try {
|
|
17560
|
-
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) {
|
|
17561
17687
|
_c = _f.value;
|
|
17562
17688
|
_d = false;
|
|
17563
17689
|
const sseChunk = _c;
|
|
@@ -17583,13 +17709,12 @@ function _iterSSEMessages(response, controller) {
|
|
|
17583
17709
|
});
|
|
17584
17710
|
}
|
|
17585
17711
|
/**
|
|
17586
|
-
* Given an async iterable iterator,
|
|
17587
|
-
*
|
|
17712
|
+
* Given an async iterable iterator, normalizes each chunk to a
|
|
17713
|
+
* Uint8Array and yields it.
|
|
17588
17714
|
*/
|
|
17589
|
-
function
|
|
17590
|
-
return __asyncGenerator(this, arguments, function*
|
|
17715
|
+
function iterBinaryChunks(iterator) {
|
|
17716
|
+
return __asyncGenerator(this, arguments, function* iterBinaryChunks_1() {
|
|
17591
17717
|
var _a, e_5, _b, _c;
|
|
17592
|
-
let data = new Uint8Array();
|
|
17593
17718
|
try {
|
|
17594
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) {
|
|
17595
17720
|
_c = iterator_3_1.value;
|
|
@@ -17601,15 +17726,7 @@ function iterSSEChunks(iterator) {
|
|
|
17601
17726
|
const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk)
|
|
17602
17727
|
: typeof chunk === 'string' ? encodeUTF8(chunk)
|
|
17603
17728
|
: chunk;
|
|
17604
|
-
|
|
17605
|
-
newData.set(data);
|
|
17606
|
-
newData.set(binaryChunk, data.length);
|
|
17607
|
-
data = newData;
|
|
17608
|
-
let patternIndex;
|
|
17609
|
-
while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {
|
|
17610
|
-
yield yield __await(data.slice(0, patternIndex));
|
|
17611
|
-
data = data.slice(patternIndex);
|
|
17612
|
-
}
|
|
17729
|
+
yield yield __await(binaryChunk);
|
|
17613
17730
|
}
|
|
17614
17731
|
}
|
|
17615
17732
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
@@ -17619,9 +17736,6 @@ function iterSSEChunks(iterator) {
|
|
|
17619
17736
|
}
|
|
17620
17737
|
finally { if (e_5) throw e_5.error; }
|
|
17621
17738
|
}
|
|
17622
|
-
if (data.length > 0) {
|
|
17623
|
-
yield yield __await(data);
|
|
17624
|
-
}
|
|
17625
17739
|
});
|
|
17626
17740
|
}
|
|
17627
17741
|
class SSEDecoder {
|
|
@@ -18273,7 +18387,7 @@ class BaseGeminiNextGenAPIClient {
|
|
|
18273
18387
|
const authHeaders = await this.authHeaders(options);
|
|
18274
18388
|
let headers = buildHeaders([
|
|
18275
18389
|
idempotencyHeaders,
|
|
18276
|
-
|
|
18390
|
+
{ Accept: 'application/json', 'User-Agent': this.getUserAgent() },
|
|
18277
18391
|
this._options.defaultHeaders,
|
|
18278
18392
|
bodyHeaders,
|
|
18279
18393
|
options.headers,
|
|
@@ -19296,10 +19410,28 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19296
19410
|
if (fromCustomBaseModel != null) {
|
|
19297
19411
|
setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
|
|
19298
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
|
+
}
|
|
19299
19425
|
const fromExperiment = getValueByPath(fromObject, ['experiment']);
|
|
19300
19426
|
if (fromExperiment != null) {
|
|
19301
19427
|
setValueByPath(toObject, ['experiment'], fromExperiment);
|
|
19302
19428
|
}
|
|
19429
|
+
const fromFullFineTuningSpec = getValueByPath(fromObject, [
|
|
19430
|
+
'fullFineTuningSpec',
|
|
19431
|
+
]);
|
|
19432
|
+
if (fromFullFineTuningSpec != null) {
|
|
19433
|
+
setValueByPath(toObject, ['fullFineTuningSpec'], fromFullFineTuningSpec);
|
|
19434
|
+
}
|
|
19303
19435
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19304
19436
|
if (fromLabels != null) {
|
|
19305
19437
|
setValueByPath(toObject, ['labels'], fromLabels);
|
|
@@ -19324,6 +19456,12 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19324
19456
|
if (fromTunedModelDisplayName != null) {
|
|
19325
19457
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19326
19458
|
}
|
|
19459
|
+
const fromTuningJobState = getValueByPath(fromObject, [
|
|
19460
|
+
'tuningJobState',
|
|
19461
|
+
]);
|
|
19462
|
+
if (fromTuningJobState != null) {
|
|
19463
|
+
setValueByPath(toObject, ['tuningJobState'], fromTuningJobState);
|
|
19464
|
+
}
|
|
19327
19465
|
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19328
19466
|
'veoTuningSpec',
|
|
19329
19467
|
]);
|
|
@@ -20176,7 +20314,7 @@ class GoogleGenAI {
|
|
|
20176
20314
|
this.project = (_d = options.project) !== null && _d !== void 0 ? _d : envProject;
|
|
20177
20315
|
this.location = (_e = options.location) !== null && _e !== void 0 ? _e : envLocation;
|
|
20178
20316
|
if (!this.vertexai && !this.apiKey) {
|
|
20179
|
-
|
|
20317
|
+
console.warn('API key should be set when using the Gemini API.');
|
|
20180
20318
|
}
|
|
20181
20319
|
// Handle when to use Vertex AI in express mode (api key)
|
|
20182
20320
|
if (options.vertexai) {
|
|
@@ -20271,5 +20409,5 @@ function getApiKeyFromEnv() {
|
|
|
20271
20409
|
return envGoogleApiKey || envGeminiApiKey || undefined;
|
|
20272
20410
|
}
|
|
20273
20411
|
|
|
20274
|
-
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, ProminentPeople, 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 };
|
|
20275
20413
|
//# sourceMappingURL=index.mjs.map
|