@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.cjs
CHANGED
|
@@ -668,7 +668,7 @@ exports.FunctionResponseScheduling = void 0;
|
|
|
668
668
|
*/
|
|
669
669
|
FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
|
|
670
670
|
})(exports.FunctionResponseScheduling || (exports.FunctionResponseScheduling = {}));
|
|
671
|
-
/**
|
|
671
|
+
/** Data type of the schema field. */
|
|
672
672
|
exports.Type = void 0;
|
|
673
673
|
(function (Type) {
|
|
674
674
|
/**
|
|
@@ -736,22 +736,6 @@ exports.PhishBlockThreshold = void 0;
|
|
|
736
736
|
*/
|
|
737
737
|
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
738
738
|
})(exports.PhishBlockThreshold || (exports.PhishBlockThreshold = {}));
|
|
739
|
-
/** The API spec that the external API implements. This enum is not supported in Gemini API. */
|
|
740
|
-
exports.ApiSpec = void 0;
|
|
741
|
-
(function (ApiSpec) {
|
|
742
|
-
/**
|
|
743
|
-
* Unspecified API spec. This value should not be used.
|
|
744
|
-
*/
|
|
745
|
-
ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
|
|
746
|
-
/**
|
|
747
|
-
* Simple search API spec.
|
|
748
|
-
*/
|
|
749
|
-
ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
|
|
750
|
-
/**
|
|
751
|
-
* Elastic search API spec.
|
|
752
|
-
*/
|
|
753
|
-
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
754
|
-
})(exports.ApiSpec || (exports.ApiSpec = {}));
|
|
755
739
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
756
740
|
exports.AuthType = void 0;
|
|
757
741
|
(function (AuthType) {
|
|
@@ -806,6 +790,22 @@ exports.HttpElementLocation = void 0;
|
|
|
806
790
|
*/
|
|
807
791
|
HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
|
|
808
792
|
})(exports.HttpElementLocation || (exports.HttpElementLocation = {}));
|
|
793
|
+
/** The API spec that the external API implements. This enum is not supported in Gemini API. */
|
|
794
|
+
exports.ApiSpec = void 0;
|
|
795
|
+
(function (ApiSpec) {
|
|
796
|
+
/**
|
|
797
|
+
* Unspecified API spec. This value should not be used.
|
|
798
|
+
*/
|
|
799
|
+
ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
|
|
800
|
+
/**
|
|
801
|
+
* Simple search API spec.
|
|
802
|
+
*/
|
|
803
|
+
ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
|
|
804
|
+
/**
|
|
805
|
+
* Elastic search API spec.
|
|
806
|
+
*/
|
|
807
|
+
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
808
|
+
})(exports.ApiSpec || (exports.ApiSpec = {}));
|
|
809
809
|
/** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
|
|
810
810
|
exports.Behavior = void 0;
|
|
811
811
|
(function (Behavior) {
|
|
@@ -882,27 +882,43 @@ exports.ThinkingLevel = void 0;
|
|
|
882
882
|
*/
|
|
883
883
|
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
884
884
|
})(exports.ThinkingLevel || (exports.ThinkingLevel = {}));
|
|
885
|
-
/**
|
|
885
|
+
/** Enum that controls the generation of people. */
|
|
886
|
+
exports.PersonGeneration = void 0;
|
|
887
|
+
(function (PersonGeneration) {
|
|
888
|
+
/**
|
|
889
|
+
* Block generation of images of people.
|
|
890
|
+
*/
|
|
891
|
+
PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
|
|
892
|
+
/**
|
|
893
|
+
* Generate images of adults, but not children.
|
|
894
|
+
*/
|
|
895
|
+
PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
|
|
896
|
+
/**
|
|
897
|
+
* Generate images that include adults and children.
|
|
898
|
+
*/
|
|
899
|
+
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
900
|
+
})(exports.PersonGeneration || (exports.PersonGeneration = {}));
|
|
901
|
+
/** The harm category to be blocked. */
|
|
886
902
|
exports.HarmCategory = void 0;
|
|
887
903
|
(function (HarmCategory) {
|
|
888
904
|
/**
|
|
889
|
-
*
|
|
905
|
+
* Default value. This value is unused.
|
|
890
906
|
*/
|
|
891
907
|
HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
|
|
892
908
|
/**
|
|
893
|
-
*
|
|
909
|
+
* Abusive, threatening, or content intended to bully, torment, or ridicule.
|
|
894
910
|
*/
|
|
895
911
|
HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
|
|
896
912
|
/**
|
|
897
|
-
*
|
|
913
|
+
* Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
|
|
898
914
|
*/
|
|
899
915
|
HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
|
|
900
916
|
/**
|
|
901
|
-
*
|
|
917
|
+
* Content that contains sexually explicit material.
|
|
902
918
|
*/
|
|
903
919
|
HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
904
920
|
/**
|
|
905
|
-
*
|
|
921
|
+
* Content that promotes, facilitates, or enables dangerous activities.
|
|
906
922
|
*/
|
|
907
923
|
HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
908
924
|
/**
|
|
@@ -910,27 +926,27 @@ exports.HarmCategory = void 0;
|
|
|
910
926
|
*/
|
|
911
927
|
HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
|
|
912
928
|
/**
|
|
913
|
-
*
|
|
929
|
+
* Images that contain hate speech. This enum value is not supported in Gemini API.
|
|
914
930
|
*/
|
|
915
931
|
HarmCategory["HARM_CATEGORY_IMAGE_HATE"] = "HARM_CATEGORY_IMAGE_HATE";
|
|
916
932
|
/**
|
|
917
|
-
*
|
|
933
|
+
* Images that contain dangerous content. This enum value is not supported in Gemini API.
|
|
918
934
|
*/
|
|
919
935
|
HarmCategory["HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT"] = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT";
|
|
920
936
|
/**
|
|
921
|
-
*
|
|
937
|
+
* Images that contain harassment. This enum value is not supported in Gemini API.
|
|
922
938
|
*/
|
|
923
939
|
HarmCategory["HARM_CATEGORY_IMAGE_HARASSMENT"] = "HARM_CATEGORY_IMAGE_HARASSMENT";
|
|
924
940
|
/**
|
|
925
|
-
*
|
|
941
|
+
* Images that contain sexually explicit content. This enum value is not supported in Gemini API.
|
|
926
942
|
*/
|
|
927
943
|
HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
|
|
928
944
|
/**
|
|
929
|
-
*
|
|
945
|
+
* Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
|
|
930
946
|
*/
|
|
931
947
|
HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
|
|
932
948
|
})(exports.HarmCategory || (exports.HarmCategory = {}));
|
|
933
|
-
/**
|
|
949
|
+
/** 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. */
|
|
934
950
|
exports.HarmBlockMethod = void 0;
|
|
935
951
|
(function (HarmBlockMethod) {
|
|
936
952
|
/**
|
|
@@ -946,31 +962,31 @@ exports.HarmBlockMethod = void 0;
|
|
|
946
962
|
*/
|
|
947
963
|
HarmBlockMethod["PROBABILITY"] = "PROBABILITY";
|
|
948
964
|
})(exports.HarmBlockMethod || (exports.HarmBlockMethod = {}));
|
|
949
|
-
/** The harm
|
|
965
|
+
/** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
950
966
|
exports.HarmBlockThreshold = void 0;
|
|
951
967
|
(function (HarmBlockThreshold) {
|
|
952
968
|
/**
|
|
953
|
-
*
|
|
969
|
+
* The harm block threshold is unspecified.
|
|
954
970
|
*/
|
|
955
971
|
HarmBlockThreshold["HARM_BLOCK_THRESHOLD_UNSPECIFIED"] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
956
972
|
/**
|
|
957
|
-
* Block
|
|
973
|
+
* Block content with a low harm probability or higher.
|
|
958
974
|
*/
|
|
959
975
|
HarmBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
960
976
|
/**
|
|
961
|
-
* Block medium
|
|
977
|
+
* Block content with a medium harm probability or higher.
|
|
962
978
|
*/
|
|
963
979
|
HarmBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
964
980
|
/**
|
|
965
|
-
* Block
|
|
981
|
+
* Block content with a high harm probability.
|
|
966
982
|
*/
|
|
967
983
|
HarmBlockThreshold["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
|
|
968
984
|
/**
|
|
969
|
-
*
|
|
985
|
+
* Do not block any content, regardless of its harm probability.
|
|
970
986
|
*/
|
|
971
987
|
HarmBlockThreshold["BLOCK_NONE"] = "BLOCK_NONE";
|
|
972
988
|
/**
|
|
973
|
-
* Turn off the safety filter.
|
|
989
|
+
* Turn off the safety filter entirely.
|
|
974
990
|
*/
|
|
975
991
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
976
992
|
})(exports.HarmBlockThreshold || (exports.HarmBlockThreshold = {}));
|
|
@@ -1048,55 +1064,55 @@ exports.FinishReason = void 0;
|
|
|
1048
1064
|
*/
|
|
1049
1065
|
FinishReason["IMAGE_OTHER"] = "IMAGE_OTHER";
|
|
1050
1066
|
})(exports.FinishReason || (exports.FinishReason = {}));
|
|
1051
|
-
/** Output only.
|
|
1067
|
+
/** Output only. The probability of harm for this category. */
|
|
1052
1068
|
exports.HarmProbability = void 0;
|
|
1053
1069
|
(function (HarmProbability) {
|
|
1054
1070
|
/**
|
|
1055
|
-
*
|
|
1071
|
+
* The harm probability is unspecified.
|
|
1056
1072
|
*/
|
|
1057
1073
|
HarmProbability["HARM_PROBABILITY_UNSPECIFIED"] = "HARM_PROBABILITY_UNSPECIFIED";
|
|
1058
1074
|
/**
|
|
1059
|
-
*
|
|
1075
|
+
* The harm probability is negligible.
|
|
1060
1076
|
*/
|
|
1061
1077
|
HarmProbability["NEGLIGIBLE"] = "NEGLIGIBLE";
|
|
1062
1078
|
/**
|
|
1063
|
-
*
|
|
1079
|
+
* The harm probability is low.
|
|
1064
1080
|
*/
|
|
1065
1081
|
HarmProbability["LOW"] = "LOW";
|
|
1066
1082
|
/**
|
|
1067
|
-
*
|
|
1083
|
+
* The harm probability is medium.
|
|
1068
1084
|
*/
|
|
1069
1085
|
HarmProbability["MEDIUM"] = "MEDIUM";
|
|
1070
1086
|
/**
|
|
1071
|
-
*
|
|
1087
|
+
* The harm probability is high.
|
|
1072
1088
|
*/
|
|
1073
1089
|
HarmProbability["HIGH"] = "HIGH";
|
|
1074
1090
|
})(exports.HarmProbability || (exports.HarmProbability = {}));
|
|
1075
|
-
/** Output only.
|
|
1091
|
+
/** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
|
|
1076
1092
|
exports.HarmSeverity = void 0;
|
|
1077
1093
|
(function (HarmSeverity) {
|
|
1078
1094
|
/**
|
|
1079
|
-
*
|
|
1095
|
+
* The harm severity is unspecified.
|
|
1080
1096
|
*/
|
|
1081
1097
|
HarmSeverity["HARM_SEVERITY_UNSPECIFIED"] = "HARM_SEVERITY_UNSPECIFIED";
|
|
1082
1098
|
/**
|
|
1083
|
-
*
|
|
1099
|
+
* The harm severity is negligible.
|
|
1084
1100
|
*/
|
|
1085
1101
|
HarmSeverity["HARM_SEVERITY_NEGLIGIBLE"] = "HARM_SEVERITY_NEGLIGIBLE";
|
|
1086
1102
|
/**
|
|
1087
|
-
*
|
|
1103
|
+
* The harm severity is low.
|
|
1088
1104
|
*/
|
|
1089
1105
|
HarmSeverity["HARM_SEVERITY_LOW"] = "HARM_SEVERITY_LOW";
|
|
1090
1106
|
/**
|
|
1091
|
-
*
|
|
1107
|
+
* The harm severity is medium.
|
|
1092
1108
|
*/
|
|
1093
1109
|
HarmSeverity["HARM_SEVERITY_MEDIUM"] = "HARM_SEVERITY_MEDIUM";
|
|
1094
1110
|
/**
|
|
1095
|
-
*
|
|
1111
|
+
* The harm severity is high.
|
|
1096
1112
|
*/
|
|
1097
1113
|
HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
|
|
1098
1114
|
})(exports.HarmSeverity || (exports.HarmSeverity = {}));
|
|
1099
|
-
/**
|
|
1115
|
+
/** The status of the URL retrieval. */
|
|
1100
1116
|
exports.UrlRetrievalStatus = void 0;
|
|
1101
1117
|
(function (UrlRetrievalStatus) {
|
|
1102
1118
|
/**
|
|
@@ -1104,11 +1120,11 @@ exports.UrlRetrievalStatus = void 0;
|
|
|
1104
1120
|
*/
|
|
1105
1121
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_UNSPECIFIED"] = "URL_RETRIEVAL_STATUS_UNSPECIFIED";
|
|
1106
1122
|
/**
|
|
1107
|
-
*
|
|
1123
|
+
* The URL was retrieved successfully.
|
|
1108
1124
|
*/
|
|
1109
1125
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_SUCCESS"] = "URL_RETRIEVAL_STATUS_SUCCESS";
|
|
1110
1126
|
/**
|
|
1111
|
-
*
|
|
1127
|
+
* The URL retrieval failed.
|
|
1112
1128
|
*/
|
|
1113
1129
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_ERROR"] = "URL_RETRIEVAL_STATUS_ERROR";
|
|
1114
1130
|
/**
|
|
@@ -1167,6 +1183,14 @@ exports.TrafficType = void 0;
|
|
|
1167
1183
|
* The request was processed using Pay-As-You-Go quota.
|
|
1168
1184
|
*/
|
|
1169
1185
|
TrafficType["ON_DEMAND"] = "ON_DEMAND";
|
|
1186
|
+
/**
|
|
1187
|
+
* Type for Priority Pay-As-You-Go traffic.
|
|
1188
|
+
*/
|
|
1189
|
+
TrafficType["ON_DEMAND_PRIORITY"] = "ON_DEMAND_PRIORITY";
|
|
1190
|
+
/**
|
|
1191
|
+
* Type for Flex traffic.
|
|
1192
|
+
*/
|
|
1193
|
+
TrafficType["ON_DEMAND_FLEX"] = "ON_DEMAND_FLEX";
|
|
1170
1194
|
/**
|
|
1171
1195
|
* Type for Provisioned Throughput traffic.
|
|
1172
1196
|
*/
|
|
@@ -1312,6 +1336,102 @@ exports.JobState = void 0;
|
|
|
1312
1336
|
*/
|
|
1313
1337
|
JobState["JOB_STATE_PARTIALLY_SUCCEEDED"] = "JOB_STATE_PARTIALLY_SUCCEEDED";
|
|
1314
1338
|
})(exports.JobState || (exports.JobState = {}));
|
|
1339
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
|
|
1340
|
+
exports.TuningJobState = void 0;
|
|
1341
|
+
(function (TuningJobState) {
|
|
1342
|
+
/**
|
|
1343
|
+
* Default tuning job state.
|
|
1344
|
+
*/
|
|
1345
|
+
TuningJobState["TUNING_JOB_STATE_UNSPECIFIED"] = "TUNING_JOB_STATE_UNSPECIFIED";
|
|
1346
|
+
/**
|
|
1347
|
+
* Tuning job is waiting for job quota.
|
|
1348
|
+
*/
|
|
1349
|
+
TuningJobState["TUNING_JOB_STATE_WAITING_FOR_QUOTA"] = "TUNING_JOB_STATE_WAITING_FOR_QUOTA";
|
|
1350
|
+
/**
|
|
1351
|
+
* Tuning job is validating the dataset.
|
|
1352
|
+
*/
|
|
1353
|
+
TuningJobState["TUNING_JOB_STATE_PROCESSING_DATASET"] = "TUNING_JOB_STATE_PROCESSING_DATASET";
|
|
1354
|
+
/**
|
|
1355
|
+
* Tuning job is waiting for hardware capacity.
|
|
1356
|
+
*/
|
|
1357
|
+
TuningJobState["TUNING_JOB_STATE_WAITING_FOR_CAPACITY"] = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY";
|
|
1358
|
+
/**
|
|
1359
|
+
* Tuning job is running.
|
|
1360
|
+
*/
|
|
1361
|
+
TuningJobState["TUNING_JOB_STATE_TUNING"] = "TUNING_JOB_STATE_TUNING";
|
|
1362
|
+
/**
|
|
1363
|
+
* Tuning job is doing some post processing steps.
|
|
1364
|
+
*/
|
|
1365
|
+
TuningJobState["TUNING_JOB_STATE_POST_PROCESSING"] = "TUNING_JOB_STATE_POST_PROCESSING";
|
|
1366
|
+
})(exports.TuningJobState || (exports.TuningJobState = {}));
|
|
1367
|
+
/** Aggregation metric. This enum is not supported in Gemini API. */
|
|
1368
|
+
exports.AggregationMetric = void 0;
|
|
1369
|
+
(function (AggregationMetric) {
|
|
1370
|
+
/**
|
|
1371
|
+
* Unspecified aggregation metric.
|
|
1372
|
+
*/
|
|
1373
|
+
AggregationMetric["AGGREGATION_METRIC_UNSPECIFIED"] = "AGGREGATION_METRIC_UNSPECIFIED";
|
|
1374
|
+
/**
|
|
1375
|
+
* Average aggregation metric. Not supported for Pairwise metric.
|
|
1376
|
+
*/
|
|
1377
|
+
AggregationMetric["AVERAGE"] = "AVERAGE";
|
|
1378
|
+
/**
|
|
1379
|
+
* Mode aggregation metric.
|
|
1380
|
+
*/
|
|
1381
|
+
AggregationMetric["MODE"] = "MODE";
|
|
1382
|
+
/**
|
|
1383
|
+
* Standard deviation aggregation metric. Not supported for pairwise metric.
|
|
1384
|
+
*/
|
|
1385
|
+
AggregationMetric["STANDARD_DEVIATION"] = "STANDARD_DEVIATION";
|
|
1386
|
+
/**
|
|
1387
|
+
* Variance aggregation metric. Not supported for pairwise metric.
|
|
1388
|
+
*/
|
|
1389
|
+
AggregationMetric["VARIANCE"] = "VARIANCE";
|
|
1390
|
+
/**
|
|
1391
|
+
* Minimum aggregation metric. Not supported for pairwise metric.
|
|
1392
|
+
*/
|
|
1393
|
+
AggregationMetric["MINIMUM"] = "MINIMUM";
|
|
1394
|
+
/**
|
|
1395
|
+
* Maximum aggregation metric. Not supported for pairwise metric.
|
|
1396
|
+
*/
|
|
1397
|
+
AggregationMetric["MAXIMUM"] = "MAXIMUM";
|
|
1398
|
+
/**
|
|
1399
|
+
* Median aggregation metric. Not supported for pairwise metric.
|
|
1400
|
+
*/
|
|
1401
|
+
AggregationMetric["MEDIAN"] = "MEDIAN";
|
|
1402
|
+
/**
|
|
1403
|
+
* 90th percentile aggregation metric. Not supported for pairwise metric.
|
|
1404
|
+
*/
|
|
1405
|
+
AggregationMetric["PERCENTILE_P90"] = "PERCENTILE_P90";
|
|
1406
|
+
/**
|
|
1407
|
+
* 95th percentile aggregation metric. Not supported for pairwise metric.
|
|
1408
|
+
*/
|
|
1409
|
+
AggregationMetric["PERCENTILE_P95"] = "PERCENTILE_P95";
|
|
1410
|
+
/**
|
|
1411
|
+
* 99th percentile aggregation metric. Not supported for pairwise metric.
|
|
1412
|
+
*/
|
|
1413
|
+
AggregationMetric["PERCENTILE_P99"] = "PERCENTILE_P99";
|
|
1414
|
+
})(exports.AggregationMetric || (exports.AggregationMetric = {}));
|
|
1415
|
+
/** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
|
|
1416
|
+
exports.PairwiseChoice = void 0;
|
|
1417
|
+
(function (PairwiseChoice) {
|
|
1418
|
+
/**
|
|
1419
|
+
* Unspecified prediction choice.
|
|
1420
|
+
*/
|
|
1421
|
+
PairwiseChoice["PAIRWISE_CHOICE_UNSPECIFIED"] = "PAIRWISE_CHOICE_UNSPECIFIED";
|
|
1422
|
+
/**
|
|
1423
|
+
* Baseline prediction wins
|
|
1424
|
+
*/
|
|
1425
|
+
PairwiseChoice["BASELINE"] = "BASELINE";
|
|
1426
|
+
/**
|
|
1427
|
+
* Candidate prediction wins
|
|
1428
|
+
*/
|
|
1429
|
+
PairwiseChoice["CANDIDATE"] = "CANDIDATE";
|
|
1430
|
+
/**
|
|
1431
|
+
* Winner cannot be determined
|
|
1432
|
+
*/
|
|
1433
|
+
PairwiseChoice["TIE"] = "TIE";
|
|
1434
|
+
})(exports.PairwiseChoice || (exports.PairwiseChoice = {}));
|
|
1315
1435
|
/** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
|
|
1316
1436
|
exports.TuningTask = void 0;
|
|
1317
1437
|
(function (TuningTask) {
|
|
@@ -1424,22 +1544,6 @@ exports.SafetyFilterLevel = void 0;
|
|
|
1424
1544
|
SafetyFilterLevel["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
|
|
1425
1545
|
SafetyFilterLevel["BLOCK_NONE"] = "BLOCK_NONE";
|
|
1426
1546
|
})(exports.SafetyFilterLevel || (exports.SafetyFilterLevel = {}));
|
|
1427
|
-
/** Enum that controls the generation of people. */
|
|
1428
|
-
exports.PersonGeneration = void 0;
|
|
1429
|
-
(function (PersonGeneration) {
|
|
1430
|
-
/**
|
|
1431
|
-
* Block generation of images of people.
|
|
1432
|
-
*/
|
|
1433
|
-
PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
|
|
1434
|
-
/**
|
|
1435
|
-
* Generate images of adults, but not children.
|
|
1436
|
-
*/
|
|
1437
|
-
PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
|
|
1438
|
-
/**
|
|
1439
|
-
* Generate images that include adults and children.
|
|
1440
|
-
*/
|
|
1441
|
-
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
1442
|
-
})(exports.PersonGeneration || (exports.PersonGeneration = {}));
|
|
1443
1547
|
/** Enum that specifies the language of the text in the prompt. */
|
|
1444
1548
|
exports.ImagePromptLanguage = void 0;
|
|
1445
1549
|
(function (ImagePromptLanguage) {
|
|
@@ -2338,6 +2442,9 @@ class GenerateVideosOperation {
|
|
|
2338
2442
|
return operation;
|
|
2339
2443
|
}
|
|
2340
2444
|
}
|
|
2445
|
+
/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
|
|
2446
|
+
class EvaluateDatasetResponse {
|
|
2447
|
+
}
|
|
2341
2448
|
/** Response for the list tuning jobs method. */
|
|
2342
2449
|
class ListTuningJobsResponse {
|
|
2343
2450
|
}
|
|
@@ -3457,6 +3564,33 @@ function tIsVertexEmbedContentModel(model) {
|
|
|
3457
3564
|
* Copyright 2025 Google LLC
|
|
3458
3565
|
* SPDX-License-Identifier: Apache-2.0
|
|
3459
3566
|
*/
|
|
3567
|
+
function authConfigToMldev$4(fromObject) {
|
|
3568
|
+
const toObject = {};
|
|
3569
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
3570
|
+
if (fromApiKey != null) {
|
|
3571
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
3572
|
+
}
|
|
3573
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
3574
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
3575
|
+
}
|
|
3576
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
3577
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
3578
|
+
}
|
|
3579
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
3580
|
+
undefined) {
|
|
3581
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
3582
|
+
}
|
|
3583
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
3584
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
3585
|
+
}
|
|
3586
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
3587
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
3588
|
+
}
|
|
3589
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
3590
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
3591
|
+
}
|
|
3592
|
+
return toObject;
|
|
3593
|
+
}
|
|
3460
3594
|
function batchJobDestinationFromMldev(fromObject) {
|
|
3461
3595
|
const toObject = {};
|
|
3462
3596
|
const fromFileName = getValueByPath(fromObject, ['responsesFile']);
|
|
@@ -4306,8 +4440,9 @@ function getBatchJobParametersToVertex(apiClient, fromObject) {
|
|
|
4306
4440
|
}
|
|
4307
4441
|
function googleMapsToMldev$4(fromObject) {
|
|
4308
4442
|
const toObject = {};
|
|
4309
|
-
|
|
4310
|
-
|
|
4443
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
4444
|
+
if (fromAuthConfig != null) {
|
|
4445
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$4(fromAuthConfig));
|
|
4311
4446
|
}
|
|
4312
4447
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
4313
4448
|
if (fromEnableWidget != null) {
|
|
@@ -4321,12 +4456,12 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
4321
4456
|
if (fromSearchTypes != null) {
|
|
4322
4457
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
4323
4458
|
}
|
|
4324
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4325
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
4326
|
-
}
|
|
4327
4459
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
4328
4460
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
4329
4461
|
}
|
|
4462
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4463
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
4464
|
+
}
|
|
4330
4465
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
4331
4466
|
'timeRangeFilter',
|
|
4332
4467
|
]);
|
|
@@ -4358,6 +4493,9 @@ function imageConfigToMldev$1(fromObject) {
|
|
|
4358
4493
|
undefined) {
|
|
4359
4494
|
throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
|
|
4360
4495
|
}
|
|
4496
|
+
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
4497
|
+
throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
|
|
4498
|
+
}
|
|
4361
4499
|
return toObject;
|
|
4362
4500
|
}
|
|
4363
4501
|
function inlinedRequestToMldev(apiClient, fromObject) {
|
|
@@ -4611,6 +4749,10 @@ function toolToMldev$4(fromObject) {
|
|
|
4611
4749
|
if (fromGoogleSearch != null) {
|
|
4612
4750
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
|
|
4613
4751
|
}
|
|
4752
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
4753
|
+
if (fromGoogleMaps != null) {
|
|
4754
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
|
|
4755
|
+
}
|
|
4614
4756
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
4615
4757
|
'codeExecution',
|
|
4616
4758
|
]);
|
|
@@ -4632,16 +4774,15 @@ function toolToMldev$4(fromObject) {
|
|
|
4632
4774
|
}
|
|
4633
4775
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
4634
4776
|
}
|
|
4635
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
4636
|
-
if (fromGoogleMaps != null) {
|
|
4637
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
|
|
4638
|
-
}
|
|
4639
4777
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
4640
4778
|
'googleSearchRetrieval',
|
|
4641
4779
|
]);
|
|
4642
4780
|
if (fromGoogleSearchRetrieval != null) {
|
|
4643
4781
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
4644
4782
|
}
|
|
4783
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
4784
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
4785
|
+
}
|
|
4645
4786
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
4646
4787
|
if (fromUrlContext != null) {
|
|
4647
4788
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -5351,6 +5492,33 @@ class Batches extends BaseModule {
|
|
|
5351
5492
|
* Copyright 2025 Google LLC
|
|
5352
5493
|
* SPDX-License-Identifier: Apache-2.0
|
|
5353
5494
|
*/
|
|
5495
|
+
function authConfigToMldev$3(fromObject) {
|
|
5496
|
+
const toObject = {};
|
|
5497
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
5498
|
+
if (fromApiKey != null) {
|
|
5499
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
5500
|
+
}
|
|
5501
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
5502
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
5503
|
+
}
|
|
5504
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
5505
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
5506
|
+
}
|
|
5507
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
5508
|
+
undefined) {
|
|
5509
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
5510
|
+
}
|
|
5511
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
5512
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
5513
|
+
}
|
|
5514
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
5515
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
5516
|
+
}
|
|
5517
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
5518
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
5519
|
+
}
|
|
5520
|
+
return toObject;
|
|
5521
|
+
}
|
|
5354
5522
|
function blobToMldev$3(fromObject) {
|
|
5355
5523
|
const toObject = {};
|
|
5356
5524
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -5651,8 +5819,9 @@ function getCachedContentParametersToVertex(apiClient, fromObject) {
|
|
|
5651
5819
|
}
|
|
5652
5820
|
function googleMapsToMldev$3(fromObject) {
|
|
5653
5821
|
const toObject = {};
|
|
5654
|
-
|
|
5655
|
-
|
|
5822
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
5823
|
+
if (fromAuthConfig != null) {
|
|
5824
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$3(fromAuthConfig));
|
|
5656
5825
|
}
|
|
5657
5826
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
5658
5827
|
if (fromEnableWidget != null) {
|
|
@@ -5666,12 +5835,12 @@ function googleSearchToMldev$3(fromObject) {
|
|
|
5666
5835
|
if (fromSearchTypes != null) {
|
|
5667
5836
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
5668
5837
|
}
|
|
5669
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
5670
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
5671
|
-
}
|
|
5672
5838
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
5673
5839
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
5674
5840
|
}
|
|
5841
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
5842
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
5843
|
+
}
|
|
5675
5844
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
5676
5845
|
'timeRangeFilter',
|
|
5677
5846
|
]);
|
|
@@ -5869,6 +6038,10 @@ function toolToMldev$3(fromObject) {
|
|
|
5869
6038
|
if (fromGoogleSearch != null) {
|
|
5870
6039
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
|
|
5871
6040
|
}
|
|
6041
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
6042
|
+
if (fromGoogleMaps != null) {
|
|
6043
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
|
|
6044
|
+
}
|
|
5872
6045
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5873
6046
|
'codeExecution',
|
|
5874
6047
|
]);
|
|
@@ -5890,16 +6063,15 @@ function toolToMldev$3(fromObject) {
|
|
|
5890
6063
|
}
|
|
5891
6064
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
5892
6065
|
}
|
|
5893
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5894
|
-
if (fromGoogleMaps != null) {
|
|
5895
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
|
|
5896
|
-
}
|
|
5897
6066
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5898
6067
|
'googleSearchRetrieval',
|
|
5899
6068
|
]);
|
|
5900
6069
|
if (fromGoogleSearchRetrieval != null) {
|
|
5901
6070
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5902
6071
|
}
|
|
6072
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
6073
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
6074
|
+
}
|
|
5903
6075
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5904
6076
|
if (fromUrlContext != null) {
|
|
5905
6077
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -5933,6 +6105,10 @@ function toolToVertex$2(fromObject) {
|
|
|
5933
6105
|
if (fromGoogleSearch != null) {
|
|
5934
6106
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
5935
6107
|
}
|
|
6108
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
6109
|
+
if (fromGoogleMaps != null) {
|
|
6110
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
6111
|
+
}
|
|
5936
6112
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5937
6113
|
'codeExecution',
|
|
5938
6114
|
]);
|
|
@@ -5957,16 +6133,18 @@ function toolToVertex$2(fromObject) {
|
|
|
5957
6133
|
}
|
|
5958
6134
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
5959
6135
|
}
|
|
5960
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5961
|
-
if (fromGoogleMaps != null) {
|
|
5962
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
5963
|
-
}
|
|
5964
6136
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5965
6137
|
'googleSearchRetrieval',
|
|
5966
6138
|
]);
|
|
5967
6139
|
if (fromGoogleSearchRetrieval != null) {
|
|
5968
6140
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5969
6141
|
}
|
|
6142
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
6143
|
+
'parallelAiSearch',
|
|
6144
|
+
]);
|
|
6145
|
+
if (fromParallelAiSearch != null) {
|
|
6146
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
6147
|
+
}
|
|
5970
6148
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5971
6149
|
if (fromUrlContext != null) {
|
|
5972
6150
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -7261,6 +7439,33 @@ class Files extends BaseModule {
|
|
|
7261
7439
|
* Copyright 2025 Google LLC
|
|
7262
7440
|
* SPDX-License-Identifier: Apache-2.0
|
|
7263
7441
|
*/
|
|
7442
|
+
function authConfigToMldev$2(fromObject) {
|
|
7443
|
+
const toObject = {};
|
|
7444
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
7445
|
+
if (fromApiKey != null) {
|
|
7446
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
7447
|
+
}
|
|
7448
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
7449
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
7450
|
+
}
|
|
7451
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
7452
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
7453
|
+
}
|
|
7454
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
7455
|
+
undefined) {
|
|
7456
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
7457
|
+
}
|
|
7458
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
7459
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
7460
|
+
}
|
|
7461
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
7462
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
7463
|
+
}
|
|
7464
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
7465
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
7466
|
+
}
|
|
7467
|
+
return toObject;
|
|
7468
|
+
}
|
|
7264
7469
|
function blobToMldev$2(fromObject) {
|
|
7265
7470
|
const toObject = {};
|
|
7266
7471
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -7496,8 +7701,9 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
7496
7701
|
}
|
|
7497
7702
|
function googleMapsToMldev$2(fromObject) {
|
|
7498
7703
|
const toObject = {};
|
|
7499
|
-
|
|
7500
|
-
|
|
7704
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7705
|
+
if (fromAuthConfig != null) {
|
|
7706
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$2(fromAuthConfig));
|
|
7501
7707
|
}
|
|
7502
7708
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
7503
7709
|
if (fromEnableWidget != null) {
|
|
@@ -7511,12 +7717,12 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
7511
7717
|
if (fromSearchTypes != null) {
|
|
7512
7718
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
7513
7719
|
}
|
|
7514
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
7515
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
7516
|
-
}
|
|
7517
7720
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
7518
7721
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
7519
7722
|
}
|
|
7723
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
7724
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
7725
|
+
}
|
|
7520
7726
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7521
7727
|
'timeRangeFilter',
|
|
7522
7728
|
]);
|
|
@@ -8030,6 +8236,10 @@ function toolToMldev$2(fromObject) {
|
|
|
8030
8236
|
if (fromGoogleSearch != null) {
|
|
8031
8237
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
|
|
8032
8238
|
}
|
|
8239
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8240
|
+
if (fromGoogleMaps != null) {
|
|
8241
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
|
|
8242
|
+
}
|
|
8033
8243
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
8034
8244
|
'codeExecution',
|
|
8035
8245
|
]);
|
|
@@ -8051,16 +8261,15 @@ function toolToMldev$2(fromObject) {
|
|
|
8051
8261
|
}
|
|
8052
8262
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
8053
8263
|
}
|
|
8054
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8055
|
-
if (fromGoogleMaps != null) {
|
|
8056
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
|
|
8057
|
-
}
|
|
8058
8264
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
8059
8265
|
'googleSearchRetrieval',
|
|
8060
8266
|
]);
|
|
8061
8267
|
if (fromGoogleSearchRetrieval != null) {
|
|
8062
8268
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
8063
8269
|
}
|
|
8270
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
8271
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
8272
|
+
}
|
|
8064
8273
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
8065
8274
|
if (fromUrlContext != null) {
|
|
8066
8275
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -8094,6 +8303,10 @@ function toolToVertex$1(fromObject) {
|
|
|
8094
8303
|
if (fromGoogleSearch != null) {
|
|
8095
8304
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
8096
8305
|
}
|
|
8306
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8307
|
+
if (fromGoogleMaps != null) {
|
|
8308
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
8309
|
+
}
|
|
8097
8310
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
8098
8311
|
'codeExecution',
|
|
8099
8312
|
]);
|
|
@@ -8118,16 +8331,18 @@ function toolToVertex$1(fromObject) {
|
|
|
8118
8331
|
}
|
|
8119
8332
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
8120
8333
|
}
|
|
8121
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8122
|
-
if (fromGoogleMaps != null) {
|
|
8123
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
8124
|
-
}
|
|
8125
8334
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
8126
8335
|
'googleSearchRetrieval',
|
|
8127
8336
|
]);
|
|
8128
8337
|
if (fromGoogleSearchRetrieval != null) {
|
|
8129
8338
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
8130
8339
|
}
|
|
8340
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
8341
|
+
'parallelAiSearch',
|
|
8342
|
+
]);
|
|
8343
|
+
if (fromParallelAiSearch != null) {
|
|
8344
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
8345
|
+
}
|
|
8131
8346
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
8132
8347
|
if (fromUrlContext != null) {
|
|
8133
8348
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -8243,6 +8458,33 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
8243
8458
|
* Copyright 2025 Google LLC
|
|
8244
8459
|
* SPDX-License-Identifier: Apache-2.0
|
|
8245
8460
|
*/
|
|
8461
|
+
function authConfigToMldev$1(fromObject, _rootObject) {
|
|
8462
|
+
const toObject = {};
|
|
8463
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
8464
|
+
if (fromApiKey != null) {
|
|
8465
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
8466
|
+
}
|
|
8467
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
8468
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
8469
|
+
}
|
|
8470
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
8471
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
8472
|
+
}
|
|
8473
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
8474
|
+
undefined) {
|
|
8475
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
8476
|
+
}
|
|
8477
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
8478
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
8479
|
+
}
|
|
8480
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
8481
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
8482
|
+
}
|
|
8483
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
8484
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
8485
|
+
}
|
|
8486
|
+
return toObject;
|
|
8487
|
+
}
|
|
8246
8488
|
function blobToMldev$1(fromObject, _rootObject) {
|
|
8247
8489
|
const toObject = {};
|
|
8248
8490
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -10391,10 +10633,11 @@ function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
|
10391
10633
|
}
|
|
10392
10634
|
return toObject;
|
|
10393
10635
|
}
|
|
10394
|
-
function googleMapsToMldev$1(fromObject,
|
|
10636
|
+
function googleMapsToMldev$1(fromObject, rootObject) {
|
|
10395
10637
|
const toObject = {};
|
|
10396
|
-
|
|
10397
|
-
|
|
10638
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
10639
|
+
if (fromAuthConfig != null) {
|
|
10640
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$1(fromAuthConfig));
|
|
10398
10641
|
}
|
|
10399
10642
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
10400
10643
|
if (fromEnableWidget != null) {
|
|
@@ -10408,12 +10651,12 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
|
10408
10651
|
if (fromSearchTypes != null) {
|
|
10409
10652
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
10410
10653
|
}
|
|
10411
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
10412
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
10413
|
-
}
|
|
10414
10654
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
10415
10655
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
10416
10656
|
}
|
|
10657
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
10658
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
10659
|
+
}
|
|
10417
10660
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
10418
10661
|
'timeRangeFilter',
|
|
10419
10662
|
]);
|
|
@@ -10445,6 +10688,9 @@ function imageConfigToMldev(fromObject, _rootObject) {
|
|
|
10445
10688
|
undefined) {
|
|
10446
10689
|
throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
|
|
10447
10690
|
}
|
|
10691
|
+
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
10692
|
+
throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
|
|
10693
|
+
}
|
|
10448
10694
|
return toObject;
|
|
10449
10695
|
}
|
|
10450
10696
|
function imageConfigToVertex(fromObject, _rootObject) {
|
|
@@ -10481,6 +10727,12 @@ function imageConfigToVertex(fromObject, _rootObject) {
|
|
|
10481
10727
|
if (fromOutputCompressionQuality != null) {
|
|
10482
10728
|
setValueByPath(toObject, ['imageOutputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
10483
10729
|
}
|
|
10730
|
+
const fromImageOutputOptions = getValueByPath(fromObject, [
|
|
10731
|
+
'imageOutputOptions',
|
|
10732
|
+
]);
|
|
10733
|
+
if (fromImageOutputOptions != null) {
|
|
10734
|
+
setValueByPath(toObject, ['imageOutputOptions'], fromImageOutputOptions);
|
|
10735
|
+
}
|
|
10484
10736
|
return toObject;
|
|
10485
10737
|
}
|
|
10486
10738
|
function imageFromMldev(fromObject, _rootObject) {
|
|
@@ -11200,6 +11452,10 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
11200
11452
|
if (fromGoogleSearch != null) {
|
|
11201
11453
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
|
|
11202
11454
|
}
|
|
11455
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11456
|
+
if (fromGoogleMaps != null) {
|
|
11457
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
|
|
11458
|
+
}
|
|
11203
11459
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
11204
11460
|
'codeExecution',
|
|
11205
11461
|
]);
|
|
@@ -11221,16 +11477,15 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
11221
11477
|
}
|
|
11222
11478
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
11223
11479
|
}
|
|
11224
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11225
|
-
if (fromGoogleMaps != null) {
|
|
11226
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
|
|
11227
|
-
}
|
|
11228
11480
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
11229
11481
|
'googleSearchRetrieval',
|
|
11230
11482
|
]);
|
|
11231
11483
|
if (fromGoogleSearchRetrieval != null) {
|
|
11232
11484
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
11233
11485
|
}
|
|
11486
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
11487
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
11488
|
+
}
|
|
11234
11489
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
11235
11490
|
if (fromUrlContext != null) {
|
|
11236
11491
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -11264,6 +11519,10 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
11264
11519
|
if (fromGoogleSearch != null) {
|
|
11265
11520
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
11266
11521
|
}
|
|
11522
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11523
|
+
if (fromGoogleMaps != null) {
|
|
11524
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
11525
|
+
}
|
|
11267
11526
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
11268
11527
|
'codeExecution',
|
|
11269
11528
|
]);
|
|
@@ -11288,16 +11547,18 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
11288
11547
|
}
|
|
11289
11548
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
11290
11549
|
}
|
|
11291
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11292
|
-
if (fromGoogleMaps != null) {
|
|
11293
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
11294
|
-
}
|
|
11295
11550
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
11296
11551
|
'googleSearchRetrieval',
|
|
11297
11552
|
]);
|
|
11298
11553
|
if (fromGoogleSearchRetrieval != null) {
|
|
11299
11554
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
11300
11555
|
}
|
|
11556
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
11557
|
+
'parallelAiSearch',
|
|
11558
|
+
]);
|
|
11559
|
+
if (fromParallelAiSearch != null) {
|
|
11560
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
11561
|
+
}
|
|
11301
11562
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
11302
11563
|
if (fromUrlContext != null) {
|
|
11303
11564
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -11861,7 +12122,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
11861
12122
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
11862
12123
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
11863
12124
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
11864
|
-
const SDK_VERSION = '1.
|
|
12125
|
+
const SDK_VERSION = '1.44.0'; // x-release-please-version
|
|
11865
12126
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
11866
12127
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
11867
12128
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -11880,6 +12141,9 @@ const DEFAULT_RETRY_HTTP_STATUS_CODES = [
|
|
|
11880
12141
|
/**
|
|
11881
12142
|
* The ApiClient class is used to send requests to the Gemini API or Vertex AI
|
|
11882
12143
|
* endpoints.
|
|
12144
|
+
*
|
|
12145
|
+
* WARNING: This is an internal API and may change without notice. Direct usage
|
|
12146
|
+
* is not supported and may break your application.
|
|
11883
12147
|
*/
|
|
11884
12148
|
class ApiClient {
|
|
11885
12149
|
constructor(opts) {
|
|
@@ -11927,10 +12191,7 @@ class ApiClient {
|
|
|
11927
12191
|
else {
|
|
11928
12192
|
// Gemini API
|
|
11929
12193
|
if (!this.clientOptions.apiKey) {
|
|
11930
|
-
|
|
11931
|
-
message: 'API key must be set when using the Gemini API.',
|
|
11932
|
-
status: 403,
|
|
11933
|
-
});
|
|
12194
|
+
console.warn('API key should be set when using the Gemini API.');
|
|
11934
12195
|
}
|
|
11935
12196
|
initHttpOptions.apiVersion =
|
|
11936
12197
|
(_c = this.clientOptions.apiVersion) !== null && _c !== void 0 ? _c : GOOGLE_AI_API_DEFAULT_VERSION;
|
|
@@ -15193,6 +15454,33 @@ class Operations extends BaseModule {
|
|
|
15193
15454
|
* Copyright 2025 Google LLC
|
|
15194
15455
|
* SPDX-License-Identifier: Apache-2.0
|
|
15195
15456
|
*/
|
|
15457
|
+
function authConfigToMldev(fromObject) {
|
|
15458
|
+
const toObject = {};
|
|
15459
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
15460
|
+
if (fromApiKey != null) {
|
|
15461
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
15462
|
+
}
|
|
15463
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
15464
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
15465
|
+
}
|
|
15466
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
15467
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
15468
|
+
}
|
|
15469
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
15470
|
+
undefined) {
|
|
15471
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
15472
|
+
}
|
|
15473
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
15474
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
15475
|
+
}
|
|
15476
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
15477
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
15478
|
+
}
|
|
15479
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
15480
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
15481
|
+
}
|
|
15482
|
+
return toObject;
|
|
15483
|
+
}
|
|
15196
15484
|
function blobToMldev(fromObject) {
|
|
15197
15485
|
const toObject = {};
|
|
15198
15486
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -15303,8 +15591,9 @@ function functionCallToMldev(fromObject) {
|
|
|
15303
15591
|
}
|
|
15304
15592
|
function googleMapsToMldev(fromObject) {
|
|
15305
15593
|
const toObject = {};
|
|
15306
|
-
|
|
15307
|
-
|
|
15594
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
15595
|
+
if (fromAuthConfig != null) {
|
|
15596
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev(fromAuthConfig));
|
|
15308
15597
|
}
|
|
15309
15598
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
15310
15599
|
if (fromEnableWidget != null) {
|
|
@@ -15318,12 +15607,12 @@ function googleSearchToMldev(fromObject) {
|
|
|
15318
15607
|
if (fromSearchTypes != null) {
|
|
15319
15608
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
15320
15609
|
}
|
|
15321
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
15322
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
15323
|
-
}
|
|
15324
15610
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
15325
15611
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
15326
15612
|
}
|
|
15613
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
15614
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
15615
|
+
}
|
|
15327
15616
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
15328
15617
|
'timeRangeFilter',
|
|
15329
15618
|
]);
|
|
@@ -15545,6 +15834,10 @@ function toolToMldev(fromObject) {
|
|
|
15545
15834
|
if (fromGoogleSearch != null) {
|
|
15546
15835
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
|
|
15547
15836
|
}
|
|
15837
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
15838
|
+
if (fromGoogleMaps != null) {
|
|
15839
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
|
|
15840
|
+
}
|
|
15548
15841
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
15549
15842
|
'codeExecution',
|
|
15550
15843
|
]);
|
|
@@ -15566,16 +15859,15 @@ function toolToMldev(fromObject) {
|
|
|
15566
15859
|
}
|
|
15567
15860
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
15568
15861
|
}
|
|
15569
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
15570
|
-
if (fromGoogleMaps != null) {
|
|
15571
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
|
|
15572
|
-
}
|
|
15573
15862
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
15574
15863
|
'googleSearchRetrieval',
|
|
15575
15864
|
]);
|
|
15576
15865
|
if (fromGoogleSearchRetrieval != null) {
|
|
15577
15866
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
15578
15867
|
}
|
|
15868
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
15869
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
15870
|
+
}
|
|
15579
15871
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
15580
15872
|
if (fromUrlContext != null) {
|
|
15581
15873
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -16576,166 +16868,6 @@ const safeJSON = (text) => {
|
|
|
16576
16868
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
16577
16869
|
const sleep$1 = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
16578
16870
|
|
|
16579
|
-
/**
|
|
16580
|
-
* @license
|
|
16581
|
-
* Copyright 2025 Google LLC
|
|
16582
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
16583
|
-
*/
|
|
16584
|
-
const VERSION = '0.0.1';
|
|
16585
|
-
|
|
16586
|
-
/**
|
|
16587
|
-
* @license
|
|
16588
|
-
* Copyright 2025 Google LLC
|
|
16589
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
16590
|
-
*/
|
|
16591
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
16592
|
-
/**
|
|
16593
|
-
* Note this does not detect 'browser'; for that, use getBrowserInfo().
|
|
16594
|
-
*/
|
|
16595
|
-
function getDetectedPlatform() {
|
|
16596
|
-
if (typeof Deno !== 'undefined' && Deno.build != null) {
|
|
16597
|
-
return 'deno';
|
|
16598
|
-
}
|
|
16599
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
16600
|
-
return 'edge';
|
|
16601
|
-
}
|
|
16602
|
-
if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') {
|
|
16603
|
-
return 'node';
|
|
16604
|
-
}
|
|
16605
|
-
return 'unknown';
|
|
16606
|
-
}
|
|
16607
|
-
const getPlatformProperties = () => {
|
|
16608
|
-
var _a, _b, _c, _d, _e;
|
|
16609
|
-
const detectedPlatform = getDetectedPlatform();
|
|
16610
|
-
if (detectedPlatform === 'deno') {
|
|
16611
|
-
return {
|
|
16612
|
-
'X-Stainless-Lang': 'js',
|
|
16613
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16614
|
-
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
16615
|
-
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
16616
|
-
'X-Stainless-Runtime': 'deno',
|
|
16617
|
-
'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',
|
|
16618
|
-
};
|
|
16619
|
-
}
|
|
16620
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
16621
|
-
return {
|
|
16622
|
-
'X-Stainless-Lang': 'js',
|
|
16623
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16624
|
-
'X-Stainless-OS': 'Unknown',
|
|
16625
|
-
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
16626
|
-
'X-Stainless-Runtime': 'edge',
|
|
16627
|
-
'X-Stainless-Runtime-Version': globalThis.process.version,
|
|
16628
|
-
};
|
|
16629
|
-
}
|
|
16630
|
-
// Check if Node.js
|
|
16631
|
-
if (detectedPlatform === 'node') {
|
|
16632
|
-
return {
|
|
16633
|
-
'X-Stainless-Lang': 'js',
|
|
16634
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16635
|
-
'X-Stainless-OS': normalizePlatform((_c = globalThis.process.platform) !== null && _c !== void 0 ? _c : 'unknown'),
|
|
16636
|
-
'X-Stainless-Arch': normalizeArch((_d = globalThis.process.arch) !== null && _d !== void 0 ? _d : 'unknown'),
|
|
16637
|
-
'X-Stainless-Runtime': 'node',
|
|
16638
|
-
'X-Stainless-Runtime-Version': (_e = globalThis.process.version) !== null && _e !== void 0 ? _e : 'unknown',
|
|
16639
|
-
};
|
|
16640
|
-
}
|
|
16641
|
-
const browserInfo = getBrowserInfo();
|
|
16642
|
-
if (browserInfo) {
|
|
16643
|
-
return {
|
|
16644
|
-
'X-Stainless-Lang': 'js',
|
|
16645
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16646
|
-
'X-Stainless-OS': 'Unknown',
|
|
16647
|
-
'X-Stainless-Arch': 'unknown',
|
|
16648
|
-
'X-Stainless-Runtime': `browser:${browserInfo.browser}`,
|
|
16649
|
-
'X-Stainless-Runtime-Version': browserInfo.version,
|
|
16650
|
-
};
|
|
16651
|
-
}
|
|
16652
|
-
// TODO add support for Cloudflare workers, etc.
|
|
16653
|
-
return {
|
|
16654
|
-
'X-Stainless-Lang': 'js',
|
|
16655
|
-
'X-Stainless-Package-Version': VERSION,
|
|
16656
|
-
'X-Stainless-OS': 'Unknown',
|
|
16657
|
-
'X-Stainless-Arch': 'unknown',
|
|
16658
|
-
'X-Stainless-Runtime': 'unknown',
|
|
16659
|
-
'X-Stainless-Runtime-Version': 'unknown',
|
|
16660
|
-
};
|
|
16661
|
-
};
|
|
16662
|
-
// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
|
|
16663
|
-
function getBrowserInfo() {
|
|
16664
|
-
if (typeof navigator === 'undefined' || !navigator) {
|
|
16665
|
-
return null;
|
|
16666
|
-
}
|
|
16667
|
-
// NOTE: The order matters here!
|
|
16668
|
-
const browserPatterns = [
|
|
16669
|
-
{ key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16670
|
-
{ key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16671
|
-
{ key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16672
|
-
{ key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16673
|
-
{ key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
16674
|
-
{ key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ },
|
|
16675
|
-
];
|
|
16676
|
-
// Find the FIRST matching browser
|
|
16677
|
-
for (const { key, pattern } of browserPatterns) {
|
|
16678
|
-
const match = pattern.exec(navigator.userAgent);
|
|
16679
|
-
if (match) {
|
|
16680
|
-
const major = match[1] || 0;
|
|
16681
|
-
const minor = match[2] || 0;
|
|
16682
|
-
const patch = match[3] || 0;
|
|
16683
|
-
return { browser: key, version: `${major}.${minor}.${patch}` };
|
|
16684
|
-
}
|
|
16685
|
-
}
|
|
16686
|
-
return null;
|
|
16687
|
-
}
|
|
16688
|
-
const normalizeArch = (arch) => {
|
|
16689
|
-
// Node docs:
|
|
16690
|
-
// - https://nodejs.org/api/process.html#processarch
|
|
16691
|
-
// Deno docs:
|
|
16692
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
16693
|
-
if (arch === 'x32')
|
|
16694
|
-
return 'x32';
|
|
16695
|
-
if (arch === 'x86_64' || arch === 'x64')
|
|
16696
|
-
return 'x64';
|
|
16697
|
-
if (arch === 'arm')
|
|
16698
|
-
return 'arm';
|
|
16699
|
-
if (arch === 'aarch64' || arch === 'arm64')
|
|
16700
|
-
return 'arm64';
|
|
16701
|
-
if (arch)
|
|
16702
|
-
return `other:${arch}`;
|
|
16703
|
-
return 'unknown';
|
|
16704
|
-
};
|
|
16705
|
-
const normalizePlatform = (platform) => {
|
|
16706
|
-
// Node platforms:
|
|
16707
|
-
// - https://nodejs.org/api/process.html#processplatform
|
|
16708
|
-
// Deno platforms:
|
|
16709
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
16710
|
-
// - https://github.com/denoland/deno/issues/14799
|
|
16711
|
-
platform = platform.toLowerCase();
|
|
16712
|
-
// NOTE: this iOS check is untested and may not work
|
|
16713
|
-
// Node does not work natively on IOS, there is a fork at
|
|
16714
|
-
// https://github.com/nodejs-mobile/nodejs-mobile
|
|
16715
|
-
// however it is unknown at the time of writing how to detect if it is running
|
|
16716
|
-
if (platform.includes('ios'))
|
|
16717
|
-
return 'iOS';
|
|
16718
|
-
if (platform === 'android')
|
|
16719
|
-
return 'Android';
|
|
16720
|
-
if (platform === 'darwin')
|
|
16721
|
-
return 'MacOS';
|
|
16722
|
-
if (platform === 'win32')
|
|
16723
|
-
return 'Windows';
|
|
16724
|
-
if (platform === 'freebsd')
|
|
16725
|
-
return 'FreeBSD';
|
|
16726
|
-
if (platform === 'openbsd')
|
|
16727
|
-
return 'OpenBSD';
|
|
16728
|
-
if (platform === 'linux')
|
|
16729
|
-
return 'Linux';
|
|
16730
|
-
if (platform)
|
|
16731
|
-
return `Other:${platform}`;
|
|
16732
|
-
return 'Unknown';
|
|
16733
|
-
};
|
|
16734
|
-
let _platformHeaders;
|
|
16735
|
-
const getPlatformHeaders = () => {
|
|
16736
|
-
return (_platformHeaders !== null && _platformHeaders !== void 0 ? _platformHeaders : (_platformHeaders = getPlatformProperties()));
|
|
16737
|
-
};
|
|
16738
|
-
|
|
16739
16871
|
/**
|
|
16740
16872
|
* @license
|
|
16741
16873
|
* Copyright 2025 Google LLC
|
|
@@ -16841,6 +16973,13 @@ const FallbackEncoder = ({ headers, body }) => {
|
|
|
16841
16973
|
};
|
|
16842
16974
|
};
|
|
16843
16975
|
|
|
16976
|
+
/**
|
|
16977
|
+
* @license
|
|
16978
|
+
* Copyright 2025 Google LLC
|
|
16979
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
16980
|
+
*/
|
|
16981
|
+
const VERSION = '0.0.1';
|
|
16982
|
+
|
|
16844
16983
|
/**
|
|
16845
16984
|
* @license
|
|
16846
16985
|
* Copyright 2025 Google LLC
|
|
@@ -17179,8 +17318,10 @@ class LineDecoder {
|
|
|
17179
17318
|
constructor() {
|
|
17180
17319
|
this.buffer = new Uint8Array();
|
|
17181
17320
|
this.carriageReturnIndex = null;
|
|
17321
|
+
this.searchIndex = 0;
|
|
17182
17322
|
}
|
|
17183
17323
|
decode(chunk) {
|
|
17324
|
+
var _a;
|
|
17184
17325
|
if (chunk == null) {
|
|
17185
17326
|
return [];
|
|
17186
17327
|
}
|
|
@@ -17190,7 +17331,7 @@ class LineDecoder {
|
|
|
17190
17331
|
this.buffer = concatBytes([this.buffer, binaryChunk]);
|
|
17191
17332
|
const lines = [];
|
|
17192
17333
|
let patternIndex;
|
|
17193
|
-
while ((patternIndex = findNewlineIndex(this.buffer, this.carriageReturnIndex)) != null) {
|
|
17334
|
+
while ((patternIndex = findNewlineIndex(this.buffer, (_a = this.carriageReturnIndex) !== null && _a !== void 0 ? _a : this.searchIndex)) != null) {
|
|
17194
17335
|
if (patternIndex.carriage && this.carriageReturnIndex == null) {
|
|
17195
17336
|
// skip until we either get a corresponding `\n`, a new `\r` or nothing
|
|
17196
17337
|
this.carriageReturnIndex = patternIndex.index;
|
|
@@ -17202,6 +17343,7 @@ class LineDecoder {
|
|
|
17202
17343
|
lines.push(decodeUTF8(this.buffer.subarray(0, this.carriageReturnIndex - 1)));
|
|
17203
17344
|
this.buffer = this.buffer.subarray(this.carriageReturnIndex);
|
|
17204
17345
|
this.carriageReturnIndex = null;
|
|
17346
|
+
this.searchIndex = 0;
|
|
17205
17347
|
continue;
|
|
17206
17348
|
}
|
|
17207
17349
|
const endIndex = this.carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
|
@@ -17209,7 +17351,9 @@ class LineDecoder {
|
|
|
17209
17351
|
lines.push(line);
|
|
17210
17352
|
this.buffer = this.buffer.subarray(patternIndex.index);
|
|
17211
17353
|
this.carriageReturnIndex = null;
|
|
17354
|
+
this.searchIndex = 0;
|
|
17212
17355
|
}
|
|
17356
|
+
this.searchIndex = Math.max(0, this.buffer.length - 1);
|
|
17213
17357
|
return lines;
|
|
17214
17358
|
}
|
|
17215
17359
|
flush() {
|
|
@@ -17234,41 +17378,23 @@ LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
|
|
17234
17378
|
function findNewlineIndex(buffer, startIndex) {
|
|
17235
17379
|
const newline = 0x0a; // \n
|
|
17236
17380
|
const carriage = 0x0d; // \r
|
|
17237
|
-
|
|
17238
|
-
|
|
17239
|
-
|
|
17240
|
-
|
|
17241
|
-
|
|
17242
|
-
return { preceding: i, index: i + 1, carriage: true };
|
|
17243
|
-
}
|
|
17381
|
+
const start = startIndex !== null && startIndex !== void 0 ? startIndex : 0;
|
|
17382
|
+
const nextNewline = buffer.indexOf(newline, start);
|
|
17383
|
+
const nextCarriage = buffer.indexOf(carriage, start);
|
|
17384
|
+
if (nextNewline === -1 && nextCarriage === -1) {
|
|
17385
|
+
return null;
|
|
17244
17386
|
}
|
|
17245
|
-
|
|
17246
|
-
|
|
17247
|
-
|
|
17248
|
-
// This function searches the buffer for the end patterns (\r\r, \n\n, \r\n\r\n)
|
|
17249
|
-
// and returns the index right after the first occurrence of any pattern,
|
|
17250
|
-
// or -1 if none of the patterns are found.
|
|
17251
|
-
const newline = 0x0a; // \n
|
|
17252
|
-
const carriage = 0x0d; // \r
|
|
17253
|
-
for (let i = 0; i < buffer.length - 1; i++) {
|
|
17254
|
-
if (buffer[i] === newline && buffer[i + 1] === newline) {
|
|
17255
|
-
// \n\n
|
|
17256
|
-
return i + 2;
|
|
17257
|
-
}
|
|
17258
|
-
if (buffer[i] === carriage && buffer[i + 1] === carriage) {
|
|
17259
|
-
// \r\r
|
|
17260
|
-
return i + 2;
|
|
17261
|
-
}
|
|
17262
|
-
if (buffer[i] === carriage &&
|
|
17263
|
-
buffer[i + 1] === newline &&
|
|
17264
|
-
i + 3 < buffer.length &&
|
|
17265
|
-
buffer[i + 2] === carriage &&
|
|
17266
|
-
buffer[i + 3] === newline) {
|
|
17267
|
-
// \r\n\r\n
|
|
17268
|
-
return i + 4;
|
|
17269
|
-
}
|
|
17387
|
+
let i;
|
|
17388
|
+
if (nextNewline !== -1 && nextCarriage !== -1) {
|
|
17389
|
+
i = Math.min(nextNewline, nextCarriage);
|
|
17270
17390
|
}
|
|
17271
|
-
|
|
17391
|
+
else {
|
|
17392
|
+
i = nextNewline !== -1 ? nextNewline : nextCarriage;
|
|
17393
|
+
}
|
|
17394
|
+
if (buffer[i] === newline) {
|
|
17395
|
+
return { preceding: i, index: i + 1, carriage: false };
|
|
17396
|
+
}
|
|
17397
|
+
return { preceding: i, index: i + 1, carriage: true };
|
|
17272
17398
|
}
|
|
17273
17399
|
|
|
17274
17400
|
/**
|
|
@@ -17579,7 +17705,7 @@ function _iterSSEMessages(response, controller) {
|
|
|
17579
17705
|
const lineDecoder = new LineDecoder();
|
|
17580
17706
|
const iter = ReadableStreamToAsyncIterable(response.body);
|
|
17581
17707
|
try {
|
|
17582
|
-
for (var _d = true, _e = __asyncValues(
|
|
17708
|
+
for (var _d = true, _e = __asyncValues(iterBinaryChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
17583
17709
|
_c = _f.value;
|
|
17584
17710
|
_d = false;
|
|
17585
17711
|
const sseChunk = _c;
|
|
@@ -17605,13 +17731,12 @@ function _iterSSEMessages(response, controller) {
|
|
|
17605
17731
|
});
|
|
17606
17732
|
}
|
|
17607
17733
|
/**
|
|
17608
|
-
* Given an async iterable iterator,
|
|
17609
|
-
*
|
|
17734
|
+
* Given an async iterable iterator, normalizes each chunk to a
|
|
17735
|
+
* Uint8Array and yields it.
|
|
17610
17736
|
*/
|
|
17611
|
-
function
|
|
17612
|
-
return __asyncGenerator(this, arguments, function*
|
|
17737
|
+
function iterBinaryChunks(iterator) {
|
|
17738
|
+
return __asyncGenerator(this, arguments, function* iterBinaryChunks_1() {
|
|
17613
17739
|
var _a, e_5, _b, _c;
|
|
17614
|
-
let data = new Uint8Array();
|
|
17615
17740
|
try {
|
|
17616
17741
|
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) {
|
|
17617
17742
|
_c = iterator_3_1.value;
|
|
@@ -17623,15 +17748,7 @@ function iterSSEChunks(iterator) {
|
|
|
17623
17748
|
const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk)
|
|
17624
17749
|
: typeof chunk === 'string' ? encodeUTF8(chunk)
|
|
17625
17750
|
: chunk;
|
|
17626
|
-
|
|
17627
|
-
newData.set(data);
|
|
17628
|
-
newData.set(binaryChunk, data.length);
|
|
17629
|
-
data = newData;
|
|
17630
|
-
let patternIndex;
|
|
17631
|
-
while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {
|
|
17632
|
-
yield yield __await(data.slice(0, patternIndex));
|
|
17633
|
-
data = data.slice(patternIndex);
|
|
17634
|
-
}
|
|
17751
|
+
yield yield __await(binaryChunk);
|
|
17635
17752
|
}
|
|
17636
17753
|
}
|
|
17637
17754
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
@@ -17641,9 +17758,6 @@ function iterSSEChunks(iterator) {
|
|
|
17641
17758
|
}
|
|
17642
17759
|
finally { if (e_5) throw e_5.error; }
|
|
17643
17760
|
}
|
|
17644
|
-
if (data.length > 0) {
|
|
17645
|
-
yield yield __await(data);
|
|
17646
|
-
}
|
|
17647
17761
|
});
|
|
17648
17762
|
}
|
|
17649
17763
|
class SSEDecoder {
|
|
@@ -18295,7 +18409,7 @@ class BaseGeminiNextGenAPIClient {
|
|
|
18295
18409
|
const authHeaders = await this.authHeaders(options);
|
|
18296
18410
|
let headers = buildHeaders([
|
|
18297
18411
|
idempotencyHeaders,
|
|
18298
|
-
|
|
18412
|
+
{ Accept: 'application/json', 'User-Agent': this.getUserAgent() },
|
|
18299
18413
|
this._options.defaultHeaders,
|
|
18300
18414
|
bodyHeaders,
|
|
18301
18415
|
options.headers,
|
|
@@ -19318,10 +19432,28 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19318
19432
|
if (fromCustomBaseModel != null) {
|
|
19319
19433
|
setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
|
|
19320
19434
|
}
|
|
19435
|
+
const fromEvaluateDatasetRuns = getValueByPath(fromObject, [
|
|
19436
|
+
'evaluateDatasetRuns',
|
|
19437
|
+
]);
|
|
19438
|
+
if (fromEvaluateDatasetRuns != null) {
|
|
19439
|
+
let transformedList = fromEvaluateDatasetRuns;
|
|
19440
|
+
if (Array.isArray(transformedList)) {
|
|
19441
|
+
transformedList = transformedList.map((item) => {
|
|
19442
|
+
return item;
|
|
19443
|
+
});
|
|
19444
|
+
}
|
|
19445
|
+
setValueByPath(toObject, ['evaluateDatasetRuns'], transformedList);
|
|
19446
|
+
}
|
|
19321
19447
|
const fromExperiment = getValueByPath(fromObject, ['experiment']);
|
|
19322
19448
|
if (fromExperiment != null) {
|
|
19323
19449
|
setValueByPath(toObject, ['experiment'], fromExperiment);
|
|
19324
19450
|
}
|
|
19451
|
+
const fromFullFineTuningSpec = getValueByPath(fromObject, [
|
|
19452
|
+
'fullFineTuningSpec',
|
|
19453
|
+
]);
|
|
19454
|
+
if (fromFullFineTuningSpec != null) {
|
|
19455
|
+
setValueByPath(toObject, ['fullFineTuningSpec'], fromFullFineTuningSpec);
|
|
19456
|
+
}
|
|
19325
19457
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19326
19458
|
if (fromLabels != null) {
|
|
19327
19459
|
setValueByPath(toObject, ['labels'], fromLabels);
|
|
@@ -19346,6 +19478,12 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19346
19478
|
if (fromTunedModelDisplayName != null) {
|
|
19347
19479
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19348
19480
|
}
|
|
19481
|
+
const fromTuningJobState = getValueByPath(fromObject, [
|
|
19482
|
+
'tuningJobState',
|
|
19483
|
+
]);
|
|
19484
|
+
if (fromTuningJobState != null) {
|
|
19485
|
+
setValueByPath(toObject, ['tuningJobState'], fromTuningJobState);
|
|
19486
|
+
}
|
|
19349
19487
|
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19350
19488
|
'veoTuningSpec',
|
|
19351
19489
|
]);
|
|
@@ -20198,7 +20336,7 @@ class GoogleGenAI {
|
|
|
20198
20336
|
this.project = (_d = options.project) !== null && _d !== void 0 ? _d : envProject;
|
|
20199
20337
|
this.location = (_e = options.location) !== null && _e !== void 0 ? _e : envLocation;
|
|
20200
20338
|
if (!this.vertexai && !this.apiKey) {
|
|
20201
|
-
|
|
20339
|
+
console.warn('API key should be set when using the Gemini API.');
|
|
20202
20340
|
}
|
|
20203
20341
|
// Handle when to use Vertex AI in express mode (api key)
|
|
20204
20342
|
if (options.vertexai) {
|
|
@@ -20309,6 +20447,7 @@ exports.DeleteFileResponse = DeleteFileResponse;
|
|
|
20309
20447
|
exports.DeleteModelResponse = DeleteModelResponse;
|
|
20310
20448
|
exports.EditImageResponse = EditImageResponse;
|
|
20311
20449
|
exports.EmbedContentResponse = EmbedContentResponse;
|
|
20450
|
+
exports.EvaluateDatasetResponse = EvaluateDatasetResponse;
|
|
20312
20451
|
exports.Files = Files;
|
|
20313
20452
|
exports.FunctionResponse = FunctionResponse;
|
|
20314
20453
|
exports.FunctionResponseBlob = FunctionResponseBlob;
|