@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.
@@ -97,26 +97,6 @@ var Type;
97
97
  */
98
98
  Type["NULL"] = "NULL";
99
99
  })(Type || (Type = {}));
100
- /** The environment being operated. */
101
- var Environment;
102
- (function (Environment) {
103
- /**
104
- * Defaults to browser.
105
- */
106
- Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
107
- /**
108
- * Operates in a web browser.
109
- */
110
- Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
111
- /**
112
- * Operates in a mobile environment.
113
- */
114
- Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
115
- /**
116
- * Operates in a desktop environment.
117
- */
118
- Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
119
- })(Environment || (Environment = {}));
120
100
  /** Type of auth scheme. This enum is not supported in Gemini API. */
121
101
  var AuthType;
122
102
  (function (AuthType) {
@@ -187,6 +167,62 @@ var ApiSpec;
187
167
  */
188
168
  ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
189
169
  })(ApiSpec || (ApiSpec = {}));
170
+ /** The environment being operated. */
171
+ var Environment;
172
+ (function (Environment) {
173
+ /**
174
+ * Defaults to browser.
175
+ */
176
+ Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
177
+ /**
178
+ * Operates in a web browser.
179
+ */
180
+ Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
181
+ /**
182
+ * Operates in a mobile environment.
183
+ */
184
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
185
+ /**
186
+ * Operates in a desktop environment.
187
+ */
188
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
189
+ })(Environment || (Environment = {}));
190
+ /** SafetyPolicy */
191
+ var SafetyPolicy;
192
+ (function (SafetyPolicy) {
193
+ /**
194
+ * Unspecified safety policy.
195
+ */
196
+ SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
197
+ /**
198
+ * Safety policy for financial transactions.
199
+ */
200
+ SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
201
+ /**
202
+ * Safety policy for sensitive data modification.
203
+ */
204
+ SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
205
+ /**
206
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
207
+ */
208
+ SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
209
+ /**
210
+ * Safety policy for account creation.
211
+ */
212
+ SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
213
+ /**
214
+ * Safety policy for data modification.
215
+ */
216
+ SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
217
+ /**
218
+ * Safety policy for user consent management.
219
+ */
220
+ SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
221
+ /**
222
+ * Safety policy for legal terms and agreements.
223
+ */
224
+ SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
225
+ })(SafetyPolicy || (SafetyPolicy = {}));
190
226
  /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
191
227
  var PhishBlockThreshold;
192
228
  (function (PhishBlockThreshold) {
@@ -219,7 +255,7 @@ var PhishBlockThreshold;
219
255
  */
220
256
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
221
257
  })(PhishBlockThreshold || (PhishBlockThreshold = {}));
222
- /** 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. */
258
+ /** 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. */
223
259
  var Behavior;
224
260
  (function (Behavior) {
225
261
  /**
@@ -733,6 +769,110 @@ var Modality;
733
769
  */
734
770
  Modality["VIDEO"] = "VIDEO";
735
771
  })(Modality || (Modality = {}));
772
+ /** Delivery mode for the generated content. */
773
+ var Delivery;
774
+ (function (Delivery) {
775
+ /**
776
+ * Default value. This value is unused.
777
+ */
778
+ Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
779
+ /**
780
+ * Generated bytes are returned inline in the response.
781
+ */
782
+ Delivery["INLINE"] = "INLINE";
783
+ /**
784
+ * Generated content is stored and a URI is returned.
785
+ */
786
+ Delivery["URI"] = "URI";
787
+ })(Delivery || (Delivery = {}));
788
+ /** The aspect ratio for the image output. */
789
+ var AspectRatio;
790
+ (function (AspectRatio) {
791
+ /**
792
+ * Default value. This value is unused.
793
+ */
794
+ AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
795
+ /**
796
+ * 1:1 aspect ratio.
797
+ */
798
+ AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
799
+ /**
800
+ * 2:3 aspect ratio.
801
+ */
802
+ AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
803
+ /**
804
+ * 3:2 aspect ratio.
805
+ */
806
+ AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
807
+ /**
808
+ * 3:4 aspect ratio.
809
+ */
810
+ AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
811
+ /**
812
+ * 4:3 aspect ratio.
813
+ */
814
+ AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
815
+ /**
816
+ * 4:5 aspect ratio.
817
+ */
818
+ AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
819
+ /**
820
+ * 5:4 aspect ratio.
821
+ */
822
+ AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
823
+ /**
824
+ * 9:16 aspect ratio.
825
+ */
826
+ AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
827
+ /**
828
+ * 16:9 aspect ratio.
829
+ */
830
+ AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
831
+ /**
832
+ * 21:9 aspect ratio.
833
+ */
834
+ AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
835
+ /**
836
+ * 1:8 aspect ratio.
837
+ */
838
+ AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
839
+ /**
840
+ * 8:1 aspect ratio.
841
+ */
842
+ AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
843
+ /**
844
+ * 1:4 aspect ratio.
845
+ */
846
+ AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
847
+ /**
848
+ * 4:1 aspect ratio.
849
+ */
850
+ AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
851
+ })(AspectRatio || (AspectRatio = {}));
852
+ /** The size of the image output. */
853
+ var ImageSize;
854
+ (function (ImageSize) {
855
+ /**
856
+ * Default value. This value is unused.
857
+ */
858
+ ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
859
+ /**
860
+ * 512px image size.
861
+ */
862
+ ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
863
+ /**
864
+ * 1K image size.
865
+ */
866
+ ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
867
+ /**
868
+ * 2K image size.
869
+ */
870
+ ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
871
+ /**
872
+ * 4K image size.
873
+ */
874
+ ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
875
+ })(ImageSize || (ImageSize = {}));
736
876
  /** Tuning mode. This enum is not supported in Gemini API. */
737
877
  var TuningMode;
738
878
  (function (TuningMode) {
@@ -781,6 +921,58 @@ var AdapterSize;
781
921
  */
782
922
  AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
783
923
  })(AdapterSize || (AdapterSize = {}));
924
+ /** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
925
+ var ResponseParseType;
926
+ (function (ResponseParseType) {
927
+ /**
928
+ * Default value. Fallback to IDENTITY
929
+ */
930
+ ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
931
+ /**
932
+ * Returns the sample response as is.
933
+ */
934
+ ResponseParseType["IDENTITY"] = "IDENTITY";
935
+ /**
936
+ * 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.
937
+ */
938
+ ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
939
+ })(ResponseParseType || (ResponseParseType = {}));
940
+ /** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
941
+ var MatchOperation;
942
+ (function (MatchOperation) {
943
+ /**
944
+ * Default value. A user error will be returned if not set.
945
+ */
946
+ MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
947
+ /**
948
+ * Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
949
+ */
950
+ MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
951
+ /**
952
+ * The match operation returns `true` if expression is a substring of the target.
953
+ */
954
+ MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
955
+ /**
956
+ * The match operation returns `true` expression is an exact match of the target.
957
+ */
958
+ MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
959
+ })(MatchOperation || (MatchOperation = {}));
960
+ /** Represents how much to think for the tuning job. */
961
+ var ReinforcementTuningThinkingLevel;
962
+ (function (ReinforcementTuningThinkingLevel) {
963
+ /**
964
+ * Unspecified thinking level.
965
+ */
966
+ ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
967
+ /**
968
+ * Little to no thinking.
969
+ */
970
+ ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
971
+ /**
972
+ * High thinking level.
973
+ */
974
+ ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
975
+ })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
784
976
  /** Job state. */
785
977
  var JobState;
786
978
  (function (JobState) {
@@ -1265,58 +1457,6 @@ var ImageResizeMode;
1265
1457
  */
1266
1458
  ImageResizeMode["PAD"] = "PAD";
1267
1459
  })(ImageResizeMode || (ImageResizeMode = {}));
1268
- /** Defines how to parse sample response. */
1269
- var ResponseParseType;
1270
- (function (ResponseParseType) {
1271
- /**
1272
- * Default value. This value is unused.
1273
- */
1274
- ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
1275
- /**
1276
- * Use the sample response as is.
1277
- */
1278
- ResponseParseType["IDENTITY"] = "IDENTITY";
1279
- /**
1280
- * Use regex to extract the important part of sample response.
1281
- */
1282
- ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
1283
- })(ResponseParseType || (ResponseParseType = {}));
1284
- /** Match operation to use for evaluation. */
1285
- var MatchOperation;
1286
- (function (MatchOperation) {
1287
- /**
1288
- * Default value. This value is unused.
1289
- */
1290
- MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
1291
- /**
1292
- * Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
1293
- */
1294
- MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
1295
- /**
1296
- * `expression` is a substring of target.
1297
- */
1298
- MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
1299
- /**
1300
- * `expression` is an exact match of target.
1301
- */
1302
- MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
1303
- })(MatchOperation || (MatchOperation = {}));
1304
- /** Represents how much to think for the tuning job. */
1305
- var ReinforcementTuningThinkingLevel;
1306
- (function (ReinforcementTuningThinkingLevel) {
1307
- /**
1308
- * Unspecified thinking level.
1309
- */
1310
- ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
1311
- /**
1312
- * Little to no thinking.
1313
- */
1314
- ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
1315
- /**
1316
- * High thinking level.
1317
- */
1318
- ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
1319
- })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
1320
1460
  /** Enum representing the tuning method. */
1321
1461
  var TuningMethod;
1322
1462
  (function (TuningMethod) {