@google/genai 2.9.0 → 2.11.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.
@@ -121,26 +121,6 @@ var Type;
121
121
  */
122
122
  Type["NULL"] = "NULL";
123
123
  })(Type || (Type = {}));
124
- /** The environment being operated. */
125
- var Environment;
126
- (function (Environment) {
127
- /**
128
- * Defaults to browser.
129
- */
130
- Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
131
- /**
132
- * Operates in a web browser.
133
- */
134
- Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
135
- /**
136
- * Operates in a mobile environment.
137
- */
138
- Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
139
- /**
140
- * Operates in a desktop environment.
141
- */
142
- Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
143
- })(Environment || (Environment = {}));
144
124
  /** Type of auth scheme. This enum is not supported in Gemini API. */
145
125
  var AuthType;
146
126
  (function (AuthType) {
@@ -211,6 +191,62 @@ var ApiSpec;
211
191
  */
212
192
  ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
213
193
  })(ApiSpec || (ApiSpec = {}));
194
+ /** The environment being operated. */
195
+ var Environment;
196
+ (function (Environment) {
197
+ /**
198
+ * Defaults to browser.
199
+ */
200
+ Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
201
+ /**
202
+ * Operates in a web browser.
203
+ */
204
+ Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
205
+ /**
206
+ * Operates in a mobile environment.
207
+ */
208
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
209
+ /**
210
+ * Operates in a desktop environment.
211
+ */
212
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
213
+ })(Environment || (Environment = {}));
214
+ /** SafetyPolicy */
215
+ var SafetyPolicy;
216
+ (function (SafetyPolicy) {
217
+ /**
218
+ * Unspecified safety policy.
219
+ */
220
+ SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
221
+ /**
222
+ * Safety policy for financial transactions.
223
+ */
224
+ SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
225
+ /**
226
+ * Safety policy for sensitive data modification.
227
+ */
228
+ SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
229
+ /**
230
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
231
+ */
232
+ SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
233
+ /**
234
+ * Safety policy for account creation.
235
+ */
236
+ SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
237
+ /**
238
+ * Safety policy for data modification.
239
+ */
240
+ SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
241
+ /**
242
+ * Safety policy for user consent management.
243
+ */
244
+ SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
245
+ /**
246
+ * Safety policy for legal terms and agreements.
247
+ */
248
+ SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
249
+ })(SafetyPolicy || (SafetyPolicy = {}));
214
250
  /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
215
251
  var PhishBlockThreshold;
216
252
  (function (PhishBlockThreshold) {
@@ -243,7 +279,7 @@ var PhishBlockThreshold;
243
279
  */
244
280
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
245
281
  })(PhishBlockThreshold || (PhishBlockThreshold = {}));
246
- /** Specifies the function Behavior. Currently only non-blocking functions are supported. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
282
+ /** Specifies the function Behavior. If not specified, the system keeps the current function call behavior. This field is currently only supported by the BidiGenerateContent method. */
247
283
  var Behavior;
248
284
  (function (Behavior) {
249
285
  /**
@@ -757,6 +793,110 @@ var Modality;
757
793
  */
758
794
  Modality["VIDEO"] = "VIDEO";
759
795
  })(Modality || (Modality = {}));
796
+ /** Delivery mode for the generated content. */
797
+ var Delivery;
798
+ (function (Delivery) {
799
+ /**
800
+ * Default value. This value is unused.
801
+ */
802
+ Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
803
+ /**
804
+ * Generated bytes are returned inline in the response.
805
+ */
806
+ Delivery["INLINE"] = "INLINE";
807
+ /**
808
+ * Generated content is stored and a URI is returned.
809
+ */
810
+ Delivery["URI"] = "URI";
811
+ })(Delivery || (Delivery = {}));
812
+ /** The aspect ratio for the image output. */
813
+ var AspectRatio;
814
+ (function (AspectRatio) {
815
+ /**
816
+ * Default value. This value is unused.
817
+ */
818
+ AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
819
+ /**
820
+ * 1:1 aspect ratio.
821
+ */
822
+ AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
823
+ /**
824
+ * 2:3 aspect ratio.
825
+ */
826
+ AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
827
+ /**
828
+ * 3:2 aspect ratio.
829
+ */
830
+ AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
831
+ /**
832
+ * 3:4 aspect ratio.
833
+ */
834
+ AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
835
+ /**
836
+ * 4:3 aspect ratio.
837
+ */
838
+ AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
839
+ /**
840
+ * 4:5 aspect ratio.
841
+ */
842
+ AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
843
+ /**
844
+ * 5:4 aspect ratio.
845
+ */
846
+ AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
847
+ /**
848
+ * 9:16 aspect ratio.
849
+ */
850
+ AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
851
+ /**
852
+ * 16:9 aspect ratio.
853
+ */
854
+ AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
855
+ /**
856
+ * 21:9 aspect ratio.
857
+ */
858
+ AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
859
+ /**
860
+ * 1:8 aspect ratio.
861
+ */
862
+ AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
863
+ /**
864
+ * 8:1 aspect ratio.
865
+ */
866
+ AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
867
+ /**
868
+ * 1:4 aspect ratio.
869
+ */
870
+ AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
871
+ /**
872
+ * 4:1 aspect ratio.
873
+ */
874
+ AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
875
+ })(AspectRatio || (AspectRatio = {}));
876
+ /** The size of the image output. */
877
+ var ImageSize;
878
+ (function (ImageSize) {
879
+ /**
880
+ * Default value. This value is unused.
881
+ */
882
+ ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
883
+ /**
884
+ * 512px image size.
885
+ */
886
+ ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
887
+ /**
888
+ * 1K image size.
889
+ */
890
+ ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
891
+ /**
892
+ * 2K image size.
893
+ */
894
+ ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
895
+ /**
896
+ * 4K image size.
897
+ */
898
+ ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
899
+ })(ImageSize || (ImageSize = {}));
760
900
  /** Tuning mode. This enum is not supported in Gemini API. */
761
901
  var TuningMode;
762
902
  (function (TuningMode) {
@@ -805,6 +945,58 @@ var AdapterSize;
805
945
  */
806
946
  AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
807
947
  })(AdapterSize || (AdapterSize = {}));
948
+ /** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
949
+ var ResponseParseType;
950
+ (function (ResponseParseType) {
951
+ /**
952
+ * Default value. Fallback to IDENTITY
953
+ */
954
+ ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
955
+ /**
956
+ * Returns the sample response as is.
957
+ */
958
+ ResponseParseType["IDENTITY"] = "IDENTITY";
959
+ /**
960
+ * Uses regex to extract the important part of sample response. Similar to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_extract) `REGEX_EXTRACT(response, regex_extract_expression)`, but different in that if there are multiple matches, the last match will be returned.
961
+ */
962
+ ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
963
+ })(ResponseParseType || (ResponseParseType = {}));
964
+ /** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
965
+ var MatchOperation;
966
+ (function (MatchOperation) {
967
+ /**
968
+ * Default value. A user error will be returned if not set.
969
+ */
970
+ MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
971
+ /**
972
+ * Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
973
+ */
974
+ MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
975
+ /**
976
+ * The match operation returns `true` if expression is a substring of the target.
977
+ */
978
+ MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
979
+ /**
980
+ * The match operation returns `true` expression is an exact match of the target.
981
+ */
982
+ MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
983
+ })(MatchOperation || (MatchOperation = {}));
984
+ /** Represents how much to think for the tuning job. */
985
+ var ReinforcementTuningThinkingLevel;
986
+ (function (ReinforcementTuningThinkingLevel) {
987
+ /**
988
+ * Unspecified thinking level.
989
+ */
990
+ ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
991
+ /**
992
+ * Little to no thinking.
993
+ */
994
+ ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
995
+ /**
996
+ * High thinking level.
997
+ */
998
+ ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
999
+ })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
808
1000
  /** Job state. */
809
1001
  var JobState;
810
1002
  (function (JobState) {
@@ -1289,58 +1481,6 @@ var ImageResizeMode;
1289
1481
  */
1290
1482
  ImageResizeMode["PAD"] = "PAD";
1291
1483
  })(ImageResizeMode || (ImageResizeMode = {}));
1292
- /** Defines how to parse sample response. */
1293
- var ResponseParseType;
1294
- (function (ResponseParseType) {
1295
- /**
1296
- * Default value. This value is unused.
1297
- */
1298
- ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
1299
- /**
1300
- * Use the sample response as is.
1301
- */
1302
- ResponseParseType["IDENTITY"] = "IDENTITY";
1303
- /**
1304
- * Use regex to extract the important part of sample response.
1305
- */
1306
- ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
1307
- })(ResponseParseType || (ResponseParseType = {}));
1308
- /** Match operation to use for evaluation. */
1309
- var MatchOperation;
1310
- (function (MatchOperation) {
1311
- /**
1312
- * Default value. This value is unused.
1313
- */
1314
- MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
1315
- /**
1316
- * Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
1317
- */
1318
- MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
1319
- /**
1320
- * `expression` is a substring of target.
1321
- */
1322
- MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
1323
- /**
1324
- * `expression` is an exact match of target.
1325
- */
1326
- MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
1327
- })(MatchOperation || (MatchOperation = {}));
1328
- /** Represents how much to think for the tuning job. */
1329
- var ReinforcementTuningThinkingLevel;
1330
- (function (ReinforcementTuningThinkingLevel) {
1331
- /**
1332
- * Unspecified thinking level.
1333
- */
1334
- ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
1335
- /**
1336
- * Little to no thinking.
1337
- */
1338
- ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
1339
- /**
1340
- * High thinking level.
1341
- */
1342
- ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
1343
- })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
1344
1484
  /** Enum representing the tuning method. */
1345
1485
  var TuningMethod;
1346
1486
  (function (TuningMethod) {