@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/node/index.cjs
CHANGED
|
@@ -704,26 +704,6 @@ exports.Type = void 0;
|
|
|
704
704
|
*/
|
|
705
705
|
Type["NULL"] = "NULL";
|
|
706
706
|
})(exports.Type || (exports.Type = {}));
|
|
707
|
-
/** The environment being operated. */
|
|
708
|
-
exports.Environment = void 0;
|
|
709
|
-
(function (Environment) {
|
|
710
|
-
/**
|
|
711
|
-
* Defaults to browser.
|
|
712
|
-
*/
|
|
713
|
-
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
714
|
-
/**
|
|
715
|
-
* Operates in a web browser.
|
|
716
|
-
*/
|
|
717
|
-
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
718
|
-
/**
|
|
719
|
-
* Operates in a mobile environment.
|
|
720
|
-
*/
|
|
721
|
-
Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
|
|
722
|
-
/**
|
|
723
|
-
* Operates in a desktop environment.
|
|
724
|
-
*/
|
|
725
|
-
Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
|
|
726
|
-
})(exports.Environment || (exports.Environment = {}));
|
|
727
707
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
728
708
|
exports.AuthType = void 0;
|
|
729
709
|
(function (AuthType) {
|
|
@@ -794,6 +774,62 @@ exports.ApiSpec = void 0;
|
|
|
794
774
|
*/
|
|
795
775
|
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
796
776
|
})(exports.ApiSpec || (exports.ApiSpec = {}));
|
|
777
|
+
/** The environment being operated. */
|
|
778
|
+
exports.Environment = void 0;
|
|
779
|
+
(function (Environment) {
|
|
780
|
+
/**
|
|
781
|
+
* Defaults to browser.
|
|
782
|
+
*/
|
|
783
|
+
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
784
|
+
/**
|
|
785
|
+
* Operates in a web browser.
|
|
786
|
+
*/
|
|
787
|
+
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
788
|
+
/**
|
|
789
|
+
* Operates in a mobile environment.
|
|
790
|
+
*/
|
|
791
|
+
Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
|
|
792
|
+
/**
|
|
793
|
+
* Operates in a desktop environment.
|
|
794
|
+
*/
|
|
795
|
+
Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
|
|
796
|
+
})(exports.Environment || (exports.Environment = {}));
|
|
797
|
+
/** SafetyPolicy */
|
|
798
|
+
exports.SafetyPolicy = void 0;
|
|
799
|
+
(function (SafetyPolicy) {
|
|
800
|
+
/**
|
|
801
|
+
* Unspecified safety policy.
|
|
802
|
+
*/
|
|
803
|
+
SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
|
|
804
|
+
/**
|
|
805
|
+
* Safety policy for financial transactions.
|
|
806
|
+
*/
|
|
807
|
+
SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
|
|
808
|
+
/**
|
|
809
|
+
* Safety policy for sensitive data modification.
|
|
810
|
+
*/
|
|
811
|
+
SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
|
|
812
|
+
/**
|
|
813
|
+
* Safety policy for communication tools (e.g. Gmail, Chat, Meet).
|
|
814
|
+
*/
|
|
815
|
+
SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
|
|
816
|
+
/**
|
|
817
|
+
* Safety policy for account creation.
|
|
818
|
+
*/
|
|
819
|
+
SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
|
|
820
|
+
/**
|
|
821
|
+
* Safety policy for data modification.
|
|
822
|
+
*/
|
|
823
|
+
SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
|
|
824
|
+
/**
|
|
825
|
+
* Safety policy for user consent management.
|
|
826
|
+
*/
|
|
827
|
+
SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
|
|
828
|
+
/**
|
|
829
|
+
* Safety policy for legal terms and agreements.
|
|
830
|
+
*/
|
|
831
|
+
SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
|
|
832
|
+
})(exports.SafetyPolicy || (exports.SafetyPolicy = {}));
|
|
797
833
|
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
798
834
|
exports.PhishBlockThreshold = void 0;
|
|
799
835
|
(function (PhishBlockThreshold) {
|
|
@@ -826,7 +862,7 @@ exports.PhishBlockThreshold = void 0;
|
|
|
826
862
|
*/
|
|
827
863
|
PhishBlockThreshold["BLOCK_ONLY_EXTREMELY_HIGH"] = "BLOCK_ONLY_EXTREMELY_HIGH";
|
|
828
864
|
})(exports.PhishBlockThreshold || (exports.PhishBlockThreshold = {}));
|
|
829
|
-
/** Specifies the function Behavior.
|
|
865
|
+
/** 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. */
|
|
830
866
|
exports.Behavior = void 0;
|
|
831
867
|
(function (Behavior) {
|
|
832
868
|
/**
|
|
@@ -1340,6 +1376,110 @@ exports.Modality = void 0;
|
|
|
1340
1376
|
*/
|
|
1341
1377
|
Modality["VIDEO"] = "VIDEO";
|
|
1342
1378
|
})(exports.Modality || (exports.Modality = {}));
|
|
1379
|
+
/** Delivery mode for the generated content. */
|
|
1380
|
+
exports.Delivery = void 0;
|
|
1381
|
+
(function (Delivery) {
|
|
1382
|
+
/**
|
|
1383
|
+
* Default value. This value is unused.
|
|
1384
|
+
*/
|
|
1385
|
+
Delivery["DELIVERY_UNSPECIFIED"] = "DELIVERY_UNSPECIFIED";
|
|
1386
|
+
/**
|
|
1387
|
+
* Generated bytes are returned inline in the response.
|
|
1388
|
+
*/
|
|
1389
|
+
Delivery["INLINE"] = "INLINE";
|
|
1390
|
+
/**
|
|
1391
|
+
* Generated content is stored and a URI is returned.
|
|
1392
|
+
*/
|
|
1393
|
+
Delivery["URI"] = "URI";
|
|
1394
|
+
})(exports.Delivery || (exports.Delivery = {}));
|
|
1395
|
+
/** The aspect ratio for the image output. */
|
|
1396
|
+
exports.AspectRatio = void 0;
|
|
1397
|
+
(function (AspectRatio) {
|
|
1398
|
+
/**
|
|
1399
|
+
* Default value. This value is unused.
|
|
1400
|
+
*/
|
|
1401
|
+
AspectRatio["ASPECT_RATIO_UNSPECIFIED"] = "ASPECT_RATIO_UNSPECIFIED";
|
|
1402
|
+
/**
|
|
1403
|
+
* 1:1 aspect ratio.
|
|
1404
|
+
*/
|
|
1405
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_ONE"] = "ASPECT_RATIO_ONE_BY_ONE";
|
|
1406
|
+
/**
|
|
1407
|
+
* 2:3 aspect ratio.
|
|
1408
|
+
*/
|
|
1409
|
+
AspectRatio["ASPECT_RATIO_TWO_BY_THREE"] = "ASPECT_RATIO_TWO_BY_THREE";
|
|
1410
|
+
/**
|
|
1411
|
+
* 3:2 aspect ratio.
|
|
1412
|
+
*/
|
|
1413
|
+
AspectRatio["ASPECT_RATIO_THREE_BY_TWO"] = "ASPECT_RATIO_THREE_BY_TWO";
|
|
1414
|
+
/**
|
|
1415
|
+
* 3:4 aspect ratio.
|
|
1416
|
+
*/
|
|
1417
|
+
AspectRatio["ASPECT_RATIO_THREE_BY_FOUR"] = "ASPECT_RATIO_THREE_BY_FOUR";
|
|
1418
|
+
/**
|
|
1419
|
+
* 4:3 aspect ratio.
|
|
1420
|
+
*/
|
|
1421
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_THREE"] = "ASPECT_RATIO_FOUR_BY_THREE";
|
|
1422
|
+
/**
|
|
1423
|
+
* 4:5 aspect ratio.
|
|
1424
|
+
*/
|
|
1425
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_FIVE"] = "ASPECT_RATIO_FOUR_BY_FIVE";
|
|
1426
|
+
/**
|
|
1427
|
+
* 5:4 aspect ratio.
|
|
1428
|
+
*/
|
|
1429
|
+
AspectRatio["ASPECT_RATIO_FIVE_BY_FOUR"] = "ASPECT_RATIO_FIVE_BY_FOUR";
|
|
1430
|
+
/**
|
|
1431
|
+
* 9:16 aspect ratio.
|
|
1432
|
+
*/
|
|
1433
|
+
AspectRatio["ASPECT_RATIO_NINE_BY_SIXTEEN"] = "ASPECT_RATIO_NINE_BY_SIXTEEN";
|
|
1434
|
+
/**
|
|
1435
|
+
* 16:9 aspect ratio.
|
|
1436
|
+
*/
|
|
1437
|
+
AspectRatio["ASPECT_RATIO_SIXTEEN_BY_NINE"] = "ASPECT_RATIO_SIXTEEN_BY_NINE";
|
|
1438
|
+
/**
|
|
1439
|
+
* 21:9 aspect ratio.
|
|
1440
|
+
*/
|
|
1441
|
+
AspectRatio["ASPECT_RATIO_TWENTY_ONE_BY_NINE"] = "ASPECT_RATIO_TWENTY_ONE_BY_NINE";
|
|
1442
|
+
/**
|
|
1443
|
+
* 1:8 aspect ratio.
|
|
1444
|
+
*/
|
|
1445
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_EIGHT"] = "ASPECT_RATIO_ONE_BY_EIGHT";
|
|
1446
|
+
/**
|
|
1447
|
+
* 8:1 aspect ratio.
|
|
1448
|
+
*/
|
|
1449
|
+
AspectRatio["ASPECT_RATIO_EIGHT_BY_ONE"] = "ASPECT_RATIO_EIGHT_BY_ONE";
|
|
1450
|
+
/**
|
|
1451
|
+
* 1:4 aspect ratio.
|
|
1452
|
+
*/
|
|
1453
|
+
AspectRatio["ASPECT_RATIO_ONE_BY_FOUR"] = "ASPECT_RATIO_ONE_BY_FOUR";
|
|
1454
|
+
/**
|
|
1455
|
+
* 4:1 aspect ratio.
|
|
1456
|
+
*/
|
|
1457
|
+
AspectRatio["ASPECT_RATIO_FOUR_BY_ONE"] = "ASPECT_RATIO_FOUR_BY_ONE";
|
|
1458
|
+
})(exports.AspectRatio || (exports.AspectRatio = {}));
|
|
1459
|
+
/** The size of the image output. */
|
|
1460
|
+
exports.ImageSize = void 0;
|
|
1461
|
+
(function (ImageSize) {
|
|
1462
|
+
/**
|
|
1463
|
+
* Default value. This value is unused.
|
|
1464
|
+
*/
|
|
1465
|
+
ImageSize["IMAGE_SIZE_UNSPECIFIED"] = "IMAGE_SIZE_UNSPECIFIED";
|
|
1466
|
+
/**
|
|
1467
|
+
* 512px image size.
|
|
1468
|
+
*/
|
|
1469
|
+
ImageSize["IMAGE_SIZE_FIVE_TWELVE"] = "IMAGE_SIZE_FIVE_TWELVE";
|
|
1470
|
+
/**
|
|
1471
|
+
* 1K image size.
|
|
1472
|
+
*/
|
|
1473
|
+
ImageSize["IMAGE_SIZE_ONE_K"] = "IMAGE_SIZE_ONE_K";
|
|
1474
|
+
/**
|
|
1475
|
+
* 2K image size.
|
|
1476
|
+
*/
|
|
1477
|
+
ImageSize["IMAGE_SIZE_TWO_K"] = "IMAGE_SIZE_TWO_K";
|
|
1478
|
+
/**
|
|
1479
|
+
* 4K image size.
|
|
1480
|
+
*/
|
|
1481
|
+
ImageSize["IMAGE_SIZE_FOUR_K"] = "IMAGE_SIZE_FOUR_K";
|
|
1482
|
+
})(exports.ImageSize || (exports.ImageSize = {}));
|
|
1343
1483
|
/** Tuning mode. This enum is not supported in Gemini API. */
|
|
1344
1484
|
exports.TuningMode = void 0;
|
|
1345
1485
|
(function (TuningMode) {
|
|
@@ -1388,6 +1528,58 @@ exports.AdapterSize = void 0;
|
|
|
1388
1528
|
*/
|
|
1389
1529
|
AdapterSize["ADAPTER_SIZE_THIRTY_TWO"] = "ADAPTER_SIZE_THIRTY_TWO";
|
|
1390
1530
|
})(exports.AdapterSize || (exports.AdapterSize = {}));
|
|
1531
|
+
/** Defines the type for parsing sample response. This enum is not supported in Gemini API. */
|
|
1532
|
+
exports.ResponseParseType = void 0;
|
|
1533
|
+
(function (ResponseParseType) {
|
|
1534
|
+
/**
|
|
1535
|
+
* Default value. Fallback to IDENTITY
|
|
1536
|
+
*/
|
|
1537
|
+
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1538
|
+
/**
|
|
1539
|
+
* Returns the sample response as is.
|
|
1540
|
+
*/
|
|
1541
|
+
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1542
|
+
/**
|
|
1543
|
+
* 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.
|
|
1544
|
+
*/
|
|
1545
|
+
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1546
|
+
})(exports.ResponseParseType || (exports.ResponseParseType = {}));
|
|
1547
|
+
/** Match operation to use for evaluating rewards. This enum is not supported in Gemini API. */
|
|
1548
|
+
exports.MatchOperation = void 0;
|
|
1549
|
+
(function (MatchOperation) {
|
|
1550
|
+
/**
|
|
1551
|
+
* Default value. A user error will be returned if not set.
|
|
1552
|
+
*/
|
|
1553
|
+
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1554
|
+
/**
|
|
1555
|
+
* Equivalent to [GoogleSQL](https://cloud.google.com/bigquery/docs/reference/standard-sql/string_functions#regexp_contains) `REGEX_CONTAINS(target, expression)`.
|
|
1556
|
+
*/
|
|
1557
|
+
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1558
|
+
/**
|
|
1559
|
+
* The match operation returns `true` if expression is a substring of the target.
|
|
1560
|
+
*/
|
|
1561
|
+
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1562
|
+
/**
|
|
1563
|
+
* The match operation returns `true` expression is an exact match of the target.
|
|
1564
|
+
*/
|
|
1565
|
+
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1566
|
+
})(exports.MatchOperation || (exports.MatchOperation = {}));
|
|
1567
|
+
/** Represents how much to think for the tuning job. */
|
|
1568
|
+
exports.ReinforcementTuningThinkingLevel = void 0;
|
|
1569
|
+
(function (ReinforcementTuningThinkingLevel) {
|
|
1570
|
+
/**
|
|
1571
|
+
* Unspecified thinking level.
|
|
1572
|
+
*/
|
|
1573
|
+
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1574
|
+
/**
|
|
1575
|
+
* Little to no thinking.
|
|
1576
|
+
*/
|
|
1577
|
+
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1578
|
+
/**
|
|
1579
|
+
* High thinking level.
|
|
1580
|
+
*/
|
|
1581
|
+
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1582
|
+
})(exports.ReinforcementTuningThinkingLevel || (exports.ReinforcementTuningThinkingLevel = {}));
|
|
1391
1583
|
/** Job state. */
|
|
1392
1584
|
exports.JobState = void 0;
|
|
1393
1585
|
(function (JobState) {
|
|
@@ -1872,58 +2064,6 @@ exports.ImageResizeMode = void 0;
|
|
|
1872
2064
|
*/
|
|
1873
2065
|
ImageResizeMode["PAD"] = "PAD";
|
|
1874
2066
|
})(exports.ImageResizeMode || (exports.ImageResizeMode = {}));
|
|
1875
|
-
/** Defines how to parse sample response. */
|
|
1876
|
-
exports.ResponseParseType = void 0;
|
|
1877
|
-
(function (ResponseParseType) {
|
|
1878
|
-
/**
|
|
1879
|
-
* Default value. This value is unused.
|
|
1880
|
-
*/
|
|
1881
|
-
ResponseParseType["RESPONSE_PARSE_TYPE_UNSPECIFIED"] = "RESPONSE_PARSE_TYPE_UNSPECIFIED";
|
|
1882
|
-
/**
|
|
1883
|
-
* Use the sample response as is.
|
|
1884
|
-
*/
|
|
1885
|
-
ResponseParseType["IDENTITY"] = "IDENTITY";
|
|
1886
|
-
/**
|
|
1887
|
-
* Use regex to extract the important part of sample response.
|
|
1888
|
-
*/
|
|
1889
|
-
ResponseParseType["REGEX_EXTRACT"] = "REGEX_EXTRACT";
|
|
1890
|
-
})(exports.ResponseParseType || (exports.ResponseParseType = {}));
|
|
1891
|
-
/** Match operation to use for evaluation. */
|
|
1892
|
-
exports.MatchOperation = void 0;
|
|
1893
|
-
(function (MatchOperation) {
|
|
1894
|
-
/**
|
|
1895
|
-
* Default value. This value is unused.
|
|
1896
|
-
*/
|
|
1897
|
-
MatchOperation["MATCH_OPERATION_UNSPECIFIED"] = "MATCH_OPERATION_UNSPECIFIED";
|
|
1898
|
-
/**
|
|
1899
|
-
* Equivalent to GoogleSQL `REGEX_CONTAINS(target, expression)`.
|
|
1900
|
-
*/
|
|
1901
|
-
MatchOperation["REGEX_CONTAINS"] = "REGEX_CONTAINS";
|
|
1902
|
-
/**
|
|
1903
|
-
* `expression` is a substring of target.
|
|
1904
|
-
*/
|
|
1905
|
-
MatchOperation["PARTIAL_MATCH"] = "PARTIAL_MATCH";
|
|
1906
|
-
/**
|
|
1907
|
-
* `expression` is an exact match of target.
|
|
1908
|
-
*/
|
|
1909
|
-
MatchOperation["EXACT_MATCH"] = "EXACT_MATCH";
|
|
1910
|
-
})(exports.MatchOperation || (exports.MatchOperation = {}));
|
|
1911
|
-
/** Represents how much to think for the tuning job. */
|
|
1912
|
-
exports.ReinforcementTuningThinkingLevel = void 0;
|
|
1913
|
-
(function (ReinforcementTuningThinkingLevel) {
|
|
1914
|
-
/**
|
|
1915
|
-
* Unspecified thinking level.
|
|
1916
|
-
*/
|
|
1917
|
-
ReinforcementTuningThinkingLevel["REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED"] = "REINFORCEMENT_TUNING_THINKING_LEVEL_UNSPECIFIED";
|
|
1918
|
-
/**
|
|
1919
|
-
* Little to no thinking.
|
|
1920
|
-
*/
|
|
1921
|
-
ReinforcementTuningThinkingLevel["MINIMAL"] = "MINIMAL";
|
|
1922
|
-
/**
|
|
1923
|
-
* High thinking level.
|
|
1924
|
-
*/
|
|
1925
|
-
ReinforcementTuningThinkingLevel["HIGH"] = "HIGH";
|
|
1926
|
-
})(exports.ReinforcementTuningThinkingLevel || (exports.ReinforcementTuningThinkingLevel = {}));
|
|
1927
2067
|
/** Enum representing the tuning method. */
|
|
1928
2068
|
exports.TuningMethod = void 0;
|
|
1929
2069
|
(function (TuningMethod) {
|
|
@@ -2720,6 +2860,21 @@ class ListModelsResponse {
|
|
|
2720
2860
|
}
|
|
2721
2861
|
class DeleteModelResponse {
|
|
2722
2862
|
}
|
|
2863
|
+
/** Configuration for audio-specific output formatting. */
|
|
2864
|
+
class AudioResponseFormat {
|
|
2865
|
+
}
|
|
2866
|
+
/** Configuration for image-specific output formatting. */
|
|
2867
|
+
class ImageResponseFormat {
|
|
2868
|
+
}
|
|
2869
|
+
/** Configuration for text-specific output formatting. */
|
|
2870
|
+
class TextResponseFormat {
|
|
2871
|
+
}
|
|
2872
|
+
/** Configuration for video-specific output formatting. This data type is not supported in Gemini API. */
|
|
2873
|
+
class VideoResponseFormat {
|
|
2874
|
+
}
|
|
2875
|
+
/** Configuration for the model to configure output formatting and delivery. This data type is not supported in Gemini API. */
|
|
2876
|
+
class ResponseFormat {
|
|
2877
|
+
}
|
|
2723
2878
|
/** Response for counting tokens. */
|
|
2724
2879
|
class CountTokensResponse {
|
|
2725
2880
|
}
|
|
@@ -2748,10 +2903,10 @@ class GenerateVideosOperation {
|
|
|
2748
2903
|
return operation;
|
|
2749
2904
|
}
|
|
2750
2905
|
}
|
|
2751
|
-
/** Defines how to parse sample response for reinforcement tuning. */
|
|
2906
|
+
/** 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. */
|
|
2752
2907
|
class ReinforcementTuningParseResponseConfig {
|
|
2753
2908
|
}
|
|
2754
|
-
/** Scores responses by directly converting parsed autorater response to float reward
|
|
2909
|
+
/** 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. */
|
|
2755
2910
|
class ReinforcementTuningAutoraterScorerParsedResponseConversionScorer {
|
|
2756
2911
|
}
|
|
2757
2912
|
/** The results from an evaluation run performed by the EvaluationService. This data type is not supported in Gemini API. */
|
|
@@ -5191,6 +5346,9 @@ function toolToMldev$4(fromObject) {
|
|
|
5191
5346
|
}
|
|
5192
5347
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
5193
5348
|
}
|
|
5349
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
5350
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
5351
|
+
}
|
|
5194
5352
|
return toObject;
|
|
5195
5353
|
}
|
|
5196
5354
|
function vertexMultimodalDatasetDestinationFromVertex(fromObject) {
|
|
@@ -5973,6 +6131,29 @@ function codeExecutionResultToVertex$3(fromObject) {
|
|
|
5973
6131
|
}
|
|
5974
6132
|
return toObject;
|
|
5975
6133
|
}
|
|
6134
|
+
function computerUseToVertex$2(fromObject) {
|
|
6135
|
+
const toObject = {};
|
|
6136
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
6137
|
+
if (fromEnvironment != null) {
|
|
6138
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
6139
|
+
}
|
|
6140
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
6141
|
+
'excludedPredefinedFunctions',
|
|
6142
|
+
]);
|
|
6143
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
6144
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
6145
|
+
}
|
|
6146
|
+
const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
|
|
6147
|
+
'enablePromptInjectionDetection',
|
|
6148
|
+
]);
|
|
6149
|
+
if (fromEnablePromptInjectionDetection != null) {
|
|
6150
|
+
setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
|
|
6151
|
+
}
|
|
6152
|
+
if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
|
|
6153
|
+
throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
6154
|
+
}
|
|
6155
|
+
return toObject;
|
|
6156
|
+
}
|
|
5976
6157
|
function contentToMldev$3(fromObject) {
|
|
5977
6158
|
const toObject = {};
|
|
5978
6159
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -6638,6 +6819,9 @@ function toolToMldev$3(fromObject) {
|
|
|
6638
6819
|
}
|
|
6639
6820
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6640
6821
|
}
|
|
6822
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
6823
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
6824
|
+
}
|
|
6641
6825
|
return toObject;
|
|
6642
6826
|
}
|
|
6643
6827
|
function toolToVertex$2(fromObject) {
|
|
@@ -6648,7 +6832,7 @@ function toolToVertex$2(fromObject) {
|
|
|
6648
6832
|
}
|
|
6649
6833
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
6650
6834
|
if (fromComputerUse != null) {
|
|
6651
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
6835
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
|
|
6652
6836
|
}
|
|
6653
6837
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
6654
6838
|
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
@@ -6711,6 +6895,10 @@ function toolToVertex$2(fromObject) {
|
|
|
6711
6895
|
}
|
|
6712
6896
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
6713
6897
|
}
|
|
6898
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
6899
|
+
if (fromExaAiSearch != null) {
|
|
6900
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
6901
|
+
}
|
|
6714
6902
|
return toObject;
|
|
6715
6903
|
}
|
|
6716
6904
|
function updateCachedContentConfigToMldev(fromObject, parentObject) {
|
|
@@ -7715,7 +7903,7 @@ class Files extends BaseModule {
|
|
|
7715
7903
|
* file extension.
|
|
7716
7904
|
* - For Blob object inputs, the `mimeType` will be set to the Blob's `type`
|
|
7717
7905
|
* property.
|
|
7718
|
-
*
|
|
7906
|
+
* Some examples for file extension to mimeType mapping:
|
|
7719
7907
|
* .txt -> text/plain
|
|
7720
7908
|
* .json -> application/json
|
|
7721
7909
|
* .jpg -> image/jpeg
|
|
@@ -8078,6 +8266,29 @@ function codeExecutionResultToVertex$2(fromObject) {
|
|
|
8078
8266
|
}
|
|
8079
8267
|
return toObject;
|
|
8080
8268
|
}
|
|
8269
|
+
function computerUseToVertex$1(fromObject) {
|
|
8270
|
+
const toObject = {};
|
|
8271
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
8272
|
+
if (fromEnvironment != null) {
|
|
8273
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
8274
|
+
}
|
|
8275
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
8276
|
+
'excludedPredefinedFunctions',
|
|
8277
|
+
]);
|
|
8278
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
8279
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
8280
|
+
}
|
|
8281
|
+
const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
|
|
8282
|
+
'enablePromptInjectionDetection',
|
|
8283
|
+
]);
|
|
8284
|
+
if (fromEnablePromptInjectionDetection != null) {
|
|
8285
|
+
setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
|
|
8286
|
+
}
|
|
8287
|
+
if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
|
|
8288
|
+
throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
8289
|
+
}
|
|
8290
|
+
return toObject;
|
|
8291
|
+
}
|
|
8081
8292
|
function contentToMldev$2(fromObject) {
|
|
8082
8293
|
const toObject = {};
|
|
8083
8294
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -8262,7 +8473,7 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
8262
8473
|
}
|
|
8263
8474
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8264
8475
|
if (fromSpeechConfig != null) {
|
|
8265
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
8476
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex$1(fromSpeechConfig));
|
|
8266
8477
|
}
|
|
8267
8478
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
8268
8479
|
'stopSequences',
|
|
@@ -8292,6 +8503,21 @@ function generationConfigToVertex$1(fromObject) {
|
|
|
8292
8503
|
undefined) {
|
|
8293
8504
|
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
8294
8505
|
}
|
|
8506
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
8507
|
+
'responseFormat',
|
|
8508
|
+
]);
|
|
8509
|
+
if (fromResponseFormat != null) {
|
|
8510
|
+
let transformedList = fromResponseFormat;
|
|
8511
|
+
if (Array.isArray(transformedList)) {
|
|
8512
|
+
transformedList = transformedList.map((item) => {
|
|
8513
|
+
return item;
|
|
8514
|
+
});
|
|
8515
|
+
}
|
|
8516
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
8517
|
+
}
|
|
8518
|
+
if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
|
|
8519
|
+
throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
8520
|
+
}
|
|
8295
8521
|
return toObject;
|
|
8296
8522
|
}
|
|
8297
8523
|
function googleMapsToMldev$2(fromObject) {
|
|
@@ -8505,7 +8731,7 @@ function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
|
8505
8731
|
}
|
|
8506
8732
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8507
8733
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8508
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], tLiveSpeechConfig(fromSpeechConfig));
|
|
8734
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8509
8735
|
}
|
|
8510
8736
|
const fromThinkingConfig = getValueByPath(fromObject, [
|
|
8511
8737
|
'thinkingConfig',
|
|
@@ -8794,6 +9020,22 @@ function mcpServerToVertex$1(fromObject) {
|
|
|
8794
9020
|
}
|
|
8795
9021
|
return toObject;
|
|
8796
9022
|
}
|
|
9023
|
+
function multiSpeakerVoiceConfigToVertex$1(fromObject) {
|
|
9024
|
+
const toObject = {};
|
|
9025
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
9026
|
+
'speakerVoiceConfigs',
|
|
9027
|
+
]);
|
|
9028
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
9029
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
9030
|
+
if (Array.isArray(transformedList)) {
|
|
9031
|
+
transformedList = transformedList.map((item) => {
|
|
9032
|
+
return speakerVoiceConfigToVertex$1(item);
|
|
9033
|
+
});
|
|
9034
|
+
}
|
|
9035
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
9036
|
+
}
|
|
9037
|
+
return toObject;
|
|
9038
|
+
}
|
|
8797
9039
|
function partToMldev$2(fromObject) {
|
|
8798
9040
|
const toObject = {};
|
|
8799
9041
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -8935,6 +9177,26 @@ function partToVertex$2(fromObject) {
|
|
|
8935
9177
|
}
|
|
8936
9178
|
return toObject;
|
|
8937
9179
|
}
|
|
9180
|
+
function replicatedVoiceConfigToVertex$1(fromObject) {
|
|
9181
|
+
const toObject = {};
|
|
9182
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9183
|
+
if (fromMimeType != null) {
|
|
9184
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9185
|
+
}
|
|
9186
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
9187
|
+
'voiceSampleAudio',
|
|
9188
|
+
]);
|
|
9189
|
+
if (fromVoiceSampleAudio != null) {
|
|
9190
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
9191
|
+
}
|
|
9192
|
+
if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
|
|
9193
|
+
throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
9194
|
+
}
|
|
9195
|
+
if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
|
|
9196
|
+
throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
9197
|
+
}
|
|
9198
|
+
return toObject;
|
|
9199
|
+
}
|
|
8938
9200
|
function safetySettingToMldev$2(fromObject) {
|
|
8939
9201
|
const toObject = {};
|
|
8940
9202
|
const fromCategory = getValueByPath(fromObject, ['category']);
|
|
@@ -8961,6 +9223,36 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
8961
9223
|
}
|
|
8962
9224
|
return toObject;
|
|
8963
9225
|
}
|
|
9226
|
+
function speakerVoiceConfigToVertex$1(fromObject) {
|
|
9227
|
+
const toObject = {};
|
|
9228
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
9229
|
+
if (fromSpeaker != null) {
|
|
9230
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
9231
|
+
}
|
|
9232
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
9233
|
+
if (fromVoiceConfig != null) {
|
|
9234
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
9235
|
+
}
|
|
9236
|
+
return toObject;
|
|
9237
|
+
}
|
|
9238
|
+
function speechConfigToVertex$1(fromObject) {
|
|
9239
|
+
const toObject = {};
|
|
9240
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
9241
|
+
if (fromVoiceConfig != null) {
|
|
9242
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
9243
|
+
}
|
|
9244
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
9245
|
+
if (fromLanguageCode != null) {
|
|
9246
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
9247
|
+
}
|
|
9248
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
9249
|
+
'multiSpeakerVoiceConfig',
|
|
9250
|
+
]);
|
|
9251
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
9252
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex$1(fromMultiSpeakerVoiceConfig));
|
|
9253
|
+
}
|
|
9254
|
+
return toObject;
|
|
9255
|
+
}
|
|
8964
9256
|
function toolToMldev$2(fromObject) {
|
|
8965
9257
|
const toObject = {};
|
|
8966
9258
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
@@ -9026,6 +9318,9 @@ function toolToMldev$2(fromObject) {
|
|
|
9026
9318
|
}
|
|
9027
9319
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
9028
9320
|
}
|
|
9321
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
9322
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
9323
|
+
}
|
|
9029
9324
|
return toObject;
|
|
9030
9325
|
}
|
|
9031
9326
|
function toolToVertex$1(fromObject) {
|
|
@@ -9036,7 +9331,7 @@ function toolToVertex$1(fromObject) {
|
|
|
9036
9331
|
}
|
|
9037
9332
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
9038
9333
|
if (fromComputerUse != null) {
|
|
9039
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
9334
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
|
|
9040
9335
|
}
|
|
9041
9336
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
9042
9337
|
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
@@ -9099,6 +9394,10 @@ function toolToVertex$1(fromObject) {
|
|
|
9099
9394
|
}
|
|
9100
9395
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
9101
9396
|
}
|
|
9397
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
9398
|
+
if (fromExaAiSearch != null) {
|
|
9399
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
9400
|
+
}
|
|
9102
9401
|
return toObject;
|
|
9103
9402
|
}
|
|
9104
9403
|
function usageMetadataFromVertex(fromObject) {
|
|
@@ -9205,6 +9504,22 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
9205
9504
|
}
|
|
9206
9505
|
return toObject;
|
|
9207
9506
|
}
|
|
9507
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
9508
|
+
const toObject = {};
|
|
9509
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
9510
|
+
'replicatedVoiceConfig',
|
|
9511
|
+
]);
|
|
9512
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
9513
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex$1(fromReplicatedVoiceConfig));
|
|
9514
|
+
}
|
|
9515
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
9516
|
+
'prebuiltVoiceConfig',
|
|
9517
|
+
]);
|
|
9518
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
9519
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
9520
|
+
}
|
|
9521
|
+
return toObject;
|
|
9522
|
+
}
|
|
9208
9523
|
|
|
9209
9524
|
/**
|
|
9210
9525
|
* @license
|
|
@@ -9380,6 +9695,29 @@ function computeTokensResponseFromVertex(fromObject, _rootObject) {
|
|
|
9380
9695
|
}
|
|
9381
9696
|
return toObject;
|
|
9382
9697
|
}
|
|
9698
|
+
function computerUseToVertex(fromObject, _rootObject) {
|
|
9699
|
+
const toObject = {};
|
|
9700
|
+
const fromEnvironment = getValueByPath(fromObject, ['environment']);
|
|
9701
|
+
if (fromEnvironment != null) {
|
|
9702
|
+
setValueByPath(toObject, ['environment'], fromEnvironment);
|
|
9703
|
+
}
|
|
9704
|
+
const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
|
|
9705
|
+
'excludedPredefinedFunctions',
|
|
9706
|
+
]);
|
|
9707
|
+
if (fromExcludedPredefinedFunctions != null) {
|
|
9708
|
+
setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
|
|
9709
|
+
}
|
|
9710
|
+
const fromEnablePromptInjectionDetection = getValueByPath(fromObject, [
|
|
9711
|
+
'enablePromptInjectionDetection',
|
|
9712
|
+
]);
|
|
9713
|
+
if (fromEnablePromptInjectionDetection != null) {
|
|
9714
|
+
setValueByPath(toObject, ['enablePromptInjectionDetection'], fromEnablePromptInjectionDetection);
|
|
9715
|
+
}
|
|
9716
|
+
if (getValueByPath(fromObject, ['disabledSafetyPolicies']) !== undefined) {
|
|
9717
|
+
throw new Error('disabledSafetyPolicies parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
9718
|
+
}
|
|
9719
|
+
return toObject;
|
|
9720
|
+
}
|
|
9383
9721
|
function contentEmbeddingFromVertex(fromObject, rootObject) {
|
|
9384
9722
|
const toObject = {};
|
|
9385
9723
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
@@ -10435,7 +10773,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject, root
|
|
|
10435
10773
|
}
|
|
10436
10774
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
10437
10775
|
if (fromSpeechConfig != null) {
|
|
10438
|
-
setValueByPath(toObject, ['speechConfig'], tSpeechConfig(fromSpeechConfig));
|
|
10776
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(tSpeechConfig(fromSpeechConfig)));
|
|
10439
10777
|
}
|
|
10440
10778
|
const fromAudioTimestamp = getValueByPath(fromObject, [
|
|
10441
10779
|
'audioTimestamp',
|
|
@@ -11322,7 +11660,7 @@ function generatedVideoFromVertex(fromObject, rootObject) {
|
|
|
11322
11660
|
}
|
|
11323
11661
|
return toObject;
|
|
11324
11662
|
}
|
|
11325
|
-
function generationConfigToVertex(fromObject,
|
|
11663
|
+
function generationConfigToVertex(fromObject, rootObject) {
|
|
11326
11664
|
const toObject = {};
|
|
11327
11665
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
11328
11666
|
'modelSelectionConfig',
|
|
@@ -11418,7 +11756,7 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
11418
11756
|
}
|
|
11419
11757
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
11420
11758
|
if (fromSpeechConfig != null) {
|
|
11421
|
-
setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
|
|
11759
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToVertex(fromSpeechConfig));
|
|
11422
11760
|
}
|
|
11423
11761
|
const fromStopSequences = getValueByPath(fromObject, [
|
|
11424
11762
|
'stopSequences',
|
|
@@ -11448,6 +11786,21 @@ function generationConfigToVertex(fromObject, _rootObject) {
|
|
|
11448
11786
|
undefined) {
|
|
11449
11787
|
throw new Error('enableEnhancedCivicAnswers parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
11450
11788
|
}
|
|
11789
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
11790
|
+
'responseFormat',
|
|
11791
|
+
]);
|
|
11792
|
+
if (fromResponseFormat != null) {
|
|
11793
|
+
let transformedList = fromResponseFormat;
|
|
11794
|
+
if (Array.isArray(transformedList)) {
|
|
11795
|
+
transformedList = transformedList.map((item) => {
|
|
11796
|
+
return item;
|
|
11797
|
+
});
|
|
11798
|
+
}
|
|
11799
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
11800
|
+
}
|
|
11801
|
+
if (getValueByPath(fromObject, ['translationConfig']) !== undefined) {
|
|
11802
|
+
throw new Error('translationConfig parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
11803
|
+
}
|
|
11451
11804
|
return toObject;
|
|
11452
11805
|
}
|
|
11453
11806
|
function getModelParametersToMldev(apiClient, fromObject, _rootObject) {
|
|
@@ -11885,6 +12238,22 @@ function modelFromVertex(fromObject, rootObject) {
|
|
|
11885
12238
|
}
|
|
11886
12239
|
return toObject;
|
|
11887
12240
|
}
|
|
12241
|
+
function multiSpeakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
12242
|
+
const toObject = {};
|
|
12243
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
12244
|
+
'speakerVoiceConfigs',
|
|
12245
|
+
]);
|
|
12246
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
12247
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
12248
|
+
if (Array.isArray(transformedList)) {
|
|
12249
|
+
transformedList = transformedList.map((item) => {
|
|
12250
|
+
return speakerVoiceConfigToVertex(item);
|
|
12251
|
+
});
|
|
12252
|
+
}
|
|
12253
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
12254
|
+
}
|
|
12255
|
+
return toObject;
|
|
12256
|
+
}
|
|
11888
12257
|
function partToMldev$1(fromObject, rootObject) {
|
|
11889
12258
|
const toObject = {};
|
|
11890
12259
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
@@ -12194,6 +12563,26 @@ function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
|
12194
12563
|
}
|
|
12195
12564
|
return toObject;
|
|
12196
12565
|
}
|
|
12566
|
+
function replicatedVoiceConfigToVertex(fromObject, _rootObject) {
|
|
12567
|
+
const toObject = {};
|
|
12568
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
12569
|
+
if (fromMimeType != null) {
|
|
12570
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
12571
|
+
}
|
|
12572
|
+
const fromVoiceSampleAudio = getValueByPath(fromObject, [
|
|
12573
|
+
'voiceSampleAudio',
|
|
12574
|
+
]);
|
|
12575
|
+
if (fromVoiceSampleAudio != null) {
|
|
12576
|
+
setValueByPath(toObject, ['voiceSampleAudio'], fromVoiceSampleAudio);
|
|
12577
|
+
}
|
|
12578
|
+
if (getValueByPath(fromObject, ['consentAudio']) !== undefined) {
|
|
12579
|
+
throw new Error('consentAudio parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12580
|
+
}
|
|
12581
|
+
if (getValueByPath(fromObject, ['voiceConsentSignature']) !== undefined) {
|
|
12582
|
+
throw new Error('voiceConsentSignature parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
12583
|
+
}
|
|
12584
|
+
return toObject;
|
|
12585
|
+
}
|
|
12197
12586
|
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
12198
12587
|
const toObject = {};
|
|
12199
12588
|
const fromCategories = getValueByPath(fromObject, [
|
|
@@ -12343,6 +12732,36 @@ function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
|
12343
12732
|
}
|
|
12344
12733
|
return toObject;
|
|
12345
12734
|
}
|
|
12735
|
+
function speakerVoiceConfigToVertex(fromObject, rootObject) {
|
|
12736
|
+
const toObject = {};
|
|
12737
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
12738
|
+
if (fromSpeaker != null) {
|
|
12739
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
12740
|
+
}
|
|
12741
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
12742
|
+
if (fromVoiceConfig != null) {
|
|
12743
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
12744
|
+
}
|
|
12745
|
+
return toObject;
|
|
12746
|
+
}
|
|
12747
|
+
function speechConfigToVertex(fromObject, rootObject) {
|
|
12748
|
+
const toObject = {};
|
|
12749
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
12750
|
+
if (fromVoiceConfig != null) {
|
|
12751
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex(fromVoiceConfig));
|
|
12752
|
+
}
|
|
12753
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
12754
|
+
if (fromLanguageCode != null) {
|
|
12755
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
12756
|
+
}
|
|
12757
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
12758
|
+
'multiSpeakerVoiceConfig',
|
|
12759
|
+
]);
|
|
12760
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
12761
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToVertex(fromMultiSpeakerVoiceConfig));
|
|
12762
|
+
}
|
|
12763
|
+
return toObject;
|
|
12764
|
+
}
|
|
12346
12765
|
function toolConfigToMldev(fromObject, rootObject) {
|
|
12347
12766
|
const toObject = {};
|
|
12348
12767
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -12448,6 +12867,9 @@ function toolToMldev$1(fromObject, rootObject) {
|
|
|
12448
12867
|
}
|
|
12449
12868
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
12450
12869
|
}
|
|
12870
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
12871
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
12872
|
+
}
|
|
12451
12873
|
return toObject;
|
|
12452
12874
|
}
|
|
12453
12875
|
function toolToVertex(fromObject, rootObject) {
|
|
@@ -12458,7 +12880,7 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
12458
12880
|
}
|
|
12459
12881
|
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
12460
12882
|
if (fromComputerUse != null) {
|
|
12461
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
12883
|
+
setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
|
|
12462
12884
|
}
|
|
12463
12885
|
if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
|
|
12464
12886
|
throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
|
|
@@ -12521,6 +12943,10 @@ function toolToVertex(fromObject, rootObject) {
|
|
|
12521
12943
|
}
|
|
12522
12944
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
12523
12945
|
}
|
|
12946
|
+
const fromExaAiSearch = getValueByPath(fromObject, ['exaAiSearch']);
|
|
12947
|
+
if (fromExaAiSearch != null) {
|
|
12948
|
+
setValueByPath(toObject, ['exaAiSearch'], fromExaAiSearch);
|
|
12949
|
+
}
|
|
12524
12950
|
return toObject;
|
|
12525
12951
|
}
|
|
12526
12952
|
function tunedModelInfoFromMldev(fromObject, _rootObject) {
|
|
@@ -12832,6 +13258,22 @@ function videoToVertex(fromObject, _rootObject) {
|
|
|
12832
13258
|
}
|
|
12833
13259
|
return toObject;
|
|
12834
13260
|
}
|
|
13261
|
+
function voiceConfigToVertex(fromObject, rootObject) {
|
|
13262
|
+
const toObject = {};
|
|
13263
|
+
const fromReplicatedVoiceConfig = getValueByPath(fromObject, [
|
|
13264
|
+
'replicatedVoiceConfig',
|
|
13265
|
+
]);
|
|
13266
|
+
if (fromReplicatedVoiceConfig != null) {
|
|
13267
|
+
setValueByPath(toObject, ['replicatedVoiceConfig'], replicatedVoiceConfigToVertex(fromReplicatedVoiceConfig));
|
|
13268
|
+
}
|
|
13269
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
13270
|
+
'prebuiltVoiceConfig',
|
|
13271
|
+
]);
|
|
13272
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
13273
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], fromPrebuiltVoiceConfig);
|
|
13274
|
+
}
|
|
13275
|
+
return toObject;
|
|
13276
|
+
}
|
|
12835
13277
|
|
|
12836
13278
|
/**
|
|
12837
13279
|
* @license
|
|
@@ -13082,7 +13524,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
13082
13524
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
13083
13525
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
13084
13526
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
13085
|
-
const SDK_VERSION = '2.
|
|
13527
|
+
const SDK_VERSION = '2.11.0'; // x-release-please-version
|
|
13086
13528
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
13087
13529
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
13088
13530
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -14336,10 +14778,27 @@ class Live {
|
|
|
14336
14778
|
onopenResolve({});
|
|
14337
14779
|
};
|
|
14338
14780
|
const apiClient = this.apiClient;
|
|
14781
|
+
let sessionResolved = false;
|
|
14782
|
+
const messageQueue = [];
|
|
14783
|
+
let setupCompleteResolve = () => { };
|
|
14784
|
+
const setupCompletePromise = new Promise((resolve) => {
|
|
14785
|
+
setupCompleteResolve = resolve;
|
|
14786
|
+
});
|
|
14339
14787
|
const websocketCallbacks = {
|
|
14340
14788
|
onopen: onopenAwaitedCallback,
|
|
14341
14789
|
onmessage: (event) => {
|
|
14342
|
-
void handleWebSocketMessage(apiClient,
|
|
14790
|
+
void handleWebSocketMessage(apiClient, (msg) => {
|
|
14791
|
+
if (msg.setupComplete && !session.setupComplete) {
|
|
14792
|
+
session.setupComplete = msg.setupComplete;
|
|
14793
|
+
setupCompleteResolve({});
|
|
14794
|
+
}
|
|
14795
|
+
if (sessionResolved) {
|
|
14796
|
+
callbacks.onmessage(msg);
|
|
14797
|
+
}
|
|
14798
|
+
else {
|
|
14799
|
+
messageQueue.push(msg);
|
|
14800
|
+
}
|
|
14801
|
+
}, event);
|
|
14343
14802
|
},
|
|
14344
14803
|
onerror: (_a = callbacks === null || callbacks === void 0 ? void 0 : callbacks.onerror) !== null && _a !== void 0 ? _a : function (e) {
|
|
14345
14804
|
},
|
|
@@ -14401,8 +14860,14 @@ class Live {
|
|
|
14401
14860
|
clientMessage = liveConnectParametersToMldev(this.apiClient, liveConnectParameters);
|
|
14402
14861
|
}
|
|
14403
14862
|
delete clientMessage['config'];
|
|
14863
|
+
const session = new Session(conn, this.apiClient);
|
|
14404
14864
|
conn.send(JSON.stringify(clientMessage));
|
|
14405
|
-
|
|
14865
|
+
await setupCompletePromise;
|
|
14866
|
+
sessionResolved = true;
|
|
14867
|
+
for (const msg of messageQueue) {
|
|
14868
|
+
callbacks.onmessage(msg);
|
|
14869
|
+
}
|
|
14870
|
+
return session;
|
|
14406
14871
|
}
|
|
14407
14872
|
// TODO: b/416041229 - Abstract this method to a common place.
|
|
14408
14873
|
isCallableTool(tool) {
|
|
@@ -14796,7 +15261,7 @@ class Models extends BaseModule {
|
|
|
14796
15261
|
this.generateContent = async (params) => {
|
|
14797
15262
|
var _a, _b, _c, _d, _e;
|
|
14798
15263
|
const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
|
|
14799
|
-
this.
|
|
15264
|
+
this.maybeMoveToResponseJsonSchema(params);
|
|
14800
15265
|
if (!hasCallableTools(params) || shouldDisableAfc(params.config)) {
|
|
14801
15266
|
return await this.generateContentInternal(transformedParams);
|
|
14802
15267
|
}
|
|
@@ -14888,7 +15353,7 @@ class Models extends BaseModule {
|
|
|
14888
15353
|
*/
|
|
14889
15354
|
this.generateContentStream = async (params) => {
|
|
14890
15355
|
var _a, _b, _c, _d, _e;
|
|
14891
|
-
this.
|
|
15356
|
+
this.maybeMoveToResponseJsonSchema(params);
|
|
14892
15357
|
if (shouldDisableAfc(params.config)) {
|
|
14893
15358
|
const transformedParams = await this.processParamsMaybeAddMcpUsage(params);
|
|
14894
15359
|
return await this.generateContentStreamInternal(transformedParams);
|
|
@@ -15113,7 +15578,7 @@ class Models extends BaseModule {
|
|
|
15113
15578
|
* To maintain backward compatibility, we move the data that was treated as
|
|
15114
15579
|
* JSON schema from the responseSchema field to the responseJsonSchema field.
|
|
15115
15580
|
*/
|
|
15116
|
-
|
|
15581
|
+
maybeMoveToResponseJsonSchema(params) {
|
|
15117
15582
|
if (params.config && params.config.responseSchema) {
|
|
15118
15583
|
if (!params.config.responseJsonSchema) {
|
|
15119
15584
|
if (Object.keys(params.config.responseSchema).includes('$schema')) {
|
|
@@ -15215,7 +15680,7 @@ class Models extends BaseModule {
|
|
|
15215
15680
|
throw new Error('Function call name was not returned by the model.');
|
|
15216
15681
|
}
|
|
15217
15682
|
if (!afcTools.has(part.functionCall.name)) {
|
|
15218
|
-
throw new Error(`Automatic function calling was requested, but not all the tools the model used implement the CallableTool interface. Available tools: ${afcTools.keys()},
|
|
15683
|
+
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}`);
|
|
15219
15684
|
}
|
|
15220
15685
|
else {
|
|
15221
15686
|
const responseParts = yield __await(afcTools
|
|
@@ -16931,6 +17396,9 @@ function toolToMldev(fromObject) {
|
|
|
16931
17396
|
}
|
|
16932
17397
|
setValueByPath(toObject, ['mcpServers'], transformedList);
|
|
16933
17398
|
}
|
|
17399
|
+
if (getValueByPath(fromObject, ['exaAiSearch']) !== undefined) {
|
|
17400
|
+
throw new Error('exaAiSearch parameter is only supported in Gemini Enterprise Agent Platform mode, not in Gemini Developer API mode.');
|
|
17401
|
+
}
|
|
16934
17402
|
return toObject;
|
|
16935
17403
|
}
|
|
16936
17404
|
|
|
@@ -17782,17 +18250,14 @@ function env() {
|
|
|
17782
18250
|
* Populates global parameters with environment variables.
|
|
17783
18251
|
*/
|
|
17784
18252
|
function fillGlobals(options) {
|
|
17785
|
-
var _a, _b
|
|
18253
|
+
var _a, _b;
|
|
17786
18254
|
const clone = Object.assign({}, options);
|
|
17787
18255
|
const envVars = env();
|
|
17788
18256
|
if (typeof envVars.GOOGLE_GENAI_API_VERSION !== "undefined") {
|
|
17789
18257
|
(_a = clone.api_version) !== null && _a !== void 0 ? _a : (clone.api_version = envVars.GOOGLE_GENAI_API_VERSION);
|
|
17790
18258
|
}
|
|
17791
|
-
if (typeof envVars.GOOGLE_GENAI_API_REVISION !== "undefined") {
|
|
17792
|
-
(_b = clone.api_revision) !== null && _b !== void 0 ? _b : (clone.api_revision = envVars.GOOGLE_GENAI_API_REVISION);
|
|
17793
|
-
}
|
|
17794
18259
|
if (typeof envVars.GOOGLE_GENAI_USER_PROJECT !== "undefined") {
|
|
17795
|
-
(
|
|
18260
|
+
(_b = clone.user_project) !== null && _b !== void 0 ? _b : (clone.user_project = envVars.GOOGLE_GENAI_USER_PROJECT);
|
|
17796
18261
|
}
|
|
17797
18262
|
return clone;
|
|
17798
18263
|
}
|
|
@@ -17804,7 +18269,6 @@ function fillGlobals(options) {
|
|
|
17804
18269
|
*
|
|
17805
18270
|
* g3-prettier-ignore-file
|
|
17806
18271
|
*/
|
|
17807
|
-
const GOOGLE_GENAI_API_REVISION = "2026-05-20";
|
|
17808
18272
|
class GoogleGenAISecurityProvider {
|
|
17809
18273
|
constructor(options) {
|
|
17810
18274
|
this.options = options;
|
|
@@ -17822,7 +18286,6 @@ class GoogleGenAIAuthHook {
|
|
|
17822
18286
|
}
|
|
17823
18287
|
async beforeRequest(hookCtx, request) {
|
|
17824
18288
|
applyDefaultHeaders(request.headers, getStaticDefaultHeaders(hookCtx.security_source));
|
|
17825
|
-
applyApiRevision(hookCtx, request.headers);
|
|
17826
18289
|
applyUserProject(hookCtx, request.headers);
|
|
17827
18290
|
if (hasAuthHeaders(request.headers)) {
|
|
17828
18291
|
return request;
|
|
@@ -17902,12 +18365,6 @@ function applyDefaultHeaders(target, source) {
|
|
|
17902
18365
|
}
|
|
17903
18366
|
}
|
|
17904
18367
|
}
|
|
17905
|
-
function applyApiRevision(hookCtx, headers) {
|
|
17906
|
-
var _a;
|
|
17907
|
-
if (headers.get("api-revision") === null) {
|
|
17908
|
-
headers.set("Api-Revision", (_a = hookCtx.options.api_revision) !== null && _a !== void 0 ? _a : GOOGLE_GENAI_API_REVISION);
|
|
17909
|
-
}
|
|
17910
|
-
}
|
|
17911
18368
|
function applyUserProject(hookCtx, headers) {
|
|
17912
18369
|
if (hookCtx.options.user_project !== undefined &&
|
|
17913
18370
|
headers.get("x-goog-user-project") === null) {
|
|
@@ -18439,7 +18896,7 @@ function serverURLFromOptions(options) {
|
|
|
18439
18896
|
return new URL(u);
|
|
18440
18897
|
}
|
|
18441
18898
|
const SDK_METADATA = {
|
|
18442
|
-
userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.
|
|
18899
|
+
userAgent: "speakeasy-sdk/typescript 2.4.1-preview.4 2.913.3 v1beta @google/genai",
|
|
18443
18900
|
};
|
|
18444
18901
|
|
|
18445
18902
|
/**
|
|
@@ -23088,6 +23545,18 @@ function generationConfigFromVertex(fromObject, _rootObject) {
|
|
|
23088
23545
|
if (fromTopP != null) {
|
|
23089
23546
|
setValueByPath(toObject, ['topP'], fromTopP);
|
|
23090
23547
|
}
|
|
23548
|
+
const fromResponseFormat = getValueByPath(fromObject, [
|
|
23549
|
+
'responseFormat',
|
|
23550
|
+
]);
|
|
23551
|
+
if (fromResponseFormat != null) {
|
|
23552
|
+
let transformedList = fromResponseFormat;
|
|
23553
|
+
if (Array.isArray(transformedList)) {
|
|
23554
|
+
transformedList = transformedList.map((item) => {
|
|
23555
|
+
return item;
|
|
23556
|
+
});
|
|
23557
|
+
}
|
|
23558
|
+
setValueByPath(toObject, ['responseFormat'], transformedList);
|
|
23559
|
+
}
|
|
23091
23560
|
return toObject;
|
|
23092
23561
|
}
|
|
23093
23562
|
function getTuningJobParametersToMldev(fromObject, _rootObject) {
|
|
@@ -24637,6 +25106,7 @@ function getApiKeyFromEnv() {
|
|
|
24637
25106
|
}
|
|
24638
25107
|
|
|
24639
25108
|
exports.ApiError = ApiError;
|
|
25109
|
+
exports.AudioResponseFormat = AudioResponseFormat;
|
|
24640
25110
|
exports.Batches = Batches;
|
|
24641
25111
|
exports.Caches = Caches;
|
|
24642
25112
|
exports.CancelTuningJobResponse = CancelTuningJobResponse;
|
|
@@ -24666,6 +25136,7 @@ exports.GenerateVideosOperation = GenerateVideosOperation;
|
|
|
24666
25136
|
exports.GenerateVideosResponse = GenerateVideosResponse;
|
|
24667
25137
|
exports.GoogleGenAI = GoogleGenAI;
|
|
24668
25138
|
exports.HttpResponse = HttpResponse;
|
|
25139
|
+
exports.ImageResponseFormat = ImageResponseFormat;
|
|
24669
25140
|
exports.ImportFileOperation = ImportFileOperation;
|
|
24670
25141
|
exports.ImportFileResponse = ImportFileResponse;
|
|
24671
25142
|
exports.InlinedEmbedContentResponse = InlinedEmbedContentResponse;
|
|
@@ -24692,11 +25163,13 @@ exports.RegisterFilesResponse = RegisterFilesResponse;
|
|
|
24692
25163
|
exports.ReinforcementTuningAutoraterScorerParsedResponseConversionScorer = ReinforcementTuningAutoraterScorerParsedResponseConversionScorer;
|
|
24693
25164
|
exports.ReinforcementTuningParseResponseConfig = ReinforcementTuningParseResponseConfig;
|
|
24694
25165
|
exports.ReplayResponse = ReplayResponse;
|
|
25166
|
+
exports.ResponseFormat = ResponseFormat;
|
|
24695
25167
|
exports.SegmentImageResponse = SegmentImageResponse;
|
|
24696
25168
|
exports.Session = Session;
|
|
24697
25169
|
exports.SingleEmbedContentResponse = SingleEmbedContentResponse;
|
|
24698
25170
|
exports.StyleReferenceImage = StyleReferenceImage;
|
|
24699
25171
|
exports.SubjectReferenceImage = SubjectReferenceImage;
|
|
25172
|
+
exports.TextResponseFormat = TextResponseFormat;
|
|
24700
25173
|
exports.Tokens = Tokens;
|
|
24701
25174
|
exports.ToolResponse = ToolResponse;
|
|
24702
25175
|
exports.UploadToFileSearchStoreOperation = UploadToFileSearchStoreOperation;
|
|
@@ -24704,6 +25177,7 @@ exports.UploadToFileSearchStoreResponse = UploadToFileSearchStoreResponse;
|
|
|
24704
25177
|
exports.UploadToFileSearchStoreResumableResponse = UploadToFileSearchStoreResumableResponse;
|
|
24705
25178
|
exports.UpscaleImageResponse = UpscaleImageResponse;
|
|
24706
25179
|
exports.ValidateRewardResponse = ValidateRewardResponse;
|
|
25180
|
+
exports.VideoResponseFormat = VideoResponseFormat;
|
|
24707
25181
|
exports.createFunctionResponsePartFromBase64 = createFunctionResponsePartFromBase64;
|
|
24708
25182
|
exports.createFunctionResponsePartFromUri = createFunctionResponsePartFromUri;
|
|
24709
25183
|
exports.createModelContent = createModelContent;
|