@google/genai 1.1.0 → 1.3.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/README.md +1 -1
- package/dist/genai.d.ts +144 -46
- package/dist/index.cjs +1066 -184
- package/dist/index.mjs +1066 -185
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +1050 -172
- package/dist/node/index.mjs +1050 -173
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +144 -46
- package/dist/web/index.mjs +1066 -185
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +144 -46
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -197,7 +197,6 @@ function getValueByPath(data, keys) {
|
|
|
197
197
|
* Copyright 2025 Google LLC
|
|
198
198
|
* SPDX-License-Identifier: Apache-2.0
|
|
199
199
|
*/
|
|
200
|
-
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
|
|
201
200
|
/** Required. Outcome of the code execution. */
|
|
202
201
|
var Outcome;
|
|
203
202
|
(function (Outcome) {
|
|
@@ -433,6 +432,10 @@ var FinishReason;
|
|
|
433
432
|
* Token generation stopped because generated images have safety violations.
|
|
434
433
|
*/
|
|
435
434
|
FinishReason["IMAGE_SAFETY"] = "IMAGE_SAFETY";
|
|
435
|
+
/**
|
|
436
|
+
* The tool call generated by the model is invalid.
|
|
437
|
+
*/
|
|
438
|
+
FinishReason["UNEXPECTED_TOOL_CALL"] = "UNEXPECTED_TOOL_CALL";
|
|
436
439
|
})(FinishReason || (FinishReason = {}));
|
|
437
440
|
/** Output only. Harm probability levels in the content. */
|
|
438
441
|
var HarmProbability;
|
|
@@ -538,7 +541,7 @@ var Modality;
|
|
|
538
541
|
*/
|
|
539
542
|
Modality["IMAGE"] = "IMAGE";
|
|
540
543
|
/**
|
|
541
|
-
* Indicates the model should return
|
|
544
|
+
* Indicates the model should return audio.
|
|
542
545
|
*/
|
|
543
546
|
Modality["AUDIO"] = "AUDIO";
|
|
544
547
|
})(Modality || (Modality = {}));
|
|
@@ -962,24 +965,6 @@ var Scale;
|
|
|
962
965
|
*/
|
|
963
966
|
Scale["B_MAJOR_A_FLAT_MINOR"] = "B_MAJOR_A_FLAT_MINOR";
|
|
964
967
|
})(Scale || (Scale = {}));
|
|
965
|
-
/** The mode of music generation. */
|
|
966
|
-
var MusicGenerationMode;
|
|
967
|
-
(function (MusicGenerationMode) {
|
|
968
|
-
/**
|
|
969
|
-
* This value is unused.
|
|
970
|
-
*/
|
|
971
|
-
MusicGenerationMode["MUSIC_GENERATION_MODE_UNSPECIFIED"] = "MUSIC_GENERATION_MODE_UNSPECIFIED";
|
|
972
|
-
/**
|
|
973
|
-
* Steer text prompts to regions of latent space with higher quality
|
|
974
|
-
music.
|
|
975
|
-
*/
|
|
976
|
-
MusicGenerationMode["QUALITY"] = "QUALITY";
|
|
977
|
-
/**
|
|
978
|
-
* Steer text prompts to regions of latent space with a larger diversity
|
|
979
|
-
of music.
|
|
980
|
-
*/
|
|
981
|
-
MusicGenerationMode["DIVERSITY"] = "DIVERSITY";
|
|
982
|
-
})(MusicGenerationMode || (MusicGenerationMode = {}));
|
|
983
968
|
/** The playback control signal to apply to the music generation. */
|
|
984
969
|
var LiveMusicPlaybackControl;
|
|
985
970
|
(function (LiveMusicPlaybackControl) {
|
|
@@ -1444,7 +1429,6 @@ class ReplayResponse {
|
|
|
1444
1429
|
*/
|
|
1445
1430
|
class RawReferenceImage {
|
|
1446
1431
|
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1447
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1448
1432
|
toReferenceImageAPI() {
|
|
1449
1433
|
const referenceImageAPI = {
|
|
1450
1434
|
referenceType: 'REFERENCE_TYPE_RAW',
|
|
@@ -1466,7 +1450,6 @@ class RawReferenceImage {
|
|
|
1466
1450
|
*/
|
|
1467
1451
|
class MaskReferenceImage {
|
|
1468
1452
|
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1469
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1470
1453
|
toReferenceImageAPI() {
|
|
1471
1454
|
const referenceImageAPI = {
|
|
1472
1455
|
referenceType: 'REFERENCE_TYPE_MASK',
|
|
@@ -1489,7 +1472,6 @@ class MaskReferenceImage {
|
|
|
1489
1472
|
*/
|
|
1490
1473
|
class ControlReferenceImage {
|
|
1491
1474
|
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1492
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1493
1475
|
toReferenceImageAPI() {
|
|
1494
1476
|
const referenceImageAPI = {
|
|
1495
1477
|
referenceType: 'REFERENCE_TYPE_CONTROL',
|
|
@@ -1510,7 +1492,6 @@ class ControlReferenceImage {
|
|
|
1510
1492
|
*/
|
|
1511
1493
|
class StyleReferenceImage {
|
|
1512
1494
|
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1513
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1514
1495
|
toReferenceImageAPI() {
|
|
1515
1496
|
const referenceImageAPI = {
|
|
1516
1497
|
referenceType: 'REFERENCE_TYPE_STYLE',
|
|
@@ -1531,7 +1512,6 @@ class StyleReferenceImage {
|
|
|
1531
1512
|
*/
|
|
1532
1513
|
class SubjectReferenceImage {
|
|
1533
1514
|
/* Internal method to convert to ReferenceImageAPIInternal. */
|
|
1534
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1535
1515
|
toReferenceImageAPI() {
|
|
1536
1516
|
const referenceImageAPI = {
|
|
1537
1517
|
referenceType: 'REFERENCE_TYPE_SUBJECT',
|
|
@@ -2446,7 +2426,7 @@ function filterToJsonSchema(schema) {
|
|
|
2446
2426
|
* Copyright 2025 Google LLC
|
|
2447
2427
|
* SPDX-License-Identifier: Apache-2.0
|
|
2448
2428
|
*/
|
|
2449
|
-
function videoMetadataToMldev$
|
|
2429
|
+
function videoMetadataToMldev$3(apiClient, fromObject) {
|
|
2450
2430
|
const toObject = {};
|
|
2451
2431
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
2452
2432
|
if (fromFps != null) {
|
|
@@ -2462,7 +2442,7 @@ function videoMetadataToMldev$2(apiClient, fromObject) {
|
|
|
2462
2442
|
}
|
|
2463
2443
|
return toObject;
|
|
2464
2444
|
}
|
|
2465
|
-
function blobToMldev$
|
|
2445
|
+
function blobToMldev$3(apiClient, fromObject) {
|
|
2466
2446
|
const toObject = {};
|
|
2467
2447
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
2468
2448
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -2477,7 +2457,7 @@ function blobToMldev$2(apiClient, fromObject) {
|
|
|
2477
2457
|
}
|
|
2478
2458
|
return toObject;
|
|
2479
2459
|
}
|
|
2480
|
-
function fileDataToMldev$
|
|
2460
|
+
function fileDataToMldev$3(apiClient, fromObject) {
|
|
2481
2461
|
const toObject = {};
|
|
2482
2462
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
2483
2463
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -2492,13 +2472,13 @@ function fileDataToMldev$2(apiClient, fromObject) {
|
|
|
2492
2472
|
}
|
|
2493
2473
|
return toObject;
|
|
2494
2474
|
}
|
|
2495
|
-
function partToMldev$
|
|
2475
|
+
function partToMldev$3(apiClient, fromObject) {
|
|
2496
2476
|
const toObject = {};
|
|
2497
2477
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
2498
2478
|
'videoMetadata',
|
|
2499
2479
|
]);
|
|
2500
2480
|
if (fromVideoMetadata != null) {
|
|
2501
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$
|
|
2481
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$3(apiClient, fromVideoMetadata));
|
|
2502
2482
|
}
|
|
2503
2483
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
2504
2484
|
if (fromThought != null) {
|
|
@@ -2506,11 +2486,17 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2506
2486
|
}
|
|
2507
2487
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
2508
2488
|
if (fromInlineData != null) {
|
|
2509
|
-
setValueByPath(toObject, ['inlineData'], blobToMldev$
|
|
2489
|
+
setValueByPath(toObject, ['inlineData'], blobToMldev$3(apiClient, fromInlineData));
|
|
2510
2490
|
}
|
|
2511
2491
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2512
2492
|
if (fromFileData != null) {
|
|
2513
|
-
setValueByPath(toObject, ['fileData'], fileDataToMldev$
|
|
2493
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$3(apiClient, fromFileData));
|
|
2494
|
+
}
|
|
2495
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
2496
|
+
'thoughtSignature',
|
|
2497
|
+
]);
|
|
2498
|
+
if (fromThoughtSignature != null) {
|
|
2499
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
2514
2500
|
}
|
|
2515
2501
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2516
2502
|
'codeExecutionResult',
|
|
@@ -2540,14 +2526,14 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2540
2526
|
}
|
|
2541
2527
|
return toObject;
|
|
2542
2528
|
}
|
|
2543
|
-
function contentToMldev$
|
|
2529
|
+
function contentToMldev$3(apiClient, fromObject) {
|
|
2544
2530
|
const toObject = {};
|
|
2545
2531
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
2546
2532
|
if (fromParts != null) {
|
|
2547
2533
|
let transformedList = fromParts;
|
|
2548
2534
|
if (Array.isArray(transformedList)) {
|
|
2549
2535
|
transformedList = transformedList.map((item) => {
|
|
2550
|
-
return partToMldev$
|
|
2536
|
+
return partToMldev$3(apiClient, item);
|
|
2551
2537
|
});
|
|
2552
2538
|
}
|
|
2553
2539
|
setValueByPath(toObject, ['parts'], transformedList);
|
|
@@ -2558,7 +2544,7 @@ function contentToMldev$2(apiClient, fromObject) {
|
|
|
2558
2544
|
}
|
|
2559
2545
|
return toObject;
|
|
2560
2546
|
}
|
|
2561
|
-
function functionDeclarationToMldev$
|
|
2547
|
+
function functionDeclarationToMldev$3(apiClient, fromObject) {
|
|
2562
2548
|
const toObject = {};
|
|
2563
2549
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
2564
2550
|
if (fromBehavior != null) {
|
|
@@ -2582,7 +2568,7 @@ function functionDeclarationToMldev$2(apiClient, fromObject) {
|
|
|
2582
2568
|
}
|
|
2583
2569
|
return toObject;
|
|
2584
2570
|
}
|
|
2585
|
-
function intervalToMldev$
|
|
2571
|
+
function intervalToMldev$3(apiClient, fromObject) {
|
|
2586
2572
|
const toObject = {};
|
|
2587
2573
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
2588
2574
|
if (fromStartTime != null) {
|
|
@@ -2594,17 +2580,17 @@ function intervalToMldev$2(apiClient, fromObject) {
|
|
|
2594
2580
|
}
|
|
2595
2581
|
return toObject;
|
|
2596
2582
|
}
|
|
2597
|
-
function googleSearchToMldev$
|
|
2583
|
+
function googleSearchToMldev$3(apiClient, fromObject) {
|
|
2598
2584
|
const toObject = {};
|
|
2599
2585
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
2600
2586
|
'timeRangeFilter',
|
|
2601
2587
|
]);
|
|
2602
2588
|
if (fromTimeRangeFilter != null) {
|
|
2603
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$
|
|
2589
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$3(apiClient, fromTimeRangeFilter));
|
|
2604
2590
|
}
|
|
2605
2591
|
return toObject;
|
|
2606
2592
|
}
|
|
2607
|
-
function dynamicRetrievalConfigToMldev$
|
|
2593
|
+
function dynamicRetrievalConfigToMldev$3(apiClient, fromObject) {
|
|
2608
2594
|
const toObject = {};
|
|
2609
2595
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
2610
2596
|
if (fromMode != null) {
|
|
@@ -2618,21 +2604,21 @@ function dynamicRetrievalConfigToMldev$2(apiClient, fromObject) {
|
|
|
2618
2604
|
}
|
|
2619
2605
|
return toObject;
|
|
2620
2606
|
}
|
|
2621
|
-
function googleSearchRetrievalToMldev$
|
|
2607
|
+
function googleSearchRetrievalToMldev$3(apiClient, fromObject) {
|
|
2622
2608
|
const toObject = {};
|
|
2623
2609
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
2624
2610
|
'dynamicRetrievalConfig',
|
|
2625
2611
|
]);
|
|
2626
2612
|
if (fromDynamicRetrievalConfig != null) {
|
|
2627
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$
|
|
2613
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$3(apiClient, fromDynamicRetrievalConfig));
|
|
2628
2614
|
}
|
|
2629
2615
|
return toObject;
|
|
2630
2616
|
}
|
|
2631
|
-
function urlContextToMldev$
|
|
2617
|
+
function urlContextToMldev$3() {
|
|
2632
2618
|
const toObject = {};
|
|
2633
2619
|
return toObject;
|
|
2634
2620
|
}
|
|
2635
|
-
function toolToMldev$
|
|
2621
|
+
function toolToMldev$3(apiClient, fromObject) {
|
|
2636
2622
|
const toObject = {};
|
|
2637
2623
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
2638
2624
|
'functionDeclarations',
|
|
@@ -2641,7 +2627,7 @@ function toolToMldev$2(apiClient, fromObject) {
|
|
|
2641
2627
|
let transformedList = fromFunctionDeclarations;
|
|
2642
2628
|
if (Array.isArray(transformedList)) {
|
|
2643
2629
|
transformedList = transformedList.map((item) => {
|
|
2644
|
-
return functionDeclarationToMldev$
|
|
2630
|
+
return functionDeclarationToMldev$3(apiClient, item);
|
|
2645
2631
|
});
|
|
2646
2632
|
}
|
|
2647
2633
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
@@ -2651,13 +2637,13 @@ function toolToMldev$2(apiClient, fromObject) {
|
|
|
2651
2637
|
}
|
|
2652
2638
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
2653
2639
|
if (fromGoogleSearch != null) {
|
|
2654
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$
|
|
2640
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(apiClient, fromGoogleSearch));
|
|
2655
2641
|
}
|
|
2656
2642
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
2657
2643
|
'googleSearchRetrieval',
|
|
2658
2644
|
]);
|
|
2659
2645
|
if (fromGoogleSearchRetrieval != null) {
|
|
2660
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$
|
|
2646
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$3(apiClient, fromGoogleSearchRetrieval));
|
|
2661
2647
|
}
|
|
2662
2648
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
2663
2649
|
throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
|
|
@@ -2667,7 +2653,7 @@ function toolToMldev$2(apiClient, fromObject) {
|
|
|
2667
2653
|
}
|
|
2668
2654
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
2669
2655
|
if (fromUrlContext != null) {
|
|
2670
|
-
setValueByPath(toObject, ['urlContext'], urlContextToMldev$
|
|
2656
|
+
setValueByPath(toObject, ['urlContext'], urlContextToMldev$3());
|
|
2671
2657
|
}
|
|
2672
2658
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
2673
2659
|
'codeExecution',
|
|
@@ -2750,7 +2736,7 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
2750
2736
|
let transformedList = tContents(apiClient, fromContents);
|
|
2751
2737
|
if (Array.isArray(transformedList)) {
|
|
2752
2738
|
transformedList = transformedList.map((item) => {
|
|
2753
|
-
return contentToMldev$
|
|
2739
|
+
return contentToMldev$3(apiClient, item);
|
|
2754
2740
|
});
|
|
2755
2741
|
}
|
|
2756
2742
|
setValueByPath(parentObject, ['contents'], transformedList);
|
|
@@ -2759,14 +2745,14 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
2759
2745
|
'systemInstruction',
|
|
2760
2746
|
]);
|
|
2761
2747
|
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
2762
|
-
setValueByPath(parentObject, ['systemInstruction'], contentToMldev$
|
|
2748
|
+
setValueByPath(parentObject, ['systemInstruction'], contentToMldev$3(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
2763
2749
|
}
|
|
2764
2750
|
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
2765
2751
|
if (parentObject !== undefined && fromTools != null) {
|
|
2766
2752
|
let transformedList = fromTools;
|
|
2767
2753
|
if (Array.isArray(transformedList)) {
|
|
2768
2754
|
transformedList = transformedList.map((item) => {
|
|
2769
|
-
return toolToMldev$
|
|
2755
|
+
return toolToMldev$3(apiClient, item);
|
|
2770
2756
|
});
|
|
2771
2757
|
}
|
|
2772
2758
|
setValueByPath(parentObject, ['tools'], transformedList);
|
|
@@ -2928,6 +2914,12 @@ function partToVertex$2(apiClient, fromObject) {
|
|
|
2928
2914
|
if (fromFileData != null) {
|
|
2929
2915
|
setValueByPath(toObject, ['fileData'], fileDataToVertex$2(apiClient, fromFileData));
|
|
2930
2916
|
}
|
|
2917
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
2918
|
+
'thoughtSignature',
|
|
2919
|
+
]);
|
|
2920
|
+
if (fromThoughtSignature != null) {
|
|
2921
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
2922
|
+
}
|
|
2931
2923
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2932
2924
|
'codeExecutionResult',
|
|
2933
2925
|
]);
|
|
@@ -4906,7 +4898,7 @@ class Files extends BaseModule {
|
|
|
4906
4898
|
* Copyright 2025 Google LLC
|
|
4907
4899
|
* SPDX-License-Identifier: Apache-2.0
|
|
4908
4900
|
*/
|
|
4909
|
-
function prebuiltVoiceConfigToMldev$
|
|
4901
|
+
function prebuiltVoiceConfigToMldev$2(apiClient, fromObject) {
|
|
4910
4902
|
const toObject = {};
|
|
4911
4903
|
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
4912
4904
|
if (fromVoiceName != null) {
|
|
@@ -4922,13 +4914,13 @@ function prebuiltVoiceConfigToVertex$1(apiClient, fromObject) {
|
|
|
4922
4914
|
}
|
|
4923
4915
|
return toObject;
|
|
4924
4916
|
}
|
|
4925
|
-
function voiceConfigToMldev$
|
|
4917
|
+
function voiceConfigToMldev$2(apiClient, fromObject) {
|
|
4926
4918
|
const toObject = {};
|
|
4927
4919
|
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
4928
4920
|
'prebuiltVoiceConfig',
|
|
4929
4921
|
]);
|
|
4930
4922
|
if (fromPrebuiltVoiceConfig != null) {
|
|
4931
|
-
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev$
|
|
4923
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev$2(apiClient, fromPrebuiltVoiceConfig));
|
|
4932
4924
|
}
|
|
4933
4925
|
return toObject;
|
|
4934
4926
|
}
|
|
@@ -4942,7 +4934,7 @@ function voiceConfigToVertex$1(apiClient, fromObject) {
|
|
|
4942
4934
|
}
|
|
4943
4935
|
return toObject;
|
|
4944
4936
|
}
|
|
4945
|
-
function speakerVoiceConfigToMldev$
|
|
4937
|
+
function speakerVoiceConfigToMldev$2(apiClient, fromObject) {
|
|
4946
4938
|
const toObject = {};
|
|
4947
4939
|
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
4948
4940
|
if (fromSpeaker != null) {
|
|
@@ -4950,11 +4942,11 @@ function speakerVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
|
4950
4942
|
}
|
|
4951
4943
|
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
4952
4944
|
if (fromVoiceConfig != null) {
|
|
4953
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$
|
|
4945
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$2(apiClient, fromVoiceConfig));
|
|
4954
4946
|
}
|
|
4955
4947
|
return toObject;
|
|
4956
4948
|
}
|
|
4957
|
-
function multiSpeakerVoiceConfigToMldev$
|
|
4949
|
+
function multiSpeakerVoiceConfigToMldev$2(apiClient, fromObject) {
|
|
4958
4950
|
const toObject = {};
|
|
4959
4951
|
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
4960
4952
|
'speakerVoiceConfigs',
|
|
@@ -4963,24 +4955,24 @@ function multiSpeakerVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
|
4963
4955
|
let transformedList = fromSpeakerVoiceConfigs;
|
|
4964
4956
|
if (Array.isArray(transformedList)) {
|
|
4965
4957
|
transformedList = transformedList.map((item) => {
|
|
4966
|
-
return speakerVoiceConfigToMldev$
|
|
4958
|
+
return speakerVoiceConfigToMldev$2(apiClient, item);
|
|
4967
4959
|
});
|
|
4968
4960
|
}
|
|
4969
4961
|
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
4970
4962
|
}
|
|
4971
4963
|
return toObject;
|
|
4972
4964
|
}
|
|
4973
|
-
function speechConfigToMldev$
|
|
4965
|
+
function speechConfigToMldev$2(apiClient, fromObject) {
|
|
4974
4966
|
const toObject = {};
|
|
4975
4967
|
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
4976
4968
|
if (fromVoiceConfig != null) {
|
|
4977
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$
|
|
4969
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$2(apiClient, fromVoiceConfig));
|
|
4978
4970
|
}
|
|
4979
4971
|
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
4980
4972
|
'multiSpeakerVoiceConfig',
|
|
4981
4973
|
]);
|
|
4982
4974
|
if (fromMultiSpeakerVoiceConfig != null) {
|
|
4983
|
-
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev$
|
|
4975
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev$2(apiClient, fromMultiSpeakerVoiceConfig));
|
|
4984
4976
|
}
|
|
4985
4977
|
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
4986
4978
|
if (fromLanguageCode != null) {
|
|
@@ -5003,7 +4995,7 @@ function speechConfigToVertex$1(apiClient, fromObject) {
|
|
|
5003
4995
|
}
|
|
5004
4996
|
return toObject;
|
|
5005
4997
|
}
|
|
5006
|
-
function videoMetadataToMldev$
|
|
4998
|
+
function videoMetadataToMldev$2(apiClient, fromObject) {
|
|
5007
4999
|
const toObject = {};
|
|
5008
5000
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
5009
5001
|
if (fromFps != null) {
|
|
@@ -5035,7 +5027,7 @@ function videoMetadataToVertex$1(apiClient, fromObject) {
|
|
|
5035
5027
|
}
|
|
5036
5028
|
return toObject;
|
|
5037
5029
|
}
|
|
5038
|
-
function blobToMldev$
|
|
5030
|
+
function blobToMldev$2(apiClient, fromObject) {
|
|
5039
5031
|
const toObject = {};
|
|
5040
5032
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5041
5033
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -5066,7 +5058,7 @@ function blobToVertex$1(apiClient, fromObject) {
|
|
|
5066
5058
|
}
|
|
5067
5059
|
return toObject;
|
|
5068
5060
|
}
|
|
5069
|
-
function fileDataToMldev$
|
|
5061
|
+
function fileDataToMldev$2(apiClient, fromObject) {
|
|
5070
5062
|
const toObject = {};
|
|
5071
5063
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5072
5064
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -5097,13 +5089,13 @@ function fileDataToVertex$1(apiClient, fromObject) {
|
|
|
5097
5089
|
}
|
|
5098
5090
|
return toObject;
|
|
5099
5091
|
}
|
|
5100
|
-
function partToMldev$
|
|
5092
|
+
function partToMldev$2(apiClient, fromObject) {
|
|
5101
5093
|
const toObject = {};
|
|
5102
5094
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
5103
5095
|
'videoMetadata',
|
|
5104
5096
|
]);
|
|
5105
5097
|
if (fromVideoMetadata != null) {
|
|
5106
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$
|
|
5098
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$2(apiClient, fromVideoMetadata));
|
|
5107
5099
|
}
|
|
5108
5100
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
5109
5101
|
if (fromThought != null) {
|
|
@@ -5111,11 +5103,17 @@ function partToMldev$1(apiClient, fromObject) {
|
|
|
5111
5103
|
}
|
|
5112
5104
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
5113
5105
|
if (fromInlineData != null) {
|
|
5114
|
-
setValueByPath(toObject, ['inlineData'], blobToMldev$
|
|
5106
|
+
setValueByPath(toObject, ['inlineData'], blobToMldev$2(apiClient, fromInlineData));
|
|
5115
5107
|
}
|
|
5116
5108
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5117
5109
|
if (fromFileData != null) {
|
|
5118
|
-
setValueByPath(toObject, ['fileData'], fileDataToMldev$
|
|
5110
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$2(apiClient, fromFileData));
|
|
5111
|
+
}
|
|
5112
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
5113
|
+
'thoughtSignature',
|
|
5114
|
+
]);
|
|
5115
|
+
if (fromThoughtSignature != null) {
|
|
5116
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
5119
5117
|
}
|
|
5120
5118
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5121
5119
|
'codeExecutionResult',
|
|
@@ -5165,6 +5163,12 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5165
5163
|
if (fromFileData != null) {
|
|
5166
5164
|
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(apiClient, fromFileData));
|
|
5167
5165
|
}
|
|
5166
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
5167
|
+
'thoughtSignature',
|
|
5168
|
+
]);
|
|
5169
|
+
if (fromThoughtSignature != null) {
|
|
5170
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
5171
|
+
}
|
|
5168
5172
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5169
5173
|
'codeExecutionResult',
|
|
5170
5174
|
]);
|
|
@@ -5193,14 +5197,14 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5193
5197
|
}
|
|
5194
5198
|
return toObject;
|
|
5195
5199
|
}
|
|
5196
|
-
function contentToMldev$
|
|
5200
|
+
function contentToMldev$2(apiClient, fromObject) {
|
|
5197
5201
|
const toObject = {};
|
|
5198
5202
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
5199
5203
|
if (fromParts != null) {
|
|
5200
5204
|
let transformedList = fromParts;
|
|
5201
5205
|
if (Array.isArray(transformedList)) {
|
|
5202
5206
|
transformedList = transformedList.map((item) => {
|
|
5203
|
-
return partToMldev$
|
|
5207
|
+
return partToMldev$2(apiClient, item);
|
|
5204
5208
|
});
|
|
5205
5209
|
}
|
|
5206
5210
|
setValueByPath(toObject, ['parts'], transformedList);
|
|
@@ -5229,7 +5233,7 @@ function contentToVertex$1(apiClient, fromObject) {
|
|
|
5229
5233
|
}
|
|
5230
5234
|
return toObject;
|
|
5231
5235
|
}
|
|
5232
|
-
function functionDeclarationToMldev$
|
|
5236
|
+
function functionDeclarationToMldev$2(apiClient, fromObject) {
|
|
5233
5237
|
const toObject = {};
|
|
5234
5238
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
5235
5239
|
if (fromBehavior != null) {
|
|
@@ -5276,7 +5280,7 @@ function functionDeclarationToVertex$1(apiClient, fromObject) {
|
|
|
5276
5280
|
}
|
|
5277
5281
|
return toObject;
|
|
5278
5282
|
}
|
|
5279
|
-
function intervalToMldev$
|
|
5283
|
+
function intervalToMldev$2(apiClient, fromObject) {
|
|
5280
5284
|
const toObject = {};
|
|
5281
5285
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
5282
5286
|
if (fromStartTime != null) {
|
|
@@ -5300,13 +5304,13 @@ function intervalToVertex$1(apiClient, fromObject) {
|
|
|
5300
5304
|
}
|
|
5301
5305
|
return toObject;
|
|
5302
5306
|
}
|
|
5303
|
-
function googleSearchToMldev$
|
|
5307
|
+
function googleSearchToMldev$2(apiClient, fromObject) {
|
|
5304
5308
|
const toObject = {};
|
|
5305
5309
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
5306
5310
|
'timeRangeFilter',
|
|
5307
5311
|
]);
|
|
5308
5312
|
if (fromTimeRangeFilter != null) {
|
|
5309
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$
|
|
5313
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$2(apiClient, fromTimeRangeFilter));
|
|
5310
5314
|
}
|
|
5311
5315
|
return toObject;
|
|
5312
5316
|
}
|
|
@@ -5320,7 +5324,7 @@ function googleSearchToVertex$1(apiClient, fromObject) {
|
|
|
5320
5324
|
}
|
|
5321
5325
|
return toObject;
|
|
5322
5326
|
}
|
|
5323
|
-
function dynamicRetrievalConfigToMldev$
|
|
5327
|
+
function dynamicRetrievalConfigToMldev$2(apiClient, fromObject) {
|
|
5324
5328
|
const toObject = {};
|
|
5325
5329
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
5326
5330
|
if (fromMode != null) {
|
|
@@ -5348,13 +5352,13 @@ function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) {
|
|
|
5348
5352
|
}
|
|
5349
5353
|
return toObject;
|
|
5350
5354
|
}
|
|
5351
|
-
function googleSearchRetrievalToMldev$
|
|
5355
|
+
function googleSearchRetrievalToMldev$2(apiClient, fromObject) {
|
|
5352
5356
|
const toObject = {};
|
|
5353
5357
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
5354
5358
|
'dynamicRetrievalConfig',
|
|
5355
5359
|
]);
|
|
5356
5360
|
if (fromDynamicRetrievalConfig != null) {
|
|
5357
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$
|
|
5361
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$2(apiClient, fromDynamicRetrievalConfig));
|
|
5358
5362
|
}
|
|
5359
5363
|
return toObject;
|
|
5360
5364
|
}
|
|
@@ -5420,11 +5424,11 @@ function googleMapsToVertex$1(apiClient, fromObject) {
|
|
|
5420
5424
|
}
|
|
5421
5425
|
return toObject;
|
|
5422
5426
|
}
|
|
5423
|
-
function urlContextToMldev$
|
|
5427
|
+
function urlContextToMldev$2() {
|
|
5424
5428
|
const toObject = {};
|
|
5425
5429
|
return toObject;
|
|
5426
5430
|
}
|
|
5427
|
-
function toolToMldev$
|
|
5431
|
+
function toolToMldev$2(apiClient, fromObject) {
|
|
5428
5432
|
const toObject = {};
|
|
5429
5433
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
5430
5434
|
'functionDeclarations',
|
|
@@ -5433,7 +5437,7 @@ function toolToMldev$1(apiClient, fromObject) {
|
|
|
5433
5437
|
let transformedList = fromFunctionDeclarations;
|
|
5434
5438
|
if (Array.isArray(transformedList)) {
|
|
5435
5439
|
transformedList = transformedList.map((item) => {
|
|
5436
|
-
return functionDeclarationToMldev$
|
|
5440
|
+
return functionDeclarationToMldev$2(apiClient, item);
|
|
5437
5441
|
});
|
|
5438
5442
|
}
|
|
5439
5443
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
@@ -5443,13 +5447,13 @@ function toolToMldev$1(apiClient, fromObject) {
|
|
|
5443
5447
|
}
|
|
5444
5448
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
5445
5449
|
if (fromGoogleSearch != null) {
|
|
5446
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$
|
|
5450
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(apiClient, fromGoogleSearch));
|
|
5447
5451
|
}
|
|
5448
5452
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
5449
5453
|
'googleSearchRetrieval',
|
|
5450
5454
|
]);
|
|
5451
5455
|
if (fromGoogleSearchRetrieval != null) {
|
|
5452
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$
|
|
5456
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$2(apiClient, fromGoogleSearchRetrieval));
|
|
5453
5457
|
}
|
|
5454
5458
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
5455
5459
|
throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
|
|
@@ -5459,7 +5463,7 @@ function toolToMldev$1(apiClient, fromObject) {
|
|
|
5459
5463
|
}
|
|
5460
5464
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
5461
5465
|
if (fromUrlContext != null) {
|
|
5462
|
-
setValueByPath(toObject, ['urlContext'], urlContextToMldev$
|
|
5466
|
+
setValueByPath(toObject, ['urlContext'], urlContextToMldev$2());
|
|
5463
5467
|
}
|
|
5464
5468
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
5465
5469
|
'codeExecution',
|
|
@@ -5518,7 +5522,7 @@ function toolToVertex$1(apiClient, fromObject) {
|
|
|
5518
5522
|
}
|
|
5519
5523
|
return toObject;
|
|
5520
5524
|
}
|
|
5521
|
-
function sessionResumptionConfigToMldev(apiClient, fromObject) {
|
|
5525
|
+
function sessionResumptionConfigToMldev$1(apiClient, fromObject) {
|
|
5522
5526
|
const toObject = {};
|
|
5523
5527
|
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
5524
5528
|
if (fromHandle != null) {
|
|
@@ -5541,7 +5545,7 @@ function sessionResumptionConfigToVertex(apiClient, fromObject) {
|
|
|
5541
5545
|
}
|
|
5542
5546
|
return toObject;
|
|
5543
5547
|
}
|
|
5544
|
-
function audioTranscriptionConfigToMldev() {
|
|
5548
|
+
function audioTranscriptionConfigToMldev$1() {
|
|
5545
5549
|
const toObject = {};
|
|
5546
5550
|
return toObject;
|
|
5547
5551
|
}
|
|
@@ -5549,7 +5553,7 @@ function audioTranscriptionConfigToVertex() {
|
|
|
5549
5553
|
const toObject = {};
|
|
5550
5554
|
return toObject;
|
|
5551
5555
|
}
|
|
5552
|
-
function automaticActivityDetectionToMldev(apiClient, fromObject) {
|
|
5556
|
+
function automaticActivityDetectionToMldev$1(apiClient, fromObject) {
|
|
5553
5557
|
const toObject = {};
|
|
5554
5558
|
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
5555
5559
|
if (fromDisabled != null) {
|
|
@@ -5613,13 +5617,13 @@ function automaticActivityDetectionToVertex(apiClient, fromObject) {
|
|
|
5613
5617
|
}
|
|
5614
5618
|
return toObject;
|
|
5615
5619
|
}
|
|
5616
|
-
function realtimeInputConfigToMldev(apiClient, fromObject) {
|
|
5620
|
+
function realtimeInputConfigToMldev$1(apiClient, fromObject) {
|
|
5617
5621
|
const toObject = {};
|
|
5618
5622
|
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
5619
5623
|
'automaticActivityDetection',
|
|
5620
5624
|
]);
|
|
5621
5625
|
if (fromAutomaticActivityDetection != null) {
|
|
5622
|
-
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(apiClient, fromAutomaticActivityDetection));
|
|
5626
|
+
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev$1(apiClient, fromAutomaticActivityDetection));
|
|
5623
5627
|
}
|
|
5624
5628
|
const fromActivityHandling = getValueByPath(fromObject, [
|
|
5625
5629
|
'activityHandling',
|
|
@@ -5653,7 +5657,7 @@ function realtimeInputConfigToVertex(apiClient, fromObject) {
|
|
|
5653
5657
|
}
|
|
5654
5658
|
return toObject;
|
|
5655
5659
|
}
|
|
5656
|
-
function slidingWindowToMldev(apiClient, fromObject) {
|
|
5660
|
+
function slidingWindowToMldev$1(apiClient, fromObject) {
|
|
5657
5661
|
const toObject = {};
|
|
5658
5662
|
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
5659
5663
|
if (fromTargetTokens != null) {
|
|
@@ -5669,7 +5673,7 @@ function slidingWindowToVertex(apiClient, fromObject) {
|
|
|
5669
5673
|
}
|
|
5670
5674
|
return toObject;
|
|
5671
5675
|
}
|
|
5672
|
-
function contextWindowCompressionConfigToMldev(apiClient, fromObject) {
|
|
5676
|
+
function contextWindowCompressionConfigToMldev$1(apiClient, fromObject) {
|
|
5673
5677
|
const toObject = {};
|
|
5674
5678
|
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
5675
5679
|
'triggerTokens',
|
|
@@ -5681,7 +5685,7 @@ function contextWindowCompressionConfigToMldev(apiClient, fromObject) {
|
|
|
5681
5685
|
'slidingWindow',
|
|
5682
5686
|
]);
|
|
5683
5687
|
if (fromSlidingWindow != null) {
|
|
5684
|
-
setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(apiClient, fromSlidingWindow));
|
|
5688
|
+
setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev$1(apiClient, fromSlidingWindow));
|
|
5685
5689
|
}
|
|
5686
5690
|
return toObject;
|
|
5687
5691
|
}
|
|
@@ -5701,7 +5705,7 @@ function contextWindowCompressionConfigToVertex(apiClient, fromObject) {
|
|
|
5701
5705
|
}
|
|
5702
5706
|
return toObject;
|
|
5703
5707
|
}
|
|
5704
|
-
function proactivityConfigToMldev(apiClient, fromObject) {
|
|
5708
|
+
function proactivityConfigToMldev$1(apiClient, fromObject) {
|
|
5705
5709
|
const toObject = {};
|
|
5706
5710
|
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
5707
5711
|
'proactiveAudio',
|
|
@@ -5721,7 +5725,7 @@ function proactivityConfigToVertex(apiClient, fromObject) {
|
|
|
5721
5725
|
}
|
|
5722
5726
|
return toObject;
|
|
5723
5727
|
}
|
|
5724
|
-
function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
5728
|
+
function liveConnectConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
5725
5729
|
const toObject = {};
|
|
5726
5730
|
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
5727
5731
|
'generationConfig',
|
|
@@ -5765,7 +5769,7 @@ function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
5765
5769
|
}
|
|
5766
5770
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
5767
5771
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
5768
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev$
|
|
5772
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev$2(apiClient, tLiveSpeechConfig(apiClient, fromSpeechConfig)));
|
|
5769
5773
|
}
|
|
5770
5774
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
5771
5775
|
'enableAffectiveDialog',
|
|
@@ -5777,14 +5781,14 @@ function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
5777
5781
|
'systemInstruction',
|
|
5778
5782
|
]);
|
|
5779
5783
|
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
5780
|
-
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$
|
|
5784
|
+
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$2(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
5781
5785
|
}
|
|
5782
5786
|
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
5783
5787
|
if (parentObject !== undefined && fromTools != null) {
|
|
5784
5788
|
let transformedList = tTools(apiClient, fromTools);
|
|
5785
5789
|
if (Array.isArray(transformedList)) {
|
|
5786
5790
|
transformedList = transformedList.map((item) => {
|
|
5787
|
-
return toolToMldev$
|
|
5791
|
+
return toolToMldev$2(apiClient, tTool(apiClient, item));
|
|
5788
5792
|
});
|
|
5789
5793
|
}
|
|
5790
5794
|
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
@@ -5793,35 +5797,35 @@ function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
5793
5797
|
'sessionResumption',
|
|
5794
5798
|
]);
|
|
5795
5799
|
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
5796
|
-
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(apiClient, fromSessionResumption));
|
|
5800
|
+
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev$1(apiClient, fromSessionResumption));
|
|
5797
5801
|
}
|
|
5798
5802
|
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
5799
5803
|
'inputAudioTranscription',
|
|
5800
5804
|
]);
|
|
5801
5805
|
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
5802
|
-
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToMldev());
|
|
5806
|
+
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToMldev$1());
|
|
5803
5807
|
}
|
|
5804
5808
|
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
5805
5809
|
'outputAudioTranscription',
|
|
5806
5810
|
]);
|
|
5807
5811
|
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
5808
|
-
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToMldev());
|
|
5812
|
+
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToMldev$1());
|
|
5809
5813
|
}
|
|
5810
5814
|
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
5811
5815
|
'realtimeInputConfig',
|
|
5812
5816
|
]);
|
|
5813
5817
|
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
5814
|
-
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig));
|
|
5818
|
+
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev$1(apiClient, fromRealtimeInputConfig));
|
|
5815
5819
|
}
|
|
5816
5820
|
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
5817
5821
|
'contextWindowCompression',
|
|
5818
5822
|
]);
|
|
5819
5823
|
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
5820
|
-
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev(apiClient, fromContextWindowCompression));
|
|
5824
|
+
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev$1(apiClient, fromContextWindowCompression));
|
|
5821
5825
|
}
|
|
5822
5826
|
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
5823
5827
|
if (parentObject !== undefined && fromProactivity != null) {
|
|
5824
|
-
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToMldev(apiClient, fromProactivity));
|
|
5828
|
+
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToMldev$1(apiClient, fromProactivity));
|
|
5825
5829
|
}
|
|
5826
5830
|
return toObject;
|
|
5827
5831
|
}
|
|
@@ -5937,7 +5941,7 @@ function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
|
5937
5941
|
}
|
|
5938
5942
|
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
5939
5943
|
if (fromConfig != null) {
|
|
5940
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToMldev(apiClient, fromConfig, toObject));
|
|
5944
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(apiClient, fromConfig, toObject));
|
|
5941
5945
|
}
|
|
5942
5946
|
return toObject;
|
|
5943
5947
|
}
|
|
@@ -6114,12 +6118,6 @@ function liveMusicGenerationConfigToMldev(apiClient, fromObject) {
|
|
|
6114
6118
|
if (fromOnlyBassAndDrums != null) {
|
|
6115
6119
|
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
6116
6120
|
}
|
|
6117
|
-
const fromMusicGenerationMode = getValueByPath(fromObject, [
|
|
6118
|
-
'musicGenerationMode',
|
|
6119
|
-
]);
|
|
6120
|
-
if (fromMusicGenerationMode != null) {
|
|
6121
|
-
setValueByPath(toObject, ['musicGenerationMode'], fromMusicGenerationMode);
|
|
6122
|
-
}
|
|
6123
6121
|
return toObject;
|
|
6124
6122
|
}
|
|
6125
6123
|
function liveMusicSetConfigParametersToMldev(apiClient, fromObject) {
|
|
@@ -6298,6 +6296,12 @@ function partFromMldev$1(apiClient, fromObject) {
|
|
|
6298
6296
|
if (fromFileData != null) {
|
|
6299
6297
|
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(apiClient, fromFileData));
|
|
6300
6298
|
}
|
|
6299
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
6300
|
+
'thoughtSignature',
|
|
6301
|
+
]);
|
|
6302
|
+
if (fromThoughtSignature != null) {
|
|
6303
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
6304
|
+
}
|
|
6301
6305
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6302
6306
|
'codeExecutionResult',
|
|
6303
6307
|
]);
|
|
@@ -6346,6 +6350,12 @@ function partFromVertex$1(apiClient, fromObject) {
|
|
|
6346
6350
|
if (fromFileData != null) {
|
|
6347
6351
|
setValueByPath(toObject, ['fileData'], fileDataFromVertex$1(apiClient, fromFileData));
|
|
6348
6352
|
}
|
|
6353
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
6354
|
+
'thoughtSignature',
|
|
6355
|
+
]);
|
|
6356
|
+
if (fromThoughtSignature != null) {
|
|
6357
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
6358
|
+
}
|
|
6349
6359
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6350
6360
|
'codeExecutionResult',
|
|
6351
6361
|
]);
|
|
@@ -7044,12 +7054,6 @@ function liveMusicGenerationConfigFromMldev(apiClient, fromObject) {
|
|
|
7044
7054
|
if (fromOnlyBassAndDrums != null) {
|
|
7045
7055
|
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
7046
7056
|
}
|
|
7047
|
-
const fromMusicGenerationMode = getValueByPath(fromObject, [
|
|
7048
|
-
'musicGenerationMode',
|
|
7049
|
-
]);
|
|
7050
|
-
if (fromMusicGenerationMode != null) {
|
|
7051
|
-
setValueByPath(toObject, ['musicGenerationMode'], fromMusicGenerationMode);
|
|
7052
|
-
}
|
|
7053
7057
|
return toObject;
|
|
7054
7058
|
}
|
|
7055
7059
|
function liveMusicSourceMetadataFromMldev(apiClient, fromObject) {
|
|
@@ -7142,7 +7146,7 @@ function liveMusicServerMessageFromMldev(apiClient, fromObject) {
|
|
|
7142
7146
|
* Copyright 2025 Google LLC
|
|
7143
7147
|
* SPDX-License-Identifier: Apache-2.0
|
|
7144
7148
|
*/
|
|
7145
|
-
function videoMetadataToMldev(apiClient, fromObject) {
|
|
7149
|
+
function videoMetadataToMldev$1(apiClient, fromObject) {
|
|
7146
7150
|
const toObject = {};
|
|
7147
7151
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
7148
7152
|
if (fromFps != null) {
|
|
@@ -7158,7 +7162,7 @@ function videoMetadataToMldev(apiClient, fromObject) {
|
|
|
7158
7162
|
}
|
|
7159
7163
|
return toObject;
|
|
7160
7164
|
}
|
|
7161
|
-
function blobToMldev(apiClient, fromObject) {
|
|
7165
|
+
function blobToMldev$1(apiClient, fromObject) {
|
|
7162
7166
|
const toObject = {};
|
|
7163
7167
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
7164
7168
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -7173,7 +7177,7 @@ function blobToMldev(apiClient, fromObject) {
|
|
|
7173
7177
|
}
|
|
7174
7178
|
return toObject;
|
|
7175
7179
|
}
|
|
7176
|
-
function fileDataToMldev(apiClient, fromObject) {
|
|
7180
|
+
function fileDataToMldev$1(apiClient, fromObject) {
|
|
7177
7181
|
const toObject = {};
|
|
7178
7182
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
7179
7183
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -7188,13 +7192,13 @@ function fileDataToMldev(apiClient, fromObject) {
|
|
|
7188
7192
|
}
|
|
7189
7193
|
return toObject;
|
|
7190
7194
|
}
|
|
7191
|
-
function partToMldev(apiClient, fromObject) {
|
|
7195
|
+
function partToMldev$1(apiClient, fromObject) {
|
|
7192
7196
|
const toObject = {};
|
|
7193
7197
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
7194
7198
|
'videoMetadata',
|
|
7195
7199
|
]);
|
|
7196
7200
|
if (fromVideoMetadata != null) {
|
|
7197
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev(apiClient, fromVideoMetadata));
|
|
7201
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$1(apiClient, fromVideoMetadata));
|
|
7198
7202
|
}
|
|
7199
7203
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
7200
7204
|
if (fromThought != null) {
|
|
@@ -7202,11 +7206,17 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7202
7206
|
}
|
|
7203
7207
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
7204
7208
|
if (fromInlineData != null) {
|
|
7205
|
-
setValueByPath(toObject, ['inlineData'], blobToMldev(apiClient, fromInlineData));
|
|
7209
|
+
setValueByPath(toObject, ['inlineData'], blobToMldev$1(apiClient, fromInlineData));
|
|
7206
7210
|
}
|
|
7207
7211
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7208
7212
|
if (fromFileData != null) {
|
|
7209
|
-
setValueByPath(toObject, ['fileData'], fileDataToMldev(apiClient, fromFileData));
|
|
7213
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$1(apiClient, fromFileData));
|
|
7214
|
+
}
|
|
7215
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
7216
|
+
'thoughtSignature',
|
|
7217
|
+
]);
|
|
7218
|
+
if (fromThoughtSignature != null) {
|
|
7219
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
7210
7220
|
}
|
|
7211
7221
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7212
7222
|
'codeExecutionResult',
|
|
@@ -7236,14 +7246,14 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7236
7246
|
}
|
|
7237
7247
|
return toObject;
|
|
7238
7248
|
}
|
|
7239
|
-
function contentToMldev(apiClient, fromObject) {
|
|
7249
|
+
function contentToMldev$1(apiClient, fromObject) {
|
|
7240
7250
|
const toObject = {};
|
|
7241
7251
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7242
7252
|
if (fromParts != null) {
|
|
7243
7253
|
let transformedList = fromParts;
|
|
7244
7254
|
if (Array.isArray(transformedList)) {
|
|
7245
7255
|
transformedList = transformedList.map((item) => {
|
|
7246
|
-
return partToMldev(apiClient, item);
|
|
7256
|
+
return partToMldev$1(apiClient, item);
|
|
7247
7257
|
});
|
|
7248
7258
|
}
|
|
7249
7259
|
setValueByPath(toObject, ['parts'], transformedList);
|
|
@@ -7367,7 +7377,7 @@ function safetySettingToMldev(apiClient, fromObject) {
|
|
|
7367
7377
|
}
|
|
7368
7378
|
return toObject;
|
|
7369
7379
|
}
|
|
7370
|
-
function functionDeclarationToMldev(apiClient, fromObject) {
|
|
7380
|
+
function functionDeclarationToMldev$1(apiClient, fromObject) {
|
|
7371
7381
|
const toObject = {};
|
|
7372
7382
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
7373
7383
|
if (fromBehavior != null) {
|
|
@@ -7391,7 +7401,7 @@ function functionDeclarationToMldev(apiClient, fromObject) {
|
|
|
7391
7401
|
}
|
|
7392
7402
|
return toObject;
|
|
7393
7403
|
}
|
|
7394
|
-
function intervalToMldev(apiClient, fromObject) {
|
|
7404
|
+
function intervalToMldev$1(apiClient, fromObject) {
|
|
7395
7405
|
const toObject = {};
|
|
7396
7406
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7397
7407
|
if (fromStartTime != null) {
|
|
@@ -7403,17 +7413,17 @@ function intervalToMldev(apiClient, fromObject) {
|
|
|
7403
7413
|
}
|
|
7404
7414
|
return toObject;
|
|
7405
7415
|
}
|
|
7406
|
-
function googleSearchToMldev(apiClient, fromObject) {
|
|
7416
|
+
function googleSearchToMldev$1(apiClient, fromObject) {
|
|
7407
7417
|
const toObject = {};
|
|
7408
7418
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7409
7419
|
'timeRangeFilter',
|
|
7410
7420
|
]);
|
|
7411
7421
|
if (fromTimeRangeFilter != null) {
|
|
7412
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev(apiClient, fromTimeRangeFilter));
|
|
7422
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$1(apiClient, fromTimeRangeFilter));
|
|
7413
7423
|
}
|
|
7414
7424
|
return toObject;
|
|
7415
7425
|
}
|
|
7416
|
-
function dynamicRetrievalConfigToMldev(apiClient, fromObject) {
|
|
7426
|
+
function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) {
|
|
7417
7427
|
const toObject = {};
|
|
7418
7428
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
7419
7429
|
if (fromMode != null) {
|
|
@@ -7427,21 +7437,21 @@ function dynamicRetrievalConfigToMldev(apiClient, fromObject) {
|
|
|
7427
7437
|
}
|
|
7428
7438
|
return toObject;
|
|
7429
7439
|
}
|
|
7430
|
-
function googleSearchRetrievalToMldev(apiClient, fromObject) {
|
|
7440
|
+
function googleSearchRetrievalToMldev$1(apiClient, fromObject) {
|
|
7431
7441
|
const toObject = {};
|
|
7432
7442
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
7433
7443
|
'dynamicRetrievalConfig',
|
|
7434
7444
|
]);
|
|
7435
7445
|
if (fromDynamicRetrievalConfig != null) {
|
|
7436
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig));
|
|
7446
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig));
|
|
7437
7447
|
}
|
|
7438
7448
|
return toObject;
|
|
7439
7449
|
}
|
|
7440
|
-
function urlContextToMldev() {
|
|
7450
|
+
function urlContextToMldev$1() {
|
|
7441
7451
|
const toObject = {};
|
|
7442
7452
|
return toObject;
|
|
7443
7453
|
}
|
|
7444
|
-
function toolToMldev(apiClient, fromObject) {
|
|
7454
|
+
function toolToMldev$1(apiClient, fromObject) {
|
|
7445
7455
|
const toObject = {};
|
|
7446
7456
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
7447
7457
|
'functionDeclarations',
|
|
@@ -7450,7 +7460,7 @@ function toolToMldev(apiClient, fromObject) {
|
|
|
7450
7460
|
let transformedList = fromFunctionDeclarations;
|
|
7451
7461
|
if (Array.isArray(transformedList)) {
|
|
7452
7462
|
transformedList = transformedList.map((item) => {
|
|
7453
|
-
return functionDeclarationToMldev(apiClient, item);
|
|
7463
|
+
return functionDeclarationToMldev$1(apiClient, item);
|
|
7454
7464
|
});
|
|
7455
7465
|
}
|
|
7456
7466
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
@@ -7460,13 +7470,13 @@ function toolToMldev(apiClient, fromObject) {
|
|
|
7460
7470
|
}
|
|
7461
7471
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
7462
7472
|
if (fromGoogleSearch != null) {
|
|
7463
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(apiClient, fromGoogleSearch));
|
|
7473
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(apiClient, fromGoogleSearch));
|
|
7464
7474
|
}
|
|
7465
7475
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
7466
7476
|
'googleSearchRetrieval',
|
|
7467
7477
|
]);
|
|
7468
7478
|
if (fromGoogleSearchRetrieval != null) {
|
|
7469
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval));
|
|
7479
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval));
|
|
7470
7480
|
}
|
|
7471
7481
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
7472
7482
|
throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
|
|
@@ -7476,7 +7486,7 @@ function toolToMldev(apiClient, fromObject) {
|
|
|
7476
7486
|
}
|
|
7477
7487
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
7478
7488
|
if (fromUrlContext != null) {
|
|
7479
|
-
setValueByPath(toObject, ['urlContext'], urlContextToMldev());
|
|
7489
|
+
setValueByPath(toObject, ['urlContext'], urlContextToMldev$1());
|
|
7480
7490
|
}
|
|
7481
7491
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
7482
7492
|
'codeExecution',
|
|
@@ -7540,7 +7550,7 @@ function toolConfigToMldev(apiClient, fromObject) {
|
|
|
7540
7550
|
}
|
|
7541
7551
|
return toObject;
|
|
7542
7552
|
}
|
|
7543
|
-
function prebuiltVoiceConfigToMldev(apiClient, fromObject) {
|
|
7553
|
+
function prebuiltVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
7544
7554
|
const toObject = {};
|
|
7545
7555
|
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
7546
7556
|
if (fromVoiceName != null) {
|
|
@@ -7548,17 +7558,17 @@ function prebuiltVoiceConfigToMldev(apiClient, fromObject) {
|
|
|
7548
7558
|
}
|
|
7549
7559
|
return toObject;
|
|
7550
7560
|
}
|
|
7551
|
-
function voiceConfigToMldev(apiClient, fromObject) {
|
|
7561
|
+
function voiceConfigToMldev$1(apiClient, fromObject) {
|
|
7552
7562
|
const toObject = {};
|
|
7553
7563
|
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
7554
7564
|
'prebuiltVoiceConfig',
|
|
7555
7565
|
]);
|
|
7556
7566
|
if (fromPrebuiltVoiceConfig != null) {
|
|
7557
|
-
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig));
|
|
7567
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev$1(apiClient, fromPrebuiltVoiceConfig));
|
|
7558
7568
|
}
|
|
7559
7569
|
return toObject;
|
|
7560
7570
|
}
|
|
7561
|
-
function speakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
7571
|
+
function speakerVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
7562
7572
|
const toObject = {};
|
|
7563
7573
|
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
7564
7574
|
if (fromSpeaker != null) {
|
|
@@ -7566,11 +7576,11 @@ function speakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
|
7566
7576
|
}
|
|
7567
7577
|
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
7568
7578
|
if (fromVoiceConfig != null) {
|
|
7569
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig));
|
|
7579
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$1(apiClient, fromVoiceConfig));
|
|
7570
7580
|
}
|
|
7571
7581
|
return toObject;
|
|
7572
7582
|
}
|
|
7573
|
-
function multiSpeakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
7583
|
+
function multiSpeakerVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
7574
7584
|
const toObject = {};
|
|
7575
7585
|
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
7576
7586
|
'speakerVoiceConfigs',
|
|
@@ -7579,24 +7589,24 @@ function multiSpeakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
|
7579
7589
|
let transformedList = fromSpeakerVoiceConfigs;
|
|
7580
7590
|
if (Array.isArray(transformedList)) {
|
|
7581
7591
|
transformedList = transformedList.map((item) => {
|
|
7582
|
-
return speakerVoiceConfigToMldev(apiClient, item);
|
|
7592
|
+
return speakerVoiceConfigToMldev$1(apiClient, item);
|
|
7583
7593
|
});
|
|
7584
7594
|
}
|
|
7585
7595
|
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
7586
7596
|
}
|
|
7587
7597
|
return toObject;
|
|
7588
7598
|
}
|
|
7589
|
-
function speechConfigToMldev(apiClient, fromObject) {
|
|
7599
|
+
function speechConfigToMldev$1(apiClient, fromObject) {
|
|
7590
7600
|
const toObject = {};
|
|
7591
7601
|
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
7592
7602
|
if (fromVoiceConfig != null) {
|
|
7593
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig));
|
|
7603
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$1(apiClient, fromVoiceConfig));
|
|
7594
7604
|
}
|
|
7595
7605
|
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
7596
7606
|
'multiSpeakerVoiceConfig',
|
|
7597
7607
|
]);
|
|
7598
7608
|
if (fromMultiSpeakerVoiceConfig != null) {
|
|
7599
|
-
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev(apiClient, fromMultiSpeakerVoiceConfig));
|
|
7609
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev$1(apiClient, fromMultiSpeakerVoiceConfig));
|
|
7600
7610
|
}
|
|
7601
7611
|
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
7602
7612
|
if (fromLanguageCode != null) {
|
|
@@ -7626,7 +7636,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
7626
7636
|
'systemInstruction',
|
|
7627
7637
|
]);
|
|
7628
7638
|
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
7629
|
-
setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
7639
|
+
setValueByPath(parentObject, ['systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
7630
7640
|
}
|
|
7631
7641
|
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
7632
7642
|
if (fromTemperature != null) {
|
|
@@ -7719,7 +7729,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
7719
7729
|
let transformedList = tTools(apiClient, fromTools);
|
|
7720
7730
|
if (Array.isArray(transformedList)) {
|
|
7721
7731
|
transformedList = transformedList.map((item) => {
|
|
7722
|
-
return toolToMldev(apiClient, tTool(apiClient, item));
|
|
7732
|
+
return toolToMldev$1(apiClient, tTool(apiClient, item));
|
|
7723
7733
|
});
|
|
7724
7734
|
}
|
|
7725
7735
|
setValueByPath(parentObject, ['tools'], transformedList);
|
|
@@ -7751,7 +7761,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
7751
7761
|
}
|
|
7752
7762
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
7753
7763
|
if (fromSpeechConfig != null) {
|
|
7754
|
-
setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig)));
|
|
7764
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToMldev$1(apiClient, tSpeechConfig(apiClient, fromSpeechConfig)));
|
|
7755
7765
|
}
|
|
7756
7766
|
if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
|
|
7757
7767
|
throw new Error('audioTimestamp parameter is not supported in Gemini API.');
|
|
@@ -7775,7 +7785,7 @@ function generateContentParametersToMldev(apiClient, fromObject) {
|
|
|
7775
7785
|
let transformedList = tContents(apiClient, fromContents);
|
|
7776
7786
|
if (Array.isArray(transformedList)) {
|
|
7777
7787
|
transformedList = transformedList.map((item) => {
|
|
7778
|
-
return contentToMldev(apiClient, item);
|
|
7788
|
+
return contentToMldev$1(apiClient, item);
|
|
7779
7789
|
});
|
|
7780
7790
|
}
|
|
7781
7791
|
setValueByPath(toObject, ['contents'], transformedList);
|
|
@@ -8027,7 +8037,7 @@ function countTokensParametersToMldev(apiClient, fromObject) {
|
|
|
8027
8037
|
let transformedList = tContents(apiClient, fromContents);
|
|
8028
8038
|
if (Array.isArray(transformedList)) {
|
|
8029
8039
|
transformedList = transformedList.map((item) => {
|
|
8030
|
-
return contentToMldev(apiClient, item);
|
|
8040
|
+
return contentToMldev$1(apiClient, item);
|
|
8031
8041
|
});
|
|
8032
8042
|
}
|
|
8033
8043
|
setValueByPath(toObject, ['contents'], transformedList);
|
|
@@ -8101,6 +8111,9 @@ function generateVideosConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
8101
8111
|
if (getValueByPath(fromObject, ['enhancePrompt']) !== undefined) {
|
|
8102
8112
|
throw new Error('enhancePrompt parameter is not supported in Gemini API.');
|
|
8103
8113
|
}
|
|
8114
|
+
if (getValueByPath(fromObject, ['generateAudio']) !== undefined) {
|
|
8115
|
+
throw new Error('generateAudio parameter is not supported in Gemini API.');
|
|
8116
|
+
}
|
|
8104
8117
|
return toObject;
|
|
8105
8118
|
}
|
|
8106
8119
|
function generateVideosParametersToMldev(apiClient, fromObject) {
|
|
@@ -8191,6 +8204,12 @@ function partToVertex(apiClient, fromObject) {
|
|
|
8191
8204
|
if (fromFileData != null) {
|
|
8192
8205
|
setValueByPath(toObject, ['fileData'], fileDataToVertex(apiClient, fromFileData));
|
|
8193
8206
|
}
|
|
8207
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8208
|
+
'thoughtSignature',
|
|
8209
|
+
]);
|
|
8210
|
+
if (fromThoughtSignature != null) {
|
|
8211
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
8212
|
+
}
|
|
8194
8213
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
8195
8214
|
'codeExecutionResult',
|
|
8196
8215
|
]);
|
|
@@ -9440,6 +9459,12 @@ function generateVideosConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
9440
9459
|
if (parentObject !== undefined && fromEnhancePrompt != null) {
|
|
9441
9460
|
setValueByPath(parentObject, ['parameters', 'enhancePrompt'], fromEnhancePrompt);
|
|
9442
9461
|
}
|
|
9462
|
+
const fromGenerateAudio = getValueByPath(fromObject, [
|
|
9463
|
+
'generateAudio',
|
|
9464
|
+
]);
|
|
9465
|
+
if (parentObject !== undefined && fromGenerateAudio != null) {
|
|
9466
|
+
setValueByPath(parentObject, ['parameters', 'generateAudio'], fromGenerateAudio);
|
|
9467
|
+
}
|
|
9443
9468
|
return toObject;
|
|
9444
9469
|
}
|
|
9445
9470
|
function generateVideosParametersToVertex(apiClient, fromObject) {
|
|
@@ -9522,6 +9547,12 @@ function partFromMldev(apiClient, fromObject) {
|
|
|
9522
9547
|
if (fromFileData != null) {
|
|
9523
9548
|
setValueByPath(toObject, ['fileData'], fileDataFromMldev(apiClient, fromFileData));
|
|
9524
9549
|
}
|
|
9550
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
9551
|
+
'thoughtSignature',
|
|
9552
|
+
]);
|
|
9553
|
+
if (fromThoughtSignature != null) {
|
|
9554
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
9555
|
+
}
|
|
9525
9556
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
9526
9557
|
'codeExecutionResult',
|
|
9527
9558
|
]);
|
|
@@ -10040,6 +10071,12 @@ function partFromVertex(apiClient, fromObject) {
|
|
|
10040
10071
|
if (fromFileData != null) {
|
|
10041
10072
|
setValueByPath(toObject, ['fileData'], fileDataFromVertex(apiClient, fromFileData));
|
|
10042
10073
|
}
|
|
10074
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
10075
|
+
'thoughtSignature',
|
|
10076
|
+
]);
|
|
10077
|
+
if (fromThoughtSignature != null) {
|
|
10078
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
10079
|
+
}
|
|
10043
10080
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
10044
10081
|
'codeExecutionResult',
|
|
10045
10082
|
]);
|
|
@@ -10582,7 +10619,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
10582
10619
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
10583
10620
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
10584
10621
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
10585
|
-
const SDK_VERSION = '1.
|
|
10622
|
+
const SDK_VERSION = '1.3.0'; // x-release-please-version
|
|
10586
10623
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
10587
10624
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
10588
10625
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -11118,9 +11155,6 @@ function hasMcpToolUsage(tools) {
|
|
|
11118
11155
|
function setMcpUsageHeader(headers) {
|
|
11119
11156
|
var _a;
|
|
11120
11157
|
const existingHeader = (_a = headers[GOOGLE_API_CLIENT_HEADER]) !== null && _a !== void 0 ? _a : '';
|
|
11121
|
-
if (existingHeader.includes(MCP_LABEL)) {
|
|
11122
|
-
return;
|
|
11123
|
-
}
|
|
11124
11158
|
headers[GOOGLE_API_CLIENT_HEADER] = (existingHeader + ` ${MCP_LABEL}`).trimStart();
|
|
11125
11159
|
}
|
|
11126
11160
|
// Checks whether the list of tools contains any MCP clients. Will return true
|
|
@@ -11137,11 +11171,9 @@ function hasNonMcpTools(params) {
|
|
|
11137
11171
|
}
|
|
11138
11172
|
// Returns true if the object is a MCP CallableTool, otherwise false.
|
|
11139
11173
|
function isMcpCallableTool(object) {
|
|
11140
|
-
// TODO: b/418266406 - Add a more robust check for the MCP CallableTool.
|
|
11141
11174
|
return (object !== null &&
|
|
11142
11175
|
typeof object === 'object' &&
|
|
11143
|
-
|
|
11144
|
-
'callTool' in object);
|
|
11176
|
+
object instanceof McpCallableTool);
|
|
11145
11177
|
}
|
|
11146
11178
|
// List all tools from the MCP client.
|
|
11147
11179
|
function listAllTools(mcpClient, maxTools = 100) {
|
|
@@ -11621,7 +11653,14 @@ class Live {
|
|
|
11621
11653
|
}
|
|
11622
11654
|
else {
|
|
11623
11655
|
const apiKey = this.apiClient.getApiKey();
|
|
11624
|
-
|
|
11656
|
+
let method = 'BidiGenerateContent';
|
|
11657
|
+
let keyName = 'key';
|
|
11658
|
+
if (apiKey === null || apiKey === void 0 ? void 0 : apiKey.startsWith('auth_tokens/')) {
|
|
11659
|
+
console.warn('Warning: Ephemeral token support is experimental and may change in future versions.');
|
|
11660
|
+
method = 'BidiGenerateContentConstrained';
|
|
11661
|
+
keyName = 'access_token';
|
|
11662
|
+
}
|
|
11663
|
+
url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${apiVersion}.GenerativeService.${method}?${keyName}=${apiKey}`;
|
|
11625
11664
|
}
|
|
11626
11665
|
let onopenResolve = () => { };
|
|
11627
11666
|
const onopenPromise = new Promise((resolve) => {
|
|
@@ -11727,7 +11766,7 @@ class Session {
|
|
|
11727
11766
|
contents = contents.map((item) => contentToVertex(apiClient, item));
|
|
11728
11767
|
}
|
|
11729
11768
|
else {
|
|
11730
|
-
contents = contents.map((item) => contentToMldev(apiClient, item));
|
|
11769
|
+
contents = contents.map((item) => contentToMldev$1(apiClient, item));
|
|
11731
11770
|
}
|
|
11732
11771
|
}
|
|
11733
11772
|
catch (_a) {
|
|
@@ -12025,7 +12064,6 @@ class Models extends BaseModule {
|
|
|
12025
12064
|
if (!hasMcpClientTools(params) || shouldDisableAfc(params.config)) {
|
|
12026
12065
|
return await this.generateContentInternal(transformedParams);
|
|
12027
12066
|
}
|
|
12028
|
-
// TODO: b/418266406 - Improve the check for CallableTools and Tools.
|
|
12029
12067
|
if (hasNonMcpTools(params)) {
|
|
12030
12068
|
throw new Error('Automatic function calling with CallableTools and Tools is not yet supported.');
|
|
12031
12069
|
}
|
|
@@ -13580,19 +13618,857 @@ class Operations extends BaseModule {
|
|
|
13580
13618
|
* Copyright 2025 Google LLC
|
|
13581
13619
|
* SPDX-License-Identifier: Apache-2.0
|
|
13582
13620
|
*/
|
|
13583
|
-
|
|
13584
|
-
const
|
|
13585
|
-
|
|
13586
|
-
|
|
13587
|
-
|
|
13588
|
-
|
|
13589
|
-
|
|
13621
|
+
function prebuiltVoiceConfigToMldev(apiClient, fromObject) {
|
|
13622
|
+
const toObject = {};
|
|
13623
|
+
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
13624
|
+
if (fromVoiceName != null) {
|
|
13625
|
+
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
13626
|
+
}
|
|
13627
|
+
return toObject;
|
|
13628
|
+
}
|
|
13629
|
+
function voiceConfigToMldev(apiClient, fromObject) {
|
|
13630
|
+
const toObject = {};
|
|
13631
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
13632
|
+
'prebuiltVoiceConfig',
|
|
13633
|
+
]);
|
|
13634
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
13635
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig));
|
|
13636
|
+
}
|
|
13637
|
+
return toObject;
|
|
13638
|
+
}
|
|
13639
|
+
function speakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
13640
|
+
const toObject = {};
|
|
13641
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
13642
|
+
if (fromSpeaker != null) {
|
|
13643
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
13644
|
+
}
|
|
13645
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
13646
|
+
if (fromVoiceConfig != null) {
|
|
13647
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig));
|
|
13648
|
+
}
|
|
13649
|
+
return toObject;
|
|
13650
|
+
}
|
|
13651
|
+
function multiSpeakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
13652
|
+
const toObject = {};
|
|
13653
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
13654
|
+
'speakerVoiceConfigs',
|
|
13655
|
+
]);
|
|
13656
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
13657
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
13658
|
+
if (Array.isArray(transformedList)) {
|
|
13659
|
+
transformedList = transformedList.map((item) => {
|
|
13660
|
+
return speakerVoiceConfigToMldev(apiClient, item);
|
|
13661
|
+
});
|
|
13590
13662
|
}
|
|
13591
|
-
|
|
13592
|
-
this.googleAuth = new GoogleAuth(vertexAuthOptions);
|
|
13663
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
13593
13664
|
}
|
|
13594
|
-
|
|
13595
|
-
|
|
13665
|
+
return toObject;
|
|
13666
|
+
}
|
|
13667
|
+
function speechConfigToMldev(apiClient, fromObject) {
|
|
13668
|
+
const toObject = {};
|
|
13669
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
13670
|
+
if (fromVoiceConfig != null) {
|
|
13671
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig));
|
|
13672
|
+
}
|
|
13673
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
13674
|
+
'multiSpeakerVoiceConfig',
|
|
13675
|
+
]);
|
|
13676
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
13677
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev(apiClient, fromMultiSpeakerVoiceConfig));
|
|
13678
|
+
}
|
|
13679
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
13680
|
+
if (fromLanguageCode != null) {
|
|
13681
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
13682
|
+
}
|
|
13683
|
+
return toObject;
|
|
13684
|
+
}
|
|
13685
|
+
function videoMetadataToMldev(apiClient, fromObject) {
|
|
13686
|
+
const toObject = {};
|
|
13687
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
13688
|
+
if (fromFps != null) {
|
|
13689
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
13690
|
+
}
|
|
13691
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
13692
|
+
if (fromEndOffset != null) {
|
|
13693
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
13694
|
+
}
|
|
13695
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
13696
|
+
if (fromStartOffset != null) {
|
|
13697
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
13698
|
+
}
|
|
13699
|
+
return toObject;
|
|
13700
|
+
}
|
|
13701
|
+
function blobToMldev(apiClient, fromObject) {
|
|
13702
|
+
const toObject = {};
|
|
13703
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
13704
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
13705
|
+
}
|
|
13706
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
13707
|
+
if (fromData != null) {
|
|
13708
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
13709
|
+
}
|
|
13710
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
13711
|
+
if (fromMimeType != null) {
|
|
13712
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
13713
|
+
}
|
|
13714
|
+
return toObject;
|
|
13715
|
+
}
|
|
13716
|
+
function fileDataToMldev(apiClient, fromObject) {
|
|
13717
|
+
const toObject = {};
|
|
13718
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
13719
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
13720
|
+
}
|
|
13721
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
13722
|
+
if (fromFileUri != null) {
|
|
13723
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
13724
|
+
}
|
|
13725
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
13726
|
+
if (fromMimeType != null) {
|
|
13727
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
13728
|
+
}
|
|
13729
|
+
return toObject;
|
|
13730
|
+
}
|
|
13731
|
+
function partToMldev(apiClient, fromObject) {
|
|
13732
|
+
const toObject = {};
|
|
13733
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
13734
|
+
'videoMetadata',
|
|
13735
|
+
]);
|
|
13736
|
+
if (fromVideoMetadata != null) {
|
|
13737
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev(apiClient, fromVideoMetadata));
|
|
13738
|
+
}
|
|
13739
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
13740
|
+
if (fromThought != null) {
|
|
13741
|
+
setValueByPath(toObject, ['thought'], fromThought);
|
|
13742
|
+
}
|
|
13743
|
+
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
13744
|
+
if (fromInlineData != null) {
|
|
13745
|
+
setValueByPath(toObject, ['inlineData'], blobToMldev(apiClient, fromInlineData));
|
|
13746
|
+
}
|
|
13747
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
13748
|
+
if (fromFileData != null) {
|
|
13749
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev(apiClient, fromFileData));
|
|
13750
|
+
}
|
|
13751
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
13752
|
+
'thoughtSignature',
|
|
13753
|
+
]);
|
|
13754
|
+
if (fromThoughtSignature != null) {
|
|
13755
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
13756
|
+
}
|
|
13757
|
+
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
13758
|
+
'codeExecutionResult',
|
|
13759
|
+
]);
|
|
13760
|
+
if (fromCodeExecutionResult != null) {
|
|
13761
|
+
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
13762
|
+
}
|
|
13763
|
+
const fromExecutableCode = getValueByPath(fromObject, [
|
|
13764
|
+
'executableCode',
|
|
13765
|
+
]);
|
|
13766
|
+
if (fromExecutableCode != null) {
|
|
13767
|
+
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
13768
|
+
}
|
|
13769
|
+
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
13770
|
+
if (fromFunctionCall != null) {
|
|
13771
|
+
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
13772
|
+
}
|
|
13773
|
+
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
13774
|
+
'functionResponse',
|
|
13775
|
+
]);
|
|
13776
|
+
if (fromFunctionResponse != null) {
|
|
13777
|
+
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
13778
|
+
}
|
|
13779
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
13780
|
+
if (fromText != null) {
|
|
13781
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
13782
|
+
}
|
|
13783
|
+
return toObject;
|
|
13784
|
+
}
|
|
13785
|
+
function contentToMldev(apiClient, fromObject) {
|
|
13786
|
+
const toObject = {};
|
|
13787
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
13788
|
+
if (fromParts != null) {
|
|
13789
|
+
let transformedList = fromParts;
|
|
13790
|
+
if (Array.isArray(transformedList)) {
|
|
13791
|
+
transformedList = transformedList.map((item) => {
|
|
13792
|
+
return partToMldev(apiClient, item);
|
|
13793
|
+
});
|
|
13794
|
+
}
|
|
13795
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
13796
|
+
}
|
|
13797
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
13798
|
+
if (fromRole != null) {
|
|
13799
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
13800
|
+
}
|
|
13801
|
+
return toObject;
|
|
13802
|
+
}
|
|
13803
|
+
function functionDeclarationToMldev(apiClient, fromObject) {
|
|
13804
|
+
const toObject = {};
|
|
13805
|
+
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
13806
|
+
if (fromBehavior != null) {
|
|
13807
|
+
setValueByPath(toObject, ['behavior'], fromBehavior);
|
|
13808
|
+
}
|
|
13809
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
13810
|
+
if (fromDescription != null) {
|
|
13811
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
13812
|
+
}
|
|
13813
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
13814
|
+
if (fromName != null) {
|
|
13815
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
13816
|
+
}
|
|
13817
|
+
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
13818
|
+
if (fromParameters != null) {
|
|
13819
|
+
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
13820
|
+
}
|
|
13821
|
+
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
13822
|
+
if (fromResponse != null) {
|
|
13823
|
+
setValueByPath(toObject, ['response'], fromResponse);
|
|
13824
|
+
}
|
|
13825
|
+
return toObject;
|
|
13826
|
+
}
|
|
13827
|
+
function intervalToMldev(apiClient, fromObject) {
|
|
13828
|
+
const toObject = {};
|
|
13829
|
+
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
13830
|
+
if (fromStartTime != null) {
|
|
13831
|
+
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
13832
|
+
}
|
|
13833
|
+
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
13834
|
+
if (fromEndTime != null) {
|
|
13835
|
+
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
13836
|
+
}
|
|
13837
|
+
return toObject;
|
|
13838
|
+
}
|
|
13839
|
+
function googleSearchToMldev(apiClient, fromObject) {
|
|
13840
|
+
const toObject = {};
|
|
13841
|
+
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
13842
|
+
'timeRangeFilter',
|
|
13843
|
+
]);
|
|
13844
|
+
if (fromTimeRangeFilter != null) {
|
|
13845
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev(apiClient, fromTimeRangeFilter));
|
|
13846
|
+
}
|
|
13847
|
+
return toObject;
|
|
13848
|
+
}
|
|
13849
|
+
function dynamicRetrievalConfigToMldev(apiClient, fromObject) {
|
|
13850
|
+
const toObject = {};
|
|
13851
|
+
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
13852
|
+
if (fromMode != null) {
|
|
13853
|
+
setValueByPath(toObject, ['mode'], fromMode);
|
|
13854
|
+
}
|
|
13855
|
+
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
13856
|
+
'dynamicThreshold',
|
|
13857
|
+
]);
|
|
13858
|
+
if (fromDynamicThreshold != null) {
|
|
13859
|
+
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
13860
|
+
}
|
|
13861
|
+
return toObject;
|
|
13862
|
+
}
|
|
13863
|
+
function googleSearchRetrievalToMldev(apiClient, fromObject) {
|
|
13864
|
+
const toObject = {};
|
|
13865
|
+
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
13866
|
+
'dynamicRetrievalConfig',
|
|
13867
|
+
]);
|
|
13868
|
+
if (fromDynamicRetrievalConfig != null) {
|
|
13869
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig));
|
|
13870
|
+
}
|
|
13871
|
+
return toObject;
|
|
13872
|
+
}
|
|
13873
|
+
function urlContextToMldev() {
|
|
13874
|
+
const toObject = {};
|
|
13875
|
+
return toObject;
|
|
13876
|
+
}
|
|
13877
|
+
function toolToMldev(apiClient, fromObject) {
|
|
13878
|
+
const toObject = {};
|
|
13879
|
+
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
13880
|
+
'functionDeclarations',
|
|
13881
|
+
]);
|
|
13882
|
+
if (fromFunctionDeclarations != null) {
|
|
13883
|
+
let transformedList = fromFunctionDeclarations;
|
|
13884
|
+
if (Array.isArray(transformedList)) {
|
|
13885
|
+
transformedList = transformedList.map((item) => {
|
|
13886
|
+
return functionDeclarationToMldev(apiClient, item);
|
|
13887
|
+
});
|
|
13888
|
+
}
|
|
13889
|
+
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
13890
|
+
}
|
|
13891
|
+
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
13892
|
+
throw new Error('retrieval parameter is not supported in Gemini API.');
|
|
13893
|
+
}
|
|
13894
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
13895
|
+
if (fromGoogleSearch != null) {
|
|
13896
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(apiClient, fromGoogleSearch));
|
|
13897
|
+
}
|
|
13898
|
+
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
13899
|
+
'googleSearchRetrieval',
|
|
13900
|
+
]);
|
|
13901
|
+
if (fromGoogleSearchRetrieval != null) {
|
|
13902
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval));
|
|
13903
|
+
}
|
|
13904
|
+
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
13905
|
+
throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
|
|
13906
|
+
}
|
|
13907
|
+
if (getValueByPath(fromObject, ['googleMaps']) !== undefined) {
|
|
13908
|
+
throw new Error('googleMaps parameter is not supported in Gemini API.');
|
|
13909
|
+
}
|
|
13910
|
+
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
13911
|
+
if (fromUrlContext != null) {
|
|
13912
|
+
setValueByPath(toObject, ['urlContext'], urlContextToMldev());
|
|
13913
|
+
}
|
|
13914
|
+
const fromCodeExecution = getValueByPath(fromObject, [
|
|
13915
|
+
'codeExecution',
|
|
13916
|
+
]);
|
|
13917
|
+
if (fromCodeExecution != null) {
|
|
13918
|
+
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
13919
|
+
}
|
|
13920
|
+
return toObject;
|
|
13921
|
+
}
|
|
13922
|
+
function sessionResumptionConfigToMldev(apiClient, fromObject) {
|
|
13923
|
+
const toObject = {};
|
|
13924
|
+
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
13925
|
+
if (fromHandle != null) {
|
|
13926
|
+
setValueByPath(toObject, ['handle'], fromHandle);
|
|
13927
|
+
}
|
|
13928
|
+
if (getValueByPath(fromObject, ['transparent']) !== undefined) {
|
|
13929
|
+
throw new Error('transparent parameter is not supported in Gemini API.');
|
|
13930
|
+
}
|
|
13931
|
+
return toObject;
|
|
13932
|
+
}
|
|
13933
|
+
function audioTranscriptionConfigToMldev() {
|
|
13934
|
+
const toObject = {};
|
|
13935
|
+
return toObject;
|
|
13936
|
+
}
|
|
13937
|
+
function automaticActivityDetectionToMldev(apiClient, fromObject) {
|
|
13938
|
+
const toObject = {};
|
|
13939
|
+
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
13940
|
+
if (fromDisabled != null) {
|
|
13941
|
+
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
13942
|
+
}
|
|
13943
|
+
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
13944
|
+
'startOfSpeechSensitivity',
|
|
13945
|
+
]);
|
|
13946
|
+
if (fromStartOfSpeechSensitivity != null) {
|
|
13947
|
+
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
13948
|
+
}
|
|
13949
|
+
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
13950
|
+
'endOfSpeechSensitivity',
|
|
13951
|
+
]);
|
|
13952
|
+
if (fromEndOfSpeechSensitivity != null) {
|
|
13953
|
+
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
13954
|
+
}
|
|
13955
|
+
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
13956
|
+
'prefixPaddingMs',
|
|
13957
|
+
]);
|
|
13958
|
+
if (fromPrefixPaddingMs != null) {
|
|
13959
|
+
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
13960
|
+
}
|
|
13961
|
+
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
13962
|
+
'silenceDurationMs',
|
|
13963
|
+
]);
|
|
13964
|
+
if (fromSilenceDurationMs != null) {
|
|
13965
|
+
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
13966
|
+
}
|
|
13967
|
+
return toObject;
|
|
13968
|
+
}
|
|
13969
|
+
function realtimeInputConfigToMldev(apiClient, fromObject) {
|
|
13970
|
+
const toObject = {};
|
|
13971
|
+
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
13972
|
+
'automaticActivityDetection',
|
|
13973
|
+
]);
|
|
13974
|
+
if (fromAutomaticActivityDetection != null) {
|
|
13975
|
+
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(apiClient, fromAutomaticActivityDetection));
|
|
13976
|
+
}
|
|
13977
|
+
const fromActivityHandling = getValueByPath(fromObject, [
|
|
13978
|
+
'activityHandling',
|
|
13979
|
+
]);
|
|
13980
|
+
if (fromActivityHandling != null) {
|
|
13981
|
+
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
13982
|
+
}
|
|
13983
|
+
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
13984
|
+
if (fromTurnCoverage != null) {
|
|
13985
|
+
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
13986
|
+
}
|
|
13987
|
+
return toObject;
|
|
13988
|
+
}
|
|
13989
|
+
function slidingWindowToMldev(apiClient, fromObject) {
|
|
13990
|
+
const toObject = {};
|
|
13991
|
+
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
13992
|
+
if (fromTargetTokens != null) {
|
|
13993
|
+
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
13994
|
+
}
|
|
13995
|
+
return toObject;
|
|
13996
|
+
}
|
|
13997
|
+
function contextWindowCompressionConfigToMldev(apiClient, fromObject) {
|
|
13998
|
+
const toObject = {};
|
|
13999
|
+
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
14000
|
+
'triggerTokens',
|
|
14001
|
+
]);
|
|
14002
|
+
if (fromTriggerTokens != null) {
|
|
14003
|
+
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
14004
|
+
}
|
|
14005
|
+
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
14006
|
+
'slidingWindow',
|
|
14007
|
+
]);
|
|
14008
|
+
if (fromSlidingWindow != null) {
|
|
14009
|
+
setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(apiClient, fromSlidingWindow));
|
|
14010
|
+
}
|
|
14011
|
+
return toObject;
|
|
14012
|
+
}
|
|
14013
|
+
function proactivityConfigToMldev(apiClient, fromObject) {
|
|
14014
|
+
const toObject = {};
|
|
14015
|
+
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
14016
|
+
'proactiveAudio',
|
|
14017
|
+
]);
|
|
14018
|
+
if (fromProactiveAudio != null) {
|
|
14019
|
+
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
14020
|
+
}
|
|
14021
|
+
return toObject;
|
|
14022
|
+
}
|
|
14023
|
+
function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
14024
|
+
const toObject = {};
|
|
14025
|
+
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
14026
|
+
'generationConfig',
|
|
14027
|
+
]);
|
|
14028
|
+
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
14029
|
+
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
14030
|
+
}
|
|
14031
|
+
const fromResponseModalities = getValueByPath(fromObject, [
|
|
14032
|
+
'responseModalities',
|
|
14033
|
+
]);
|
|
14034
|
+
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
14035
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
14036
|
+
}
|
|
14037
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
14038
|
+
if (parentObject !== undefined && fromTemperature != null) {
|
|
14039
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
|
|
14040
|
+
}
|
|
14041
|
+
const fromTopP = getValueByPath(fromObject, ['topP']);
|
|
14042
|
+
if (parentObject !== undefined && fromTopP != null) {
|
|
14043
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
|
|
14044
|
+
}
|
|
14045
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
14046
|
+
if (parentObject !== undefined && fromTopK != null) {
|
|
14047
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
|
|
14048
|
+
}
|
|
14049
|
+
const fromMaxOutputTokens = getValueByPath(fromObject, [
|
|
14050
|
+
'maxOutputTokens',
|
|
14051
|
+
]);
|
|
14052
|
+
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
14053
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
14054
|
+
}
|
|
14055
|
+
const fromMediaResolution = getValueByPath(fromObject, [
|
|
14056
|
+
'mediaResolution',
|
|
14057
|
+
]);
|
|
14058
|
+
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
14059
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
14060
|
+
}
|
|
14061
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
14062
|
+
if (parentObject !== undefined && fromSeed != null) {
|
|
14063
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
14064
|
+
}
|
|
14065
|
+
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
14066
|
+
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
14067
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev(apiClient, tLiveSpeechConfig(apiClient, fromSpeechConfig)));
|
|
14068
|
+
}
|
|
14069
|
+
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
14070
|
+
'enableAffectiveDialog',
|
|
14071
|
+
]);
|
|
14072
|
+
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
14073
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
14074
|
+
}
|
|
14075
|
+
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
14076
|
+
'systemInstruction',
|
|
14077
|
+
]);
|
|
14078
|
+
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
14079
|
+
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
14080
|
+
}
|
|
14081
|
+
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
14082
|
+
if (parentObject !== undefined && fromTools != null) {
|
|
14083
|
+
let transformedList = tTools(apiClient, fromTools);
|
|
14084
|
+
if (Array.isArray(transformedList)) {
|
|
14085
|
+
transformedList = transformedList.map((item) => {
|
|
14086
|
+
return toolToMldev(apiClient, tTool(apiClient, item));
|
|
14087
|
+
});
|
|
14088
|
+
}
|
|
14089
|
+
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
14090
|
+
}
|
|
14091
|
+
const fromSessionResumption = getValueByPath(fromObject, [
|
|
14092
|
+
'sessionResumption',
|
|
14093
|
+
]);
|
|
14094
|
+
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
14095
|
+
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(apiClient, fromSessionResumption));
|
|
14096
|
+
}
|
|
14097
|
+
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
14098
|
+
'inputAudioTranscription',
|
|
14099
|
+
]);
|
|
14100
|
+
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
14101
|
+
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToMldev());
|
|
14102
|
+
}
|
|
14103
|
+
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
14104
|
+
'outputAudioTranscription',
|
|
14105
|
+
]);
|
|
14106
|
+
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
14107
|
+
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToMldev());
|
|
14108
|
+
}
|
|
14109
|
+
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
14110
|
+
'realtimeInputConfig',
|
|
14111
|
+
]);
|
|
14112
|
+
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
14113
|
+
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig));
|
|
14114
|
+
}
|
|
14115
|
+
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
14116
|
+
'contextWindowCompression',
|
|
14117
|
+
]);
|
|
14118
|
+
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
14119
|
+
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev(apiClient, fromContextWindowCompression));
|
|
14120
|
+
}
|
|
14121
|
+
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
14122
|
+
if (parentObject !== undefined && fromProactivity != null) {
|
|
14123
|
+
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToMldev(apiClient, fromProactivity));
|
|
14124
|
+
}
|
|
14125
|
+
return toObject;
|
|
14126
|
+
}
|
|
14127
|
+
function liveConnectConstraintsToMldev(apiClient, fromObject) {
|
|
14128
|
+
const toObject = {};
|
|
14129
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
14130
|
+
if (fromModel != null) {
|
|
14131
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
14132
|
+
}
|
|
14133
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
14134
|
+
if (fromConfig != null) {
|
|
14135
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToMldev(apiClient, fromConfig, toObject));
|
|
14136
|
+
}
|
|
14137
|
+
return toObject;
|
|
14138
|
+
}
|
|
14139
|
+
function createAuthTokenConfigToMldev(apiClient, fromObject, parentObject) {
|
|
14140
|
+
const toObject = {};
|
|
14141
|
+
const fromExpireTime = getValueByPath(fromObject, ['expireTime']);
|
|
14142
|
+
if (parentObject !== undefined && fromExpireTime != null) {
|
|
14143
|
+
setValueByPath(parentObject, ['expireTime'], fromExpireTime);
|
|
14144
|
+
}
|
|
14145
|
+
const fromNewSessionExpireTime = getValueByPath(fromObject, [
|
|
14146
|
+
'newSessionExpireTime',
|
|
14147
|
+
]);
|
|
14148
|
+
if (parentObject !== undefined && fromNewSessionExpireTime != null) {
|
|
14149
|
+
setValueByPath(parentObject, ['newSessionExpireTime'], fromNewSessionExpireTime);
|
|
14150
|
+
}
|
|
14151
|
+
const fromUses = getValueByPath(fromObject, ['uses']);
|
|
14152
|
+
if (parentObject !== undefined && fromUses != null) {
|
|
14153
|
+
setValueByPath(parentObject, ['uses'], fromUses);
|
|
14154
|
+
}
|
|
14155
|
+
const fromLiveConnectConstraints = getValueByPath(fromObject, [
|
|
14156
|
+
'liveConnectConstraints',
|
|
14157
|
+
]);
|
|
14158
|
+
if (parentObject !== undefined && fromLiveConnectConstraints != null) {
|
|
14159
|
+
setValueByPath(parentObject, ['bidiGenerateContentSetup'], liveConnectConstraintsToMldev(apiClient, fromLiveConnectConstraints));
|
|
14160
|
+
}
|
|
14161
|
+
const fromLockAdditionalFields = getValueByPath(fromObject, [
|
|
14162
|
+
'lockAdditionalFields',
|
|
14163
|
+
]);
|
|
14164
|
+
if (parentObject !== undefined && fromLockAdditionalFields != null) {
|
|
14165
|
+
setValueByPath(parentObject, ['fieldMask'], fromLockAdditionalFields);
|
|
14166
|
+
}
|
|
14167
|
+
return toObject;
|
|
14168
|
+
}
|
|
14169
|
+
function createAuthTokenParametersToMldev(apiClient, fromObject) {
|
|
14170
|
+
const toObject = {};
|
|
14171
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
14172
|
+
if (fromConfig != null) {
|
|
14173
|
+
setValueByPath(toObject, ['config'], createAuthTokenConfigToMldev(apiClient, fromConfig, toObject));
|
|
14174
|
+
}
|
|
14175
|
+
return toObject;
|
|
14176
|
+
}
|
|
14177
|
+
function authTokenFromMldev(apiClient, fromObject) {
|
|
14178
|
+
const toObject = {};
|
|
14179
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
14180
|
+
if (fromName != null) {
|
|
14181
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
14182
|
+
}
|
|
14183
|
+
return toObject;
|
|
14184
|
+
}
|
|
14185
|
+
|
|
14186
|
+
/**
|
|
14187
|
+
* @license
|
|
14188
|
+
* Copyright 2025 Google LLC
|
|
14189
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
14190
|
+
*/
|
|
14191
|
+
/**
|
|
14192
|
+
* Returns a comma-separated list of field masks from a given object.
|
|
14193
|
+
*
|
|
14194
|
+
* @param setup The object to extract field masks from.
|
|
14195
|
+
* @return A comma-separated list of field masks.
|
|
14196
|
+
*/
|
|
14197
|
+
function getFieldMasks(setup) {
|
|
14198
|
+
const fields = [];
|
|
14199
|
+
for (const key in setup) {
|
|
14200
|
+
if (Object.prototype.hasOwnProperty.call(setup, key)) {
|
|
14201
|
+
const value = setup[key];
|
|
14202
|
+
// 2nd layer, recursively get field masks see TODO(b/418290100)
|
|
14203
|
+
if (typeof value === 'object' &&
|
|
14204
|
+
value != null &&
|
|
14205
|
+
Object.keys(value).length > 0) {
|
|
14206
|
+
const field = Object.keys(value).map((kk) => `${key}.${kk}`);
|
|
14207
|
+
fields.push(...field);
|
|
14208
|
+
}
|
|
14209
|
+
else {
|
|
14210
|
+
fields.push(key); // 1st layer
|
|
14211
|
+
}
|
|
14212
|
+
}
|
|
14213
|
+
}
|
|
14214
|
+
return fields.join(',');
|
|
14215
|
+
}
|
|
14216
|
+
/**
|
|
14217
|
+
* Converts bidiGenerateContentSetup.
|
|
14218
|
+
* @param requestDict - The request dictionary.
|
|
14219
|
+
* @param config - The configuration object.
|
|
14220
|
+
* @return - The modified request dictionary.
|
|
14221
|
+
*/
|
|
14222
|
+
function convertBidiSetupToTokenSetup(requestDict, config) {
|
|
14223
|
+
// Convert bidiGenerateContentSetup from bidiGenerateContentSetup.setup.
|
|
14224
|
+
let setupForMaskGeneration = null;
|
|
14225
|
+
const bidiGenerateContentSetupValue = requestDict['bidiGenerateContentSetup'];
|
|
14226
|
+
if (typeof bidiGenerateContentSetupValue === 'object' &&
|
|
14227
|
+
bidiGenerateContentSetupValue !== null &&
|
|
14228
|
+
'setup' in bidiGenerateContentSetupValue) {
|
|
14229
|
+
// Now we know bidiGenerateContentSetupValue is an object and has a 'setup'
|
|
14230
|
+
// property.
|
|
14231
|
+
const innerSetup = bidiGenerateContentSetupValue
|
|
14232
|
+
.setup;
|
|
14233
|
+
if (typeof innerSetup === 'object' && innerSetup !== null) {
|
|
14234
|
+
// Valid inner setup found.
|
|
14235
|
+
requestDict['bidiGenerateContentSetup'] = innerSetup;
|
|
14236
|
+
setupForMaskGeneration = innerSetup;
|
|
14237
|
+
}
|
|
14238
|
+
else {
|
|
14239
|
+
// `bidiGenerateContentSetupValue.setup` is not a valid object; treat as
|
|
14240
|
+
// if bidiGenerateContentSetup is invalid.
|
|
14241
|
+
delete requestDict['bidiGenerateContentSetup'];
|
|
14242
|
+
}
|
|
14243
|
+
}
|
|
14244
|
+
else if (bidiGenerateContentSetupValue !== undefined) {
|
|
14245
|
+
// `bidiGenerateContentSetup` exists but not in the expected
|
|
14246
|
+
// shape {setup: {...}}; treat as invalid.
|
|
14247
|
+
delete requestDict['bidiGenerateContentSetup'];
|
|
14248
|
+
}
|
|
14249
|
+
const preExistingFieldMask = requestDict['fieldMask'];
|
|
14250
|
+
// Handle mask generation setup.
|
|
14251
|
+
if (setupForMaskGeneration) {
|
|
14252
|
+
const generatedMaskFromBidi = getFieldMasks(setupForMaskGeneration);
|
|
14253
|
+
if (Array.isArray(config === null || config === void 0 ? void 0 : config.lockAdditionalFields) &&
|
|
14254
|
+
(config === null || config === void 0 ? void 0 : config.lockAdditionalFields.length) === 0) {
|
|
14255
|
+
// Case 1: lockAdditionalFields is an empty array. Lock only fields from
|
|
14256
|
+
// bidi setup.
|
|
14257
|
+
if (generatedMaskFromBidi) {
|
|
14258
|
+
// Only assign if mask is not empty
|
|
14259
|
+
requestDict['fieldMask'] = generatedMaskFromBidi;
|
|
14260
|
+
}
|
|
14261
|
+
else {
|
|
14262
|
+
delete requestDict['fieldMask']; // If mask is empty, effectively no
|
|
14263
|
+
// specific fields locked by bidi
|
|
14264
|
+
}
|
|
14265
|
+
}
|
|
14266
|
+
else if ((config === null || config === void 0 ? void 0 : config.lockAdditionalFields) &&
|
|
14267
|
+
config.lockAdditionalFields.length > 0 &&
|
|
14268
|
+
preExistingFieldMask !== null &&
|
|
14269
|
+
Array.isArray(preExistingFieldMask) &&
|
|
14270
|
+
preExistingFieldMask.length > 0) {
|
|
14271
|
+
// Case 2: Lock fields from bidi setup + additional fields
|
|
14272
|
+
// (preExistingFieldMask).
|
|
14273
|
+
const generationConfigFields = [
|
|
14274
|
+
'temperature',
|
|
14275
|
+
'topK',
|
|
14276
|
+
'topP',
|
|
14277
|
+
'maxOutputTokens',
|
|
14278
|
+
'responseModalities',
|
|
14279
|
+
'seed',
|
|
14280
|
+
'speechConfig',
|
|
14281
|
+
];
|
|
14282
|
+
let mappedFieldsFromPreExisting = [];
|
|
14283
|
+
if (preExistingFieldMask.length > 0) {
|
|
14284
|
+
mappedFieldsFromPreExisting = preExistingFieldMask.map((field) => {
|
|
14285
|
+
if (generationConfigFields.includes(field)) {
|
|
14286
|
+
return `generationConfig.${field}`;
|
|
14287
|
+
}
|
|
14288
|
+
return field; // Keep original field name if not in
|
|
14289
|
+
// generationConfigFields
|
|
14290
|
+
});
|
|
14291
|
+
}
|
|
14292
|
+
const finalMaskParts = [];
|
|
14293
|
+
if (generatedMaskFromBidi) {
|
|
14294
|
+
finalMaskParts.push(generatedMaskFromBidi);
|
|
14295
|
+
}
|
|
14296
|
+
if (mappedFieldsFromPreExisting.length > 0) {
|
|
14297
|
+
finalMaskParts.push(...mappedFieldsFromPreExisting);
|
|
14298
|
+
}
|
|
14299
|
+
if (finalMaskParts.length > 0) {
|
|
14300
|
+
requestDict['fieldMask'] = finalMaskParts.join(',');
|
|
14301
|
+
}
|
|
14302
|
+
else {
|
|
14303
|
+
// If no fields from bidi and no valid additional fields from
|
|
14304
|
+
// pre-existing mask.
|
|
14305
|
+
delete requestDict['fieldMask'];
|
|
14306
|
+
}
|
|
14307
|
+
}
|
|
14308
|
+
else {
|
|
14309
|
+
// Case 3: "Lock all fields" (meaning, don't send a field_mask, let server
|
|
14310
|
+
// defaults apply or all are mutable). This is hit if:
|
|
14311
|
+
// - `config.lockAdditionalFields` is undefined.
|
|
14312
|
+
// - `config.lockAdditionalFields` is non-empty, BUT
|
|
14313
|
+
// `preExistingFieldMask` is null, not a string, or an empty string.
|
|
14314
|
+
delete requestDict['fieldMask'];
|
|
14315
|
+
}
|
|
14316
|
+
}
|
|
14317
|
+
else {
|
|
14318
|
+
// No valid `bidiGenerateContentSetup` was found or extracted.
|
|
14319
|
+
// "Lock additional null fields if any".
|
|
14320
|
+
if (preExistingFieldMask !== null &&
|
|
14321
|
+
Array.isArray(preExistingFieldMask) &&
|
|
14322
|
+
preExistingFieldMask.length > 0) {
|
|
14323
|
+
// If there's a pre-existing field mask, it's a string, and it's not
|
|
14324
|
+
// empty, then we should lock all fields.
|
|
14325
|
+
requestDict['fieldMask'] = preExistingFieldMask.join(',');
|
|
14326
|
+
}
|
|
14327
|
+
else {
|
|
14328
|
+
delete requestDict['fieldMask'];
|
|
14329
|
+
}
|
|
14330
|
+
}
|
|
14331
|
+
return requestDict;
|
|
14332
|
+
}
|
|
14333
|
+
class Tokens extends BaseModule {
|
|
14334
|
+
constructor(apiClient) {
|
|
14335
|
+
super();
|
|
14336
|
+
this.apiClient = apiClient;
|
|
14337
|
+
}
|
|
14338
|
+
/**
|
|
14339
|
+
* Creates an ephemeral auth token resource.
|
|
14340
|
+
*
|
|
14341
|
+
* @experimental
|
|
14342
|
+
*
|
|
14343
|
+
* @remarks
|
|
14344
|
+
* Ephermeral auth tokens is only supported in the Gemini Developer API.
|
|
14345
|
+
* It can be used for the session connection to the Live constrained API.
|
|
14346
|
+
*
|
|
14347
|
+
* @param params - The parameters for the create request.
|
|
14348
|
+
* @return The created auth token.
|
|
14349
|
+
*
|
|
14350
|
+
* @example
|
|
14351
|
+
* ```ts
|
|
14352
|
+
* // Case 1: If LiveEphemeralParameters is unset, unlock LiveConnectConfig
|
|
14353
|
+
* // when using the token in Live API sessions. Each session connection can
|
|
14354
|
+
* // use a different configuration.
|
|
14355
|
+
* const config: CreateAuthTokenConfig = {
|
|
14356
|
+
* uses: 3,
|
|
14357
|
+
* expireTime: '2025-05-01T00:00:00Z',
|
|
14358
|
+
* }
|
|
14359
|
+
* const token = await ai.tokens.create(config);
|
|
14360
|
+
*
|
|
14361
|
+
* // Case 2: If LiveEphemeralParameters is set, lock all fields in
|
|
14362
|
+
* // LiveConnectConfig when using the token in Live API sessions. For
|
|
14363
|
+
* // example, changing `outputAudioTranscription` in the Live API
|
|
14364
|
+
* // connection will be ignored by the API.
|
|
14365
|
+
* const config: CreateAuthTokenConfig =
|
|
14366
|
+
* uses: 3,
|
|
14367
|
+
* expireTime: '2025-05-01T00:00:00Z',
|
|
14368
|
+
* LiveEphemeralParameters: {
|
|
14369
|
+
* model: 'gemini-2.0-flash-001',
|
|
14370
|
+
* config: {
|
|
14371
|
+
* 'responseModalities': ['AUDIO'],
|
|
14372
|
+
* 'systemInstruction': 'Always answer in English.',
|
|
14373
|
+
* }
|
|
14374
|
+
* }
|
|
14375
|
+
* }
|
|
14376
|
+
* const token = await ai.tokens.create(config);
|
|
14377
|
+
*
|
|
14378
|
+
* // Case 3: If LiveEphemeralParameters is set and lockAdditionalFields is
|
|
14379
|
+
* // set, lock LiveConnectConfig with set and additional fields (e.g.
|
|
14380
|
+
* // responseModalities, systemInstruction, temperature in this example) when
|
|
14381
|
+
* // using the token in Live API sessions.
|
|
14382
|
+
* const config: CreateAuthTokenConfig =
|
|
14383
|
+
* uses: 3,
|
|
14384
|
+
* expireTime: '2025-05-01T00:00:00Z',
|
|
14385
|
+
* LiveEphemeralParameters: {
|
|
14386
|
+
* model: 'gemini-2.0-flash-001',
|
|
14387
|
+
* config: {
|
|
14388
|
+
* 'responseModalities': ['AUDIO'],
|
|
14389
|
+
* 'systemInstruction': 'Always answer in English.',
|
|
14390
|
+
* }
|
|
14391
|
+
* },
|
|
14392
|
+
* lockAdditionalFields: ['temperature'],
|
|
14393
|
+
* }
|
|
14394
|
+
* const token = await ai.tokens.create(config);
|
|
14395
|
+
*
|
|
14396
|
+
* // Case 4: If LiveEphemeralParameters is set and lockAdditionalFields is
|
|
14397
|
+
* // empty array, lock LiveConnectConfig with set fields (e.g.
|
|
14398
|
+
* // responseModalities, systemInstruction in this example) when using the
|
|
14399
|
+
* // token in Live API sessions.
|
|
14400
|
+
* const config: CreateAuthTokenConfig =
|
|
14401
|
+
* uses: 3,
|
|
14402
|
+
* expireTime: '2025-05-01T00:00:00Z',
|
|
14403
|
+
* LiveEphemeralParameters: {
|
|
14404
|
+
* model: 'gemini-2.0-flash-001',
|
|
14405
|
+
* config: {
|
|
14406
|
+
* 'responseModalities': ['AUDIO'],
|
|
14407
|
+
* 'systemInstruction': 'Always answer in English.',
|
|
14408
|
+
* }
|
|
14409
|
+
* },
|
|
14410
|
+
* lockAdditionalFields: [],
|
|
14411
|
+
* }
|
|
14412
|
+
* const token = await ai.tokens.create(config);
|
|
14413
|
+
* ```
|
|
14414
|
+
*/
|
|
14415
|
+
async create(params) {
|
|
14416
|
+
var _a, _b;
|
|
14417
|
+
let response;
|
|
14418
|
+
let path = '';
|
|
14419
|
+
let queryParams = {};
|
|
14420
|
+
if (this.apiClient.isVertexAI()) {
|
|
14421
|
+
throw new Error('The client.tokens.create method is only supported by the Gemini Developer API.');
|
|
14422
|
+
}
|
|
14423
|
+
else {
|
|
14424
|
+
const body = createAuthTokenParametersToMldev(this.apiClient, params);
|
|
14425
|
+
path = formatMap('auth_tokens', body['_url']);
|
|
14426
|
+
queryParams = body['_query'];
|
|
14427
|
+
delete body['config'];
|
|
14428
|
+
delete body['_url'];
|
|
14429
|
+
delete body['_query'];
|
|
14430
|
+
const transformedBody = convertBidiSetupToTokenSetup(body, params.config);
|
|
14431
|
+
response = this.apiClient
|
|
14432
|
+
.request({
|
|
14433
|
+
path: path,
|
|
14434
|
+
queryParams: queryParams,
|
|
14435
|
+
body: JSON.stringify(transformedBody),
|
|
14436
|
+
httpMethod: 'POST',
|
|
14437
|
+
httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
|
|
14438
|
+
abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
|
|
14439
|
+
})
|
|
14440
|
+
.then((httpResponse) => {
|
|
14441
|
+
return httpResponse.json();
|
|
14442
|
+
});
|
|
14443
|
+
return response.then((apiResponse) => {
|
|
14444
|
+
const resp = authTokenFromMldev(this.apiClient, apiResponse);
|
|
14445
|
+
return resp;
|
|
14446
|
+
});
|
|
14447
|
+
}
|
|
14448
|
+
}
|
|
14449
|
+
}
|
|
14450
|
+
|
|
14451
|
+
/**
|
|
14452
|
+
* @license
|
|
14453
|
+
* Copyright 2025 Google LLC
|
|
14454
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
14455
|
+
*/
|
|
14456
|
+
const GOOGLE_API_KEY_HEADER = 'x-goog-api-key';
|
|
14457
|
+
const REQUIRED_VERTEX_AI_SCOPE = 'https://www.googleapis.com/auth/cloud-platform';
|
|
14458
|
+
class NodeAuth {
|
|
14459
|
+
constructor(opts) {
|
|
14460
|
+
if (opts.apiKey !== undefined) {
|
|
14461
|
+
this.apiKey = opts.apiKey;
|
|
14462
|
+
return;
|
|
14463
|
+
}
|
|
14464
|
+
const vertexAuthOptions = buildGoogleAuthOptions(opts.googleAuthOptions);
|
|
14465
|
+
this.googleAuth = new GoogleAuth(vertexAuthOptions);
|
|
14466
|
+
}
|
|
14467
|
+
async addAuthHeaders(headers) {
|
|
14468
|
+
if (this.apiKey !== undefined) {
|
|
14469
|
+
if (this.apiKey.startsWith('auth_tokens/')) {
|
|
14470
|
+
throw new Error('Ephemeral tokens are only supported by the live API.');
|
|
14471
|
+
}
|
|
13596
14472
|
this.addKeyHeader(headers);
|
|
13597
14473
|
return;
|
|
13598
14474
|
}
|
|
@@ -14901,6 +15777,7 @@ class GoogleGenAI {
|
|
|
14901
15777
|
this.caches = new Caches(this.apiClient);
|
|
14902
15778
|
this.files = new Files(this.apiClient);
|
|
14903
15779
|
this.operations = new Operations(this.apiClient);
|
|
15780
|
+
this.authTokens = new Tokens(this.apiClient);
|
|
14904
15781
|
this.tunings = new Tunings(this.apiClient);
|
|
14905
15782
|
}
|
|
14906
15783
|
}
|
|
@@ -14918,5 +15795,5 @@ function stringToBoolean(str) {
|
|
|
14918
15795
|
return str.toLowerCase() === 'true';
|
|
14919
15796
|
}
|
|
14920
15797
|
|
|
14921
|
-
export { ActivityHandling, AdapterSize, AuthType, Behavior, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, JobState, Language, ListCachedContentsResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models,
|
|
15798
|
+
export { ActivityHandling, AdapterSize, AuthType, Behavior, BlockedReason, Caches, Chat, Chats, ComputeTokensResponse, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpResponse, ImagePromptLanguage, JobState, Language, ListCachedContentsResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Mode, Models, Operations, Outcome, PagedItem, Pager, PersonGeneration, RawReferenceImage, ReplayResponse, SafetyFilterLevel, Scale, Session, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, Tokens, TrafficType, TurnCoverage, Type, UpscaleImageResponse, UrlRetrievalStatus, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
14922
15799
|
//# sourceMappingURL=index.mjs.map
|