@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/index.mjs
CHANGED
|
@@ -608,7 +608,7 @@ var FunctionResponseScheduling;
|
|
|
608
608
|
*/
|
|
609
609
|
FunctionResponseScheduling["INTERRUPT"] = "INTERRUPT";
|
|
610
610
|
})(FunctionResponseScheduling || (FunctionResponseScheduling = {}));
|
|
611
|
-
/**
|
|
611
|
+
/** Data type of the schema field. */
|
|
612
612
|
var Type;
|
|
613
613
|
(function (Type) {
|
|
614
614
|
/**
|
|
@@ -676,22 +676,6 @@ var PhishBlockThreshold;
|
|
|
676
676
|
*/
|
|
677
677
|
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
678
678
|
})(PhishBlockThreshold || (PhishBlockThreshold = {}));
|
|
679
|
-
/** The API spec that the external API implements. This enum is not supported in Gemini API. */
|
|
680
|
-
var ApiSpec;
|
|
681
|
-
(function (ApiSpec) {
|
|
682
|
-
/**
|
|
683
|
-
* Unspecified API spec. This value should not be used.
|
|
684
|
-
*/
|
|
685
|
-
ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
|
|
686
|
-
/**
|
|
687
|
-
* Simple search API spec.
|
|
688
|
-
*/
|
|
689
|
-
ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
|
|
690
|
-
/**
|
|
691
|
-
* Elastic search API spec.
|
|
692
|
-
*/
|
|
693
|
-
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
694
|
-
})(ApiSpec || (ApiSpec = {}));
|
|
695
679
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
696
680
|
var AuthType;
|
|
697
681
|
(function (AuthType) {
|
|
@@ -746,6 +730,22 @@ var HttpElementLocation;
|
|
|
746
730
|
*/
|
|
747
731
|
HttpElementLocation["HTTP_IN_COOKIE"] = "HTTP_IN_COOKIE";
|
|
748
732
|
})(HttpElementLocation || (HttpElementLocation = {}));
|
|
733
|
+
/** The API spec that the external API implements. This enum is not supported in Gemini API. */
|
|
734
|
+
var ApiSpec;
|
|
735
|
+
(function (ApiSpec) {
|
|
736
|
+
/**
|
|
737
|
+
* Unspecified API spec. This value should not be used.
|
|
738
|
+
*/
|
|
739
|
+
ApiSpec["API_SPEC_UNSPECIFIED"] = "API_SPEC_UNSPECIFIED";
|
|
740
|
+
/**
|
|
741
|
+
* Simple search API spec.
|
|
742
|
+
*/
|
|
743
|
+
ApiSpec["SIMPLE_SEARCH"] = "SIMPLE_SEARCH";
|
|
744
|
+
/**
|
|
745
|
+
* Elastic search API spec.
|
|
746
|
+
*/
|
|
747
|
+
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
748
|
+
})(ApiSpec || (ApiSpec = {}));
|
|
749
749
|
/** Specifies the function Behavior. Currently only supported by the BidiGenerateContent method. This enum is not supported in Vertex AI. */
|
|
750
750
|
var Behavior;
|
|
751
751
|
(function (Behavior) {
|
|
@@ -822,27 +822,43 @@ var ThinkingLevel;
|
|
|
822
822
|
*/
|
|
823
823
|
ThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
824
824
|
})(ThinkingLevel || (ThinkingLevel = {}));
|
|
825
|
-
/**
|
|
825
|
+
/** Enum that controls the generation of people. */
|
|
826
|
+
var PersonGeneration;
|
|
827
|
+
(function (PersonGeneration) {
|
|
828
|
+
/**
|
|
829
|
+
* Block generation of images of people.
|
|
830
|
+
*/
|
|
831
|
+
PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
|
|
832
|
+
/**
|
|
833
|
+
* Generate images of adults, but not children.
|
|
834
|
+
*/
|
|
835
|
+
PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
|
|
836
|
+
/**
|
|
837
|
+
* Generate images that include adults and children.
|
|
838
|
+
*/
|
|
839
|
+
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
840
|
+
})(PersonGeneration || (PersonGeneration = {}));
|
|
841
|
+
/** The harm category to be blocked. */
|
|
826
842
|
var HarmCategory;
|
|
827
843
|
(function (HarmCategory) {
|
|
828
844
|
/**
|
|
829
|
-
*
|
|
845
|
+
* Default value. This value is unused.
|
|
830
846
|
*/
|
|
831
847
|
HarmCategory["HARM_CATEGORY_UNSPECIFIED"] = "HARM_CATEGORY_UNSPECIFIED";
|
|
832
848
|
/**
|
|
833
|
-
*
|
|
849
|
+
* Abusive, threatening, or content intended to bully, torment, or ridicule.
|
|
834
850
|
*/
|
|
835
851
|
HarmCategory["HARM_CATEGORY_HARASSMENT"] = "HARM_CATEGORY_HARASSMENT";
|
|
836
852
|
/**
|
|
837
|
-
*
|
|
853
|
+
* Content that promotes violence or incites hatred against individuals or groups based on certain attributes.
|
|
838
854
|
*/
|
|
839
855
|
HarmCategory["HARM_CATEGORY_HATE_SPEECH"] = "HARM_CATEGORY_HATE_SPEECH";
|
|
840
856
|
/**
|
|
841
|
-
*
|
|
857
|
+
* Content that contains sexually explicit material.
|
|
842
858
|
*/
|
|
843
859
|
HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
844
860
|
/**
|
|
845
|
-
*
|
|
861
|
+
* Content that promotes, facilitates, or enables dangerous activities.
|
|
846
862
|
*/
|
|
847
863
|
HarmCategory["HARM_CATEGORY_DANGEROUS_CONTENT"] = "HARM_CATEGORY_DANGEROUS_CONTENT";
|
|
848
864
|
/**
|
|
@@ -850,27 +866,27 @@ var HarmCategory;
|
|
|
850
866
|
*/
|
|
851
867
|
HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
|
|
852
868
|
/**
|
|
853
|
-
*
|
|
869
|
+
* Images that contain hate speech. This enum value is not supported in Gemini API.
|
|
854
870
|
*/
|
|
855
871
|
HarmCategory["HARM_CATEGORY_IMAGE_HATE"] = "HARM_CATEGORY_IMAGE_HATE";
|
|
856
872
|
/**
|
|
857
|
-
*
|
|
873
|
+
* Images that contain dangerous content. This enum value is not supported in Gemini API.
|
|
858
874
|
*/
|
|
859
875
|
HarmCategory["HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT"] = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT";
|
|
860
876
|
/**
|
|
861
|
-
*
|
|
877
|
+
* Images that contain harassment. This enum value is not supported in Gemini API.
|
|
862
878
|
*/
|
|
863
879
|
HarmCategory["HARM_CATEGORY_IMAGE_HARASSMENT"] = "HARM_CATEGORY_IMAGE_HARASSMENT";
|
|
864
880
|
/**
|
|
865
|
-
*
|
|
881
|
+
* Images that contain sexually explicit content. This enum value is not supported in Gemini API.
|
|
866
882
|
*/
|
|
867
883
|
HarmCategory["HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT";
|
|
868
884
|
/**
|
|
869
|
-
*
|
|
885
|
+
* Prompts designed to bypass safety filters. This enum value is not supported in Gemini API.
|
|
870
886
|
*/
|
|
871
887
|
HarmCategory["HARM_CATEGORY_JAILBREAK"] = "HARM_CATEGORY_JAILBREAK";
|
|
872
888
|
})(HarmCategory || (HarmCategory = {}));
|
|
873
|
-
/**
|
|
889
|
+
/** 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. */
|
|
874
890
|
var HarmBlockMethod;
|
|
875
891
|
(function (HarmBlockMethod) {
|
|
876
892
|
/**
|
|
@@ -886,31 +902,31 @@ var HarmBlockMethod;
|
|
|
886
902
|
*/
|
|
887
903
|
HarmBlockMethod["PROBABILITY"] = "PROBABILITY";
|
|
888
904
|
})(HarmBlockMethod || (HarmBlockMethod = {}));
|
|
889
|
-
/** The harm
|
|
905
|
+
/** The threshold for blocking content. If the harm probability exceeds this threshold, the content will be blocked. */
|
|
890
906
|
var HarmBlockThreshold;
|
|
891
907
|
(function (HarmBlockThreshold) {
|
|
892
908
|
/**
|
|
893
|
-
*
|
|
909
|
+
* The harm block threshold is unspecified.
|
|
894
910
|
*/
|
|
895
911
|
HarmBlockThreshold["HARM_BLOCK_THRESHOLD_UNSPECIFIED"] = "HARM_BLOCK_THRESHOLD_UNSPECIFIED";
|
|
896
912
|
/**
|
|
897
|
-
* Block
|
|
913
|
+
* Block content with a low harm probability or higher.
|
|
898
914
|
*/
|
|
899
915
|
HarmBlockThreshold["BLOCK_LOW_AND_ABOVE"] = "BLOCK_LOW_AND_ABOVE";
|
|
900
916
|
/**
|
|
901
|
-
* Block medium
|
|
917
|
+
* Block content with a medium harm probability or higher.
|
|
902
918
|
*/
|
|
903
919
|
HarmBlockThreshold["BLOCK_MEDIUM_AND_ABOVE"] = "BLOCK_MEDIUM_AND_ABOVE";
|
|
904
920
|
/**
|
|
905
|
-
* Block
|
|
921
|
+
* Block content with a high harm probability.
|
|
906
922
|
*/
|
|
907
923
|
HarmBlockThreshold["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
|
|
908
924
|
/**
|
|
909
|
-
*
|
|
925
|
+
* Do not block any content, regardless of its harm probability.
|
|
910
926
|
*/
|
|
911
927
|
HarmBlockThreshold["BLOCK_NONE"] = "BLOCK_NONE";
|
|
912
928
|
/**
|
|
913
|
-
* Turn off the safety filter.
|
|
929
|
+
* Turn off the safety filter entirely.
|
|
914
930
|
*/
|
|
915
931
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
916
932
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
@@ -988,55 +1004,55 @@ var FinishReason;
|
|
|
988
1004
|
*/
|
|
989
1005
|
FinishReason["IMAGE_OTHER"] = "IMAGE_OTHER";
|
|
990
1006
|
})(FinishReason || (FinishReason = {}));
|
|
991
|
-
/** Output only.
|
|
1007
|
+
/** Output only. The probability of harm for this category. */
|
|
992
1008
|
var HarmProbability;
|
|
993
1009
|
(function (HarmProbability) {
|
|
994
1010
|
/**
|
|
995
|
-
*
|
|
1011
|
+
* The harm probability is unspecified.
|
|
996
1012
|
*/
|
|
997
1013
|
HarmProbability["HARM_PROBABILITY_UNSPECIFIED"] = "HARM_PROBABILITY_UNSPECIFIED";
|
|
998
1014
|
/**
|
|
999
|
-
*
|
|
1015
|
+
* The harm probability is negligible.
|
|
1000
1016
|
*/
|
|
1001
1017
|
HarmProbability["NEGLIGIBLE"] = "NEGLIGIBLE";
|
|
1002
1018
|
/**
|
|
1003
|
-
*
|
|
1019
|
+
* The harm probability is low.
|
|
1004
1020
|
*/
|
|
1005
1021
|
HarmProbability["LOW"] = "LOW";
|
|
1006
1022
|
/**
|
|
1007
|
-
*
|
|
1023
|
+
* The harm probability is medium.
|
|
1008
1024
|
*/
|
|
1009
1025
|
HarmProbability["MEDIUM"] = "MEDIUM";
|
|
1010
1026
|
/**
|
|
1011
|
-
*
|
|
1027
|
+
* The harm probability is high.
|
|
1012
1028
|
*/
|
|
1013
1029
|
HarmProbability["HIGH"] = "HIGH";
|
|
1014
1030
|
})(HarmProbability || (HarmProbability = {}));
|
|
1015
|
-
/** Output only.
|
|
1031
|
+
/** Output only. The severity of harm for this category. This enum is not supported in Gemini API. */
|
|
1016
1032
|
var HarmSeverity;
|
|
1017
1033
|
(function (HarmSeverity) {
|
|
1018
1034
|
/**
|
|
1019
|
-
*
|
|
1035
|
+
* The harm severity is unspecified.
|
|
1020
1036
|
*/
|
|
1021
1037
|
HarmSeverity["HARM_SEVERITY_UNSPECIFIED"] = "HARM_SEVERITY_UNSPECIFIED";
|
|
1022
1038
|
/**
|
|
1023
|
-
*
|
|
1039
|
+
* The harm severity is negligible.
|
|
1024
1040
|
*/
|
|
1025
1041
|
HarmSeverity["HARM_SEVERITY_NEGLIGIBLE"] = "HARM_SEVERITY_NEGLIGIBLE";
|
|
1026
1042
|
/**
|
|
1027
|
-
*
|
|
1043
|
+
* The harm severity is low.
|
|
1028
1044
|
*/
|
|
1029
1045
|
HarmSeverity["HARM_SEVERITY_LOW"] = "HARM_SEVERITY_LOW";
|
|
1030
1046
|
/**
|
|
1031
|
-
*
|
|
1047
|
+
* The harm severity is medium.
|
|
1032
1048
|
*/
|
|
1033
1049
|
HarmSeverity["HARM_SEVERITY_MEDIUM"] = "HARM_SEVERITY_MEDIUM";
|
|
1034
1050
|
/**
|
|
1035
|
-
*
|
|
1051
|
+
* The harm severity is high.
|
|
1036
1052
|
*/
|
|
1037
1053
|
HarmSeverity["HARM_SEVERITY_HIGH"] = "HARM_SEVERITY_HIGH";
|
|
1038
1054
|
})(HarmSeverity || (HarmSeverity = {}));
|
|
1039
|
-
/**
|
|
1055
|
+
/** The status of the URL retrieval. */
|
|
1040
1056
|
var UrlRetrievalStatus;
|
|
1041
1057
|
(function (UrlRetrievalStatus) {
|
|
1042
1058
|
/**
|
|
@@ -1044,11 +1060,11 @@ var UrlRetrievalStatus;
|
|
|
1044
1060
|
*/
|
|
1045
1061
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_UNSPECIFIED"] = "URL_RETRIEVAL_STATUS_UNSPECIFIED";
|
|
1046
1062
|
/**
|
|
1047
|
-
*
|
|
1063
|
+
* The URL was retrieved successfully.
|
|
1048
1064
|
*/
|
|
1049
1065
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_SUCCESS"] = "URL_RETRIEVAL_STATUS_SUCCESS";
|
|
1050
1066
|
/**
|
|
1051
|
-
*
|
|
1067
|
+
* The URL retrieval failed.
|
|
1052
1068
|
*/
|
|
1053
1069
|
UrlRetrievalStatus["URL_RETRIEVAL_STATUS_ERROR"] = "URL_RETRIEVAL_STATUS_ERROR";
|
|
1054
1070
|
/**
|
|
@@ -1107,6 +1123,14 @@ var TrafficType;
|
|
|
1107
1123
|
* The request was processed using Pay-As-You-Go quota.
|
|
1108
1124
|
*/
|
|
1109
1125
|
TrafficType["ON_DEMAND"] = "ON_DEMAND";
|
|
1126
|
+
/**
|
|
1127
|
+
* Type for Priority Pay-As-You-Go traffic.
|
|
1128
|
+
*/
|
|
1129
|
+
TrafficType["ON_DEMAND_PRIORITY"] = "ON_DEMAND_PRIORITY";
|
|
1130
|
+
/**
|
|
1131
|
+
* Type for Flex traffic.
|
|
1132
|
+
*/
|
|
1133
|
+
TrafficType["ON_DEMAND_FLEX"] = "ON_DEMAND_FLEX";
|
|
1110
1134
|
/**
|
|
1111
1135
|
* Type for Provisioned Throughput traffic.
|
|
1112
1136
|
*/
|
|
@@ -1252,6 +1276,102 @@ var JobState;
|
|
|
1252
1276
|
*/
|
|
1253
1277
|
JobState["JOB_STATE_PARTIALLY_SUCCEEDED"] = "JOB_STATE_PARTIALLY_SUCCEEDED";
|
|
1254
1278
|
})(JobState || (JobState = {}));
|
|
1279
|
+
/** Output only. The detail state of the tuning job (while the overall `JobState` is running). This enum is not supported in Gemini API. */
|
|
1280
|
+
var TuningJobState;
|
|
1281
|
+
(function (TuningJobState) {
|
|
1282
|
+
/**
|
|
1283
|
+
* Default tuning job state.
|
|
1284
|
+
*/
|
|
1285
|
+
TuningJobState["TUNING_JOB_STATE_UNSPECIFIED"] = "TUNING_JOB_STATE_UNSPECIFIED";
|
|
1286
|
+
/**
|
|
1287
|
+
* Tuning job is waiting for job quota.
|
|
1288
|
+
*/
|
|
1289
|
+
TuningJobState["TUNING_JOB_STATE_WAITING_FOR_QUOTA"] = "TUNING_JOB_STATE_WAITING_FOR_QUOTA";
|
|
1290
|
+
/**
|
|
1291
|
+
* Tuning job is validating the dataset.
|
|
1292
|
+
*/
|
|
1293
|
+
TuningJobState["TUNING_JOB_STATE_PROCESSING_DATASET"] = "TUNING_JOB_STATE_PROCESSING_DATASET";
|
|
1294
|
+
/**
|
|
1295
|
+
* Tuning job is waiting for hardware capacity.
|
|
1296
|
+
*/
|
|
1297
|
+
TuningJobState["TUNING_JOB_STATE_WAITING_FOR_CAPACITY"] = "TUNING_JOB_STATE_WAITING_FOR_CAPACITY";
|
|
1298
|
+
/**
|
|
1299
|
+
* Tuning job is running.
|
|
1300
|
+
*/
|
|
1301
|
+
TuningJobState["TUNING_JOB_STATE_TUNING"] = "TUNING_JOB_STATE_TUNING";
|
|
1302
|
+
/**
|
|
1303
|
+
* Tuning job is doing some post processing steps.
|
|
1304
|
+
*/
|
|
1305
|
+
TuningJobState["TUNING_JOB_STATE_POST_PROCESSING"] = "TUNING_JOB_STATE_POST_PROCESSING";
|
|
1306
|
+
})(TuningJobState || (TuningJobState = {}));
|
|
1307
|
+
/** Aggregation metric. This enum is not supported in Gemini API. */
|
|
1308
|
+
var AggregationMetric;
|
|
1309
|
+
(function (AggregationMetric) {
|
|
1310
|
+
/**
|
|
1311
|
+
* Unspecified aggregation metric.
|
|
1312
|
+
*/
|
|
1313
|
+
AggregationMetric["AGGREGATION_METRIC_UNSPECIFIED"] = "AGGREGATION_METRIC_UNSPECIFIED";
|
|
1314
|
+
/**
|
|
1315
|
+
* Average aggregation metric. Not supported for Pairwise metric.
|
|
1316
|
+
*/
|
|
1317
|
+
AggregationMetric["AVERAGE"] = "AVERAGE";
|
|
1318
|
+
/**
|
|
1319
|
+
* Mode aggregation metric.
|
|
1320
|
+
*/
|
|
1321
|
+
AggregationMetric["MODE"] = "MODE";
|
|
1322
|
+
/**
|
|
1323
|
+
* Standard deviation aggregation metric. Not supported for pairwise metric.
|
|
1324
|
+
*/
|
|
1325
|
+
AggregationMetric["STANDARD_DEVIATION"] = "STANDARD_DEVIATION";
|
|
1326
|
+
/**
|
|
1327
|
+
* Variance aggregation metric. Not supported for pairwise metric.
|
|
1328
|
+
*/
|
|
1329
|
+
AggregationMetric["VARIANCE"] = "VARIANCE";
|
|
1330
|
+
/**
|
|
1331
|
+
* Minimum aggregation metric. Not supported for pairwise metric.
|
|
1332
|
+
*/
|
|
1333
|
+
AggregationMetric["MINIMUM"] = "MINIMUM";
|
|
1334
|
+
/**
|
|
1335
|
+
* Maximum aggregation metric. Not supported for pairwise metric.
|
|
1336
|
+
*/
|
|
1337
|
+
AggregationMetric["MAXIMUM"] = "MAXIMUM";
|
|
1338
|
+
/**
|
|
1339
|
+
* Median aggregation metric. Not supported for pairwise metric.
|
|
1340
|
+
*/
|
|
1341
|
+
AggregationMetric["MEDIAN"] = "MEDIAN";
|
|
1342
|
+
/**
|
|
1343
|
+
* 90th percentile aggregation metric. Not supported for pairwise metric.
|
|
1344
|
+
*/
|
|
1345
|
+
AggregationMetric["PERCENTILE_P90"] = "PERCENTILE_P90";
|
|
1346
|
+
/**
|
|
1347
|
+
* 95th percentile aggregation metric. Not supported for pairwise metric.
|
|
1348
|
+
*/
|
|
1349
|
+
AggregationMetric["PERCENTILE_P95"] = "PERCENTILE_P95";
|
|
1350
|
+
/**
|
|
1351
|
+
* 99th percentile aggregation metric. Not supported for pairwise metric.
|
|
1352
|
+
*/
|
|
1353
|
+
AggregationMetric["PERCENTILE_P99"] = "PERCENTILE_P99";
|
|
1354
|
+
})(AggregationMetric || (AggregationMetric = {}));
|
|
1355
|
+
/** Output only. Pairwise metric choice. This enum is not supported in Gemini API. */
|
|
1356
|
+
var PairwiseChoice;
|
|
1357
|
+
(function (PairwiseChoice) {
|
|
1358
|
+
/**
|
|
1359
|
+
* Unspecified prediction choice.
|
|
1360
|
+
*/
|
|
1361
|
+
PairwiseChoice["PAIRWISE_CHOICE_UNSPECIFIED"] = "PAIRWISE_CHOICE_UNSPECIFIED";
|
|
1362
|
+
/**
|
|
1363
|
+
* Baseline prediction wins
|
|
1364
|
+
*/
|
|
1365
|
+
PairwiseChoice["BASELINE"] = "BASELINE";
|
|
1366
|
+
/**
|
|
1367
|
+
* Candidate prediction wins
|
|
1368
|
+
*/
|
|
1369
|
+
PairwiseChoice["CANDIDATE"] = "CANDIDATE";
|
|
1370
|
+
/**
|
|
1371
|
+
* Winner cannot be determined
|
|
1372
|
+
*/
|
|
1373
|
+
PairwiseChoice["TIE"] = "TIE";
|
|
1374
|
+
})(PairwiseChoice || (PairwiseChoice = {}));
|
|
1255
1375
|
/** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
|
|
1256
1376
|
var TuningTask;
|
|
1257
1377
|
(function (TuningTask) {
|
|
@@ -1364,22 +1484,6 @@ var SafetyFilterLevel;
|
|
|
1364
1484
|
SafetyFilterLevel["BLOCK_ONLY_HIGH"] = "BLOCK_ONLY_HIGH";
|
|
1365
1485
|
SafetyFilterLevel["BLOCK_NONE"] = "BLOCK_NONE";
|
|
1366
1486
|
})(SafetyFilterLevel || (SafetyFilterLevel = {}));
|
|
1367
|
-
/** Enum that controls the generation of people. */
|
|
1368
|
-
var PersonGeneration;
|
|
1369
|
-
(function (PersonGeneration) {
|
|
1370
|
-
/**
|
|
1371
|
-
* Block generation of images of people.
|
|
1372
|
-
*/
|
|
1373
|
-
PersonGeneration["DONT_ALLOW"] = "DONT_ALLOW";
|
|
1374
|
-
/**
|
|
1375
|
-
* Generate images of adults, but not children.
|
|
1376
|
-
*/
|
|
1377
|
-
PersonGeneration["ALLOW_ADULT"] = "ALLOW_ADULT";
|
|
1378
|
-
/**
|
|
1379
|
-
* Generate images that include adults and children.
|
|
1380
|
-
*/
|
|
1381
|
-
PersonGeneration["ALLOW_ALL"] = "ALLOW_ALL";
|
|
1382
|
-
})(PersonGeneration || (PersonGeneration = {}));
|
|
1383
1487
|
/** Enum that specifies the language of the text in the prompt. */
|
|
1384
1488
|
var ImagePromptLanguage;
|
|
1385
1489
|
(function (ImagePromptLanguage) {
|
|
@@ -2278,6 +2382,9 @@ class GenerateVideosOperation {
|
|
|
2278
2382
|
return operation;
|
|
2279
2383
|
}
|
|
2280
2384
|
}
|
|
2385
|
+
/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
|
|
2386
|
+
class EvaluateDatasetResponse {
|
|
2387
|
+
}
|
|
2281
2388
|
/** Response for the list tuning jobs method. */
|
|
2282
2389
|
class ListTuningJobsResponse {
|
|
2283
2390
|
}
|
|
@@ -3397,6 +3504,33 @@ function tIsVertexEmbedContentModel(model) {
|
|
|
3397
3504
|
* Copyright 2025 Google LLC
|
|
3398
3505
|
* SPDX-License-Identifier: Apache-2.0
|
|
3399
3506
|
*/
|
|
3507
|
+
function authConfigToMldev$4(fromObject) {
|
|
3508
|
+
const toObject = {};
|
|
3509
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
3510
|
+
if (fromApiKey != null) {
|
|
3511
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
3512
|
+
}
|
|
3513
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
3514
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
3515
|
+
}
|
|
3516
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
3517
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
3518
|
+
}
|
|
3519
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
3520
|
+
undefined) {
|
|
3521
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
3522
|
+
}
|
|
3523
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
3524
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
3525
|
+
}
|
|
3526
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
3527
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
3528
|
+
}
|
|
3529
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
3530
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
3531
|
+
}
|
|
3532
|
+
return toObject;
|
|
3533
|
+
}
|
|
3400
3534
|
function batchJobDestinationFromMldev(fromObject) {
|
|
3401
3535
|
const toObject = {};
|
|
3402
3536
|
const fromFileName = getValueByPath(fromObject, ['responsesFile']);
|
|
@@ -4246,8 +4380,9 @@ function getBatchJobParametersToVertex(apiClient, fromObject) {
|
|
|
4246
4380
|
}
|
|
4247
4381
|
function googleMapsToMldev$4(fromObject) {
|
|
4248
4382
|
const toObject = {};
|
|
4249
|
-
|
|
4250
|
-
|
|
4383
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
4384
|
+
if (fromAuthConfig != null) {
|
|
4385
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$4(fromAuthConfig));
|
|
4251
4386
|
}
|
|
4252
4387
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
4253
4388
|
if (fromEnableWidget != null) {
|
|
@@ -4261,12 +4396,12 @@ function googleSearchToMldev$4(fromObject) {
|
|
|
4261
4396
|
if (fromSearchTypes != null) {
|
|
4262
4397
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
4263
4398
|
}
|
|
4264
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4265
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
4266
|
-
}
|
|
4267
4399
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
4268
4400
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
4269
4401
|
}
|
|
4402
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
4403
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
4404
|
+
}
|
|
4270
4405
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
4271
4406
|
'timeRangeFilter',
|
|
4272
4407
|
]);
|
|
@@ -4298,6 +4433,9 @@ function imageConfigToMldev$1(fromObject) {
|
|
|
4298
4433
|
undefined) {
|
|
4299
4434
|
throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
|
|
4300
4435
|
}
|
|
4436
|
+
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
4437
|
+
throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
|
|
4438
|
+
}
|
|
4301
4439
|
return toObject;
|
|
4302
4440
|
}
|
|
4303
4441
|
function inlinedRequestToMldev(apiClient, fromObject) {
|
|
@@ -4551,6 +4689,10 @@ function toolToMldev$4(fromObject) {
|
|
|
4551
4689
|
if (fromGoogleSearch != null) {
|
|
4552
4690
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$4(fromGoogleSearch));
|
|
4553
4691
|
}
|
|
4692
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
4693
|
+
if (fromGoogleMaps != null) {
|
|
4694
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
|
|
4695
|
+
}
|
|
4554
4696
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
4555
4697
|
'codeExecution',
|
|
4556
4698
|
]);
|
|
@@ -4572,16 +4714,15 @@ function toolToMldev$4(fromObject) {
|
|
|
4572
4714
|
}
|
|
4573
4715
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
4574
4716
|
}
|
|
4575
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
4576
|
-
if (fromGoogleMaps != null) {
|
|
4577
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$4(fromGoogleMaps));
|
|
4578
|
-
}
|
|
4579
4717
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
4580
4718
|
'googleSearchRetrieval',
|
|
4581
4719
|
]);
|
|
4582
4720
|
if (fromGoogleSearchRetrieval != null) {
|
|
4583
4721
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
4584
4722
|
}
|
|
4723
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
4724
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
4725
|
+
}
|
|
4585
4726
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
4586
4727
|
if (fromUrlContext != null) {
|
|
4587
4728
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -5291,6 +5432,33 @@ class Batches extends BaseModule {
|
|
|
5291
5432
|
* Copyright 2025 Google LLC
|
|
5292
5433
|
* SPDX-License-Identifier: Apache-2.0
|
|
5293
5434
|
*/
|
|
5435
|
+
function authConfigToMldev$3(fromObject) {
|
|
5436
|
+
const toObject = {};
|
|
5437
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
5438
|
+
if (fromApiKey != null) {
|
|
5439
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
5440
|
+
}
|
|
5441
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
5442
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
5443
|
+
}
|
|
5444
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
5445
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
5446
|
+
}
|
|
5447
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
5448
|
+
undefined) {
|
|
5449
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
5450
|
+
}
|
|
5451
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
5452
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
5453
|
+
}
|
|
5454
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
5455
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
5456
|
+
}
|
|
5457
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
5458
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
5459
|
+
}
|
|
5460
|
+
return toObject;
|
|
5461
|
+
}
|
|
5294
5462
|
function blobToMldev$3(fromObject) {
|
|
5295
5463
|
const toObject = {};
|
|
5296
5464
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -5591,8 +5759,9 @@ function getCachedContentParametersToVertex(apiClient, fromObject) {
|
|
|
5591
5759
|
}
|
|
5592
5760
|
function googleMapsToMldev$3(fromObject) {
|
|
5593
5761
|
const toObject = {};
|
|
5594
|
-
|
|
5595
|
-
|
|
5762
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
5763
|
+
if (fromAuthConfig != null) {
|
|
5764
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$3(fromAuthConfig));
|
|
5596
5765
|
}
|
|
5597
5766
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
5598
5767
|
if (fromEnableWidget != null) {
|
|
@@ -5606,12 +5775,12 @@ function googleSearchToMldev$3(fromObject) {
|
|
|
5606
5775
|
if (fromSearchTypes != null) {
|
|
5607
5776
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
5608
5777
|
}
|
|
5609
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
5610
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
5611
|
-
}
|
|
5612
5778
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
5613
5779
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
5614
5780
|
}
|
|
5781
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
5782
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
5783
|
+
}
|
|
5615
5784
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
5616
5785
|
'timeRangeFilter',
|
|
5617
5786
|
]);
|
|
@@ -5809,6 +5978,10 @@ function toolToMldev$3(fromObject) {
|
|
|
5809
5978
|
if (fromGoogleSearch != null) {
|
|
5810
5979
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(fromGoogleSearch));
|
|
5811
5980
|
}
|
|
5981
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5982
|
+
if (fromGoogleMaps != null) {
|
|
5983
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
|
|
5984
|
+
}
|
|
5812
5985
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5813
5986
|
'codeExecution',
|
|
5814
5987
|
]);
|
|
@@ -5830,16 +6003,15 @@ function toolToMldev$3(fromObject) {
|
|
|
5830
6003
|
}
|
|
5831
6004
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
5832
6005
|
}
|
|
5833
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5834
|
-
if (fromGoogleMaps != null) {
|
|
5835
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$3(fromGoogleMaps));
|
|
5836
|
-
}
|
|
5837
6006
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5838
6007
|
'googleSearchRetrieval',
|
|
5839
6008
|
]);
|
|
5840
6009
|
if (fromGoogleSearchRetrieval != null) {
|
|
5841
6010
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5842
6011
|
}
|
|
6012
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
6013
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
6014
|
+
}
|
|
5843
6015
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5844
6016
|
if (fromUrlContext != null) {
|
|
5845
6017
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -5873,6 +6045,10 @@ function toolToVertex$2(fromObject) {
|
|
|
5873
6045
|
if (fromGoogleSearch != null) {
|
|
5874
6046
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
5875
6047
|
}
|
|
6048
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
6049
|
+
if (fromGoogleMaps != null) {
|
|
6050
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
6051
|
+
}
|
|
5876
6052
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5877
6053
|
'codeExecution',
|
|
5878
6054
|
]);
|
|
@@ -5897,16 +6073,18 @@ function toolToVertex$2(fromObject) {
|
|
|
5897
6073
|
}
|
|
5898
6074
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
5899
6075
|
}
|
|
5900
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
5901
|
-
if (fromGoogleMaps != null) {
|
|
5902
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
5903
|
-
}
|
|
5904
6076
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5905
6077
|
'googleSearchRetrieval',
|
|
5906
6078
|
]);
|
|
5907
6079
|
if (fromGoogleSearchRetrieval != null) {
|
|
5908
6080
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
5909
6081
|
}
|
|
6082
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
6083
|
+
'parallelAiSearch',
|
|
6084
|
+
]);
|
|
6085
|
+
if (fromParallelAiSearch != null) {
|
|
6086
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
6087
|
+
}
|
|
5910
6088
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5911
6089
|
if (fromUrlContext != null) {
|
|
5912
6090
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -6997,7 +7175,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
6997
7175
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
6998
7176
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
6999
7177
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
7000
|
-
const SDK_VERSION = '1.
|
|
7178
|
+
const SDK_VERSION = '1.44.0'; // x-release-please-version
|
|
7001
7179
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
7002
7180
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
7003
7181
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -7016,6 +7194,9 @@ const DEFAULT_RETRY_HTTP_STATUS_CODES = [
|
|
|
7016
7194
|
/**
|
|
7017
7195
|
* The ApiClient class is used to send requests to the Gemini API or Vertex AI
|
|
7018
7196
|
* endpoints.
|
|
7197
|
+
*
|
|
7198
|
+
* WARNING: This is an internal API and may change without notice. Direct usage
|
|
7199
|
+
* is not supported and may break your application.
|
|
7019
7200
|
*/
|
|
7020
7201
|
class ApiClient {
|
|
7021
7202
|
constructor(opts) {
|
|
@@ -7063,10 +7244,7 @@ class ApiClient {
|
|
|
7063
7244
|
else {
|
|
7064
7245
|
// Gemini API
|
|
7065
7246
|
if (!this.clientOptions.apiKey) {
|
|
7066
|
-
|
|
7067
|
-
message: 'API key must be set when using the Gemini API.',
|
|
7068
|
-
status: 403,
|
|
7069
|
-
});
|
|
7247
|
+
console.warn('API key should be set when using the Gemini API.');
|
|
7070
7248
|
}
|
|
7071
7249
|
initHttpOptions.apiVersion =
|
|
7072
7250
|
(_c = this.clientOptions.apiVersion) !== null && _c !== void 0 ? _c : GOOGLE_AI_API_DEFAULT_VERSION;
|
|
@@ -8967,166 +9145,6 @@ const safeJSON = (text) => {
|
|
|
8967
9145
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8968
9146
|
const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
8969
9147
|
|
|
8970
|
-
/**
|
|
8971
|
-
* @license
|
|
8972
|
-
* Copyright 2025 Google LLC
|
|
8973
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
8974
|
-
*/
|
|
8975
|
-
const VERSION = '0.0.1';
|
|
8976
|
-
|
|
8977
|
-
/**
|
|
8978
|
-
* @license
|
|
8979
|
-
* Copyright 2025 Google LLC
|
|
8980
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
8981
|
-
*/
|
|
8982
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
8983
|
-
/**
|
|
8984
|
-
* Note this does not detect 'browser'; for that, use getBrowserInfo().
|
|
8985
|
-
*/
|
|
8986
|
-
function getDetectedPlatform() {
|
|
8987
|
-
if (typeof Deno !== 'undefined' && Deno.build != null) {
|
|
8988
|
-
return 'deno';
|
|
8989
|
-
}
|
|
8990
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
8991
|
-
return 'edge';
|
|
8992
|
-
}
|
|
8993
|
-
if (Object.prototype.toString.call(typeof globalThis.process !== 'undefined' ? globalThis.process : 0) === '[object process]') {
|
|
8994
|
-
return 'node';
|
|
8995
|
-
}
|
|
8996
|
-
return 'unknown';
|
|
8997
|
-
}
|
|
8998
|
-
const getPlatformProperties = () => {
|
|
8999
|
-
var _a, _b, _c, _d, _e;
|
|
9000
|
-
const detectedPlatform = getDetectedPlatform();
|
|
9001
|
-
if (detectedPlatform === 'deno') {
|
|
9002
|
-
return {
|
|
9003
|
-
'X-Stainless-Lang': 'js',
|
|
9004
|
-
'X-Stainless-Package-Version': VERSION,
|
|
9005
|
-
'X-Stainless-OS': normalizePlatform(Deno.build.os),
|
|
9006
|
-
'X-Stainless-Arch': normalizeArch(Deno.build.arch),
|
|
9007
|
-
'X-Stainless-Runtime': 'deno',
|
|
9008
|
-
'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',
|
|
9009
|
-
};
|
|
9010
|
-
}
|
|
9011
|
-
if (typeof EdgeRuntime !== 'undefined') {
|
|
9012
|
-
return {
|
|
9013
|
-
'X-Stainless-Lang': 'js',
|
|
9014
|
-
'X-Stainless-Package-Version': VERSION,
|
|
9015
|
-
'X-Stainless-OS': 'Unknown',
|
|
9016
|
-
'X-Stainless-Arch': `other:${EdgeRuntime}`,
|
|
9017
|
-
'X-Stainless-Runtime': 'edge',
|
|
9018
|
-
'X-Stainless-Runtime-Version': globalThis.process.version,
|
|
9019
|
-
};
|
|
9020
|
-
}
|
|
9021
|
-
// Check if Node.js
|
|
9022
|
-
if (detectedPlatform === 'node') {
|
|
9023
|
-
return {
|
|
9024
|
-
'X-Stainless-Lang': 'js',
|
|
9025
|
-
'X-Stainless-Package-Version': VERSION,
|
|
9026
|
-
'X-Stainless-OS': normalizePlatform((_c = globalThis.process.platform) !== null && _c !== void 0 ? _c : 'unknown'),
|
|
9027
|
-
'X-Stainless-Arch': normalizeArch((_d = globalThis.process.arch) !== null && _d !== void 0 ? _d : 'unknown'),
|
|
9028
|
-
'X-Stainless-Runtime': 'node',
|
|
9029
|
-
'X-Stainless-Runtime-Version': (_e = globalThis.process.version) !== null && _e !== void 0 ? _e : 'unknown',
|
|
9030
|
-
};
|
|
9031
|
-
}
|
|
9032
|
-
const browserInfo = getBrowserInfo();
|
|
9033
|
-
if (browserInfo) {
|
|
9034
|
-
return {
|
|
9035
|
-
'X-Stainless-Lang': 'js',
|
|
9036
|
-
'X-Stainless-Package-Version': VERSION,
|
|
9037
|
-
'X-Stainless-OS': 'Unknown',
|
|
9038
|
-
'X-Stainless-Arch': 'unknown',
|
|
9039
|
-
'X-Stainless-Runtime': `browser:${browserInfo.browser}`,
|
|
9040
|
-
'X-Stainless-Runtime-Version': browserInfo.version,
|
|
9041
|
-
};
|
|
9042
|
-
}
|
|
9043
|
-
// TODO add support for Cloudflare workers, etc.
|
|
9044
|
-
return {
|
|
9045
|
-
'X-Stainless-Lang': 'js',
|
|
9046
|
-
'X-Stainless-Package-Version': VERSION,
|
|
9047
|
-
'X-Stainless-OS': 'Unknown',
|
|
9048
|
-
'X-Stainless-Arch': 'unknown',
|
|
9049
|
-
'X-Stainless-Runtime': 'unknown',
|
|
9050
|
-
'X-Stainless-Runtime-Version': 'unknown',
|
|
9051
|
-
};
|
|
9052
|
-
};
|
|
9053
|
-
// Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts
|
|
9054
|
-
function getBrowserInfo() {
|
|
9055
|
-
if (typeof navigator === 'undefined' || !navigator) {
|
|
9056
|
-
return null;
|
|
9057
|
-
}
|
|
9058
|
-
// NOTE: The order matters here!
|
|
9059
|
-
const browserPatterns = [
|
|
9060
|
-
{ key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
9061
|
-
{ key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
9062
|
-
{ key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
9063
|
-
{ key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
9064
|
-
{ key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ },
|
|
9065
|
-
{ key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ },
|
|
9066
|
-
];
|
|
9067
|
-
// Find the FIRST matching browser
|
|
9068
|
-
for (const { key, pattern } of browserPatterns) {
|
|
9069
|
-
const match = pattern.exec(navigator.userAgent);
|
|
9070
|
-
if (match) {
|
|
9071
|
-
const major = match[1] || 0;
|
|
9072
|
-
const minor = match[2] || 0;
|
|
9073
|
-
const patch = match[3] || 0;
|
|
9074
|
-
return { browser: key, version: `${major}.${minor}.${patch}` };
|
|
9075
|
-
}
|
|
9076
|
-
}
|
|
9077
|
-
return null;
|
|
9078
|
-
}
|
|
9079
|
-
const normalizeArch = (arch) => {
|
|
9080
|
-
// Node docs:
|
|
9081
|
-
// - https://nodejs.org/api/process.html#processarch
|
|
9082
|
-
// Deno docs:
|
|
9083
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
9084
|
-
if (arch === 'x32')
|
|
9085
|
-
return 'x32';
|
|
9086
|
-
if (arch === 'x86_64' || arch === 'x64')
|
|
9087
|
-
return 'x64';
|
|
9088
|
-
if (arch === 'arm')
|
|
9089
|
-
return 'arm';
|
|
9090
|
-
if (arch === 'aarch64' || arch === 'arm64')
|
|
9091
|
-
return 'arm64';
|
|
9092
|
-
if (arch)
|
|
9093
|
-
return `other:${arch}`;
|
|
9094
|
-
return 'unknown';
|
|
9095
|
-
};
|
|
9096
|
-
const normalizePlatform = (platform) => {
|
|
9097
|
-
// Node platforms:
|
|
9098
|
-
// - https://nodejs.org/api/process.html#processplatform
|
|
9099
|
-
// Deno platforms:
|
|
9100
|
-
// - https://doc.deno.land/deno/stable/~/Deno.build
|
|
9101
|
-
// - https://github.com/denoland/deno/issues/14799
|
|
9102
|
-
platform = platform.toLowerCase();
|
|
9103
|
-
// NOTE: this iOS check is untested and may not work
|
|
9104
|
-
// Node does not work natively on IOS, there is a fork at
|
|
9105
|
-
// https://github.com/nodejs-mobile/nodejs-mobile
|
|
9106
|
-
// however it is unknown at the time of writing how to detect if it is running
|
|
9107
|
-
if (platform.includes('ios'))
|
|
9108
|
-
return 'iOS';
|
|
9109
|
-
if (platform === 'android')
|
|
9110
|
-
return 'Android';
|
|
9111
|
-
if (platform === 'darwin')
|
|
9112
|
-
return 'MacOS';
|
|
9113
|
-
if (platform === 'win32')
|
|
9114
|
-
return 'Windows';
|
|
9115
|
-
if (platform === 'freebsd')
|
|
9116
|
-
return 'FreeBSD';
|
|
9117
|
-
if (platform === 'openbsd')
|
|
9118
|
-
return 'OpenBSD';
|
|
9119
|
-
if (platform === 'linux')
|
|
9120
|
-
return 'Linux';
|
|
9121
|
-
if (platform)
|
|
9122
|
-
return `Other:${platform}`;
|
|
9123
|
-
return 'Unknown';
|
|
9124
|
-
};
|
|
9125
|
-
let _platformHeaders;
|
|
9126
|
-
const getPlatformHeaders = () => {
|
|
9127
|
-
return (_platformHeaders !== null && _platformHeaders !== void 0 ? _platformHeaders : (_platformHeaders = getPlatformProperties()));
|
|
9128
|
-
};
|
|
9129
|
-
|
|
9130
9148
|
/**
|
|
9131
9149
|
* @license
|
|
9132
9150
|
* Copyright 2025 Google LLC
|
|
@@ -9232,6 +9250,13 @@ const FallbackEncoder = ({ headers, body }) => {
|
|
|
9232
9250
|
};
|
|
9233
9251
|
};
|
|
9234
9252
|
|
|
9253
|
+
/**
|
|
9254
|
+
* @license
|
|
9255
|
+
* Copyright 2025 Google LLC
|
|
9256
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
9257
|
+
*/
|
|
9258
|
+
const VERSION = '0.0.1';
|
|
9259
|
+
|
|
9235
9260
|
/**
|
|
9236
9261
|
* @license
|
|
9237
9262
|
* Copyright 2025 Google LLC
|
|
@@ -9570,8 +9595,10 @@ class LineDecoder {
|
|
|
9570
9595
|
constructor() {
|
|
9571
9596
|
this.buffer = new Uint8Array();
|
|
9572
9597
|
this.carriageReturnIndex = null;
|
|
9598
|
+
this.searchIndex = 0;
|
|
9573
9599
|
}
|
|
9574
9600
|
decode(chunk) {
|
|
9601
|
+
var _a;
|
|
9575
9602
|
if (chunk == null) {
|
|
9576
9603
|
return [];
|
|
9577
9604
|
}
|
|
@@ -9581,7 +9608,7 @@ class LineDecoder {
|
|
|
9581
9608
|
this.buffer = concatBytes([this.buffer, binaryChunk]);
|
|
9582
9609
|
const lines = [];
|
|
9583
9610
|
let patternIndex;
|
|
9584
|
-
while ((patternIndex = findNewlineIndex(this.buffer, this.carriageReturnIndex)) != null) {
|
|
9611
|
+
while ((patternIndex = findNewlineIndex(this.buffer, (_a = this.carriageReturnIndex) !== null && _a !== void 0 ? _a : this.searchIndex)) != null) {
|
|
9585
9612
|
if (patternIndex.carriage && this.carriageReturnIndex == null) {
|
|
9586
9613
|
// skip until we either get a corresponding `\n`, a new `\r` or nothing
|
|
9587
9614
|
this.carriageReturnIndex = patternIndex.index;
|
|
@@ -9593,6 +9620,7 @@ class LineDecoder {
|
|
|
9593
9620
|
lines.push(decodeUTF8(this.buffer.subarray(0, this.carriageReturnIndex - 1)));
|
|
9594
9621
|
this.buffer = this.buffer.subarray(this.carriageReturnIndex);
|
|
9595
9622
|
this.carriageReturnIndex = null;
|
|
9623
|
+
this.searchIndex = 0;
|
|
9596
9624
|
continue;
|
|
9597
9625
|
}
|
|
9598
9626
|
const endIndex = this.carriageReturnIndex !== null ? patternIndex.preceding - 1 : patternIndex.preceding;
|
|
@@ -9600,7 +9628,9 @@ class LineDecoder {
|
|
|
9600
9628
|
lines.push(line);
|
|
9601
9629
|
this.buffer = this.buffer.subarray(patternIndex.index);
|
|
9602
9630
|
this.carriageReturnIndex = null;
|
|
9631
|
+
this.searchIndex = 0;
|
|
9603
9632
|
}
|
|
9633
|
+
this.searchIndex = Math.max(0, this.buffer.length - 1);
|
|
9604
9634
|
return lines;
|
|
9605
9635
|
}
|
|
9606
9636
|
flush() {
|
|
@@ -9625,41 +9655,23 @@ LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r]/g;
|
|
|
9625
9655
|
function findNewlineIndex(buffer, startIndex) {
|
|
9626
9656
|
const newline = 0x0a; // \n
|
|
9627
9657
|
const carriage = 0x0d; // \r
|
|
9628
|
-
|
|
9629
|
-
|
|
9630
|
-
|
|
9631
|
-
|
|
9632
|
-
|
|
9633
|
-
return { preceding: i, index: i + 1, carriage: true };
|
|
9634
|
-
}
|
|
9658
|
+
const start = startIndex !== null && startIndex !== void 0 ? startIndex : 0;
|
|
9659
|
+
const nextNewline = buffer.indexOf(newline, start);
|
|
9660
|
+
const nextCarriage = buffer.indexOf(carriage, start);
|
|
9661
|
+
if (nextNewline === -1 && nextCarriage === -1) {
|
|
9662
|
+
return null;
|
|
9635
9663
|
}
|
|
9636
|
-
|
|
9637
|
-
|
|
9638
|
-
|
|
9639
|
-
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9643
|
-
|
|
9644
|
-
|
|
9645
|
-
if (buffer[i] === newline && buffer[i + 1] === newline) {
|
|
9646
|
-
// \n\n
|
|
9647
|
-
return i + 2;
|
|
9648
|
-
}
|
|
9649
|
-
if (buffer[i] === carriage && buffer[i + 1] === carriage) {
|
|
9650
|
-
// \r\r
|
|
9651
|
-
return i + 2;
|
|
9652
|
-
}
|
|
9653
|
-
if (buffer[i] === carriage &&
|
|
9654
|
-
buffer[i + 1] === newline &&
|
|
9655
|
-
i + 3 < buffer.length &&
|
|
9656
|
-
buffer[i + 2] === carriage &&
|
|
9657
|
-
buffer[i + 3] === newline) {
|
|
9658
|
-
// \r\n\r\n
|
|
9659
|
-
return i + 4;
|
|
9660
|
-
}
|
|
9664
|
+
let i;
|
|
9665
|
+
if (nextNewline !== -1 && nextCarriage !== -1) {
|
|
9666
|
+
i = Math.min(nextNewline, nextCarriage);
|
|
9667
|
+
}
|
|
9668
|
+
else {
|
|
9669
|
+
i = nextNewline !== -1 ? nextNewline : nextCarriage;
|
|
9670
|
+
}
|
|
9671
|
+
if (buffer[i] === newline) {
|
|
9672
|
+
return { preceding: i, index: i + 1, carriage: false };
|
|
9661
9673
|
}
|
|
9662
|
-
return
|
|
9674
|
+
return { preceding: i, index: i + 1, carriage: true };
|
|
9663
9675
|
}
|
|
9664
9676
|
|
|
9665
9677
|
/**
|
|
@@ -9970,7 +9982,7 @@ function _iterSSEMessages(response, controller) {
|
|
|
9970
9982
|
const lineDecoder = new LineDecoder();
|
|
9971
9983
|
const iter = ReadableStreamToAsyncIterable(response.body);
|
|
9972
9984
|
try {
|
|
9973
|
-
for (var _d = true, _e = __asyncValues(
|
|
9985
|
+
for (var _d = true, _e = __asyncValues(iterBinaryChunks(iter)), _f; _f = yield __await(_e.next()), _a = _f.done, !_a; _d = true) {
|
|
9974
9986
|
_c = _f.value;
|
|
9975
9987
|
_d = false;
|
|
9976
9988
|
const sseChunk = _c;
|
|
@@ -9996,13 +10008,12 @@ function _iterSSEMessages(response, controller) {
|
|
|
9996
10008
|
});
|
|
9997
10009
|
}
|
|
9998
10010
|
/**
|
|
9999
|
-
* Given an async iterable iterator,
|
|
10000
|
-
*
|
|
10011
|
+
* Given an async iterable iterator, normalizes each chunk to a
|
|
10012
|
+
* Uint8Array and yields it.
|
|
10001
10013
|
*/
|
|
10002
|
-
function
|
|
10003
|
-
return __asyncGenerator(this, arguments, function*
|
|
10014
|
+
function iterBinaryChunks(iterator) {
|
|
10015
|
+
return __asyncGenerator(this, arguments, function* iterBinaryChunks_1() {
|
|
10004
10016
|
var _a, e_5, _b, _c;
|
|
10005
|
-
let data = new Uint8Array();
|
|
10006
10017
|
try {
|
|
10007
10018
|
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) {
|
|
10008
10019
|
_c = iterator_3_1.value;
|
|
@@ -10014,15 +10025,7 @@ function iterSSEChunks(iterator) {
|
|
|
10014
10025
|
const binaryChunk = chunk instanceof ArrayBuffer ? new Uint8Array(chunk)
|
|
10015
10026
|
: typeof chunk === 'string' ? encodeUTF8(chunk)
|
|
10016
10027
|
: chunk;
|
|
10017
|
-
|
|
10018
|
-
newData.set(data);
|
|
10019
|
-
newData.set(binaryChunk, data.length);
|
|
10020
|
-
data = newData;
|
|
10021
|
-
let patternIndex;
|
|
10022
|
-
while ((patternIndex = findDoubleNewlineIndex(data)) !== -1) {
|
|
10023
|
-
yield yield __await(data.slice(0, patternIndex));
|
|
10024
|
-
data = data.slice(patternIndex);
|
|
10025
|
-
}
|
|
10028
|
+
yield yield __await(binaryChunk);
|
|
10026
10029
|
}
|
|
10027
10030
|
}
|
|
10028
10031
|
catch (e_5_1) { e_5 = { error: e_5_1 }; }
|
|
@@ -10032,9 +10035,6 @@ function iterSSEChunks(iterator) {
|
|
|
10032
10035
|
}
|
|
10033
10036
|
finally { if (e_5) throw e_5.error; }
|
|
10034
10037
|
}
|
|
10035
|
-
if (data.length > 0) {
|
|
10036
|
-
yield yield __await(data);
|
|
10037
|
-
}
|
|
10038
10038
|
});
|
|
10039
10039
|
}
|
|
10040
10040
|
class SSEDecoder {
|
|
@@ -10686,7 +10686,7 @@ class BaseGeminiNextGenAPIClient {
|
|
|
10686
10686
|
const authHeaders = await this.authHeaders(options);
|
|
10687
10687
|
let headers = buildHeaders([
|
|
10688
10688
|
idempotencyHeaders,
|
|
10689
|
-
|
|
10689
|
+
{ Accept: 'application/json', 'User-Agent': this.getUserAgent() },
|
|
10690
10690
|
this._options.defaultHeaders,
|
|
10691
10691
|
bodyHeaders,
|
|
10692
10692
|
options.headers,
|
|
@@ -10773,6 +10773,33 @@ GeminiNextGenAPIClient.Interactions = Interactions;
|
|
|
10773
10773
|
* Copyright 2025 Google LLC
|
|
10774
10774
|
* SPDX-License-Identifier: Apache-2.0
|
|
10775
10775
|
*/
|
|
10776
|
+
function authConfigToMldev$2(fromObject) {
|
|
10777
|
+
const toObject = {};
|
|
10778
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
10779
|
+
if (fromApiKey != null) {
|
|
10780
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
10781
|
+
}
|
|
10782
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
10783
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
10784
|
+
}
|
|
10785
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
10786
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
10787
|
+
}
|
|
10788
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
10789
|
+
undefined) {
|
|
10790
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
10791
|
+
}
|
|
10792
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
10793
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
10794
|
+
}
|
|
10795
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
10796
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
10797
|
+
}
|
|
10798
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
10799
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
10800
|
+
}
|
|
10801
|
+
return toObject;
|
|
10802
|
+
}
|
|
10776
10803
|
function blobToMldev$2(fromObject) {
|
|
10777
10804
|
const toObject = {};
|
|
10778
10805
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -11008,8 +11035,9 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
11008
11035
|
}
|
|
11009
11036
|
function googleMapsToMldev$2(fromObject) {
|
|
11010
11037
|
const toObject = {};
|
|
11011
|
-
|
|
11012
|
-
|
|
11038
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
11039
|
+
if (fromAuthConfig != null) {
|
|
11040
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$2(fromAuthConfig));
|
|
11013
11041
|
}
|
|
11014
11042
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
11015
11043
|
if (fromEnableWidget != null) {
|
|
@@ -11023,12 +11051,12 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
11023
11051
|
if (fromSearchTypes != null) {
|
|
11024
11052
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
11025
11053
|
}
|
|
11026
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
11027
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
11028
|
-
}
|
|
11029
11054
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
11030
11055
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
11031
11056
|
}
|
|
11057
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
11058
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
11059
|
+
}
|
|
11032
11060
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
11033
11061
|
'timeRangeFilter',
|
|
11034
11062
|
]);
|
|
@@ -11542,6 +11570,10 @@ function toolToMldev$2(fromObject) {
|
|
|
11542
11570
|
if (fromGoogleSearch != null) {
|
|
11543
11571
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(fromGoogleSearch));
|
|
11544
11572
|
}
|
|
11573
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11574
|
+
if (fromGoogleMaps != null) {
|
|
11575
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
|
|
11576
|
+
}
|
|
11545
11577
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
11546
11578
|
'codeExecution',
|
|
11547
11579
|
]);
|
|
@@ -11563,16 +11595,15 @@ function toolToMldev$2(fromObject) {
|
|
|
11563
11595
|
}
|
|
11564
11596
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
11565
11597
|
}
|
|
11566
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11567
|
-
if (fromGoogleMaps != null) {
|
|
11568
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$2(fromGoogleMaps));
|
|
11569
|
-
}
|
|
11570
11598
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
11571
11599
|
'googleSearchRetrieval',
|
|
11572
11600
|
]);
|
|
11573
11601
|
if (fromGoogleSearchRetrieval != null) {
|
|
11574
11602
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
11575
11603
|
}
|
|
11604
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
11605
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
11606
|
+
}
|
|
11576
11607
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
11577
11608
|
if (fromUrlContext != null) {
|
|
11578
11609
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -11606,6 +11637,10 @@ function toolToVertex$1(fromObject) {
|
|
|
11606
11637
|
if (fromGoogleSearch != null) {
|
|
11607
11638
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
11608
11639
|
}
|
|
11640
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11641
|
+
if (fromGoogleMaps != null) {
|
|
11642
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
11643
|
+
}
|
|
11609
11644
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
11610
11645
|
'codeExecution',
|
|
11611
11646
|
]);
|
|
@@ -11630,16 +11665,18 @@ function toolToVertex$1(fromObject) {
|
|
|
11630
11665
|
}
|
|
11631
11666
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
11632
11667
|
}
|
|
11633
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
11634
|
-
if (fromGoogleMaps != null) {
|
|
11635
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
11636
|
-
}
|
|
11637
11668
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
11638
11669
|
'googleSearchRetrieval',
|
|
11639
11670
|
]);
|
|
11640
11671
|
if (fromGoogleSearchRetrieval != null) {
|
|
11641
11672
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
11642
11673
|
}
|
|
11674
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
11675
|
+
'parallelAiSearch',
|
|
11676
|
+
]);
|
|
11677
|
+
if (fromParallelAiSearch != null) {
|
|
11678
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
11679
|
+
}
|
|
11643
11680
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
11644
11681
|
if (fromUrlContext != null) {
|
|
11645
11682
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -11755,6 +11792,33 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
11755
11792
|
* Copyright 2025 Google LLC
|
|
11756
11793
|
* SPDX-License-Identifier: Apache-2.0
|
|
11757
11794
|
*/
|
|
11795
|
+
function authConfigToMldev$1(fromObject, _rootObject) {
|
|
11796
|
+
const toObject = {};
|
|
11797
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
11798
|
+
if (fromApiKey != null) {
|
|
11799
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
11800
|
+
}
|
|
11801
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
11802
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
11803
|
+
}
|
|
11804
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
11805
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
11806
|
+
}
|
|
11807
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
11808
|
+
undefined) {
|
|
11809
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
11810
|
+
}
|
|
11811
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
11812
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
11813
|
+
}
|
|
11814
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
11815
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
11816
|
+
}
|
|
11817
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
11818
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
11819
|
+
}
|
|
11820
|
+
return toObject;
|
|
11821
|
+
}
|
|
11758
11822
|
function blobToMldev$1(fromObject, _rootObject) {
|
|
11759
11823
|
const toObject = {};
|
|
11760
11824
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -13903,10 +13967,11 @@ function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
|
13903
13967
|
}
|
|
13904
13968
|
return toObject;
|
|
13905
13969
|
}
|
|
13906
|
-
function googleMapsToMldev$1(fromObject,
|
|
13970
|
+
function googleMapsToMldev$1(fromObject, rootObject) {
|
|
13907
13971
|
const toObject = {};
|
|
13908
|
-
|
|
13909
|
-
|
|
13972
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
13973
|
+
if (fromAuthConfig != null) {
|
|
13974
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev$1(fromAuthConfig));
|
|
13910
13975
|
}
|
|
13911
13976
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
13912
13977
|
if (fromEnableWidget != null) {
|
|
@@ -13920,12 +13985,12 @@ function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
|
13920
13985
|
if (fromSearchTypes != null) {
|
|
13921
13986
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
13922
13987
|
}
|
|
13923
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
13924
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
13925
|
-
}
|
|
13926
13988
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
13927
13989
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
13928
13990
|
}
|
|
13991
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
13992
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
13993
|
+
}
|
|
13929
13994
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
13930
13995
|
'timeRangeFilter',
|
|
13931
13996
|
]);
|
|
@@ -13957,6 +14022,9 @@ function imageConfigToMldev(fromObject, _rootObject) {
|
|
|
13957
14022
|
undefined) {
|
|
13958
14023
|
throw new Error('outputCompressionQuality parameter is not supported in Gemini API.');
|
|
13959
14024
|
}
|
|
14025
|
+
if (getValueByPath(fromObject, ['imageOutputOptions']) !== undefined) {
|
|
14026
|
+
throw new Error('imageOutputOptions parameter is not supported in Gemini API.');
|
|
14027
|
+
}
|
|
13960
14028
|
return toObject;
|
|
13961
14029
|
}
|
|
13962
14030
|
function imageConfigToVertex(fromObject, _rootObject) {
|
|
@@ -13993,6 +14061,12 @@ function imageConfigToVertex(fromObject, _rootObject) {
|
|
|
13993
14061
|
if (fromOutputCompressionQuality != null) {
|
|
13994
14062
|
setValueByPath(toObject, ['imageOutputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
13995
14063
|
}
|
|
14064
|
+
const fromImageOutputOptions = getValueByPath(fromObject, [
|
|
14065
|
+
'imageOutputOptions',
|
|
14066
|
+
]);
|
|
14067
|
+
if (fromImageOutputOptions != null) {
|
|
14068
|
+
setValueByPath(toObject, ['imageOutputOptions'], fromImageOutputOptions);
|
|
14069
|
+
}
|
|
13996
14070
|
return toObject;
|
|
13997
14071
|
}
|
|
13998
14072
|
function imageFromMldev(fromObject, _rootObject) {
|
|
@@ -14712,6 +14786,10 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
14712
14786
|
if (fromGoogleSearch != null) {
|
|
14713
14787
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(fromGoogleSearch));
|
|
14714
14788
|
}
|
|
14789
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
14790
|
+
if (fromGoogleMaps != null) {
|
|
14791
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
|
|
14792
|
+
}
|
|
14715
14793
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
14716
14794
|
'codeExecution',
|
|
14717
14795
|
]);
|
|
@@ -14733,16 +14811,15 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
14733
14811
|
}
|
|
14734
14812
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
14735
14813
|
}
|
|
14736
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
14737
|
-
if (fromGoogleMaps != null) {
|
|
14738
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev$1(fromGoogleMaps));
|
|
14739
|
-
}
|
|
14740
14814
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
14741
14815
|
'googleSearchRetrieval',
|
|
14742
14816
|
]);
|
|
14743
14817
|
if (fromGoogleSearchRetrieval != null) {
|
|
14744
14818
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
14745
14819
|
}
|
|
14820
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
14821
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
14822
|
+
}
|
|
14746
14823
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
14747
14824
|
if (fromUrlContext != null) {
|
|
14748
14825
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -14776,6 +14853,10 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
14776
14853
|
if (fromGoogleSearch != null) {
|
|
14777
14854
|
setValueByPath(toObject, ['googleSearch'], fromGoogleSearch);
|
|
14778
14855
|
}
|
|
14856
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
14857
|
+
if (fromGoogleMaps != null) {
|
|
14858
|
+
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
14859
|
+
}
|
|
14779
14860
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
14780
14861
|
'codeExecution',
|
|
14781
14862
|
]);
|
|
@@ -14800,16 +14881,18 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
14800
14881
|
}
|
|
14801
14882
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
14802
14883
|
}
|
|
14803
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
14804
|
-
if (fromGoogleMaps != null) {
|
|
14805
|
-
setValueByPath(toObject, ['googleMaps'], fromGoogleMaps);
|
|
14806
|
-
}
|
|
14807
14884
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
14808
14885
|
'googleSearchRetrieval',
|
|
14809
14886
|
]);
|
|
14810
14887
|
if (fromGoogleSearchRetrieval != null) {
|
|
14811
14888
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
14812
14889
|
}
|
|
14890
|
+
const fromParallelAiSearch = getValueByPath(fromObject, [
|
|
14891
|
+
'parallelAiSearch',
|
|
14892
|
+
]);
|
|
14893
|
+
if (fromParallelAiSearch != null) {
|
|
14894
|
+
setValueByPath(toObject, ['parallelAiSearch'], fromParallelAiSearch);
|
|
14895
|
+
}
|
|
14813
14896
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
14814
14897
|
if (fromUrlContext != null) {
|
|
14815
14898
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -17795,6 +17878,33 @@ class Operations extends BaseModule {
|
|
|
17795
17878
|
* Copyright 2025 Google LLC
|
|
17796
17879
|
* SPDX-License-Identifier: Apache-2.0
|
|
17797
17880
|
*/
|
|
17881
|
+
function authConfigToMldev(fromObject) {
|
|
17882
|
+
const toObject = {};
|
|
17883
|
+
const fromApiKey = getValueByPath(fromObject, ['apiKey']);
|
|
17884
|
+
if (fromApiKey != null) {
|
|
17885
|
+
setValueByPath(toObject, ['apiKey'], fromApiKey);
|
|
17886
|
+
}
|
|
17887
|
+
if (getValueByPath(fromObject, ['apiKeyConfig']) !== undefined) {
|
|
17888
|
+
throw new Error('apiKeyConfig parameter is not supported in Gemini API.');
|
|
17889
|
+
}
|
|
17890
|
+
if (getValueByPath(fromObject, ['authType']) !== undefined) {
|
|
17891
|
+
throw new Error('authType parameter is not supported in Gemini API.');
|
|
17892
|
+
}
|
|
17893
|
+
if (getValueByPath(fromObject, ['googleServiceAccountConfig']) !==
|
|
17894
|
+
undefined) {
|
|
17895
|
+
throw new Error('googleServiceAccountConfig parameter is not supported in Gemini API.');
|
|
17896
|
+
}
|
|
17897
|
+
if (getValueByPath(fromObject, ['httpBasicAuthConfig']) !== undefined) {
|
|
17898
|
+
throw new Error('httpBasicAuthConfig parameter is not supported in Gemini API.');
|
|
17899
|
+
}
|
|
17900
|
+
if (getValueByPath(fromObject, ['oauthConfig']) !== undefined) {
|
|
17901
|
+
throw new Error('oauthConfig parameter is not supported in Gemini API.');
|
|
17902
|
+
}
|
|
17903
|
+
if (getValueByPath(fromObject, ['oidcConfig']) !== undefined) {
|
|
17904
|
+
throw new Error('oidcConfig parameter is not supported in Gemini API.');
|
|
17905
|
+
}
|
|
17906
|
+
return toObject;
|
|
17907
|
+
}
|
|
17798
17908
|
function blobToMldev(fromObject) {
|
|
17799
17909
|
const toObject = {};
|
|
17800
17910
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
@@ -17905,8 +18015,9 @@ function functionCallToMldev(fromObject) {
|
|
|
17905
18015
|
}
|
|
17906
18016
|
function googleMapsToMldev(fromObject) {
|
|
17907
18017
|
const toObject = {};
|
|
17908
|
-
|
|
17909
|
-
|
|
18018
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
18019
|
+
if (fromAuthConfig != null) {
|
|
18020
|
+
setValueByPath(toObject, ['authConfig'], authConfigToMldev(fromAuthConfig));
|
|
17910
18021
|
}
|
|
17911
18022
|
const fromEnableWidget = getValueByPath(fromObject, ['enableWidget']);
|
|
17912
18023
|
if (fromEnableWidget != null) {
|
|
@@ -17920,12 +18031,12 @@ function googleSearchToMldev(fromObject) {
|
|
|
17920
18031
|
if (fromSearchTypes != null) {
|
|
17921
18032
|
setValueByPath(toObject, ['searchTypes'], fromSearchTypes);
|
|
17922
18033
|
}
|
|
17923
|
-
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
17924
|
-
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
17925
|
-
}
|
|
17926
18034
|
if (getValueByPath(fromObject, ['blockingConfidence']) !== undefined) {
|
|
17927
18035
|
throw new Error('blockingConfidence parameter is not supported in Gemini API.');
|
|
17928
18036
|
}
|
|
18037
|
+
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
18038
|
+
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
18039
|
+
}
|
|
17929
18040
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
17930
18041
|
'timeRangeFilter',
|
|
17931
18042
|
]);
|
|
@@ -18147,6 +18258,10 @@ function toolToMldev(fromObject) {
|
|
|
18147
18258
|
if (fromGoogleSearch != null) {
|
|
18148
18259
|
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(fromGoogleSearch));
|
|
18149
18260
|
}
|
|
18261
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
18262
|
+
if (fromGoogleMaps != null) {
|
|
18263
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
|
|
18264
|
+
}
|
|
18150
18265
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
18151
18266
|
'codeExecution',
|
|
18152
18267
|
]);
|
|
@@ -18168,16 +18283,15 @@ function toolToMldev(fromObject) {
|
|
|
18168
18283
|
}
|
|
18169
18284
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
18170
18285
|
}
|
|
18171
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
18172
|
-
if (fromGoogleMaps != null) {
|
|
18173
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToMldev(fromGoogleMaps));
|
|
18174
|
-
}
|
|
18175
18286
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
18176
18287
|
'googleSearchRetrieval',
|
|
18177
18288
|
]);
|
|
18178
18289
|
if (fromGoogleSearchRetrieval != null) {
|
|
18179
18290
|
setValueByPath(toObject, ['googleSearchRetrieval'], fromGoogleSearchRetrieval);
|
|
18180
18291
|
}
|
|
18292
|
+
if (getValueByPath(fromObject, ['parallelAiSearch']) !== undefined) {
|
|
18293
|
+
throw new Error('parallelAiSearch parameter is not supported in Gemini API.');
|
|
18294
|
+
}
|
|
18181
18295
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
18182
18296
|
if (fromUrlContext != null) {
|
|
18183
18297
|
setValueByPath(toObject, ['urlContext'], fromUrlContext);
|
|
@@ -19227,10 +19341,28 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19227
19341
|
if (fromCustomBaseModel != null) {
|
|
19228
19342
|
setValueByPath(toObject, ['customBaseModel'], fromCustomBaseModel);
|
|
19229
19343
|
}
|
|
19344
|
+
const fromEvaluateDatasetRuns = getValueByPath(fromObject, [
|
|
19345
|
+
'evaluateDatasetRuns',
|
|
19346
|
+
]);
|
|
19347
|
+
if (fromEvaluateDatasetRuns != null) {
|
|
19348
|
+
let transformedList = fromEvaluateDatasetRuns;
|
|
19349
|
+
if (Array.isArray(transformedList)) {
|
|
19350
|
+
transformedList = transformedList.map((item) => {
|
|
19351
|
+
return item;
|
|
19352
|
+
});
|
|
19353
|
+
}
|
|
19354
|
+
setValueByPath(toObject, ['evaluateDatasetRuns'], transformedList);
|
|
19355
|
+
}
|
|
19230
19356
|
const fromExperiment = getValueByPath(fromObject, ['experiment']);
|
|
19231
19357
|
if (fromExperiment != null) {
|
|
19232
19358
|
setValueByPath(toObject, ['experiment'], fromExperiment);
|
|
19233
19359
|
}
|
|
19360
|
+
const fromFullFineTuningSpec = getValueByPath(fromObject, [
|
|
19361
|
+
'fullFineTuningSpec',
|
|
19362
|
+
]);
|
|
19363
|
+
if (fromFullFineTuningSpec != null) {
|
|
19364
|
+
setValueByPath(toObject, ['fullFineTuningSpec'], fromFullFineTuningSpec);
|
|
19365
|
+
}
|
|
19234
19366
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
19235
19367
|
if (fromLabels != null) {
|
|
19236
19368
|
setValueByPath(toObject, ['labels'], fromLabels);
|
|
@@ -19255,6 +19387,12 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
19255
19387
|
if (fromTunedModelDisplayName != null) {
|
|
19256
19388
|
setValueByPath(toObject, ['tunedModelDisplayName'], fromTunedModelDisplayName);
|
|
19257
19389
|
}
|
|
19390
|
+
const fromTuningJobState = getValueByPath(fromObject, [
|
|
19391
|
+
'tuningJobState',
|
|
19392
|
+
]);
|
|
19393
|
+
if (fromTuningJobState != null) {
|
|
19394
|
+
setValueByPath(toObject, ['tuningJobState'], fromTuningJobState);
|
|
19395
|
+
}
|
|
19258
19396
|
const fromVeoTuningSpec = getValueByPath(fromObject, [
|
|
19259
19397
|
'veoTuningSpec',
|
|
19260
19398
|
]);
|
|
@@ -19803,5 +19941,5 @@ class GoogleGenAI {
|
|
|
19803
19941
|
}
|
|
19804
19942
|
}
|
|
19805
19943
|
|
|
19806
|
-
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 };
|
|
19944
|
+
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 };
|
|
19807
19945
|
//# sourceMappingURL=index.mjs.map
|