@google/genai 2.10.0 → 2.12.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.
@@ -595,7 +595,7 @@ var PhishBlockThreshold;
595
595
  */
596
596
  PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
597
597
  })(PhishBlockThreshold || (PhishBlockThreshold = {}));
598
- /** 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. */
598
+ /** 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. */
599
599
  var Behavior;
600
600
  (function (Behavior) {
601
601
  /**
@@ -1109,6 +1109,110 @@ var Modality;
1109
1109
  */
1110
1110
  Modality["VIDEO"] = "VIDEO";
1111
1111
  })(Modality || (Modality = {}));
1112
+ /** Delivery mode for the generated content. */
1113
+ var Delivery;
1114
+ (function (Delivery) {
1115
+ /**
1116
+ * Default value. This value is unused.
1117
+ */
1118
+ Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
1119
+ /**
1120
+ * Generated bytes are returned inline in the response.
1121
+ */
1122
+ Delivery["INLINE"] = "INLINE";
1123
+ /**
1124
+ * Generated content is stored and a URI is returned.
1125
+ */
1126
+ Delivery["URI"] = "URI";
1127
+ })(Delivery || (Delivery = {}));
1128
+ /** The aspect ratio for the image output. */
1129
+ var AspectRatio;
1130
+ (function (AspectRatio) {
1131
+ /**
1132
+ * Default value. This value is unused.
1133
+ */
1134
+ AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
1135
+ /**
1136
+ * 1:1 aspect ratio.
1137
+ */
1138
+ AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
1139
+ /**
1140
+ * 2:3 aspect ratio.
1141
+ */
1142
+ AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
1143
+ /**
1144
+ * 3:2 aspect ratio.
1145
+ */
1146
+ AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
1147
+ /**
1148
+ * 3:4 aspect ratio.
1149
+ */
1150
+ AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
1151
+ /**
1152
+ * 4:3 aspect ratio.
1153
+ */
1154
+ AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
1155
+ /**
1156
+ * 4:5 aspect ratio.
1157
+ */
1158
+ AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
1159
+ /**
1160
+ * 5:4 aspect ratio.
1161
+ */
1162
+ AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
1163
+ /**
1164
+ * 9:16 aspect ratio.
1165
+ */
1166
+ AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
1167
+ /**
1168
+ * 16:9 aspect ratio.
1169
+ */
1170
+ AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
1171
+ /**
1172
+ * 21:9 aspect ratio.
1173
+ */
1174
+ AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
1175
+ /**
1176
+ * 1:8 aspect ratio.
1177
+ */
1178
+ AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
1179
+ /**
1180
+ * 8:1 aspect ratio.
1181
+ */
1182
+ AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
1183
+ /**
1184
+ * 1:4 aspect ratio.
1185
+ */
1186
+ AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
1187
+ /**
1188
+ * 4:1 aspect ratio.
1189
+ */
1190
+ AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
1191
+ })(AspectRatio || (AspectRatio = {}));
1192
+ /** The size of the image output. */
1193
+ var ImageSize;
1194
+ (function (ImageSize) {
1195
+ /**
1196
+ * Default value. This value is unused.
1197
+ */
1198
+ ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
1199
+ /**
1200
+ * 512px image size.
1201
+ */
1202
+ ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
1203
+ /**
1204
+ * 1K image size.
1205
+ */
1206
+ ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
1207
+ /**
1208
+ * 2K image size.
1209
+ */
1210
+ ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
1211
+ /**
1212
+ * 4K image size.
1213
+ */
1214
+ ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
1215
+ })(ImageSize || (ImageSize = {}));
1112
1216
  /** Tuning mode. This enum is not supported in Gemini API. */
1113
1217
  var TuningMode;
1114
1218
  (function (TuningMode) {
@@ -1157,6 +1261,58 @@ var AdapterSize;
1157
1261
  */
1158
1262
  AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
1159
1263
  })(AdapterSize || (AdapterSize = {}));
1264
+ /** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
1265
+ var ResponseParseType;
1266
+ (function (ResponseParseType) {
1267
+ /**
1268
+ * Default value. Fallback to IDENTITY
1269
+ */
1270
+ ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
1271
+ /**
1272
+ * Returns the sample response as is.
1273
+ */
1274
+ ResponseParseType["IDENTITY"] = "IDENTITY";
1275
+ /**
1276
+ * 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.
1277
+ */
1278
+ ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
1279
+ })(ResponseParseType || (ResponseParseType = {}));
1280
+ /** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
1281
+ var MatchOperation;
1282
+ (function (MatchOperation) {
1283
+ /**
1284
+ * Default value. A user error will be returned if not set.
1285
+ */
1286
+ MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
1287
+ /**
1288
+ * Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
1289
+ */
1290
+ MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
1291
+ /**
1292
+ * The match operation returns `true` if expression is a substring of the target.
1293
+ */
1294
+ MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
1295
+ /**
1296
+ * The match operation returns `true` expression is an exact match of the target.
1297
+ */
1298
+ MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
1299
+ })(MatchOperation || (MatchOperation = {}));
1300
+ /** Represents how much to think for the tuning job. */
1301
+ var ReinforcementTuningThinkingLevel;
1302
+ (function (ReinforcementTuningThinkingLevel) {
1303
+ /**
1304
+ * Unspecified thinking level.
1305
+ */
1306
+ ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
1307
+ /**
1308
+ * Little to no thinking.
1309
+ */
1310
+ ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
1311
+ /**
1312
+ * High thinking level.
1313
+ */
1314
+ ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
1315
+ })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
1160
1316
  /** Job state. */
1161
1317
  var JobState;
1162
1318
  (function (JobState) {
@@ -1641,58 +1797,6 @@ var ImageResizeMode;
1641
1797
  */
1642
1798
  ImageResizeMode["PAD"] = "PAD";
1643
1799
  })(ImageResizeMode || (ImageResizeMode = {}));
1644
- /** Defines how to parse sample response. */
1645
- var ResponseParseType;
1646
- (function (ResponseParseType) {
1647
- /**
1648
- * Default value. This value is unused.
1649
- */
1650
- ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
1651
- /**
1652
- * Use the sample response as is.
1653
- */
1654
- ResponseParseType["IDENTITY"] = "IDENTITY";
1655
- /**
1656
- * Use regex to extract the important part of sample response.
1657
- */
1658
- ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
1659
- })(ResponseParseType || (ResponseParseType = {}));
1660
- /** Match operation to use for evaluation. */
1661
- var MatchOperation;
1662
- (function (MatchOperation) {
1663
- /**
1664
- * Default value. This value is unused.
1665
- */
1666
- MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
1667
- /**
1668
- * Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
1669
- */
1670
- MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
1671
- /**
1672
- * `expression` is a substring of target.
1673
- */
1674
- MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
1675
- /**
1676
- * `expression` is an exact match of target.
1677
- */
1678
- MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
1679
- })(MatchOperation || (MatchOperation = {}));
1680
- /** Represents how much to think for the tuning job. */
1681
- var ReinforcementTuningThinkingLevel;
1682
- (function (ReinforcementTuningThinkingLevel) {
1683
- /**
1684
- * Unspecified thinking level.
1685
- */
1686
- ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
1687
- /**
1688
- * Little to no thinking.
1689
- */
1690
- ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
1691
- /**
1692
- * High thinking level.
1693
- */
1694
- ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
1695
- })(ReinforcementTuningThinkingLevel || (ReinforcementTuningThinkingLevel = {}));
1696
1800
  /** Enum representing the tuning method. */
1697
1801
  var TuningMethod;
1698
1802
  (function (TuningMethod) {
@@ -2203,7 +2307,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
2203
2307
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
2204
2308
  const USER_AGENT_HEADER = 'User-Agent';
2205
2309
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
2206
- const SDK_VERSION = '2.10.0'; // x-release-please-version
2310
+ const SDK_VERSION = '2.12.0'; // x-release-please-version
2207
2311
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
2208
2312
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
2209
2313
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';