@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.
- package/dist/genai.d.ts +1149 -566
- package/dist/index.cjs +579 -105
- package/dist/index.mjs +575 -106
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +579 -105
- package/dist/node/index.mjs +575 -106
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +1149 -566
- package/dist/tokenizer/node.cjs +213 -73
- package/dist/tokenizer/node.d.ts +245 -14
- package/dist/tokenizer/node.mjs +213 -73
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +214 -74
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +339 -82
- package/dist/vertex_internal/index.js +214 -74
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +575 -106
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +1149 -566
- package/package.json +2 -9
package/dist/index.cjs
CHANGED
|
@@ -646,26 +646,6 @@ exports.Type = void 0;
|
|
|
646
646
|
*/
|
|
647
647
|
Type["NULL"] = "NULL";
|
|
648
648
|
})(exports.Type || (exports.Type = {}));
|
|
649
|
-
/** The environment being operated. */
|
|
650
|
-
exports.Environment = void 0;
|
|
651
|
-
(function (Environment) {
|
|
652
|
-
/**
|
|
653
|
-
* Defaults to browser.
|
|
654
|
-
*/
|
|
655
|
-
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
656
|
-
/**
|
|
657
|
-
* Operates in a web browser.
|
|
658
|
-
*/
|
|
659
|
-
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
660
|
-
/**
|
|
661
|
-
* Operates in a mobile environment.
|
|
662
|
-
*/
|
|
663
|
-
Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
|
|
664
|
-
/**
|
|
665
|
-
* Operates in a desktop environment.
|
|
666
|
-
*/
|
|
667
|
-
Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
|
|
668
|
-
})(exports.Environment || (exports.Environment = {}));
|
|
669
649
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
670
650
|
exports.AuthType = void 0;
|
|
671
651
|
(function (AuthType) {
|
|
@@ -736,6 +716,62 @@ exports.ApiSpec = void 0;
|
|
|
736
716
|
*/
|
|
737
717
|
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
738
718
|
})(exports.ApiSpec || (exports.ApiSpec = {}));
|
|
719
|
+
/** The environment being operated. */
|
|
720
|
+
exports.Environment = void 0;
|
|
721
|
+
(function (Environment) {
|
|
722
|
+
/**
|
|
723
|
+
* Defaults to browser.
|
|
724
|
+
*/
|
|
725
|
+
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
726
|
+
/**
|
|
727
|
+
* Operates in a web browser.
|
|
728
|
+
*/
|
|
729
|
+
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
730
|
+
/**
|
|
731
|
+
* Operates in a mobile environment.
|
|
732
|
+
*/
|
|
733
|
+
Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
|
|
734
|
+
/**
|
|
735
|
+
* Operates in a desktop environment.
|
|
736
|
+
*/
|
|
737
|
+
Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
|
|
738
|
+
})(exports.Environment || (exports.Environment = {}));
|
|
739
|
+
/** SafetyPolicy */
|
|
740
|
+
exports.SafetyPolicy = void 0;
|
|
741
|
+
(function (SafetyPolicy) {
|
|
742
|
+
/**
|
|
743
|
+
* Unspecified safety policy.
|
|
744
|
+
*/
|
|
745
|
+
SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
|
|
746
|
+
/**
|
|
747
|
+
* Safety policy for financial transactions.
|
|
748
|
+
*/
|
|
749
|
+
SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
|
|
750
|
+
/**
|
|
751
|
+
* Safety policy for sensitive data modification.
|
|
752
|
+
*/
|
|
753
|
+
SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
|
|
754
|
+
/**
|
|
755
|
+
* Safety policy for communication tools (e.g. Gmail, Chat, Meet).
|
|
756
|
+
*/
|
|
757
|
+
SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
|
|
758
|
+
/**
|
|
759
|
+
* Safety policy for account creation.
|
|
760
|
+
*/
|
|
761
|
+
SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
|
|
762
|
+
/**
|
|
763
|
+
* Safety policy for data modification.
|
|
764
|
+
*/
|
|
765
|
+
SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
|
|
766
|
+
/**
|
|
767
|
+
* Safety policy for user consent management.
|
|
768
|
+
*/
|
|
769
|
+
SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
|
|
770
|
+
/**
|
|
771
|
+
* Safety policy for legal terms and agreements.
|
|
772
|
+
*/
|
|
773
|
+
SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
|
|
774
|
+
})(exports.SafetyPolicy || (exports.SafetyPolicy = {}));
|
|
739
775
|
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
740
776
|
exports.PhishBlockThreshold = void 0;
|
|
741
777
|
(function (PhishBlockThreshold) {
|
|
@@ -768,7 +804,7 @@ exports.PhishBlockThreshold = void 0;
|
|
|
768
804
|
*/
|
|
769
805
|
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
770
806
|
})(exports.PhishBlockThreshold || (exports.PhishBlockThreshold = {}));
|
|
771
|
-
/** Specifies the function Behavior.
|
|
807
|
+
/** 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. */
|
|
772
808
|
exports.Behavior = void 0;
|
|
773
809
|
(function (Behavior) {
|
|
774
810
|
/**
|
|
@@ -1282,6 +1318,110 @@ exports.Modality = void 0;
|
|
|
1282
1318
|
*/
|
|
1283
1319
|
Modality["VIDEO"] = "VIDEO";
|
|
1284
1320
|
})(exports.Modality || (exports.Modality = {}));
|
|
1321
|
+
/** Delivery mode for the generated content. */
|
|
1322
|
+
exports.Delivery = void 0;
|
|
1323
|
+
(function (Delivery) {
|
|
1324
|
+
/**
|
|
1325
|
+
* Default value. This value is unused.
|
|
1326
|
+
*/
|
|
1327
|
+
Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
|
|
1328
|
+
/**
|
|
1329
|
+
* Generated bytes are returned inline in the response.
|
|
1330
|
+
*/
|
|
1331
|
+
Delivery["INLINE"] = "INLINE";
|
|
1332
|
+
/**
|
|
1333
|
+
* Generated content is stored and a URI is returned.
|
|
1334
|
+
*/
|
|
1335
|
+
Delivery["URI"] = "URI";
|
|
1336
|
+
})(exports.Delivery || (exports.Delivery = {}));
|
|
1337
|
+
/** The aspect ratio for the image output. */
|
|
1338
|
+
exports.AspectRatio = void 0;
|
|
1339
|
+
(function (AspectRatio) {
|
|
1340
|
+
/**
|
|
1341
|
+
* Default value. This value is unused.
|
|
1342
|
+
*/
|
|
1343
|
+
AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
|
|
1344
|
+
/**
|
|
1345
|
+
* 1:1 aspect ratio.
|
|
1346
|
+
*/
|
|
1347
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
|
|
1348
|
+
/**
|
|
1349
|
+
* 2:3 aspect ratio.
|
|
1350
|
+
*/
|
|
1351
|
+
AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
|
|
1352
|
+
/**
|
|
1353
|
+
* 3:2 aspect ratio.
|
|
1354
|
+
*/
|
|
1355
|
+
AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
|
|
1356
|
+
/**
|
|
1357
|
+
* 3:4 aspect ratio.
|
|
1358
|
+
*/
|
|
1359
|
+
AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
|
|
1360
|
+
/**
|
|
1361
|
+
* 4:3 aspect ratio.
|
|
1362
|
+
*/
|
|
1363
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
|
|
1364
|
+
/**
|
|
1365
|
+
* 4:5 aspect ratio.
|
|
1366
|
+
*/
|
|
1367
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
|
|
1368
|
+
/**
|
|
1369
|
+
* 5:4 aspect ratio.
|
|
1370
|
+
*/
|
|
1371
|
+
AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
|
|
1372
|
+
/**
|
|
1373
|
+
* 9:16 aspect ratio.
|
|
1374
|
+
*/
|
|
1375
|
+
AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
|
|
1376
|
+
/**
|
|
1377
|
+
* 16:9 aspect ratio.
|
|
1378
|
+
*/
|
|
1379
|
+
AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
|
|
1380
|
+
/**
|
|
1381
|
+
* 21:9 aspect ratio.
|
|
1382
|
+
*/
|
|
1383
|
+
AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
|
|
1384
|
+
/**
|
|
1385
|
+
* 1:8 aspect ratio.
|
|
1386
|
+
*/
|
|
1387
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
|
|
1388
|
+
/**
|
|
1389
|
+
* 8:1 aspect ratio.
|
|
1390
|
+
*/
|
|
1391
|
+
AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
|
|
1392
|
+
/**
|
|
1393
|
+
* 1:4 aspect ratio.
|
|
1394
|
+
*/
|
|
1395
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
|
|
1396
|
+
/**
|
|
1397
|
+
* 4:1 aspect ratio.
|
|
1398
|
+
*/
|
|
1399
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
|
|
1400
|
+
})(exports.AspectRatio || (exports.AspectRatio = {}));
|
|
1401
|
+
/** The size of the image output. */
|
|
1402
|
+
exports.ImageSize = void 0;
|
|
1403
|
+
(function (ImageSize) {
|
|
1404
|
+
/**
|
|
1405
|
+
* Default value. This value is unused.
|
|
1406
|
+
*/
|
|
1407
|
+
ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
|
|
1408
|
+
/**
|
|
1409
|
+
* 512px image size.
|
|
1410
|
+
*/
|
|
1411
|
+
ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
|
|
1412
|
+
/**
|
|
1413
|
+
* 1K image size.
|
|
1414
|
+
*/
|
|
1415
|
+
ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
|
|
1416
|
+
/**
|
|
1417
|
+
* 2K image size.
|
|
1418
|
+
*/
|
|
1419
|
+
ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
|
|
1420
|
+
/**
|
|
1421
|
+
* 4K image size.
|
|
1422
|
+
*/
|
|
1423
|
+
ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
|
|
1424
|
+
})(exports.ImageSize || (exports.ImageSize = {}));
|
|
1285
1425
|
/** Tuning mode. This enum is not supported in Gemini API. */
|
|
1286
1426
|
exports.TuningMode = void 0;
|
|
1287
1427
|
(function (TuningMode) {
|
|
@@ -1330,6 +1470,58 @@ exports.AdapterSize = void 0;
|
|
|
1330
1470
|
*/
|
|
1331
1471
|
AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
|
|
1332
1472
|
})(exports.AdapterSize || (exports.AdapterSize = {}));
|
|
1473
|
+
/** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
|
|
1474
|
+
exports.ResponseParseType = void 0;
|
|
1475
|
+
(function (ResponseParseType) {
|
|
1476
|
+
/**
|
|
1477
|
+
* Default value. Fallback to IDENTITY
|
|
1478
|
+
*/
|
|
1479
|
+
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1480
|
+
/**
|
|
1481
|
+
* Returns the sample response as is.
|
|
1482
|
+
*/
|
|
1483
|
+
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1484
|
+
/**
|
|
1485
|
+
* 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.
|
|
1486
|
+
*/
|
|
1487
|
+
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1488
|
+
})(exports.ResponseParseType || (exports.ResponseParseType = {}));
|
|
1489
|
+
/** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
|
|
1490
|
+
exports.MatchOperation = void 0;
|
|
1491
|
+
(function (MatchOperation) {
|
|
1492
|
+
/**
|
|
1493
|
+
* Default value. A user error will be returned if not set.
|
|
1494
|
+
*/
|
|
1495
|
+
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1496
|
+
/**
|
|
1497
|
+
* Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
|
|
1498
|
+
*/
|
|
1499
|
+
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1500
|
+
/**
|
|
1501
|
+
* The match operation returns `true` if expression is a substring of the target.
|
|
1502
|
+
*/
|
|
1503
|
+
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1504
|
+
/**
|
|
1505
|
+
* The match operation returns `true` expression is an exact match of the target.
|
|
1506
|
+
*/
|
|
1507
|
+
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1508
|
+
})(exports.MatchOperation || (exports.MatchOperation = {}));
|
|
1509
|
+
/** Represents how much to think for the tuning job. */
|
|
1510
|
+
exports.ReinforcementTuningThinkingLevel = void 0;
|
|
1511
|
+
(function (ReinforcementTuningThinkingLevel) {
|
|
1512
|
+
/**
|
|
1513
|
+
* Unspecified thinking level.
|
|
1514
|
+
*/
|
|
1515
|
+
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1516
|
+
/**
|
|
1517
|
+
* Little to no thinking.
|
|
1518
|
+
*/
|
|
1519
|
+
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1520
|
+
/**
|
|
1521
|
+
* High thinking level.
|
|
1522
|
+
*/
|
|
1523
|
+
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1524
|
+
})(exports.ReinforcementTuningThinkingLevel || (exports.ReinforcementTuningThinkingLevel = {}));
|
|
1333
1525
|
/** Job state. */
|
|
1334
1526
|
exports.JobState = void 0;
|
|
1335
1527
|
(function (JobState) {
|
|
@@ -1814,58 +2006,6 @@ exports.ImageResizeMode = void 0;
|
|
|
1814
2006
|
*/
|
|
1815
2007
|
ImageResizeMode["PAD"] = "PAD";
|
|
1816
2008
|
})(exports.ImageResizeMode || (exports.ImageResizeMode = {}));
|
|
1817
|
-
/** Defines how to parse sample response. */
|
|
1818
|
-
exports.ResponseParseType = void 0;
|
|
1819
|
-
(function (ResponseParseType) {
|
|
1820
|
-
/**
|
|
1821
|
-
* Default value. This value is unused.
|
|
1822
|
-
*/
|
|
1823
|
-
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1824
|
-
/**
|
|
1825
|
-
* Use the sample response as is.
|
|
1826
|
-
*/
|
|
1827
|
-
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1828
|
-
/**
|
|
1829
|
-
* Use regex to extract the important part of sample response.
|
|
1830
|
-
*/
|
|
1831
|
-
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1832
|
-
})(exports.ResponseParseType || (exports.ResponseParseType = {}));
|
|
1833
|
-
/** Match operation to use for evaluation. */
|
|
1834
|
-
exports.MatchOperation = void 0;
|
|
1835
|
-
(function (MatchOperation) {
|
|
1836
|
-
/**
|
|
1837
|
-
* Default value. This value is unused.
|
|
1838
|
-
*/
|
|
1839
|
-
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1840
|
-
/**
|
|
1841
|
-
* Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
|
|
1842
|
-
*/
|
|
1843
|
-
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1844
|
-
/**
|
|
1845
|
-
* `expression` is a substring of target.
|
|
1846
|
-
*/
|
|
1847
|
-
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1848
|
-
/**
|
|
1849
|
-
* `expression` is an exact match of target.
|
|
1850
|
-
*/
|
|
1851
|
-
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1852
|
-
})(exports.MatchOperation || (exports.MatchOperation = {}));
|
|
1853
|
-
/** Represents how much to think for the tuning job. */
|
|
1854
|
-
exports.ReinforcementTuningThinkingLevel = void 0;
|
|
1855
|
-
(function (ReinforcementTuningThinkingLevel) {
|
|
1856
|
-
/**
|
|
1857
|
-
* Unspecified thinking level.
|
|
1858
|
-
*/
|
|
1859
|
-
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1860
|
-
/**
|
|
1861
|
-
* Little to no thinking.
|
|
1862
|
-
*/
|
|
1863
|
-
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1864
|
-
/**
|
|
1865
|
-
* High thinking level.
|
|
1866
|
-
*/
|
|
1867
|
-
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1868
|
-
})(exports.ReinforcementTuningThinkingLevel || (exports.ReinforcementTuningThinkingLevel = {}));
|
|
1869
2009
|
/** Enum representing the tuning method. */
|
|
1870
2010
|
exports.TuningMethod = void 0;
|
|
1871
2011
|
(function (TuningMethod) {
|
|
@@ -2662,6 +2802,21 @@ class ListModelsResponse {
|
|
|
2662
2802
|
}
|
|
2663
2803
|
class DeleteModelResponse {
|
|
2664
2804
|
}
|
|
2805
|
+
/** Configuration for audio-specific output formatting. */
|
|
2806
|
+
class AudioResponseFormat {
|
|
2807
|
+
}
|
|
2808
|
+
/** Configuration for image-specific output formatting. */
|
|
2809
|
+
class ImageResponseFormat {
|
|
2810
|
+
}
|
|
2811
|
+
/** Configuration for text-specific output formatting. */
|
|
2812
|
+
class TextResponseFormat {
|
|
2813
|
+
}
|
|
2814
|
+
/** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
|
|
2815
|
+
class VideoResponseFormat {
|
|
2816
|
+
}
|
|
2817
|
+
/** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
|
|
2818
|
+
class ResponseFormat {
|
|
2819
|
+
}
|
|
2665
2820
|
/** Response for counting tokens. */
|
|
2666
2821
|
class CountTokensResponse {
|
|
2667
2822
|
}
|
|
@@ -2690,10 +2845,10 @@ class GenerateVideosOperation {
|
|
|
2690
2845
|
return operation;
|
|
2691
2846
|
}
|
|
2692
2847
|
}
|
|
2693
|
-
/** Defines how to parse sample response for reinforcement tuning. */
|
|
2848
|
+
/** Defines how to parse sample response config for reinforcement tuning. The parsed response (i.e., substring) will be passed to the reward functions. For example, the input prompt might be: > "Perform step-by-step thoughts first to problem A, finally output answer in the <ans> </ans> block." The sample response from the model under tuning might look like: > "<ans>Yes</ans>" Here, users can define the following parse config: ``` { "parseType": "REGEX_EXTRACT", "regexExtractExpression": ".*(.*?)" } ``` The resulting parsed response would be `"Yes"` and will be passed to the reward functions for evaluating rewards. This data type is not supported in Gemini API. */
|
|
2694
2849
|
class ReinforcementTuningParseResponseConfig {
|
|
2695
2850
|
}
|
|
2696
|
-
/** Scores responses by directly converting parsed autorater response to float reward
|
|
2851
|
+
/** Scores responses by directly converting the parsed autorater response to a float reward. Note: Reward is clipped to be within `[-1, 1]`, i.e., `reward = max(min(reward, 1.0), -1.0)`. This data type is not supported in Gemini API. */
|
|
2697
2852
|
class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
|
|
2698
2853
|
}
|
|
2699
2854
|
/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
|
|
@@ -5133,6 +5288,9 @@ function toolToMldev$4(fromObject) {
|
|
|
5133
5288
|
}
|
|
5134
5289
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
5135
5290
|
}
|
|
5291
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
5292
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5293
|
+
}
|
|
5136
5294
|
return toObject;
|
|
5137
5295
|
}
|
|
5138
5296
|
function vertexMultimodalDatasetDestinationFromVertex(fromObject) {
|
|
@@ -5915,6 +6073,29 @@ function codeExecutionResultToVertex$3(fromObject) {
|
|
|
5915
6073
|
}
|
|
5916
6074
|
return toObject;
|
|
5917
6075
|
}
|
|
6076
|
+
function computerUseToVertex$2(fromObject) {
|
|
6077
|
+
const toObject = {};
|
|
6078
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6079
|
+
if (fromEnvironment != null) {
|
|
6080
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6081
|
+
}
|
|
6082
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6083
|
+
'excludedPredefinedFunctions',
|
|
6084
|
+
]);
|
|
6085
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
6086
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6087
|
+
}
|
|
6088
|
+
const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
|
|
6089
|
+
'enablePromptInjectionDetection',
|
|
6090
|
+
]);
|
|
6091
|
+
if (fromEnablePromptInjectionDetection != null) {
|
|
6092
|
+
setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
|
|
6093
|
+
}
|
|
6094
|
+
if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
|
|
6095
|
+
throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6096
|
+
}
|
|
6097
|
+
return toObject;
|
|
6098
|
+
}
|
|
5918
6099
|
function contentToMldev$3(fromObject) {
|
|
5919
6100
|
const toObject = {};
|
|
5920
6101
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -6580,6 +6761,9 @@ function toolToMldev$3(fromObject) {
|
|
|
6580
6761
|
}
|
|
6581
6762
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6582
6763
|
}
|
|
6764
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
6765
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6766
|
+
}
|
|
6583
6767
|
return toObject;
|
|
6584
6768
|
}
|
|
6585
6769
|
function toolToVertex$2(fromObject) {
|
|
@@ -6590,7 +6774,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6590
6774
|
}
|
|
6591
6775
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6592
6776
|
if (fromComputerUse != null) {
|
|
6593
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
6777
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
|
|
6594
6778
|
}
|
|
6595
6779
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
6596
6780
|
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
@@ -6653,6 +6837,10 @@ function toolToVertex$2(fromObject) {
|
|
|
6653
6837
|
}
|
|
6654
6838
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6655
6839
|
}
|
|
6840
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
6841
|
+
if (fromExaAiSearch != null) {
|
|
6842
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
6843
|
+
}
|
|
6656
6844
|
return toObject;
|
|
6657
6845
|
}
|
|
6658
6846
|
function updateCachedContentConfigToMldev(fromObject, parentObject) {
|
|
@@ -7741,7 +7929,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
7741
7929
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
7742
7930
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
7743
7931
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
7744
|
-
const SDK_VERSION = '2.
|
|
7932
|
+
const SDK_VERSION = '2.11.0'; // x-release-please-version
|
|
7745
7933
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
7746
7934
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
7747
7935
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -8750,7 +8938,7 @@ class Files extends BaseModule {
|
|
|
8750
8938
|
* file extension.
|
|
8751
8939
|
* - For Blob object inputs, the `mimeType` will be set to the Blob's `type`
|
|
8752
8940
|
* property.
|
|
8753
|
-
*
|
|
8941
|
+
* Some examples for file extension to mimeType mapping:
|
|
8754
8942
|
* .txt -> text/plain
|
|
8755
8943
|
* .json -> application/json
|
|
8756
8944
|
* .jpg -> image/jpeg
|
|
@@ -9606,17 +9794,14 @@ function env() {
|
|
|
9606
9794
|
* Populates global parameters with environment variables.
|
|
9607
9795
|
*/
|
|
9608
9796
|
function fillGlobals(options) {
|
|
9609
|
-
var _a, _b
|
|
9797
|
+
var _a, _b;
|
|
9610
9798
|
const clone = Object.assign({}, options);
|
|
9611
9799
|
const envVars = env();
|
|
9612
9800
|
if (typeof envVars.GOOGLE_GENAI_API_VERSION !== "undefined") {
|
|
9613
9801
|
(_a = clone.api_version) !== null && _a !== void 0 ? _a : (clone.api_version = envVars.GOOGLE_GENAI_API_VERSION);
|
|
9614
9802
|
}
|
|
9615
|
-
if (typeof envVars.GOOGLE_GENAI_API_REVISION !== "undefined") {
|
|
9616
|
-
(_b = clone.api_revision) !== null && _b !== void 0 ? _b : (clone.api_revision = envVars.GOOGLE_GENAI_API_REVISION);
|
|
9617
|
-
}
|
|
9618
9803
|
if (typeof envVars.GOOGLE_GENAI_USER_PROJECT !== "undefined") {
|
|
9619
|
-
(
|
|
9804
|
+
(_b = clone.user_project) !== null && _b !== void 0 ? _b : (clone.user_project = envVars.GOOGLE_GENAI_USER_PROJECT);
|
|
9620
9805
|
}
|
|
9621
9806
|
return clone;
|
|
9622
9807
|
}
|
|
@@ -9628,7 +9813,6 @@ function fillGlobals(options) {
|
|
|
9628
9813
|
*
|
|
9629
9814
|
* g3-prettier-ignore-file
|
|
9630
9815
|
*/
|
|
9631
|
-
const GOOGLE_GENAI_API_REVISION = "2026-05-20";
|
|
9632
9816
|
class GoogleGenAISecurityProvider {
|
|
9633
9817
|
constructor(options) {
|
|
9634
9818
|
this.options = options;
|
|
@@ -9646,7 +9830,6 @@ class GoogleGenAIAuthHook {
|
|
|
9646
9830
|
}
|
|
9647
9831
|
async beforeRequest(hookCtx, request) {
|
|
9648
9832
|
applyDefaultHeaders(request.headers, getStaticDefaultHeaders(hookCtx.security_source));
|
|
9649
|
-
applyApiRevision(hookCtx, request.headers);
|
|
9650
9833
|
applyUserProject(hookCtx, request.headers);
|
|
9651
9834
|
if (hasAuthHeaders(request.headers)) {
|
|
9652
9835
|
return request;
|
|
@@ -9726,12 +9909,6 @@ function applyDefaultHeaders(target, source) {
|
|
|
9726
9909
|
}
|
|
9727
9910
|
}
|
|
9728
9911
|
}
|
|
9729
|
-
function applyApiRevision(hookCtx, headers) {
|
|
9730
|
-
var _a;
|
|
9731
|
-
if (headers.get("api-revision") === null) {
|
|
9732
|
-
headers.set("Api-Revision", (_a = hookCtx.options.api_revision) !== null && _a !== void 0 ? _a : GOOGLE_GENAI_API_REVISION);
|
|
9733
|
-
}
|
|
9734
|
-
}
|
|
9735
9912
|
function applyUserProject(hookCtx, headers) {
|
|
9736
9913
|
if (hookCtx.options.user_project !== undefined &&
|
|
9737
9914
|
headers.get("x-goog-user-project") === null) {
|
|
@@ -10263,7 +10440,7 @@ function serverURLFromOptions(options) {
|
|
|
10263
10440
|
return new URL(u);
|
|
10264
10441
|
}
|
|
10265
10442
|
const SDK_METADATA = {
|
|
10266
|
-
userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.
|
|
10443
|
+
userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.913.3 v1beta @google/genai",
|
|
10267
10444
|
};
|
|
10268
10445
|
|
|
10269
10446
|
/**
|
|
@@ -13997,6 +14174,29 @@ function codeExecutionResultToVertex$2(fromObject) {
|
|
|
13997
14174
|
}
|
|
13998
14175
|
return toObject;
|
|
13999
14176
|
}
|
|
14177
|
+
function computerUseToVertex$1(fromObject) {
|
|
14178
|
+
const toObject = {};
|
|
14179
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
14180
|
+
if (fromEnvironment != null) {
|
|
14181
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
14182
|
+
}
|
|
14183
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
14184
|
+
'excludedPredefinedFunctions',
|
|
14185
|
+
]);
|
|
14186
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
14187
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
14188
|
+
}
|
|
14189
|
+
const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
|
|
14190
|
+
'enablePromptInjectionDetection',
|
|
14191
|
+
]);
|
|
14192
|
+
if (fromEnablePromptInjectionDetection != null) {
|
|
14193
|
+
setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
|
|
14194
|
+
}
|
|
14195
|
+
if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
|
|
14196
|
+
throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
14197
|
+
}
|
|
14198
|
+
return toObject;
|
|
14199
|
+
}
|
|
14000
14200
|
function contentToMldev$2(fromObject) {
|
|
14001
14201
|
const toObject = {};
|
|
14002
14202
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -14181,7 +14381,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
14181
14381
|
}
|
|
14182
14382
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
14183
14383
|
if (fromSpeechConfig != null) {
|
|
14184
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
14384
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
|
|
14185
14385
|
}
|
|
14186
14386
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
14187
14387
|
'stopSequences',
|
|
@@ -14211,6 +14411,21 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
14211
14411
|
undefined) {
|
|
14212
14412
|
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
14213
14413
|
}
|
|
14414
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
14415
|
+
'responseFormat',
|
|
14416
|
+
]);
|
|
14417
|
+
if (fromResponseFormat != null) {
|
|
14418
|
+
let transformedList = fromResponseFormat;
|
|
14419
|
+
if (Array.isArray(transformedList)) {
|
|
14420
|
+
transformedList = transformedList.map((item) => {
|
|
14421
|
+
return item;
|
|
14422
|
+
});
|
|
14423
|
+
}
|
|
14424
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
14425
|
+
}
|
|
14426
|
+
if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
|
|
14427
|
+
throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
14428
|
+
}
|
|
14214
14429
|
return toObject;
|
|
14215
14430
|
}
|
|
14216
14431
|
function googleMapsToMldev$2(fromObject) {
|
|
@@ -14424,7 +14639,7 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
14424
14639
|
}
|
|
14425
14640
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
14426
14641
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
14427
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
|
|
14642
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
14428
14643
|
}
|
|
14429
14644
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
14430
14645
|
'thinkingConfig',
|
|
@@ -14713,6 +14928,22 @@ function mcpServerToVertex$1(fromObject) {
|
|
|
14713
14928
|
}
|
|
14714
14929
|
return toObject;
|
|
14715
14930
|
}
|
|
14931
|
+
function multiSpeakerVoiceConfigToVertex$1(fromObject) {
|
|
14932
|
+
const toObject = {};
|
|
14933
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
14934
|
+
'speakerVoiceConfigs',
|
|
14935
|
+
]);
|
|
14936
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
14937
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
14938
|
+
if (Array.isArray(transformedList)) {
|
|
14939
|
+
transformedList = transformedList.map((item) => {
|
|
14940
|
+
return speakerVoiceConfigToVertex$1(item);
|
|
14941
|
+
});
|
|
14942
|
+
}
|
|
14943
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
14944
|
+
}
|
|
14945
|
+
return toObject;
|
|
14946
|
+
}
|
|
14716
14947
|
function partToMldev$2(fromObject) {
|
|
14717
14948
|
const toObject = {};
|
|
14718
14949
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -14854,6 +15085,26 @@ function partToVertex$2(fromObject) {
|
|
|
14854
15085
|
}
|
|
14855
15086
|
return toObject;
|
|
14856
15087
|
}
|
|
15088
|
+
function replicatedVoiceConfigToVertex$1(fromObject) {
|
|
15089
|
+
const toObject = {};
|
|
15090
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
15091
|
+
if (fromMimeType != null) {
|
|
15092
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
15093
|
+
}
|
|
15094
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
15095
|
+
'voiceSampleAudio',
|
|
15096
|
+
]);
|
|
15097
|
+
if (fromVoiceSampleAudio != null) {
|
|
15098
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
15099
|
+
}
|
|
15100
|
+
if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
|
|
15101
|
+
throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15102
|
+
}
|
|
15103
|
+
if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
|
|
15104
|
+
throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15105
|
+
}
|
|
15106
|
+
return toObject;
|
|
15107
|
+
}
|
|
14857
15108
|
function safetySettingToMldev$2(fromObject) {
|
|
14858
15109
|
const toObject = {};
|
|
14859
15110
|
const fromCategory = getValueByPath(fromObject, ['category']);
|
|
@@ -14880,6 +15131,36 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
14880
15131
|
}
|
|
14881
15132
|
return toObject;
|
|
14882
15133
|
}
|
|
15134
|
+
function speakerVoiceConfigToVertex$1(fromObject) {
|
|
15135
|
+
const toObject = {};
|
|
15136
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
15137
|
+
if (fromSpeaker != null) {
|
|
15138
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
15139
|
+
}
|
|
15140
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
15141
|
+
if (fromVoiceConfig != null) {
|
|
15142
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
15143
|
+
}
|
|
15144
|
+
return toObject;
|
|
15145
|
+
}
|
|
15146
|
+
function speechConfigToVertex$1(fromObject) {
|
|
15147
|
+
const toObject = {};
|
|
15148
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
15149
|
+
if (fromVoiceConfig != null) {
|
|
15150
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
15151
|
+
}
|
|
15152
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
15153
|
+
if (fromLanguageCode != null) {
|
|
15154
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
15155
|
+
}
|
|
15156
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
15157
|
+
'multiSpeakerVoiceConfig',
|
|
15158
|
+
]);
|
|
15159
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
15160
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
|
|
15161
|
+
}
|
|
15162
|
+
return toObject;
|
|
15163
|
+
}
|
|
14883
15164
|
function toolToMldev$2(fromObject) {
|
|
14884
15165
|
const toObject = {};
|
|
14885
15166
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
@@ -14945,6 +15226,9 @@ function toolToMldev$2(fromObject) {
|
|
|
14945
15226
|
}
|
|
14946
15227
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
14947
15228
|
}
|
|
15229
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
15230
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
15231
|
+
}
|
|
14948
15232
|
return toObject;
|
|
14949
15233
|
}
|
|
14950
15234
|
function toolToVertex$1(fromObject) {
|
|
@@ -14955,7 +15239,7 @@ function toolToVertex$1(fromObject) {
|
|
|
14955
15239
|
}
|
|
14956
15240
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
14957
15241
|
if (fromComputerUse != null) {
|
|
14958
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
15242
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
|
|
14959
15243
|
}
|
|
14960
15244
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
14961
15245
|
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
@@ -15018,6 +15302,10 @@ function toolToVertex$1(fromObject) {
|
|
|
15018
15302
|
}
|
|
15019
15303
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
15020
15304
|
}
|
|
15305
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
15306
|
+
if (fromExaAiSearch != null) {
|
|
15307
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
15308
|
+
}
|
|
15021
15309
|
return toObject;
|
|
15022
15310
|
}
|
|
15023
15311
|
function usageMetadataFromVertex(fromObject) {
|
|
@@ -15124,6 +15412,22 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
15124
15412
|
}
|
|
15125
15413
|
return toObject;
|
|
15126
15414
|
}
|
|
15415
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
15416
|
+
const toObject = {};
|
|
15417
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
15418
|
+
'replicatedVoiceConfig',
|
|
15419
|
+
]);
|
|
15420
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
15421
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
|
|
15422
|
+
}
|
|
15423
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
15424
|
+
'prebuiltVoiceConfig',
|
|
15425
|
+
]);
|
|
15426
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
15427
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
15428
|
+
}
|
|
15429
|
+
return toObject;
|
|
15430
|
+
}
|
|
15127
15431
|
|
|
15128
15432
|
/**
|
|
15129
15433
|
* @license
|
|
@@ -15299,6 +15603,29 @@ function computeTokensResponseFromVertex(fromObject, _rootObject) {
|
|
|
15299
15603
|
}
|
|
15300
15604
|
return toObject;
|
|
15301
15605
|
}
|
|
15606
|
+
function computerUseToVertex(fromObject, _rootObject) {
|
|
15607
|
+
const toObject = {};
|
|
15608
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
15609
|
+
if (fromEnvironment != null) {
|
|
15610
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
15611
|
+
}
|
|
15612
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
15613
|
+
'excludedPredefinedFunctions',
|
|
15614
|
+
]);
|
|
15615
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
15616
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
15617
|
+
}
|
|
15618
|
+
const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
|
|
15619
|
+
'enablePromptInjectionDetection',
|
|
15620
|
+
]);
|
|
15621
|
+
if (fromEnablePromptInjectionDetection != null) {
|
|
15622
|
+
setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
|
|
15623
|
+
}
|
|
15624
|
+
if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
|
|
15625
|
+
throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
15626
|
+
}
|
|
15627
|
+
return toObject;
|
|
15628
|
+
}
|
|
15302
15629
|
function contentEmbeddingFromVertex(fromObject, rootObject) {
|
|
15303
15630
|
const toObject = {};
|
|
15304
15631
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -16354,7 +16681,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
16354
16681
|
}
|
|
16355
16682
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
16356
16683
|
if (fromSpeechConfig != null) {
|
|
16357
|
-
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
16684
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
|
|
16358
16685
|
}
|
|
16359
16686
|
const fromAudioTimestamp = getValueByPath(fromObject, [
|
|
16360
16687
|
'audioTimestamp',
|
|
@@ -17241,7 +17568,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
17241
17568
|
}
|
|
17242
17569
|
return toObject;
|
|
17243
17570
|
}
|
|
17244
|
-
function generationConfigToVertex(fromObject,
|
|
17571
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
17245
17572
|
const toObject = {};
|
|
17246
17573
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
17247
17574
|
'modelSelectionConfig',
|
|
@@ -17337,7 +17664,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
17337
17664
|
}
|
|
17338
17665
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
17339
17666
|
if (fromSpeechConfig != null) {
|
|
17340
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
17667
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
17341
17668
|
}
|
|
17342
17669
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
17343
17670
|
'stopSequences',
|
|
@@ -17367,6 +17694,21 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
17367
17694
|
undefined) {
|
|
17368
17695
|
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
17369
17696
|
}
|
|
17697
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
17698
|
+
'responseFormat',
|
|
17699
|
+
]);
|
|
17700
|
+
if (fromResponseFormat != null) {
|
|
17701
|
+
let transformedList = fromResponseFormat;
|
|
17702
|
+
if (Array.isArray(transformedList)) {
|
|
17703
|
+
transformedList = transformedList.map((item) => {
|
|
17704
|
+
return item;
|
|
17705
|
+
});
|
|
17706
|
+
}
|
|
17707
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
17708
|
+
}
|
|
17709
|
+
if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
|
|
17710
|
+
throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
17711
|
+
}
|
|
17370
17712
|
return toObject;
|
|
17371
17713
|
}
|
|
17372
17714
|
function getModelParametersToMldev(apiClient, fromObject, _rootObject) {
|
|
@@ -17804,6 +18146,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
17804
18146
|
}
|
|
17805
18147
|
return toObject;
|
|
17806
18148
|
}
|
|
18149
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
18150
|
+
const toObject = {};
|
|
18151
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
18152
|
+
'speakerVoiceConfigs',
|
|
18153
|
+
]);
|
|
18154
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
18155
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
18156
|
+
if (Array.isArray(transformedList)) {
|
|
18157
|
+
transformedList = transformedList.map((item) => {
|
|
18158
|
+
return speakerVoiceConfigToVertex(item);
|
|
18159
|
+
});
|
|
18160
|
+
}
|
|
18161
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
18162
|
+
}
|
|
18163
|
+
return toObject;
|
|
18164
|
+
}
|
|
17807
18165
|
function partToMldev$1(fromObject, rootObject) {
|
|
17808
18166
|
const toObject = {};
|
|
17809
18167
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -18113,6 +18471,26 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
18113
18471
|
}
|
|
18114
18472
|
return toObject;
|
|
18115
18473
|
}
|
|
18474
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
18475
|
+
const toObject = {};
|
|
18476
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
18477
|
+
if (fromMimeType != null) {
|
|
18478
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
18479
|
+
}
|
|
18480
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
18481
|
+
'voiceSampleAudio',
|
|
18482
|
+
]);
|
|
18483
|
+
if (fromVoiceSampleAudio != null) {
|
|
18484
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
18485
|
+
}
|
|
18486
|
+
if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
|
|
18487
|
+
throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
18488
|
+
}
|
|
18489
|
+
if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
|
|
18490
|
+
throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
18491
|
+
}
|
|
18492
|
+
return toObject;
|
|
18493
|
+
}
|
|
18116
18494
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
18117
18495
|
const toObject = {};
|
|
18118
18496
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -18262,6 +18640,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
18262
18640
|
}
|
|
18263
18641
|
return toObject;
|
|
18264
18642
|
}
|
|
18643
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
18644
|
+
const toObject = {};
|
|
18645
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
18646
|
+
if (fromSpeaker != null) {
|
|
18647
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
18648
|
+
}
|
|
18649
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
18650
|
+
if (fromVoiceConfig != null) {
|
|
18651
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
18652
|
+
}
|
|
18653
|
+
return toObject;
|
|
18654
|
+
}
|
|
18655
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
18656
|
+
const toObject = {};
|
|
18657
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
18658
|
+
if (fromVoiceConfig != null) {
|
|
18659
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
18660
|
+
}
|
|
18661
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
18662
|
+
if (fromLanguageCode != null) {
|
|
18663
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
18664
|
+
}
|
|
18665
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
18666
|
+
'multiSpeakerVoiceConfig',
|
|
18667
|
+
]);
|
|
18668
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
18669
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
18670
|
+
}
|
|
18671
|
+
return toObject;
|
|
18672
|
+
}
|
|
18265
18673
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
18266
18674
|
const toObject = {};
|
|
18267
18675
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -18367,6 +18775,9 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
18367
18775
|
}
|
|
18368
18776
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
18369
18777
|
}
|
|
18778
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
18779
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
18780
|
+
}
|
|
18370
18781
|
return toObject;
|
|
18371
18782
|
}
|
|
18372
18783
|
function toolToVertex(fromObject, rootObject) {
|
|
@@ -18377,7 +18788,7 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
18377
18788
|
}
|
|
18378
18789
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
18379
18790
|
if (fromComputerUse != null) {
|
|
18380
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
18791
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
|
|
18381
18792
|
}
|
|
18382
18793
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
18383
18794
|
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
@@ -18440,6 +18851,10 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
18440
18851
|
}
|
|
18441
18852
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
18442
18853
|
}
|
|
18854
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
18855
|
+
if (fromExaAiSearch != null) {
|
|
18856
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
18857
|
+
}
|
|
18443
18858
|
return toObject;
|
|
18444
18859
|
}
|
|
18445
18860
|
function tunedModelInfoFromMldev(fromObject, _rootObject) {
|
|
@@ -18751,6 +19166,22 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
18751
19166
|
}
|
|
18752
19167
|
return toObject;
|
|
18753
19168
|
}
|
|
19169
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
19170
|
+
const toObject = {};
|
|
19171
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
19172
|
+
'replicatedVoiceConfig',
|
|
19173
|
+
]);
|
|
19174
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
19175
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
19176
|
+
}
|
|
19177
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
19178
|
+
'prebuiltVoiceConfig',
|
|
19179
|
+
]);
|
|
19180
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
19181
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
19182
|
+
}
|
|
19183
|
+
return toObject;
|
|
19184
|
+
}
|
|
18754
19185
|
|
|
18755
19186
|
/**
|
|
18756
19187
|
* @license
|
|
@@ -19313,10 +19744,27 @@ class Live {
|
|
|
19313
19744
|
onopenResolve({});
|
|
19314
19745
|
};
|
|
19315
19746
|
const apiClient = this.apiClient;
|
|
19747
|
+
let sessionResolved = false;
|
|
19748
|
+
const messageQueue = [];
|
|
19749
|
+
let setupCompleteResolve = () => { };
|
|
19750
|
+
const setupCompletePromise = new Promise((resolve) => {
|
|
19751
|
+
setupCompleteResolve = resolve;
|
|
19752
|
+
});
|
|
19316
19753
|
const websocketCallbacks = {
|
|
19317
19754
|
onopen: onopenAwaitedCallback,
|
|
19318
19755
|
onmessage: (event) => {
|
|
19319
|
-
void handleWebSocketMessage(apiClient,
|
|
19756
|
+
void handleWebSocketMessage(apiClient, (msg) => {
|
|
19757
|
+
if (msg.setupComplete && !session.setupComplete) {
|
|
19758
|
+
session.setupComplete = msg.setupComplete;
|
|
19759
|
+
setupCompleteResolve({});
|
|
19760
|
+
}
|
|
19761
|
+
if (sessionResolved) {
|
|
19762
|
+
callbacks.onmessage(msg);
|
|
19763
|
+
}
|
|
19764
|
+
else {
|
|
19765
|
+
messageQueue.push(msg);
|
|
19766
|
+
}
|
|
19767
|
+
}, event);
|
|
19320
19768
|
},
|
|
19321
19769
|
onerror: (_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onerror) !== null && _a !== void 0 ? _a : function (e) {
|
|
19322
19770
|
},
|
|
@@ -19378,8 +19826,14 @@ class Live {
|
|
|
19378
19826
|
clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters);
|
|
19379
19827
|
}
|
|
19380
19828
|
delete clientMessage['config'];
|
|
19829
|
+
const session = new Session(conn, this.apiClient);
|
|
19381
19830
|
conn.send(JSON.stringify(clientMessage));
|
|
19382
|
-
|
|
19831
|
+
await setupCompletePromise;
|
|
19832
|
+
sessionResolved = true;
|
|
19833
|
+
for (const msg of messageQueue) {
|
|
19834
|
+
callbacks.onmessage(msg);
|
|
19835
|
+
}
|
|
19836
|
+
return session;
|
|
19383
19837
|
}
|
|
19384
19838
|
// TODO: b/416041229 - Abstract this method to a common place.
|
|
19385
19839
|
isCallableTool(tool) {
|
|
@@ -19773,7 +20227,7 @@ class Models extends BaseModule {
|
|
|
19773
20227
|
this.generateContent = async (params) => {
|
|
19774
20228
|
var _a, _b, _c, _d, _e;
|
|
19775
20229
|
const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
|
|
19776
|
-
this.
|
|
20230
|
+
this.maybeMoveToResponseJsonSchema(params);
|
|
19777
20231
|
if (!hasCallableTools(params) || shouldDisableAfc(params.config)) {
|
|
19778
20232
|
return await this.generateContentInternal(transformedParams);
|
|
19779
20233
|
}
|
|
@@ -19865,7 +20319,7 @@ class Models extends BaseModule {
|
|
|
19865
20319
|
*/
|
|
19866
20320
|
this.generateContentStream = async (params) => {
|
|
19867
20321
|
var _a, _b, _c, _d, _e;
|
|
19868
|
-
this.
|
|
20322
|
+
this.maybeMoveToResponseJsonSchema(params);
|
|
19869
20323
|
if (shouldDisableAfc(params.config)) {
|
|
19870
20324
|
const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
|
|
19871
20325
|
return await this.generateContentStreamInternal(transformedParams);
|
|
@@ -20090,7 +20544,7 @@ class Models extends BaseModule {
|
|
|
20090
20544
|
* To maintain backward compatibility, we move the data that was treated as
|
|
20091
20545
|
* JSON schema from the responseSchema field to the responseJsonSchema field.
|
|
20092
20546
|
*/
|
|
20093
|
-
|
|
20547
|
+
maybeMoveToResponseJsonSchema(params) {
|
|
20094
20548
|
if (params.config && params.config.responseSchema) {
|
|
20095
20549
|
if (!params.config.responseJsonSchema) {
|
|
20096
20550
|
if (Object.keys(params.config.responseSchema).includes('$schema')) {
|
|
@@ -20192,7 +20646,7 @@ class Models extends BaseModule {
|
|
|
20192
20646
|
throw new Error('Function call name was not returned by the model.');
|
|
20193
20647
|
}
|
|
20194
20648
|
if (!afcTools.has(part.functionCall.name)) {
|
|
20195
|
-
throw new Error(`Automatic function calling was requested, but not all the tools the model used implement the CallableTool interface. Available tools: ${afcTools.keys()},
|
|
20649
|
+
throw new Error(`Automatic function calling was requested, but not all the tools the model used implement the CallableTool interface. Available tools: ${afcTools.keys()}, missing tool: ${part.functionCall.name}`);
|
|
20196
20650
|
}
|
|
20197
20651
|
else {
|
|
20198
20652
|
const responseParts = yield __await(afcTools
|
|
@@ -21908,6 +22362,9 @@ function toolToMldev(fromObject) {
|
|
|
21908
22362
|
}
|
|
21909
22363
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
21910
22364
|
}
|
|
22365
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
22366
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
22367
|
+
}
|
|
21911
22368
|
return toObject;
|
|
21912
22369
|
}
|
|
21913
22370
|
|
|
@@ -23002,6 +23459,18 @@ function generationConfigFromVertex(fromObject, _rootObject) {
|
|
|
23002
23459
|
if (fromTopP != null) {
|
|
23003
23460
|
setValueByPath(toObject, ['topP'], fromTopP);
|
|
23004
23461
|
}
|
|
23462
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
23463
|
+
'responseFormat',
|
|
23464
|
+
]);
|
|
23465
|
+
if (fromResponseFormat != null) {
|
|
23466
|
+
let transformedList = fromResponseFormat;
|
|
23467
|
+
if (Array.isArray(transformedList)) {
|
|
23468
|
+
transformedList = transformedList.map((item) => {
|
|
23469
|
+
return item;
|
|
23470
|
+
});
|
|
23471
|
+
}
|
|
23472
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
23473
|
+
}
|
|
23005
23474
|
return toObject;
|
|
23006
23475
|
}
|
|
23007
23476
|
function getTuningJobParametersToMldev(fromObject, _rootObject) {
|
|
@@ -24126,6 +24595,7 @@ class GoogleGenAI {
|
|
|
24126
24595
|
}
|
|
24127
24596
|
|
|
24128
24597
|
exports.ApiError = ApiError;
|
|
24598
|
+
exports.AudioResponseFormat = AudioResponseFormat;
|
|
24129
24599
|
exports.Batches = Batches;
|
|
24130
24600
|
exports.Caches = Caches;
|
|
24131
24601
|
exports.CancelTuningJobResponse = CancelTuningJobResponse;
|
|
@@ -24155,6 +24625,7 @@ exports.GenerateVideosOperation = GenerateVideosOperation;
|
|
|
24155
24625
|
exports.GenerateVideosResponse = GenerateVideosResponse;
|
|
24156
24626
|
exports.GoogleGenAI = GoogleGenAI;
|
|
24157
24627
|
exports.HttpResponse = HttpResponse;
|
|
24628
|
+
exports.ImageResponseFormat = ImageResponseFormat;
|
|
24158
24629
|
exports.ImportFileOperation = ImportFileOperation;
|
|
24159
24630
|
exports.ImportFileResponse = ImportFileResponse;
|
|
24160
24631
|
exports.InlinedEmbedContentResponse = InlinedEmbedContentResponse;
|
|
@@ -24181,11 +24652,13 @@ exports.RegisterFilesResponse = RegisterFilesResponse;
|
|
|
24181
24652
|
exports.ReinforcementTuningAutoraterScorerParsedResponseConversionScorer = ReinforcementTuningAutoraterScorerParsedResponseConversionScorer;
|
|
24182
24653
|
exports.ReinforcementTuningParseResponseConfig = ReinforcementTuningParseResponseConfig;
|
|
24183
24654
|
exports.ReplayResponse = ReplayResponse;
|
|
24655
|
+
exports.ResponseFormat = ResponseFormat;
|
|
24184
24656
|
exports.SegmentImageResponse = SegmentImageResponse;
|
|
24185
24657
|
exports.Session = Session;
|
|
24186
24658
|
exports.SingleEmbedContentResponse = SingleEmbedContentResponse;
|
|
24187
24659
|
exports.StyleReferenceImage = StyleReferenceImage;
|
|
24188
24660
|
exports.SubjectReferenceImage = SubjectReferenceImage;
|
|
24661
|
+
exports.TextResponseFormat = TextResponseFormat;
|
|
24189
24662
|
exports.Tokens = Tokens;
|
|
24190
24663
|
exports.ToolResponse = ToolResponse;
|
|
24191
24664
|
exports.UploadToFileSearchStoreOperation = UploadToFileSearchStoreOperation;
|
|
@@ -24193,6 +24666,7 @@ exports.UploadToFileSearchStoreResponse = UploadToFileSearchStoreResponse;
|
|
|
24193
24666
|
exports.UploadToFileSearchStoreResumableResponse = UploadToFileSearchStoreResumableResponse;
|
|
24194
24667
|
exports.UpscaleImageResponse = UpscaleImageResponse;
|
|
24195
24668
|
exports.ValidateRewardResponse = ValidateRewardResponse;
|
|
24669
|
+
exports.VideoResponseFormat = VideoResponseFormat;
|
|
24196
24670
|
exports.createFunctionResponsePartFromBase64 = createFunctionResponsePartFromBase64;
|
|
24197
24671
|
exports.createFunctionResponsePartFromUri = createFunctionResponsePartFromUri;
|
|
24198
24672
|
exports.createModelContent = createModelContent;
|