@google/genai 1.2.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/dist/genai.d.ts +141 -24
- package/dist/index.cjs +1080 -174
- package/dist/index.mjs +1080 -175
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +1040 -138
- package/dist/node/index.mjs +1040 -139
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +141 -24
- package/dist/web/index.mjs +1080 -175
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +141 -24
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -162,7 +162,6 @@ function getValueByPath(data, keys) {
|
|
|
162
162
|
* Copyright 2025 Google LLC
|
|
163
163
|
* SPDX-License-Identifier: Apache-2.0
|
|
164
164
|
*/
|
|
165
|
-
// Code generated by the Google Gen AI SDK generator DO NOT EDIT.
|
|
166
165
|
/** Required. Outcome of the code execution. */
|
|
167
166
|
var Outcome;
|
|
168
167
|
(function (Outcome) {
|
|
@@ -398,6 +397,10 @@ var FinishReason;
|
|
|
398
397
|
* Token generation stopped because generated images have safety violations.
|
|
399
398
|
*/
|
|
400
399
|
FinishReason["IMAGE_SAFETY"] = "IMAGE_SAFETY";
|
|
400
|
+
/**
|
|
401
|
+
* The tool call generated by the model is invalid.
|
|
402
|
+
*/
|
|
403
|
+
FinishReason["UNEXPECTED_TOOL_CALL"] = "UNEXPECTED_TOOL_CALL";
|
|
401
404
|
})(FinishReason || (FinishReason = {}));
|
|
402
405
|
/** Output only. Harm probability levels in the content. */
|
|
403
406
|
var HarmProbability;
|
|
@@ -1391,7 +1394,6 @@ class ReplayResponse {
|
|
|
1391
1394
|
*/
|
|
1392
1395
|
class RawReferenceImage {
|
|
1393
1396
|
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1394
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1395
1397
|
toReferenceImageAPI() {
|
|
1396
1398
|
const referenceImageAPI = {
|
|
1397
1399
|
referenceType: 'REFERENCE_TYPE_RAW',
|
|
@@ -1413,7 +1415,6 @@ class RawReferenceImage {
|
|
|
1413
1415
|
*/
|
|
1414
1416
|
class MaskReferenceImage {
|
|
1415
1417
|
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1416
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1417
1418
|
toReferenceImageAPI() {
|
|
1418
1419
|
const referenceImageAPI = {
|
|
1419
1420
|
referenceType: 'REFERENCE_TYPE_MASK',
|
|
@@ -1436,7 +1437,6 @@ class MaskReferenceImage {
|
|
|
1436
1437
|
*/
|
|
1437
1438
|
class ControlReferenceImage {
|
|
1438
1439
|
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1439
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1440
1440
|
toReferenceImageAPI() {
|
|
1441
1441
|
const referenceImageAPI = {
|
|
1442
1442
|
referenceType: 'REFERENCE_TYPE_CONTROL',
|
|
@@ -1457,7 +1457,6 @@ class ControlReferenceImage {
|
|
|
1457
1457
|
*/
|
|
1458
1458
|
class StyleReferenceImage {
|
|
1459
1459
|
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
1460
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1461
1460
|
toReferenceImageAPI() {
|
|
1462
1461
|
const referenceImageAPI = {
|
|
1463
1462
|
referenceType: 'REFERENCE_TYPE_STYLE',
|
|
@@ -1478,7 +1477,6 @@ class StyleReferenceImage {
|
|
|
1478
1477
|
*/
|
|
1479
1478
|
class SubjectReferenceImage {
|
|
1480
1479
|
/* Internal method to convert to ReferenceImageAPIInternal. */
|
|
1481
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
1482
1480
|
toReferenceImageAPI() {
|
|
1483
1481
|
const referenceImageAPI = {
|
|
1484
1482
|
referenceType: 'REFERENCE_TYPE_SUBJECT',
|
|
@@ -2393,7 +2391,7 @@ function filterToJsonSchema(schema) {
|
|
|
2393
2391
|
* Copyright 2025 Google LLC
|
|
2394
2392
|
* SPDX-License-Identifier: Apache-2.0
|
|
2395
2393
|
*/
|
|
2396
|
-
function videoMetadataToMldev$
|
|
2394
|
+
function videoMetadataToMldev$3(apiClient, fromObject) {
|
|
2397
2395
|
const toObject = {};
|
|
2398
2396
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
2399
2397
|
if (fromFps != null) {
|
|
@@ -2409,7 +2407,7 @@ function videoMetadataToMldev$2(apiClient, fromObject) {
|
|
|
2409
2407
|
}
|
|
2410
2408
|
return toObject;
|
|
2411
2409
|
}
|
|
2412
|
-
function blobToMldev$
|
|
2410
|
+
function blobToMldev$3(apiClient, fromObject) {
|
|
2413
2411
|
const toObject = {};
|
|
2414
2412
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
2415
2413
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -2424,7 +2422,7 @@ function blobToMldev$2(apiClient, fromObject) {
|
|
|
2424
2422
|
}
|
|
2425
2423
|
return toObject;
|
|
2426
2424
|
}
|
|
2427
|
-
function fileDataToMldev$
|
|
2425
|
+
function fileDataToMldev$3(apiClient, fromObject) {
|
|
2428
2426
|
const toObject = {};
|
|
2429
2427
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
2430
2428
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -2439,13 +2437,13 @@ function fileDataToMldev$2(apiClient, fromObject) {
|
|
|
2439
2437
|
}
|
|
2440
2438
|
return toObject;
|
|
2441
2439
|
}
|
|
2442
|
-
function partToMldev$
|
|
2440
|
+
function partToMldev$3(apiClient, fromObject) {
|
|
2443
2441
|
const toObject = {};
|
|
2444
2442
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
2445
2443
|
'videoMetadata',
|
|
2446
2444
|
]);
|
|
2447
2445
|
if (fromVideoMetadata != null) {
|
|
2448
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$
|
|
2446
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$3(apiClient, fromVideoMetadata));
|
|
2449
2447
|
}
|
|
2450
2448
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
2451
2449
|
if (fromThought != null) {
|
|
@@ -2453,11 +2451,17 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2453
2451
|
}
|
|
2454
2452
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
2455
2453
|
if (fromInlineData != null) {
|
|
2456
|
-
setValueByPath(toObject, ['inlineData'], blobToMldev$
|
|
2454
|
+
setValueByPath(toObject, ['inlineData'], blobToMldev$3(apiClient, fromInlineData));
|
|
2457
2455
|
}
|
|
2458
2456
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2459
2457
|
if (fromFileData != null) {
|
|
2460
|
-
setValueByPath(toObject, ['fileData'], fileDataToMldev$
|
|
2458
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$3(apiClient, fromFileData));
|
|
2459
|
+
}
|
|
2460
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
2461
|
+
'thoughtSignature',
|
|
2462
|
+
]);
|
|
2463
|
+
if (fromThoughtSignature != null) {
|
|
2464
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
2461
2465
|
}
|
|
2462
2466
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2463
2467
|
'codeExecutionResult',
|
|
@@ -2487,14 +2491,14 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2487
2491
|
}
|
|
2488
2492
|
return toObject;
|
|
2489
2493
|
}
|
|
2490
|
-
function contentToMldev$
|
|
2494
|
+
function contentToMldev$3(apiClient, fromObject) {
|
|
2491
2495
|
const toObject = {};
|
|
2492
2496
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
2493
2497
|
if (fromParts != null) {
|
|
2494
2498
|
let transformedList = fromParts;
|
|
2495
2499
|
if (Array.isArray(transformedList)) {
|
|
2496
2500
|
transformedList = transformedList.map((item) => {
|
|
2497
|
-
return partToMldev$
|
|
2501
|
+
return partToMldev$3(apiClient, item);
|
|
2498
2502
|
});
|
|
2499
2503
|
}
|
|
2500
2504
|
setValueByPath(toObject, ['parts'], transformedList);
|
|
@@ -2505,7 +2509,7 @@ function contentToMldev$2(apiClient, fromObject) {
|
|
|
2505
2509
|
}
|
|
2506
2510
|
return toObject;
|
|
2507
2511
|
}
|
|
2508
|
-
function functionDeclarationToMldev$
|
|
2512
|
+
function functionDeclarationToMldev$3(apiClient, fromObject) {
|
|
2509
2513
|
const toObject = {};
|
|
2510
2514
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
2511
2515
|
if (fromBehavior != null) {
|
|
@@ -2529,7 +2533,7 @@ function functionDeclarationToMldev$2(apiClient, fromObject) {
|
|
|
2529
2533
|
}
|
|
2530
2534
|
return toObject;
|
|
2531
2535
|
}
|
|
2532
|
-
function intervalToMldev$
|
|
2536
|
+
function intervalToMldev$3(apiClient, fromObject) {
|
|
2533
2537
|
const toObject = {};
|
|
2534
2538
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
2535
2539
|
if (fromStartTime != null) {
|
|
@@ -2541,17 +2545,17 @@ function intervalToMldev$2(apiClient, fromObject) {
|
|
|
2541
2545
|
}
|
|
2542
2546
|
return toObject;
|
|
2543
2547
|
}
|
|
2544
|
-
function googleSearchToMldev$
|
|
2548
|
+
function googleSearchToMldev$3(apiClient, fromObject) {
|
|
2545
2549
|
const toObject = {};
|
|
2546
2550
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
2547
2551
|
'timeRangeFilter',
|
|
2548
2552
|
]);
|
|
2549
2553
|
if (fromTimeRangeFilter != null) {
|
|
2550
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$
|
|
2554
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$3(apiClient, fromTimeRangeFilter));
|
|
2551
2555
|
}
|
|
2552
2556
|
return toObject;
|
|
2553
2557
|
}
|
|
2554
|
-
function dynamicRetrievalConfigToMldev$
|
|
2558
|
+
function dynamicRetrievalConfigToMldev$3(apiClient, fromObject) {
|
|
2555
2559
|
const toObject = {};
|
|
2556
2560
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
2557
2561
|
if (fromMode != null) {
|
|
@@ -2565,21 +2569,21 @@ function dynamicRetrievalConfigToMldev$2(apiClient, fromObject) {
|
|
|
2565
2569
|
}
|
|
2566
2570
|
return toObject;
|
|
2567
2571
|
}
|
|
2568
|
-
function googleSearchRetrievalToMldev$
|
|
2572
|
+
function googleSearchRetrievalToMldev$3(apiClient, fromObject) {
|
|
2569
2573
|
const toObject = {};
|
|
2570
2574
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
2571
2575
|
'dynamicRetrievalConfig',
|
|
2572
2576
|
]);
|
|
2573
2577
|
if (fromDynamicRetrievalConfig != null) {
|
|
2574
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$
|
|
2578
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$3(apiClient, fromDynamicRetrievalConfig));
|
|
2575
2579
|
}
|
|
2576
2580
|
return toObject;
|
|
2577
2581
|
}
|
|
2578
|
-
function urlContextToMldev$
|
|
2582
|
+
function urlContextToMldev$3() {
|
|
2579
2583
|
const toObject = {};
|
|
2580
2584
|
return toObject;
|
|
2581
2585
|
}
|
|
2582
|
-
function toolToMldev$
|
|
2586
|
+
function toolToMldev$3(apiClient, fromObject) {
|
|
2583
2587
|
const toObject = {};
|
|
2584
2588
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
2585
2589
|
'functionDeclarations',
|
|
@@ -2588,7 +2592,7 @@ function toolToMldev$2(apiClient, fromObject) {
|
|
|
2588
2592
|
let transformedList = fromFunctionDeclarations;
|
|
2589
2593
|
if (Array.isArray(transformedList)) {
|
|
2590
2594
|
transformedList = transformedList.map((item) => {
|
|
2591
|
-
return functionDeclarationToMldev$
|
|
2595
|
+
return functionDeclarationToMldev$3(apiClient, item);
|
|
2592
2596
|
});
|
|
2593
2597
|
}
|
|
2594
2598
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
@@ -2598,13 +2602,13 @@ function toolToMldev$2(apiClient, fromObject) {
|
|
|
2598
2602
|
}
|
|
2599
2603
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
2600
2604
|
if (fromGoogleSearch != null) {
|
|
2601
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$
|
|
2605
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$3(apiClient, fromGoogleSearch));
|
|
2602
2606
|
}
|
|
2603
2607
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
2604
2608
|
'googleSearchRetrieval',
|
|
2605
2609
|
]);
|
|
2606
2610
|
if (fromGoogleSearchRetrieval != null) {
|
|
2607
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$
|
|
2611
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$3(apiClient, fromGoogleSearchRetrieval));
|
|
2608
2612
|
}
|
|
2609
2613
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
2610
2614
|
throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
|
|
@@ -2614,7 +2618,7 @@ function toolToMldev$2(apiClient, fromObject) {
|
|
|
2614
2618
|
}
|
|
2615
2619
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
2616
2620
|
if (fromUrlContext != null) {
|
|
2617
|
-
setValueByPath(toObject, ['urlContext'], urlContextToMldev$
|
|
2621
|
+
setValueByPath(toObject, ['urlContext'], urlContextToMldev$3());
|
|
2618
2622
|
}
|
|
2619
2623
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
2620
2624
|
'codeExecution',
|
|
@@ -2697,7 +2701,7 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
2697
2701
|
let transformedList = tContents(apiClient, fromContents);
|
|
2698
2702
|
if (Array.isArray(transformedList)) {
|
|
2699
2703
|
transformedList = transformedList.map((item) => {
|
|
2700
|
-
return contentToMldev$
|
|
2704
|
+
return contentToMldev$3(apiClient, item);
|
|
2701
2705
|
});
|
|
2702
2706
|
}
|
|
2703
2707
|
setValueByPath(parentObject, ['contents'], transformedList);
|
|
@@ -2706,14 +2710,14 @@ function createCachedContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
2706
2710
|
'systemInstruction',
|
|
2707
2711
|
]);
|
|
2708
2712
|
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
2709
|
-
setValueByPath(parentObject, ['systemInstruction'], contentToMldev$
|
|
2713
|
+
setValueByPath(parentObject, ['systemInstruction'], contentToMldev$3(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
2710
2714
|
}
|
|
2711
2715
|
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
2712
2716
|
if (parentObject !== undefined && fromTools != null) {
|
|
2713
2717
|
let transformedList = fromTools;
|
|
2714
2718
|
if (Array.isArray(transformedList)) {
|
|
2715
2719
|
transformedList = transformedList.map((item) => {
|
|
2716
|
-
return toolToMldev$
|
|
2720
|
+
return toolToMldev$3(apiClient, item);
|
|
2717
2721
|
});
|
|
2718
2722
|
}
|
|
2719
2723
|
setValueByPath(parentObject, ['tools'], transformedList);
|
|
@@ -2875,6 +2879,12 @@ function partToVertex$2(apiClient, fromObject) {
|
|
|
2875
2879
|
if (fromFileData != null) {
|
|
2876
2880
|
setValueByPath(toObject, ['fileData'], fileDataToVertex$2(apiClient, fromFileData));
|
|
2877
2881
|
}
|
|
2882
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
2883
|
+
'thoughtSignature',
|
|
2884
|
+
]);
|
|
2885
|
+
if (fromThoughtSignature != null) {
|
|
2886
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
2887
|
+
}
|
|
2878
2888
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2879
2889
|
'codeExecutionResult',
|
|
2880
2890
|
]);
|
|
@@ -4336,7 +4346,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
4336
4346
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
4337
4347
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
4338
4348
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
4339
|
-
const SDK_VERSION = '1.
|
|
4349
|
+
const SDK_VERSION = '1.3.0'; // x-release-please-version
|
|
4340
4350
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
4341
4351
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
4342
4352
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -5500,7 +5510,7 @@ class Files extends BaseModule {
|
|
|
5500
5510
|
* Copyright 2025 Google LLC
|
|
5501
5511
|
* SPDX-License-Identifier: Apache-2.0
|
|
5502
5512
|
*/
|
|
5503
|
-
function prebuiltVoiceConfigToMldev$
|
|
5513
|
+
function prebuiltVoiceConfigToMldev$2(apiClient, fromObject) {
|
|
5504
5514
|
const toObject = {};
|
|
5505
5515
|
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
5506
5516
|
if (fromVoiceName != null) {
|
|
@@ -5516,13 +5526,13 @@ function prebuiltVoiceConfigToVertex$1(apiClient, fromObject) {
|
|
|
5516
5526
|
}
|
|
5517
5527
|
return toObject;
|
|
5518
5528
|
}
|
|
5519
|
-
function voiceConfigToMldev$
|
|
5529
|
+
function voiceConfigToMldev$2(apiClient, fromObject) {
|
|
5520
5530
|
const toObject = {};
|
|
5521
5531
|
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
5522
5532
|
'prebuiltVoiceConfig',
|
|
5523
5533
|
]);
|
|
5524
5534
|
if (fromPrebuiltVoiceConfig != null) {
|
|
5525
|
-
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev$
|
|
5535
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev$2(apiClient, fromPrebuiltVoiceConfig));
|
|
5526
5536
|
}
|
|
5527
5537
|
return toObject;
|
|
5528
5538
|
}
|
|
@@ -5536,7 +5546,7 @@ function voiceConfigToVertex$1(apiClient, fromObject) {
|
|
|
5536
5546
|
}
|
|
5537
5547
|
return toObject;
|
|
5538
5548
|
}
|
|
5539
|
-
function speakerVoiceConfigToMldev$
|
|
5549
|
+
function speakerVoiceConfigToMldev$2(apiClient, fromObject) {
|
|
5540
5550
|
const toObject = {};
|
|
5541
5551
|
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
5542
5552
|
if (fromSpeaker != null) {
|
|
@@ -5544,11 +5554,11 @@ function speakerVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
|
5544
5554
|
}
|
|
5545
5555
|
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
5546
5556
|
if (fromVoiceConfig != null) {
|
|
5547
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$
|
|
5557
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$2(apiClient, fromVoiceConfig));
|
|
5548
5558
|
}
|
|
5549
5559
|
return toObject;
|
|
5550
5560
|
}
|
|
5551
|
-
function multiSpeakerVoiceConfigToMldev$
|
|
5561
|
+
function multiSpeakerVoiceConfigToMldev$2(apiClient, fromObject) {
|
|
5552
5562
|
const toObject = {};
|
|
5553
5563
|
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
5554
5564
|
'speakerVoiceConfigs',
|
|
@@ -5557,24 +5567,24 @@ function multiSpeakerVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
|
5557
5567
|
let transformedList = fromSpeakerVoiceConfigs;
|
|
5558
5568
|
if (Array.isArray(transformedList)) {
|
|
5559
5569
|
transformedList = transformedList.map((item) => {
|
|
5560
|
-
return speakerVoiceConfigToMldev$
|
|
5570
|
+
return speakerVoiceConfigToMldev$2(apiClient, item);
|
|
5561
5571
|
});
|
|
5562
5572
|
}
|
|
5563
5573
|
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
5564
5574
|
}
|
|
5565
5575
|
return toObject;
|
|
5566
5576
|
}
|
|
5567
|
-
function speechConfigToMldev$
|
|
5577
|
+
function speechConfigToMldev$2(apiClient, fromObject) {
|
|
5568
5578
|
const toObject = {};
|
|
5569
5579
|
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
5570
5580
|
if (fromVoiceConfig != null) {
|
|
5571
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$
|
|
5581
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$2(apiClient, fromVoiceConfig));
|
|
5572
5582
|
}
|
|
5573
5583
|
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
5574
5584
|
'multiSpeakerVoiceConfig',
|
|
5575
5585
|
]);
|
|
5576
5586
|
if (fromMultiSpeakerVoiceConfig != null) {
|
|
5577
|
-
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev$
|
|
5587
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev$2(apiClient, fromMultiSpeakerVoiceConfig));
|
|
5578
5588
|
}
|
|
5579
5589
|
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
5580
5590
|
if (fromLanguageCode != null) {
|
|
@@ -5597,7 +5607,7 @@ function speechConfigToVertex$1(apiClient, fromObject) {
|
|
|
5597
5607
|
}
|
|
5598
5608
|
return toObject;
|
|
5599
5609
|
}
|
|
5600
|
-
function videoMetadataToMldev$
|
|
5610
|
+
function videoMetadataToMldev$2(apiClient, fromObject) {
|
|
5601
5611
|
const toObject = {};
|
|
5602
5612
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
5603
5613
|
if (fromFps != null) {
|
|
@@ -5629,7 +5639,7 @@ function videoMetadataToVertex$1(apiClient, fromObject) {
|
|
|
5629
5639
|
}
|
|
5630
5640
|
return toObject;
|
|
5631
5641
|
}
|
|
5632
|
-
function blobToMldev$
|
|
5642
|
+
function blobToMldev$2(apiClient, fromObject) {
|
|
5633
5643
|
const toObject = {};
|
|
5634
5644
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5635
5645
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -5660,7 +5670,7 @@ function blobToVertex$1(apiClient, fromObject) {
|
|
|
5660
5670
|
}
|
|
5661
5671
|
return toObject;
|
|
5662
5672
|
}
|
|
5663
|
-
function fileDataToMldev$
|
|
5673
|
+
function fileDataToMldev$2(apiClient, fromObject) {
|
|
5664
5674
|
const toObject = {};
|
|
5665
5675
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5666
5676
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -5691,13 +5701,13 @@ function fileDataToVertex$1(apiClient, fromObject) {
|
|
|
5691
5701
|
}
|
|
5692
5702
|
return toObject;
|
|
5693
5703
|
}
|
|
5694
|
-
function partToMldev$
|
|
5704
|
+
function partToMldev$2(apiClient, fromObject) {
|
|
5695
5705
|
const toObject = {};
|
|
5696
5706
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
5697
5707
|
'videoMetadata',
|
|
5698
5708
|
]);
|
|
5699
5709
|
if (fromVideoMetadata != null) {
|
|
5700
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$
|
|
5710
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$2(apiClient, fromVideoMetadata));
|
|
5701
5711
|
}
|
|
5702
5712
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
5703
5713
|
if (fromThought != null) {
|
|
@@ -5705,11 +5715,17 @@ function partToMldev$1(apiClient, fromObject) {
|
|
|
5705
5715
|
}
|
|
5706
5716
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
5707
5717
|
if (fromInlineData != null) {
|
|
5708
|
-
setValueByPath(toObject, ['inlineData'], blobToMldev$
|
|
5718
|
+
setValueByPath(toObject, ['inlineData'], blobToMldev$2(apiClient, fromInlineData));
|
|
5709
5719
|
}
|
|
5710
5720
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5711
5721
|
if (fromFileData != null) {
|
|
5712
|
-
setValueByPath(toObject, ['fileData'], fileDataToMldev$
|
|
5722
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$2(apiClient, fromFileData));
|
|
5723
|
+
}
|
|
5724
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
5725
|
+
'thoughtSignature',
|
|
5726
|
+
]);
|
|
5727
|
+
if (fromThoughtSignature != null) {
|
|
5728
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
5713
5729
|
}
|
|
5714
5730
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5715
5731
|
'codeExecutionResult',
|
|
@@ -5759,6 +5775,12 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5759
5775
|
if (fromFileData != null) {
|
|
5760
5776
|
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(apiClient, fromFileData));
|
|
5761
5777
|
}
|
|
5778
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
5779
|
+
'thoughtSignature',
|
|
5780
|
+
]);
|
|
5781
|
+
if (fromThoughtSignature != null) {
|
|
5782
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
5783
|
+
}
|
|
5762
5784
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5763
5785
|
'codeExecutionResult',
|
|
5764
5786
|
]);
|
|
@@ -5787,14 +5809,14 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5787
5809
|
}
|
|
5788
5810
|
return toObject;
|
|
5789
5811
|
}
|
|
5790
|
-
function contentToMldev$
|
|
5812
|
+
function contentToMldev$2(apiClient, fromObject) {
|
|
5791
5813
|
const toObject = {};
|
|
5792
5814
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
5793
5815
|
if (fromParts != null) {
|
|
5794
5816
|
let transformedList = fromParts;
|
|
5795
5817
|
if (Array.isArray(transformedList)) {
|
|
5796
5818
|
transformedList = transformedList.map((item) => {
|
|
5797
|
-
return partToMldev$
|
|
5819
|
+
return partToMldev$2(apiClient, item);
|
|
5798
5820
|
});
|
|
5799
5821
|
}
|
|
5800
5822
|
setValueByPath(toObject, ['parts'], transformedList);
|
|
@@ -5823,7 +5845,7 @@ function contentToVertex$1(apiClient, fromObject) {
|
|
|
5823
5845
|
}
|
|
5824
5846
|
return toObject;
|
|
5825
5847
|
}
|
|
5826
|
-
function functionDeclarationToMldev$
|
|
5848
|
+
function functionDeclarationToMldev$2(apiClient, fromObject) {
|
|
5827
5849
|
const toObject = {};
|
|
5828
5850
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
5829
5851
|
if (fromBehavior != null) {
|
|
@@ -5870,7 +5892,7 @@ function functionDeclarationToVertex$1(apiClient, fromObject) {
|
|
|
5870
5892
|
}
|
|
5871
5893
|
return toObject;
|
|
5872
5894
|
}
|
|
5873
|
-
function intervalToMldev$
|
|
5895
|
+
function intervalToMldev$2(apiClient, fromObject) {
|
|
5874
5896
|
const toObject = {};
|
|
5875
5897
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
5876
5898
|
if (fromStartTime != null) {
|
|
@@ -5894,13 +5916,13 @@ function intervalToVertex$1(apiClient, fromObject) {
|
|
|
5894
5916
|
}
|
|
5895
5917
|
return toObject;
|
|
5896
5918
|
}
|
|
5897
|
-
function googleSearchToMldev$
|
|
5919
|
+
function googleSearchToMldev$2(apiClient, fromObject) {
|
|
5898
5920
|
const toObject = {};
|
|
5899
5921
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
5900
5922
|
'timeRangeFilter',
|
|
5901
5923
|
]);
|
|
5902
5924
|
if (fromTimeRangeFilter != null) {
|
|
5903
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$
|
|
5925
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$2(apiClient, fromTimeRangeFilter));
|
|
5904
5926
|
}
|
|
5905
5927
|
return toObject;
|
|
5906
5928
|
}
|
|
@@ -5914,7 +5936,7 @@ function googleSearchToVertex$1(apiClient, fromObject) {
|
|
|
5914
5936
|
}
|
|
5915
5937
|
return toObject;
|
|
5916
5938
|
}
|
|
5917
|
-
function dynamicRetrievalConfigToMldev$
|
|
5939
|
+
function dynamicRetrievalConfigToMldev$2(apiClient, fromObject) {
|
|
5918
5940
|
const toObject = {};
|
|
5919
5941
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
5920
5942
|
if (fromMode != null) {
|
|
@@ -5942,13 +5964,13 @@ function dynamicRetrievalConfigToVertex$1(apiClient, fromObject) {
|
|
|
5942
5964
|
}
|
|
5943
5965
|
return toObject;
|
|
5944
5966
|
}
|
|
5945
|
-
function googleSearchRetrievalToMldev$
|
|
5967
|
+
function googleSearchRetrievalToMldev$2(apiClient, fromObject) {
|
|
5946
5968
|
const toObject = {};
|
|
5947
5969
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
5948
5970
|
'dynamicRetrievalConfig',
|
|
5949
5971
|
]);
|
|
5950
5972
|
if (fromDynamicRetrievalConfig != null) {
|
|
5951
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$
|
|
5973
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$2(apiClient, fromDynamicRetrievalConfig));
|
|
5952
5974
|
}
|
|
5953
5975
|
return toObject;
|
|
5954
5976
|
}
|
|
@@ -6014,11 +6036,11 @@ function googleMapsToVertex$1(apiClient, fromObject) {
|
|
|
6014
6036
|
}
|
|
6015
6037
|
return toObject;
|
|
6016
6038
|
}
|
|
6017
|
-
function urlContextToMldev$
|
|
6039
|
+
function urlContextToMldev$2() {
|
|
6018
6040
|
const toObject = {};
|
|
6019
6041
|
return toObject;
|
|
6020
6042
|
}
|
|
6021
|
-
function toolToMldev$
|
|
6043
|
+
function toolToMldev$2(apiClient, fromObject) {
|
|
6022
6044
|
const toObject = {};
|
|
6023
6045
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
6024
6046
|
'functionDeclarations',
|
|
@@ -6027,7 +6049,7 @@ function toolToMldev$1(apiClient, fromObject) {
|
|
|
6027
6049
|
let transformedList = fromFunctionDeclarations;
|
|
6028
6050
|
if (Array.isArray(transformedList)) {
|
|
6029
6051
|
transformedList = transformedList.map((item) => {
|
|
6030
|
-
return functionDeclarationToMldev$
|
|
6052
|
+
return functionDeclarationToMldev$2(apiClient, item);
|
|
6031
6053
|
});
|
|
6032
6054
|
}
|
|
6033
6055
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
@@ -6037,13 +6059,13 @@ function toolToMldev$1(apiClient, fromObject) {
|
|
|
6037
6059
|
}
|
|
6038
6060
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
6039
6061
|
if (fromGoogleSearch != null) {
|
|
6040
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$
|
|
6062
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$2(apiClient, fromGoogleSearch));
|
|
6041
6063
|
}
|
|
6042
6064
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
6043
6065
|
'googleSearchRetrieval',
|
|
6044
6066
|
]);
|
|
6045
6067
|
if (fromGoogleSearchRetrieval != null) {
|
|
6046
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$
|
|
6068
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$2(apiClient, fromGoogleSearchRetrieval));
|
|
6047
6069
|
}
|
|
6048
6070
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
6049
6071
|
throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
|
|
@@ -6053,7 +6075,7 @@ function toolToMldev$1(apiClient, fromObject) {
|
|
|
6053
6075
|
}
|
|
6054
6076
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
6055
6077
|
if (fromUrlContext != null) {
|
|
6056
|
-
setValueByPath(toObject, ['urlContext'], urlContextToMldev$
|
|
6078
|
+
setValueByPath(toObject, ['urlContext'], urlContextToMldev$2());
|
|
6057
6079
|
}
|
|
6058
6080
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
6059
6081
|
'codeExecution',
|
|
@@ -6112,7 +6134,7 @@ function toolToVertex$1(apiClient, fromObject) {
|
|
|
6112
6134
|
}
|
|
6113
6135
|
return toObject;
|
|
6114
6136
|
}
|
|
6115
|
-
function sessionResumptionConfigToMldev(apiClient, fromObject) {
|
|
6137
|
+
function sessionResumptionConfigToMldev$1(apiClient, fromObject) {
|
|
6116
6138
|
const toObject = {};
|
|
6117
6139
|
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
6118
6140
|
if (fromHandle != null) {
|
|
@@ -6135,7 +6157,7 @@ function sessionResumptionConfigToVertex(apiClient, fromObject) {
|
|
|
6135
6157
|
}
|
|
6136
6158
|
return toObject;
|
|
6137
6159
|
}
|
|
6138
|
-
function audioTranscriptionConfigToMldev() {
|
|
6160
|
+
function audioTranscriptionConfigToMldev$1() {
|
|
6139
6161
|
const toObject = {};
|
|
6140
6162
|
return toObject;
|
|
6141
6163
|
}
|
|
@@ -6143,7 +6165,7 @@ function audioTranscriptionConfigToVertex() {
|
|
|
6143
6165
|
const toObject = {};
|
|
6144
6166
|
return toObject;
|
|
6145
6167
|
}
|
|
6146
|
-
function automaticActivityDetectionToMldev(apiClient, fromObject) {
|
|
6168
|
+
function automaticActivityDetectionToMldev$1(apiClient, fromObject) {
|
|
6147
6169
|
const toObject = {};
|
|
6148
6170
|
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
6149
6171
|
if (fromDisabled != null) {
|
|
@@ -6207,13 +6229,13 @@ function automaticActivityDetectionToVertex(apiClient, fromObject) {
|
|
|
6207
6229
|
}
|
|
6208
6230
|
return toObject;
|
|
6209
6231
|
}
|
|
6210
|
-
function realtimeInputConfigToMldev(apiClient, fromObject) {
|
|
6232
|
+
function realtimeInputConfigToMldev$1(apiClient, fromObject) {
|
|
6211
6233
|
const toObject = {};
|
|
6212
6234
|
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
6213
6235
|
'automaticActivityDetection',
|
|
6214
6236
|
]);
|
|
6215
6237
|
if (fromAutomaticActivityDetection != null) {
|
|
6216
|
-
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(apiClient, fromAutomaticActivityDetection));
|
|
6238
|
+
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev$1(apiClient, fromAutomaticActivityDetection));
|
|
6217
6239
|
}
|
|
6218
6240
|
const fromActivityHandling = getValueByPath(fromObject, [
|
|
6219
6241
|
'activityHandling',
|
|
@@ -6247,7 +6269,7 @@ function realtimeInputConfigToVertex(apiClient, fromObject) {
|
|
|
6247
6269
|
}
|
|
6248
6270
|
return toObject;
|
|
6249
6271
|
}
|
|
6250
|
-
function slidingWindowToMldev(apiClient, fromObject) {
|
|
6272
|
+
function slidingWindowToMldev$1(apiClient, fromObject) {
|
|
6251
6273
|
const toObject = {};
|
|
6252
6274
|
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
6253
6275
|
if (fromTargetTokens != null) {
|
|
@@ -6263,7 +6285,7 @@ function slidingWindowToVertex(apiClient, fromObject) {
|
|
|
6263
6285
|
}
|
|
6264
6286
|
return toObject;
|
|
6265
6287
|
}
|
|
6266
|
-
function contextWindowCompressionConfigToMldev(apiClient, fromObject) {
|
|
6288
|
+
function contextWindowCompressionConfigToMldev$1(apiClient, fromObject) {
|
|
6267
6289
|
const toObject = {};
|
|
6268
6290
|
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
6269
6291
|
'triggerTokens',
|
|
@@ -6275,7 +6297,7 @@ function contextWindowCompressionConfigToMldev(apiClient, fromObject) {
|
|
|
6275
6297
|
'slidingWindow',
|
|
6276
6298
|
]);
|
|
6277
6299
|
if (fromSlidingWindow != null) {
|
|
6278
|
-
setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(apiClient, fromSlidingWindow));
|
|
6300
|
+
setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev$1(apiClient, fromSlidingWindow));
|
|
6279
6301
|
}
|
|
6280
6302
|
return toObject;
|
|
6281
6303
|
}
|
|
@@ -6295,7 +6317,7 @@ function contextWindowCompressionConfigToVertex(apiClient, fromObject) {
|
|
|
6295
6317
|
}
|
|
6296
6318
|
return toObject;
|
|
6297
6319
|
}
|
|
6298
|
-
function proactivityConfigToMldev(apiClient, fromObject) {
|
|
6320
|
+
function proactivityConfigToMldev$1(apiClient, fromObject) {
|
|
6299
6321
|
const toObject = {};
|
|
6300
6322
|
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
6301
6323
|
'proactiveAudio',
|
|
@@ -6315,7 +6337,7 @@ function proactivityConfigToVertex(apiClient, fromObject) {
|
|
|
6315
6337
|
}
|
|
6316
6338
|
return toObject;
|
|
6317
6339
|
}
|
|
6318
|
-
function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
6340
|
+
function liveConnectConfigToMldev$1(apiClient, fromObject, parentObject) {
|
|
6319
6341
|
const toObject = {};
|
|
6320
6342
|
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
6321
6343
|
'generationConfig',
|
|
@@ -6359,7 +6381,7 @@ function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
6359
6381
|
}
|
|
6360
6382
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
6361
6383
|
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
6362
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev$
|
|
6384
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev$2(apiClient, tLiveSpeechConfig(apiClient, fromSpeechConfig)));
|
|
6363
6385
|
}
|
|
6364
6386
|
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
6365
6387
|
'enableAffectiveDialog',
|
|
@@ -6371,14 +6393,14 @@ function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
6371
6393
|
'systemInstruction',
|
|
6372
6394
|
]);
|
|
6373
6395
|
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
6374
|
-
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$
|
|
6396
|
+
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev$2(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
6375
6397
|
}
|
|
6376
6398
|
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
6377
6399
|
if (parentObject !== undefined && fromTools != null) {
|
|
6378
6400
|
let transformedList = tTools(apiClient, fromTools);
|
|
6379
6401
|
if (Array.isArray(transformedList)) {
|
|
6380
6402
|
transformedList = transformedList.map((item) => {
|
|
6381
|
-
return toolToMldev$
|
|
6403
|
+
return toolToMldev$2(apiClient, tTool(apiClient, item));
|
|
6382
6404
|
});
|
|
6383
6405
|
}
|
|
6384
6406
|
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
@@ -6387,35 +6409,35 @@ function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
6387
6409
|
'sessionResumption',
|
|
6388
6410
|
]);
|
|
6389
6411
|
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
6390
|
-
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(apiClient, fromSessionResumption));
|
|
6412
|
+
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev$1(apiClient, fromSessionResumption));
|
|
6391
6413
|
}
|
|
6392
6414
|
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
6393
6415
|
'inputAudioTranscription',
|
|
6394
6416
|
]);
|
|
6395
6417
|
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
6396
|
-
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToMldev());
|
|
6418
|
+
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToMldev$1());
|
|
6397
6419
|
}
|
|
6398
6420
|
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
6399
6421
|
'outputAudioTranscription',
|
|
6400
6422
|
]);
|
|
6401
6423
|
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
6402
|
-
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToMldev());
|
|
6424
|
+
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToMldev$1());
|
|
6403
6425
|
}
|
|
6404
6426
|
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
6405
6427
|
'realtimeInputConfig',
|
|
6406
6428
|
]);
|
|
6407
6429
|
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
6408
|
-
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig));
|
|
6430
|
+
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev$1(apiClient, fromRealtimeInputConfig));
|
|
6409
6431
|
}
|
|
6410
6432
|
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
6411
6433
|
'contextWindowCompression',
|
|
6412
6434
|
]);
|
|
6413
6435
|
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
6414
|
-
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev(apiClient, fromContextWindowCompression));
|
|
6436
|
+
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev$1(apiClient, fromContextWindowCompression));
|
|
6415
6437
|
}
|
|
6416
6438
|
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
6417
6439
|
if (parentObject !== undefined && fromProactivity != null) {
|
|
6418
|
-
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToMldev(apiClient, fromProactivity));
|
|
6440
|
+
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToMldev$1(apiClient, fromProactivity));
|
|
6419
6441
|
}
|
|
6420
6442
|
return toObject;
|
|
6421
6443
|
}
|
|
@@ -6531,7 +6553,7 @@ function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
|
6531
6553
|
}
|
|
6532
6554
|
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
6533
6555
|
if (fromConfig != null) {
|
|
6534
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToMldev(apiClient, fromConfig, toObject));
|
|
6556
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(apiClient, fromConfig, toObject));
|
|
6535
6557
|
}
|
|
6536
6558
|
return toObject;
|
|
6537
6559
|
}
|
|
@@ -6886,6 +6908,12 @@ function partFromMldev$1(apiClient, fromObject) {
|
|
|
6886
6908
|
if (fromFileData != null) {
|
|
6887
6909
|
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(apiClient, fromFileData));
|
|
6888
6910
|
}
|
|
6911
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
6912
|
+
'thoughtSignature',
|
|
6913
|
+
]);
|
|
6914
|
+
if (fromThoughtSignature != null) {
|
|
6915
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
6916
|
+
}
|
|
6889
6917
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6890
6918
|
'codeExecutionResult',
|
|
6891
6919
|
]);
|
|
@@ -6934,6 +6962,12 @@ function partFromVertex$1(apiClient, fromObject) {
|
|
|
6934
6962
|
if (fromFileData != null) {
|
|
6935
6963
|
setValueByPath(toObject, ['fileData'], fileDataFromVertex$1(apiClient, fromFileData));
|
|
6936
6964
|
}
|
|
6965
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
6966
|
+
'thoughtSignature',
|
|
6967
|
+
]);
|
|
6968
|
+
if (fromThoughtSignature != null) {
|
|
6969
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
6970
|
+
}
|
|
6937
6971
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6938
6972
|
'codeExecutionResult',
|
|
6939
6973
|
]);
|
|
@@ -7724,7 +7758,7 @@ function liveMusicServerMessageFromMldev(apiClient, fromObject) {
|
|
|
7724
7758
|
* Copyright 2025 Google LLC
|
|
7725
7759
|
* SPDX-License-Identifier: Apache-2.0
|
|
7726
7760
|
*/
|
|
7727
|
-
function videoMetadataToMldev(apiClient, fromObject) {
|
|
7761
|
+
function videoMetadataToMldev$1(apiClient, fromObject) {
|
|
7728
7762
|
const toObject = {};
|
|
7729
7763
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
7730
7764
|
if (fromFps != null) {
|
|
@@ -7740,7 +7774,7 @@ function videoMetadataToMldev(apiClient, fromObject) {
|
|
|
7740
7774
|
}
|
|
7741
7775
|
return toObject;
|
|
7742
7776
|
}
|
|
7743
|
-
function blobToMldev(apiClient, fromObject) {
|
|
7777
|
+
function blobToMldev$1(apiClient, fromObject) {
|
|
7744
7778
|
const toObject = {};
|
|
7745
7779
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
7746
7780
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -7755,7 +7789,7 @@ function blobToMldev(apiClient, fromObject) {
|
|
|
7755
7789
|
}
|
|
7756
7790
|
return toObject;
|
|
7757
7791
|
}
|
|
7758
|
-
function fileDataToMldev(apiClient, fromObject) {
|
|
7792
|
+
function fileDataToMldev$1(apiClient, fromObject) {
|
|
7759
7793
|
const toObject = {};
|
|
7760
7794
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
7761
7795
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -7770,13 +7804,13 @@ function fileDataToMldev(apiClient, fromObject) {
|
|
|
7770
7804
|
}
|
|
7771
7805
|
return toObject;
|
|
7772
7806
|
}
|
|
7773
|
-
function partToMldev(apiClient, fromObject) {
|
|
7807
|
+
function partToMldev$1(apiClient, fromObject) {
|
|
7774
7808
|
const toObject = {};
|
|
7775
7809
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
7776
7810
|
'videoMetadata',
|
|
7777
7811
|
]);
|
|
7778
7812
|
if (fromVideoMetadata != null) {
|
|
7779
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev(apiClient, fromVideoMetadata));
|
|
7813
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev$1(apiClient, fromVideoMetadata));
|
|
7780
7814
|
}
|
|
7781
7815
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
7782
7816
|
if (fromThought != null) {
|
|
@@ -7784,11 +7818,17 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7784
7818
|
}
|
|
7785
7819
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
7786
7820
|
if (fromInlineData != null) {
|
|
7787
|
-
setValueByPath(toObject, ['inlineData'], blobToMldev(apiClient, fromInlineData));
|
|
7821
|
+
setValueByPath(toObject, ['inlineData'], blobToMldev$1(apiClient, fromInlineData));
|
|
7788
7822
|
}
|
|
7789
7823
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7790
7824
|
if (fromFileData != null) {
|
|
7791
|
-
setValueByPath(toObject, ['fileData'], fileDataToMldev(apiClient, fromFileData));
|
|
7825
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$1(apiClient, fromFileData));
|
|
7826
|
+
}
|
|
7827
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
7828
|
+
'thoughtSignature',
|
|
7829
|
+
]);
|
|
7830
|
+
if (fromThoughtSignature != null) {
|
|
7831
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
7792
7832
|
}
|
|
7793
7833
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7794
7834
|
'codeExecutionResult',
|
|
@@ -7818,14 +7858,14 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7818
7858
|
}
|
|
7819
7859
|
return toObject;
|
|
7820
7860
|
}
|
|
7821
|
-
function contentToMldev(apiClient, fromObject) {
|
|
7861
|
+
function contentToMldev$1(apiClient, fromObject) {
|
|
7822
7862
|
const toObject = {};
|
|
7823
7863
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7824
7864
|
if (fromParts != null) {
|
|
7825
7865
|
let transformedList = fromParts;
|
|
7826
7866
|
if (Array.isArray(transformedList)) {
|
|
7827
7867
|
transformedList = transformedList.map((item) => {
|
|
7828
|
-
return partToMldev(apiClient, item);
|
|
7868
|
+
return partToMldev$1(apiClient, item);
|
|
7829
7869
|
});
|
|
7830
7870
|
}
|
|
7831
7871
|
setValueByPath(toObject, ['parts'], transformedList);
|
|
@@ -7949,7 +7989,7 @@ function safetySettingToMldev(apiClient, fromObject) {
|
|
|
7949
7989
|
}
|
|
7950
7990
|
return toObject;
|
|
7951
7991
|
}
|
|
7952
|
-
function functionDeclarationToMldev(apiClient, fromObject) {
|
|
7992
|
+
function functionDeclarationToMldev$1(apiClient, fromObject) {
|
|
7953
7993
|
const toObject = {};
|
|
7954
7994
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
7955
7995
|
if (fromBehavior != null) {
|
|
@@ -7973,7 +8013,7 @@ function functionDeclarationToMldev(apiClient, fromObject) {
|
|
|
7973
8013
|
}
|
|
7974
8014
|
return toObject;
|
|
7975
8015
|
}
|
|
7976
|
-
function intervalToMldev(apiClient, fromObject) {
|
|
8016
|
+
function intervalToMldev$1(apiClient, fromObject) {
|
|
7977
8017
|
const toObject = {};
|
|
7978
8018
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7979
8019
|
if (fromStartTime != null) {
|
|
@@ -7985,17 +8025,17 @@ function intervalToMldev(apiClient, fromObject) {
|
|
|
7985
8025
|
}
|
|
7986
8026
|
return toObject;
|
|
7987
8027
|
}
|
|
7988
|
-
function googleSearchToMldev(apiClient, fromObject) {
|
|
8028
|
+
function googleSearchToMldev$1(apiClient, fromObject) {
|
|
7989
8029
|
const toObject = {};
|
|
7990
8030
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7991
8031
|
'timeRangeFilter',
|
|
7992
8032
|
]);
|
|
7993
8033
|
if (fromTimeRangeFilter != null) {
|
|
7994
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev(apiClient, fromTimeRangeFilter));
|
|
8034
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev$1(apiClient, fromTimeRangeFilter));
|
|
7995
8035
|
}
|
|
7996
8036
|
return toObject;
|
|
7997
8037
|
}
|
|
7998
|
-
function dynamicRetrievalConfigToMldev(apiClient, fromObject) {
|
|
8038
|
+
function dynamicRetrievalConfigToMldev$1(apiClient, fromObject) {
|
|
7999
8039
|
const toObject = {};
|
|
8000
8040
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
8001
8041
|
if (fromMode != null) {
|
|
@@ -8009,21 +8049,21 @@ function dynamicRetrievalConfigToMldev(apiClient, fromObject) {
|
|
|
8009
8049
|
}
|
|
8010
8050
|
return toObject;
|
|
8011
8051
|
}
|
|
8012
|
-
function googleSearchRetrievalToMldev(apiClient, fromObject) {
|
|
8052
|
+
function googleSearchRetrievalToMldev$1(apiClient, fromObject) {
|
|
8013
8053
|
const toObject = {};
|
|
8014
8054
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
8015
8055
|
'dynamicRetrievalConfig',
|
|
8016
8056
|
]);
|
|
8017
8057
|
if (fromDynamicRetrievalConfig != null) {
|
|
8018
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig));
|
|
8058
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev$1(apiClient, fromDynamicRetrievalConfig));
|
|
8019
8059
|
}
|
|
8020
8060
|
return toObject;
|
|
8021
8061
|
}
|
|
8022
|
-
function urlContextToMldev() {
|
|
8062
|
+
function urlContextToMldev$1() {
|
|
8023
8063
|
const toObject = {};
|
|
8024
8064
|
return toObject;
|
|
8025
8065
|
}
|
|
8026
|
-
function toolToMldev(apiClient, fromObject) {
|
|
8066
|
+
function toolToMldev$1(apiClient, fromObject) {
|
|
8027
8067
|
const toObject = {};
|
|
8028
8068
|
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
8029
8069
|
'functionDeclarations',
|
|
@@ -8032,7 +8072,7 @@ function toolToMldev(apiClient, fromObject) {
|
|
|
8032
8072
|
let transformedList = fromFunctionDeclarations;
|
|
8033
8073
|
if (Array.isArray(transformedList)) {
|
|
8034
8074
|
transformedList = transformedList.map((item) => {
|
|
8035
|
-
return functionDeclarationToMldev(apiClient, item);
|
|
8075
|
+
return functionDeclarationToMldev$1(apiClient, item);
|
|
8036
8076
|
});
|
|
8037
8077
|
}
|
|
8038
8078
|
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
@@ -8042,13 +8082,13 @@ function toolToMldev(apiClient, fromObject) {
|
|
|
8042
8082
|
}
|
|
8043
8083
|
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
8044
8084
|
if (fromGoogleSearch != null) {
|
|
8045
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(apiClient, fromGoogleSearch));
|
|
8085
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev$1(apiClient, fromGoogleSearch));
|
|
8046
8086
|
}
|
|
8047
8087
|
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
8048
8088
|
'googleSearchRetrieval',
|
|
8049
8089
|
]);
|
|
8050
8090
|
if (fromGoogleSearchRetrieval != null) {
|
|
8051
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval));
|
|
8091
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev$1(apiClient, fromGoogleSearchRetrieval));
|
|
8052
8092
|
}
|
|
8053
8093
|
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
8054
8094
|
throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
|
|
@@ -8058,7 +8098,7 @@ function toolToMldev(apiClient, fromObject) {
|
|
|
8058
8098
|
}
|
|
8059
8099
|
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
8060
8100
|
if (fromUrlContext != null) {
|
|
8061
|
-
setValueByPath(toObject, ['urlContext'], urlContextToMldev());
|
|
8101
|
+
setValueByPath(toObject, ['urlContext'], urlContextToMldev$1());
|
|
8062
8102
|
}
|
|
8063
8103
|
const fromCodeExecution = getValueByPath(fromObject, [
|
|
8064
8104
|
'codeExecution',
|
|
@@ -8122,7 +8162,7 @@ function toolConfigToMldev(apiClient, fromObject) {
|
|
|
8122
8162
|
}
|
|
8123
8163
|
return toObject;
|
|
8124
8164
|
}
|
|
8125
|
-
function prebuiltVoiceConfigToMldev(apiClient, fromObject) {
|
|
8165
|
+
function prebuiltVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
8126
8166
|
const toObject = {};
|
|
8127
8167
|
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
8128
8168
|
if (fromVoiceName != null) {
|
|
@@ -8130,17 +8170,17 @@ function prebuiltVoiceConfigToMldev(apiClient, fromObject) {
|
|
|
8130
8170
|
}
|
|
8131
8171
|
return toObject;
|
|
8132
8172
|
}
|
|
8133
|
-
function voiceConfigToMldev(apiClient, fromObject) {
|
|
8173
|
+
function voiceConfigToMldev$1(apiClient, fromObject) {
|
|
8134
8174
|
const toObject = {};
|
|
8135
8175
|
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
8136
8176
|
'prebuiltVoiceConfig',
|
|
8137
8177
|
]);
|
|
8138
8178
|
if (fromPrebuiltVoiceConfig != null) {
|
|
8139
|
-
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig));
|
|
8179
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev$1(apiClient, fromPrebuiltVoiceConfig));
|
|
8140
8180
|
}
|
|
8141
8181
|
return toObject;
|
|
8142
8182
|
}
|
|
8143
|
-
function speakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
8183
|
+
function speakerVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
8144
8184
|
const toObject = {};
|
|
8145
8185
|
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
8146
8186
|
if (fromSpeaker != null) {
|
|
@@ -8148,11 +8188,11 @@ function speakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
|
8148
8188
|
}
|
|
8149
8189
|
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
8150
8190
|
if (fromVoiceConfig != null) {
|
|
8151
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig));
|
|
8191
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$1(apiClient, fromVoiceConfig));
|
|
8152
8192
|
}
|
|
8153
8193
|
return toObject;
|
|
8154
8194
|
}
|
|
8155
|
-
function multiSpeakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
8195
|
+
function multiSpeakerVoiceConfigToMldev$1(apiClient, fromObject) {
|
|
8156
8196
|
const toObject = {};
|
|
8157
8197
|
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
8158
8198
|
'speakerVoiceConfigs',
|
|
@@ -8161,24 +8201,24 @@ function multiSpeakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
|
8161
8201
|
let transformedList = fromSpeakerVoiceConfigs;
|
|
8162
8202
|
if (Array.isArray(transformedList)) {
|
|
8163
8203
|
transformedList = transformedList.map((item) => {
|
|
8164
|
-
return speakerVoiceConfigToMldev(apiClient, item);
|
|
8204
|
+
return speakerVoiceConfigToMldev$1(apiClient, item);
|
|
8165
8205
|
});
|
|
8166
8206
|
}
|
|
8167
8207
|
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
8168
8208
|
}
|
|
8169
8209
|
return toObject;
|
|
8170
8210
|
}
|
|
8171
|
-
function speechConfigToMldev(apiClient, fromObject) {
|
|
8211
|
+
function speechConfigToMldev$1(apiClient, fromObject) {
|
|
8172
8212
|
const toObject = {};
|
|
8173
8213
|
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
8174
8214
|
if (fromVoiceConfig != null) {
|
|
8175
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig));
|
|
8215
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev$1(apiClient, fromVoiceConfig));
|
|
8176
8216
|
}
|
|
8177
8217
|
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
8178
8218
|
'multiSpeakerVoiceConfig',
|
|
8179
8219
|
]);
|
|
8180
8220
|
if (fromMultiSpeakerVoiceConfig != null) {
|
|
8181
|
-
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev(apiClient, fromMultiSpeakerVoiceConfig));
|
|
8221
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev$1(apiClient, fromMultiSpeakerVoiceConfig));
|
|
8182
8222
|
}
|
|
8183
8223
|
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
8184
8224
|
if (fromLanguageCode != null) {
|
|
@@ -8208,7 +8248,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
8208
8248
|
'systemInstruction',
|
|
8209
8249
|
]);
|
|
8210
8250
|
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
8211
|
-
setValueByPath(parentObject, ['systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
8251
|
+
setValueByPath(parentObject, ['systemInstruction'], contentToMldev$1(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
8212
8252
|
}
|
|
8213
8253
|
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8214
8254
|
if (fromTemperature != null) {
|
|
@@ -8301,7 +8341,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
8301
8341
|
let transformedList = tTools(apiClient, fromTools);
|
|
8302
8342
|
if (Array.isArray(transformedList)) {
|
|
8303
8343
|
transformedList = transformedList.map((item) => {
|
|
8304
|
-
return toolToMldev(apiClient, tTool(apiClient, item));
|
|
8344
|
+
return toolToMldev$1(apiClient, tTool(apiClient, item));
|
|
8305
8345
|
});
|
|
8306
8346
|
}
|
|
8307
8347
|
setValueByPath(parentObject, ['tools'], transformedList);
|
|
@@ -8333,7 +8373,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
8333
8373
|
}
|
|
8334
8374
|
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8335
8375
|
if (fromSpeechConfig != null) {
|
|
8336
|
-
setValueByPath(toObject, ['speechConfig'], speechConfigToMldev(apiClient, tSpeechConfig(apiClient, fromSpeechConfig)));
|
|
8376
|
+
setValueByPath(toObject, ['speechConfig'], speechConfigToMldev$1(apiClient, tSpeechConfig(apiClient, fromSpeechConfig)));
|
|
8337
8377
|
}
|
|
8338
8378
|
if (getValueByPath(fromObject, ['audioTimestamp']) !== undefined) {
|
|
8339
8379
|
throw new Error('audioTimestamp parameter is not supported in Gemini API.');
|
|
@@ -8357,7 +8397,7 @@ function generateContentParametersToMldev(apiClient, fromObject) {
|
|
|
8357
8397
|
let transformedList = tContents(apiClient, fromContents);
|
|
8358
8398
|
if (Array.isArray(transformedList)) {
|
|
8359
8399
|
transformedList = transformedList.map((item) => {
|
|
8360
|
-
return contentToMldev(apiClient, item);
|
|
8400
|
+
return contentToMldev$1(apiClient, item);
|
|
8361
8401
|
});
|
|
8362
8402
|
}
|
|
8363
8403
|
setValueByPath(toObject, ['contents'], transformedList);
|
|
@@ -8609,7 +8649,7 @@ function countTokensParametersToMldev(apiClient, fromObject) {
|
|
|
8609
8649
|
let transformedList = tContents(apiClient, fromContents);
|
|
8610
8650
|
if (Array.isArray(transformedList)) {
|
|
8611
8651
|
transformedList = transformedList.map((item) => {
|
|
8612
|
-
return contentToMldev(apiClient, item);
|
|
8652
|
+
return contentToMldev$1(apiClient, item);
|
|
8613
8653
|
});
|
|
8614
8654
|
}
|
|
8615
8655
|
setValueByPath(toObject, ['contents'], transformedList);
|
|
@@ -8776,6 +8816,12 @@ function partToVertex(apiClient, fromObject) {
|
|
|
8776
8816
|
if (fromFileData != null) {
|
|
8777
8817
|
setValueByPath(toObject, ['fileData'], fileDataToVertex(apiClient, fromFileData));
|
|
8778
8818
|
}
|
|
8819
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8820
|
+
'thoughtSignature',
|
|
8821
|
+
]);
|
|
8822
|
+
if (fromThoughtSignature != null) {
|
|
8823
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
8824
|
+
}
|
|
8779
8825
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
8780
8826
|
'codeExecutionResult',
|
|
8781
8827
|
]);
|
|
@@ -10113,6 +10159,12 @@ function partFromMldev(apiClient, fromObject) {
|
|
|
10113
10159
|
if (fromFileData != null) {
|
|
10114
10160
|
setValueByPath(toObject, ['fileData'], fileDataFromMldev(apiClient, fromFileData));
|
|
10115
10161
|
}
|
|
10162
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
10163
|
+
'thoughtSignature',
|
|
10164
|
+
]);
|
|
10165
|
+
if (fromThoughtSignature != null) {
|
|
10166
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
10167
|
+
}
|
|
10116
10168
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
10117
10169
|
'codeExecutionResult',
|
|
10118
10170
|
]);
|
|
@@ -10631,6 +10683,12 @@ function partFromVertex(apiClient, fromObject) {
|
|
|
10631
10683
|
if (fromFileData != null) {
|
|
10632
10684
|
setValueByPath(toObject, ['fileData'], fileDataFromVertex(apiClient, fromFileData));
|
|
10633
10685
|
}
|
|
10686
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
10687
|
+
'thoughtSignature',
|
|
10688
|
+
]);
|
|
10689
|
+
if (fromThoughtSignature != null) {
|
|
10690
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
10691
|
+
}
|
|
10634
10692
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
10635
10693
|
'codeExecutionResult',
|
|
10636
10694
|
]);
|
|
@@ -11203,11 +11261,9 @@ function hasNonMcpTools(params) {
|
|
|
11203
11261
|
}
|
|
11204
11262
|
// Returns true if the object is a MCP CallableTool, otherwise false.
|
|
11205
11263
|
function isMcpCallableTool(object) {
|
|
11206
|
-
// TODO: b/418266406 - Add a more robust check for the MCP CallableTool.
|
|
11207
11264
|
return (object !== null &&
|
|
11208
11265
|
typeof object === 'object' &&
|
|
11209
|
-
|
|
11210
|
-
'callTool' in object);
|
|
11266
|
+
object instanceof McpCallableTool);
|
|
11211
11267
|
}
|
|
11212
11268
|
// List all tools from the MCP client.
|
|
11213
11269
|
function listAllTools(mcpClient, maxTools = 100) {
|
|
@@ -11687,7 +11743,14 @@ class Live {
|
|
|
11687
11743
|
}
|
|
11688
11744
|
else {
|
|
11689
11745
|
const apiKey = this.apiClient.getApiKey();
|
|
11690
|
-
|
|
11746
|
+
let method = 'BidiGenerateContent';
|
|
11747
|
+
let keyName = 'key';
|
|
11748
|
+
if (apiKey === null || apiKey === void 0 ? void 0 : apiKey.startsWith('auth_tokens/')) {
|
|
11749
|
+
console.warn('Warning: Ephemeral token support is experimental and may change in future versions.');
|
|
11750
|
+
method = 'BidiGenerateContentConstrained';
|
|
11751
|
+
keyName = 'access_token';
|
|
11752
|
+
}
|
|
11753
|
+
url = `${websocketBaseUrl}/ws/google.ai.generativelanguage.${apiVersion}.GenerativeService.${method}?${keyName}=${apiKey}`;
|
|
11691
11754
|
}
|
|
11692
11755
|
let onopenResolve = () => { };
|
|
11693
11756
|
const onopenPromise = new Promise((resolve) => {
|
|
@@ -11793,7 +11856,7 @@ class Session {
|
|
|
11793
11856
|
contents = contents.map((item) => contentToVertex(apiClient, item));
|
|
11794
11857
|
}
|
|
11795
11858
|
else {
|
|
11796
|
-
contents = contents.map((item) => contentToMldev(apiClient, item));
|
|
11859
|
+
contents = contents.map((item) => contentToMldev$1(apiClient, item));
|
|
11797
11860
|
}
|
|
11798
11861
|
}
|
|
11799
11862
|
catch (_a) {
|
|
@@ -12091,7 +12154,6 @@ class Models extends BaseModule {
|
|
|
12091
12154
|
if (!hasMcpClientTools(params) || shouldDisableAfc(params.config)) {
|
|
12092
12155
|
return await this.generateContentInternal(transformedParams);
|
|
12093
12156
|
}
|
|
12094
|
-
// TODO: b/418266406 - Improve the check for CallableTools and Tools.
|
|
12095
12157
|
if (hasNonMcpTools(params)) {
|
|
12096
12158
|
throw new Error('Automatic function calling with CallableTools and Tools is not yet supported.');
|
|
12097
12159
|
}
|
|
@@ -13646,75 +13708,910 @@ class Operations extends BaseModule {
|
|
|
13646
13708
|
* Copyright 2025 Google LLC
|
|
13647
13709
|
* SPDX-License-Identifier: Apache-2.0
|
|
13648
13710
|
*/
|
|
13649
|
-
function
|
|
13650
|
-
const toObject = {};
|
|
13651
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
13652
|
-
if (fromName != null) {
|
|
13653
|
-
setValueByPath(toObject, ['_url', 'name'], fromName);
|
|
13654
|
-
}
|
|
13655
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
13656
|
-
if (fromConfig != null) {
|
|
13657
|
-
setValueByPath(toObject, ['config'], fromConfig);
|
|
13658
|
-
}
|
|
13659
|
-
return toObject;
|
|
13660
|
-
}
|
|
13661
|
-
function listTuningJobsConfigToMldev(apiClient, fromObject, parentObject) {
|
|
13711
|
+
function prebuiltVoiceConfigToMldev(apiClient, fromObject) {
|
|
13662
13712
|
const toObject = {};
|
|
13663
|
-
const
|
|
13664
|
-
if (
|
|
13665
|
-
setValueByPath(
|
|
13666
|
-
}
|
|
13667
|
-
const fromPageToken = getValueByPath(fromObject, ['pageToken']);
|
|
13668
|
-
if (parentObject !== undefined && fromPageToken != null) {
|
|
13669
|
-
setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
|
|
13670
|
-
}
|
|
13671
|
-
const fromFilter = getValueByPath(fromObject, ['filter']);
|
|
13672
|
-
if (parentObject !== undefined && fromFilter != null) {
|
|
13673
|
-
setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
|
|
13713
|
+
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
13714
|
+
if (fromVoiceName != null) {
|
|
13715
|
+
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
13674
13716
|
}
|
|
13675
13717
|
return toObject;
|
|
13676
13718
|
}
|
|
13677
|
-
function
|
|
13719
|
+
function voiceConfigToMldev(apiClient, fromObject) {
|
|
13678
13720
|
const toObject = {};
|
|
13679
|
-
const
|
|
13680
|
-
|
|
13681
|
-
|
|
13721
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
13722
|
+
'prebuiltVoiceConfig',
|
|
13723
|
+
]);
|
|
13724
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
13725
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToMldev(apiClient, fromPrebuiltVoiceConfig));
|
|
13682
13726
|
}
|
|
13683
13727
|
return toObject;
|
|
13684
13728
|
}
|
|
13685
|
-
function
|
|
13729
|
+
function speakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
13686
13730
|
const toObject = {};
|
|
13687
|
-
const
|
|
13688
|
-
if (
|
|
13689
|
-
setValueByPath(toObject, ['
|
|
13731
|
+
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
13732
|
+
if (fromSpeaker != null) {
|
|
13733
|
+
setValueByPath(toObject, ['speaker'], fromSpeaker);
|
|
13690
13734
|
}
|
|
13691
|
-
const
|
|
13692
|
-
if (
|
|
13693
|
-
setValueByPath(toObject, ['
|
|
13735
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
13736
|
+
if (fromVoiceConfig != null) {
|
|
13737
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig));
|
|
13694
13738
|
}
|
|
13695
13739
|
return toObject;
|
|
13696
13740
|
}
|
|
13697
|
-
function
|
|
13741
|
+
function multiSpeakerVoiceConfigToMldev(apiClient, fromObject) {
|
|
13698
13742
|
const toObject = {};
|
|
13699
|
-
|
|
13700
|
-
|
|
13701
|
-
|
|
13702
|
-
|
|
13703
|
-
|
|
13704
|
-
let transformedList = fromExamples;
|
|
13743
|
+
const fromSpeakerVoiceConfigs = getValueByPath(fromObject, [
|
|
13744
|
+
'speakerVoiceConfigs',
|
|
13745
|
+
]);
|
|
13746
|
+
if (fromSpeakerVoiceConfigs != null) {
|
|
13747
|
+
let transformedList = fromSpeakerVoiceConfigs;
|
|
13705
13748
|
if (Array.isArray(transformedList)) {
|
|
13706
13749
|
transformedList = transformedList.map((item) => {
|
|
13707
|
-
return
|
|
13750
|
+
return speakerVoiceConfigToMldev(apiClient, item);
|
|
13708
13751
|
});
|
|
13709
13752
|
}
|
|
13710
|
-
setValueByPath(toObject, ['
|
|
13753
|
+
setValueByPath(toObject, ['speakerVoiceConfigs'], transformedList);
|
|
13711
13754
|
}
|
|
13712
13755
|
return toObject;
|
|
13713
13756
|
}
|
|
13714
|
-
function
|
|
13757
|
+
function speechConfigToMldev(apiClient, fromObject) {
|
|
13715
13758
|
const toObject = {};
|
|
13716
|
-
|
|
13717
|
-
|
|
13759
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
13760
|
+
if (fromVoiceConfig != null) {
|
|
13761
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToMldev(apiClient, fromVoiceConfig));
|
|
13762
|
+
}
|
|
13763
|
+
const fromMultiSpeakerVoiceConfig = getValueByPath(fromObject, [
|
|
13764
|
+
'multiSpeakerVoiceConfig',
|
|
13765
|
+
]);
|
|
13766
|
+
if (fromMultiSpeakerVoiceConfig != null) {
|
|
13767
|
+
setValueByPath(toObject, ['multiSpeakerVoiceConfig'], multiSpeakerVoiceConfigToMldev(apiClient, fromMultiSpeakerVoiceConfig));
|
|
13768
|
+
}
|
|
13769
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
13770
|
+
if (fromLanguageCode != null) {
|
|
13771
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
13772
|
+
}
|
|
13773
|
+
return toObject;
|
|
13774
|
+
}
|
|
13775
|
+
function videoMetadataToMldev(apiClient, fromObject) {
|
|
13776
|
+
const toObject = {};
|
|
13777
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
13778
|
+
if (fromFps != null) {
|
|
13779
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
13780
|
+
}
|
|
13781
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
13782
|
+
if (fromEndOffset != null) {
|
|
13783
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
13784
|
+
}
|
|
13785
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
13786
|
+
if (fromStartOffset != null) {
|
|
13787
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
13788
|
+
}
|
|
13789
|
+
return toObject;
|
|
13790
|
+
}
|
|
13791
|
+
function blobToMldev(apiClient, fromObject) {
|
|
13792
|
+
const toObject = {};
|
|
13793
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
13794
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
13795
|
+
}
|
|
13796
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
13797
|
+
if (fromData != null) {
|
|
13798
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
13799
|
+
}
|
|
13800
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
13801
|
+
if (fromMimeType != null) {
|
|
13802
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
13803
|
+
}
|
|
13804
|
+
return toObject;
|
|
13805
|
+
}
|
|
13806
|
+
function fileDataToMldev(apiClient, fromObject) {
|
|
13807
|
+
const toObject = {};
|
|
13808
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
13809
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
13810
|
+
}
|
|
13811
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
13812
|
+
if (fromFileUri != null) {
|
|
13813
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
13814
|
+
}
|
|
13815
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
13816
|
+
if (fromMimeType != null) {
|
|
13817
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
13818
|
+
}
|
|
13819
|
+
return toObject;
|
|
13820
|
+
}
|
|
13821
|
+
function partToMldev(apiClient, fromObject) {
|
|
13822
|
+
const toObject = {};
|
|
13823
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
13824
|
+
'videoMetadata',
|
|
13825
|
+
]);
|
|
13826
|
+
if (fromVideoMetadata != null) {
|
|
13827
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToMldev(apiClient, fromVideoMetadata));
|
|
13828
|
+
}
|
|
13829
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
13830
|
+
if (fromThought != null) {
|
|
13831
|
+
setValueByPath(toObject, ['thought'], fromThought);
|
|
13832
|
+
}
|
|
13833
|
+
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
13834
|
+
if (fromInlineData != null) {
|
|
13835
|
+
setValueByPath(toObject, ['inlineData'], blobToMldev(apiClient, fromInlineData));
|
|
13836
|
+
}
|
|
13837
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
13838
|
+
if (fromFileData != null) {
|
|
13839
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev(apiClient, fromFileData));
|
|
13840
|
+
}
|
|
13841
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
13842
|
+
'thoughtSignature',
|
|
13843
|
+
]);
|
|
13844
|
+
if (fromThoughtSignature != null) {
|
|
13845
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
13846
|
+
}
|
|
13847
|
+
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
13848
|
+
'codeExecutionResult',
|
|
13849
|
+
]);
|
|
13850
|
+
if (fromCodeExecutionResult != null) {
|
|
13851
|
+
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
13852
|
+
}
|
|
13853
|
+
const fromExecutableCode = getValueByPath(fromObject, [
|
|
13854
|
+
'executableCode',
|
|
13855
|
+
]);
|
|
13856
|
+
if (fromExecutableCode != null) {
|
|
13857
|
+
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
13858
|
+
}
|
|
13859
|
+
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
13860
|
+
if (fromFunctionCall != null) {
|
|
13861
|
+
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
13862
|
+
}
|
|
13863
|
+
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
13864
|
+
'functionResponse',
|
|
13865
|
+
]);
|
|
13866
|
+
if (fromFunctionResponse != null) {
|
|
13867
|
+
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
13868
|
+
}
|
|
13869
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
13870
|
+
if (fromText != null) {
|
|
13871
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
13872
|
+
}
|
|
13873
|
+
return toObject;
|
|
13874
|
+
}
|
|
13875
|
+
function contentToMldev(apiClient, fromObject) {
|
|
13876
|
+
const toObject = {};
|
|
13877
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
13878
|
+
if (fromParts != null) {
|
|
13879
|
+
let transformedList = fromParts;
|
|
13880
|
+
if (Array.isArray(transformedList)) {
|
|
13881
|
+
transformedList = transformedList.map((item) => {
|
|
13882
|
+
return partToMldev(apiClient, item);
|
|
13883
|
+
});
|
|
13884
|
+
}
|
|
13885
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
13886
|
+
}
|
|
13887
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
13888
|
+
if (fromRole != null) {
|
|
13889
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
13890
|
+
}
|
|
13891
|
+
return toObject;
|
|
13892
|
+
}
|
|
13893
|
+
function functionDeclarationToMldev(apiClient, fromObject) {
|
|
13894
|
+
const toObject = {};
|
|
13895
|
+
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
13896
|
+
if (fromBehavior != null) {
|
|
13897
|
+
setValueByPath(toObject, ['behavior'], fromBehavior);
|
|
13898
|
+
}
|
|
13899
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
13900
|
+
if (fromDescription != null) {
|
|
13901
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
13902
|
+
}
|
|
13903
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
13904
|
+
if (fromName != null) {
|
|
13905
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
13906
|
+
}
|
|
13907
|
+
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
13908
|
+
if (fromParameters != null) {
|
|
13909
|
+
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
13910
|
+
}
|
|
13911
|
+
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
13912
|
+
if (fromResponse != null) {
|
|
13913
|
+
setValueByPath(toObject, ['response'], fromResponse);
|
|
13914
|
+
}
|
|
13915
|
+
return toObject;
|
|
13916
|
+
}
|
|
13917
|
+
function intervalToMldev(apiClient, fromObject) {
|
|
13918
|
+
const toObject = {};
|
|
13919
|
+
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
13920
|
+
if (fromStartTime != null) {
|
|
13921
|
+
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
13922
|
+
}
|
|
13923
|
+
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
13924
|
+
if (fromEndTime != null) {
|
|
13925
|
+
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
13926
|
+
}
|
|
13927
|
+
return toObject;
|
|
13928
|
+
}
|
|
13929
|
+
function googleSearchToMldev(apiClient, fromObject) {
|
|
13930
|
+
const toObject = {};
|
|
13931
|
+
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
13932
|
+
'timeRangeFilter',
|
|
13933
|
+
]);
|
|
13934
|
+
if (fromTimeRangeFilter != null) {
|
|
13935
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToMldev(apiClient, fromTimeRangeFilter));
|
|
13936
|
+
}
|
|
13937
|
+
return toObject;
|
|
13938
|
+
}
|
|
13939
|
+
function dynamicRetrievalConfigToMldev(apiClient, fromObject) {
|
|
13940
|
+
const toObject = {};
|
|
13941
|
+
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
13942
|
+
if (fromMode != null) {
|
|
13943
|
+
setValueByPath(toObject, ['mode'], fromMode);
|
|
13944
|
+
}
|
|
13945
|
+
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
13946
|
+
'dynamicThreshold',
|
|
13947
|
+
]);
|
|
13948
|
+
if (fromDynamicThreshold != null) {
|
|
13949
|
+
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
13950
|
+
}
|
|
13951
|
+
return toObject;
|
|
13952
|
+
}
|
|
13953
|
+
function googleSearchRetrievalToMldev(apiClient, fromObject) {
|
|
13954
|
+
const toObject = {};
|
|
13955
|
+
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
13956
|
+
'dynamicRetrievalConfig',
|
|
13957
|
+
]);
|
|
13958
|
+
if (fromDynamicRetrievalConfig != null) {
|
|
13959
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToMldev(apiClient, fromDynamicRetrievalConfig));
|
|
13960
|
+
}
|
|
13961
|
+
return toObject;
|
|
13962
|
+
}
|
|
13963
|
+
function urlContextToMldev() {
|
|
13964
|
+
const toObject = {};
|
|
13965
|
+
return toObject;
|
|
13966
|
+
}
|
|
13967
|
+
function toolToMldev(apiClient, fromObject) {
|
|
13968
|
+
const toObject = {};
|
|
13969
|
+
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
13970
|
+
'functionDeclarations',
|
|
13971
|
+
]);
|
|
13972
|
+
if (fromFunctionDeclarations != null) {
|
|
13973
|
+
let transformedList = fromFunctionDeclarations;
|
|
13974
|
+
if (Array.isArray(transformedList)) {
|
|
13975
|
+
transformedList = transformedList.map((item) => {
|
|
13976
|
+
return functionDeclarationToMldev(apiClient, item);
|
|
13977
|
+
});
|
|
13978
|
+
}
|
|
13979
|
+
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
13980
|
+
}
|
|
13981
|
+
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
13982
|
+
throw new Error('retrieval parameter is not supported in Gemini API.');
|
|
13983
|
+
}
|
|
13984
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
13985
|
+
if (fromGoogleSearch != null) {
|
|
13986
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToMldev(apiClient, fromGoogleSearch));
|
|
13987
|
+
}
|
|
13988
|
+
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
13989
|
+
'googleSearchRetrieval',
|
|
13990
|
+
]);
|
|
13991
|
+
if (fromGoogleSearchRetrieval != null) {
|
|
13992
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToMldev(apiClient, fromGoogleSearchRetrieval));
|
|
13993
|
+
}
|
|
13994
|
+
if (getValueByPath(fromObject, ['enterpriseWebSearch']) !== undefined) {
|
|
13995
|
+
throw new Error('enterpriseWebSearch parameter is not supported in Gemini API.');
|
|
13996
|
+
}
|
|
13997
|
+
if (getValueByPath(fromObject, ['googleMaps']) !== undefined) {
|
|
13998
|
+
throw new Error('googleMaps parameter is not supported in Gemini API.');
|
|
13999
|
+
}
|
|
14000
|
+
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
14001
|
+
if (fromUrlContext != null) {
|
|
14002
|
+
setValueByPath(toObject, ['urlContext'], urlContextToMldev());
|
|
14003
|
+
}
|
|
14004
|
+
const fromCodeExecution = getValueByPath(fromObject, [
|
|
14005
|
+
'codeExecution',
|
|
14006
|
+
]);
|
|
14007
|
+
if (fromCodeExecution != null) {
|
|
14008
|
+
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
14009
|
+
}
|
|
14010
|
+
return toObject;
|
|
14011
|
+
}
|
|
14012
|
+
function sessionResumptionConfigToMldev(apiClient, fromObject) {
|
|
14013
|
+
const toObject = {};
|
|
14014
|
+
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
14015
|
+
if (fromHandle != null) {
|
|
14016
|
+
setValueByPath(toObject, ['handle'], fromHandle);
|
|
14017
|
+
}
|
|
14018
|
+
if (getValueByPath(fromObject, ['transparent']) !== undefined) {
|
|
14019
|
+
throw new Error('transparent parameter is not supported in Gemini API.');
|
|
14020
|
+
}
|
|
14021
|
+
return toObject;
|
|
14022
|
+
}
|
|
14023
|
+
function audioTranscriptionConfigToMldev() {
|
|
14024
|
+
const toObject = {};
|
|
14025
|
+
return toObject;
|
|
14026
|
+
}
|
|
14027
|
+
function automaticActivityDetectionToMldev(apiClient, fromObject) {
|
|
14028
|
+
const toObject = {};
|
|
14029
|
+
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
14030
|
+
if (fromDisabled != null) {
|
|
14031
|
+
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
14032
|
+
}
|
|
14033
|
+
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
14034
|
+
'startOfSpeechSensitivity',
|
|
14035
|
+
]);
|
|
14036
|
+
if (fromStartOfSpeechSensitivity != null) {
|
|
14037
|
+
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
14038
|
+
}
|
|
14039
|
+
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
14040
|
+
'endOfSpeechSensitivity',
|
|
14041
|
+
]);
|
|
14042
|
+
if (fromEndOfSpeechSensitivity != null) {
|
|
14043
|
+
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
14044
|
+
}
|
|
14045
|
+
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
14046
|
+
'prefixPaddingMs',
|
|
14047
|
+
]);
|
|
14048
|
+
if (fromPrefixPaddingMs != null) {
|
|
14049
|
+
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
14050
|
+
}
|
|
14051
|
+
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
14052
|
+
'silenceDurationMs',
|
|
14053
|
+
]);
|
|
14054
|
+
if (fromSilenceDurationMs != null) {
|
|
14055
|
+
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
14056
|
+
}
|
|
14057
|
+
return toObject;
|
|
14058
|
+
}
|
|
14059
|
+
function realtimeInputConfigToMldev(apiClient, fromObject) {
|
|
14060
|
+
const toObject = {};
|
|
14061
|
+
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
14062
|
+
'automaticActivityDetection',
|
|
14063
|
+
]);
|
|
14064
|
+
if (fromAutomaticActivityDetection != null) {
|
|
14065
|
+
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToMldev(apiClient, fromAutomaticActivityDetection));
|
|
14066
|
+
}
|
|
14067
|
+
const fromActivityHandling = getValueByPath(fromObject, [
|
|
14068
|
+
'activityHandling',
|
|
14069
|
+
]);
|
|
14070
|
+
if (fromActivityHandling != null) {
|
|
14071
|
+
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
14072
|
+
}
|
|
14073
|
+
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
14074
|
+
if (fromTurnCoverage != null) {
|
|
14075
|
+
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
14076
|
+
}
|
|
14077
|
+
return toObject;
|
|
14078
|
+
}
|
|
14079
|
+
function slidingWindowToMldev(apiClient, fromObject) {
|
|
14080
|
+
const toObject = {};
|
|
14081
|
+
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
14082
|
+
if (fromTargetTokens != null) {
|
|
14083
|
+
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
14084
|
+
}
|
|
14085
|
+
return toObject;
|
|
14086
|
+
}
|
|
14087
|
+
function contextWindowCompressionConfigToMldev(apiClient, fromObject) {
|
|
14088
|
+
const toObject = {};
|
|
14089
|
+
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
14090
|
+
'triggerTokens',
|
|
14091
|
+
]);
|
|
14092
|
+
if (fromTriggerTokens != null) {
|
|
14093
|
+
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
14094
|
+
}
|
|
14095
|
+
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
14096
|
+
'slidingWindow',
|
|
14097
|
+
]);
|
|
14098
|
+
if (fromSlidingWindow != null) {
|
|
14099
|
+
setValueByPath(toObject, ['slidingWindow'], slidingWindowToMldev(apiClient, fromSlidingWindow));
|
|
14100
|
+
}
|
|
14101
|
+
return toObject;
|
|
14102
|
+
}
|
|
14103
|
+
function proactivityConfigToMldev(apiClient, fromObject) {
|
|
14104
|
+
const toObject = {};
|
|
14105
|
+
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
14106
|
+
'proactiveAudio',
|
|
14107
|
+
]);
|
|
14108
|
+
if (fromProactiveAudio != null) {
|
|
14109
|
+
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
14110
|
+
}
|
|
14111
|
+
return toObject;
|
|
14112
|
+
}
|
|
14113
|
+
function liveConnectConfigToMldev(apiClient, fromObject, parentObject) {
|
|
14114
|
+
const toObject = {};
|
|
14115
|
+
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
14116
|
+
'generationConfig',
|
|
14117
|
+
]);
|
|
14118
|
+
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
14119
|
+
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
14120
|
+
}
|
|
14121
|
+
const fromResponseModalities = getValueByPath(fromObject, [
|
|
14122
|
+
'responseModalities',
|
|
14123
|
+
]);
|
|
14124
|
+
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
14125
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
14126
|
+
}
|
|
14127
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
14128
|
+
if (parentObject !== undefined && fromTemperature != null) {
|
|
14129
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
|
|
14130
|
+
}
|
|
14131
|
+
const fromTopP = getValueByPath(fromObject, ['topP']);
|
|
14132
|
+
if (parentObject !== undefined && fromTopP != null) {
|
|
14133
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
|
|
14134
|
+
}
|
|
14135
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
14136
|
+
if (parentObject !== undefined && fromTopK != null) {
|
|
14137
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
|
|
14138
|
+
}
|
|
14139
|
+
const fromMaxOutputTokens = getValueByPath(fromObject, [
|
|
14140
|
+
'maxOutputTokens',
|
|
14141
|
+
]);
|
|
14142
|
+
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
14143
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
14144
|
+
}
|
|
14145
|
+
const fromMediaResolution = getValueByPath(fromObject, [
|
|
14146
|
+
'mediaResolution',
|
|
14147
|
+
]);
|
|
14148
|
+
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
14149
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
14150
|
+
}
|
|
14151
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
14152
|
+
if (parentObject !== undefined && fromSeed != null) {
|
|
14153
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
14154
|
+
}
|
|
14155
|
+
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
14156
|
+
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
14157
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToMldev(apiClient, tLiveSpeechConfig(apiClient, fromSpeechConfig)));
|
|
14158
|
+
}
|
|
14159
|
+
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
14160
|
+
'enableAffectiveDialog',
|
|
14161
|
+
]);
|
|
14162
|
+
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
14163
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
14164
|
+
}
|
|
14165
|
+
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
14166
|
+
'systemInstruction',
|
|
14167
|
+
]);
|
|
14168
|
+
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
14169
|
+
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToMldev(apiClient, tContent(apiClient, fromSystemInstruction)));
|
|
14170
|
+
}
|
|
14171
|
+
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
14172
|
+
if (parentObject !== undefined && fromTools != null) {
|
|
14173
|
+
let transformedList = tTools(apiClient, fromTools);
|
|
14174
|
+
if (Array.isArray(transformedList)) {
|
|
14175
|
+
transformedList = transformedList.map((item) => {
|
|
14176
|
+
return toolToMldev(apiClient, tTool(apiClient, item));
|
|
14177
|
+
});
|
|
14178
|
+
}
|
|
14179
|
+
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
14180
|
+
}
|
|
14181
|
+
const fromSessionResumption = getValueByPath(fromObject, [
|
|
14182
|
+
'sessionResumption',
|
|
14183
|
+
]);
|
|
14184
|
+
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
14185
|
+
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToMldev(apiClient, fromSessionResumption));
|
|
14186
|
+
}
|
|
14187
|
+
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
14188
|
+
'inputAudioTranscription',
|
|
14189
|
+
]);
|
|
14190
|
+
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
14191
|
+
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToMldev());
|
|
14192
|
+
}
|
|
14193
|
+
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
14194
|
+
'outputAudioTranscription',
|
|
14195
|
+
]);
|
|
14196
|
+
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
14197
|
+
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToMldev());
|
|
14198
|
+
}
|
|
14199
|
+
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
14200
|
+
'realtimeInputConfig',
|
|
14201
|
+
]);
|
|
14202
|
+
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
14203
|
+
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToMldev(apiClient, fromRealtimeInputConfig));
|
|
14204
|
+
}
|
|
14205
|
+
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
14206
|
+
'contextWindowCompression',
|
|
14207
|
+
]);
|
|
14208
|
+
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
14209
|
+
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToMldev(apiClient, fromContextWindowCompression));
|
|
14210
|
+
}
|
|
14211
|
+
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
14212
|
+
if (parentObject !== undefined && fromProactivity != null) {
|
|
14213
|
+
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToMldev(apiClient, fromProactivity));
|
|
14214
|
+
}
|
|
14215
|
+
return toObject;
|
|
14216
|
+
}
|
|
14217
|
+
function liveConnectConstraintsToMldev(apiClient, fromObject) {
|
|
14218
|
+
const toObject = {};
|
|
14219
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
14220
|
+
if (fromModel != null) {
|
|
14221
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
14222
|
+
}
|
|
14223
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
14224
|
+
if (fromConfig != null) {
|
|
14225
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToMldev(apiClient, fromConfig, toObject));
|
|
14226
|
+
}
|
|
14227
|
+
return toObject;
|
|
14228
|
+
}
|
|
14229
|
+
function createAuthTokenConfigToMldev(apiClient, fromObject, parentObject) {
|
|
14230
|
+
const toObject = {};
|
|
14231
|
+
const fromExpireTime = getValueByPath(fromObject, ['expireTime']);
|
|
14232
|
+
if (parentObject !== undefined && fromExpireTime != null) {
|
|
14233
|
+
setValueByPath(parentObject, ['expireTime'], fromExpireTime);
|
|
14234
|
+
}
|
|
14235
|
+
const fromNewSessionExpireTime = getValueByPath(fromObject, [
|
|
14236
|
+
'newSessionExpireTime',
|
|
14237
|
+
]);
|
|
14238
|
+
if (parentObject !== undefined && fromNewSessionExpireTime != null) {
|
|
14239
|
+
setValueByPath(parentObject, ['newSessionExpireTime'], fromNewSessionExpireTime);
|
|
14240
|
+
}
|
|
14241
|
+
const fromUses = getValueByPath(fromObject, ['uses']);
|
|
14242
|
+
if (parentObject !== undefined && fromUses != null) {
|
|
14243
|
+
setValueByPath(parentObject, ['uses'], fromUses);
|
|
14244
|
+
}
|
|
14245
|
+
const fromLiveConnectConstraints = getValueByPath(fromObject, [
|
|
14246
|
+
'liveConnectConstraints',
|
|
14247
|
+
]);
|
|
14248
|
+
if (parentObject !== undefined && fromLiveConnectConstraints != null) {
|
|
14249
|
+
setValueByPath(parentObject, ['bidiGenerateContentSetup'], liveConnectConstraintsToMldev(apiClient, fromLiveConnectConstraints));
|
|
14250
|
+
}
|
|
14251
|
+
const fromLockAdditionalFields = getValueByPath(fromObject, [
|
|
14252
|
+
'lockAdditionalFields',
|
|
14253
|
+
]);
|
|
14254
|
+
if (parentObject !== undefined && fromLockAdditionalFields != null) {
|
|
14255
|
+
setValueByPath(parentObject, ['fieldMask'], fromLockAdditionalFields);
|
|
14256
|
+
}
|
|
14257
|
+
return toObject;
|
|
14258
|
+
}
|
|
14259
|
+
function createAuthTokenParametersToMldev(apiClient, fromObject) {
|
|
14260
|
+
const toObject = {};
|
|
14261
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
14262
|
+
if (fromConfig != null) {
|
|
14263
|
+
setValueByPath(toObject, ['config'], createAuthTokenConfigToMldev(apiClient, fromConfig, toObject));
|
|
14264
|
+
}
|
|
14265
|
+
return toObject;
|
|
14266
|
+
}
|
|
14267
|
+
function authTokenFromMldev(apiClient, fromObject) {
|
|
14268
|
+
const toObject = {};
|
|
14269
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
14270
|
+
if (fromName != null) {
|
|
14271
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
14272
|
+
}
|
|
14273
|
+
return toObject;
|
|
14274
|
+
}
|
|
14275
|
+
|
|
14276
|
+
/**
|
|
14277
|
+
* @license
|
|
14278
|
+
* Copyright 2025 Google LLC
|
|
14279
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
14280
|
+
*/
|
|
14281
|
+
/**
|
|
14282
|
+
* Returns a comma-separated list of field masks from a given object.
|
|
14283
|
+
*
|
|
14284
|
+
* @param setup The object to extract field masks from.
|
|
14285
|
+
* @return A comma-separated list of field masks.
|
|
14286
|
+
*/
|
|
14287
|
+
function getFieldMasks(setup) {
|
|
14288
|
+
const fields = [];
|
|
14289
|
+
for (const key in setup) {
|
|
14290
|
+
if (Object.prototype.hasOwnProperty.call(setup, key)) {
|
|
14291
|
+
const value = setup[key];
|
|
14292
|
+
// 2nd layer, recursively get field masks see TODO(b/418290100)
|
|
14293
|
+
if (typeof value === 'object' &&
|
|
14294
|
+
value != null &&
|
|
14295
|
+
Object.keys(value).length > 0) {
|
|
14296
|
+
const field = Object.keys(value).map((kk) => `${key}.${kk}`);
|
|
14297
|
+
fields.push(...field);
|
|
14298
|
+
}
|
|
14299
|
+
else {
|
|
14300
|
+
fields.push(key); // 1st layer
|
|
14301
|
+
}
|
|
14302
|
+
}
|
|
14303
|
+
}
|
|
14304
|
+
return fields.join(',');
|
|
14305
|
+
}
|
|
14306
|
+
/**
|
|
14307
|
+
* Converts bidiGenerateContentSetup.
|
|
14308
|
+
* @param requestDict - The request dictionary.
|
|
14309
|
+
* @param config - The configuration object.
|
|
14310
|
+
* @return - The modified request dictionary.
|
|
14311
|
+
*/
|
|
14312
|
+
function convertBidiSetupToTokenSetup(requestDict, config) {
|
|
14313
|
+
// Convert bidiGenerateContentSetup from bidiGenerateContentSetup.setup.
|
|
14314
|
+
let setupForMaskGeneration = null;
|
|
14315
|
+
const bidiGenerateContentSetupValue = requestDict['bidiGenerateContentSetup'];
|
|
14316
|
+
if (typeof bidiGenerateContentSetupValue === 'object' &&
|
|
14317
|
+
bidiGenerateContentSetupValue !== null &&
|
|
14318
|
+
'setup' in bidiGenerateContentSetupValue) {
|
|
14319
|
+
// Now we know bidiGenerateContentSetupValue is an object and has a 'setup'
|
|
14320
|
+
// property.
|
|
14321
|
+
const innerSetup = bidiGenerateContentSetupValue
|
|
14322
|
+
.setup;
|
|
14323
|
+
if (typeof innerSetup === 'object' && innerSetup !== null) {
|
|
14324
|
+
// Valid inner setup found.
|
|
14325
|
+
requestDict['bidiGenerateContentSetup'] = innerSetup;
|
|
14326
|
+
setupForMaskGeneration = innerSetup;
|
|
14327
|
+
}
|
|
14328
|
+
else {
|
|
14329
|
+
// `bidiGenerateContentSetupValue.setup` is not a valid object; treat as
|
|
14330
|
+
// if bidiGenerateContentSetup is invalid.
|
|
14331
|
+
delete requestDict['bidiGenerateContentSetup'];
|
|
14332
|
+
}
|
|
14333
|
+
}
|
|
14334
|
+
else if (bidiGenerateContentSetupValue !== undefined) {
|
|
14335
|
+
// `bidiGenerateContentSetup` exists but not in the expected
|
|
14336
|
+
// shape {setup: {...}}; treat as invalid.
|
|
14337
|
+
delete requestDict['bidiGenerateContentSetup'];
|
|
14338
|
+
}
|
|
14339
|
+
const preExistingFieldMask = requestDict['fieldMask'];
|
|
14340
|
+
// Handle mask generation setup.
|
|
14341
|
+
if (setupForMaskGeneration) {
|
|
14342
|
+
const generatedMaskFromBidi = getFieldMasks(setupForMaskGeneration);
|
|
14343
|
+
if (Array.isArray(config === null || config === void 0 ? void 0 : config.lockAdditionalFields) &&
|
|
14344
|
+
(config === null || config === void 0 ? void 0 : config.lockAdditionalFields.length) === 0) {
|
|
14345
|
+
// Case 1: lockAdditionalFields is an empty array. Lock only fields from
|
|
14346
|
+
// bidi setup.
|
|
14347
|
+
if (generatedMaskFromBidi) {
|
|
14348
|
+
// Only assign if mask is not empty
|
|
14349
|
+
requestDict['fieldMask'] = generatedMaskFromBidi;
|
|
14350
|
+
}
|
|
14351
|
+
else {
|
|
14352
|
+
delete requestDict['fieldMask']; // If mask is empty, effectively no
|
|
14353
|
+
// specific fields locked by bidi
|
|
14354
|
+
}
|
|
14355
|
+
}
|
|
14356
|
+
else if ((config === null || config === void 0 ? void 0 : config.lockAdditionalFields) &&
|
|
14357
|
+
config.lockAdditionalFields.length > 0 &&
|
|
14358
|
+
preExistingFieldMask !== null &&
|
|
14359
|
+
Array.isArray(preExistingFieldMask) &&
|
|
14360
|
+
preExistingFieldMask.length > 0) {
|
|
14361
|
+
// Case 2: Lock fields from bidi setup + additional fields
|
|
14362
|
+
// (preExistingFieldMask).
|
|
14363
|
+
const generationConfigFields = [
|
|
14364
|
+
'temperature',
|
|
14365
|
+
'topK',
|
|
14366
|
+
'topP',
|
|
14367
|
+
'maxOutputTokens',
|
|
14368
|
+
'responseModalities',
|
|
14369
|
+
'seed',
|
|
14370
|
+
'speechConfig',
|
|
14371
|
+
];
|
|
14372
|
+
let mappedFieldsFromPreExisting = [];
|
|
14373
|
+
if (preExistingFieldMask.length > 0) {
|
|
14374
|
+
mappedFieldsFromPreExisting = preExistingFieldMask.map((field) => {
|
|
14375
|
+
if (generationConfigFields.includes(field)) {
|
|
14376
|
+
return `generationConfig.${field}`;
|
|
14377
|
+
}
|
|
14378
|
+
return field; // Keep original field name if not in
|
|
14379
|
+
// generationConfigFields
|
|
14380
|
+
});
|
|
14381
|
+
}
|
|
14382
|
+
const finalMaskParts = [];
|
|
14383
|
+
if (generatedMaskFromBidi) {
|
|
14384
|
+
finalMaskParts.push(generatedMaskFromBidi);
|
|
14385
|
+
}
|
|
14386
|
+
if (mappedFieldsFromPreExisting.length > 0) {
|
|
14387
|
+
finalMaskParts.push(...mappedFieldsFromPreExisting);
|
|
14388
|
+
}
|
|
14389
|
+
if (finalMaskParts.length > 0) {
|
|
14390
|
+
requestDict['fieldMask'] = finalMaskParts.join(',');
|
|
14391
|
+
}
|
|
14392
|
+
else {
|
|
14393
|
+
// If no fields from bidi and no valid additional fields from
|
|
14394
|
+
// pre-existing mask.
|
|
14395
|
+
delete requestDict['fieldMask'];
|
|
14396
|
+
}
|
|
14397
|
+
}
|
|
14398
|
+
else {
|
|
14399
|
+
// Case 3: "Lock all fields" (meaning, don't send a field_mask, let server
|
|
14400
|
+
// defaults apply or all are mutable). This is hit if:
|
|
14401
|
+
// - `config.lockAdditionalFields` is undefined.
|
|
14402
|
+
// - `config.lockAdditionalFields` is non-empty, BUT
|
|
14403
|
+
// `preExistingFieldMask` is null, not a string, or an empty string.
|
|
14404
|
+
delete requestDict['fieldMask'];
|
|
14405
|
+
}
|
|
14406
|
+
}
|
|
14407
|
+
else {
|
|
14408
|
+
// No valid `bidiGenerateContentSetup` was found or extracted.
|
|
14409
|
+
// "Lock additional null fields if any".
|
|
14410
|
+
if (preExistingFieldMask !== null &&
|
|
14411
|
+
Array.isArray(preExistingFieldMask) &&
|
|
14412
|
+
preExistingFieldMask.length > 0) {
|
|
14413
|
+
// If there's a pre-existing field mask, it's a string, and it's not
|
|
14414
|
+
// empty, then we should lock all fields.
|
|
14415
|
+
requestDict['fieldMask'] = preExistingFieldMask.join(',');
|
|
14416
|
+
}
|
|
14417
|
+
else {
|
|
14418
|
+
delete requestDict['fieldMask'];
|
|
14419
|
+
}
|
|
14420
|
+
}
|
|
14421
|
+
return requestDict;
|
|
14422
|
+
}
|
|
14423
|
+
class Tokens extends BaseModule {
|
|
14424
|
+
constructor(apiClient) {
|
|
14425
|
+
super();
|
|
14426
|
+
this.apiClient = apiClient;
|
|
14427
|
+
}
|
|
14428
|
+
/**
|
|
14429
|
+
* Creates an ephemeral auth token resource.
|
|
14430
|
+
*
|
|
14431
|
+
* @experimental
|
|
14432
|
+
*
|
|
14433
|
+
* @remarks
|
|
14434
|
+
* Ephermeral auth tokens is only supported in the Gemini Developer API.
|
|
14435
|
+
* It can be used for the session connection to the Live constrained API.
|
|
14436
|
+
*
|
|
14437
|
+
* @param params - The parameters for the create request.
|
|
14438
|
+
* @return The created auth token.
|
|
14439
|
+
*
|
|
14440
|
+
* @example
|
|
14441
|
+
* ```ts
|
|
14442
|
+
* // Case 1: If LiveEphemeralParameters is unset, unlock LiveConnectConfig
|
|
14443
|
+
* // when using the token in Live API sessions. Each session connection can
|
|
14444
|
+
* // use a different configuration.
|
|
14445
|
+
* const config: CreateAuthTokenConfig = {
|
|
14446
|
+
* uses: 3,
|
|
14447
|
+
* expireTime: '2025-05-01T00:00:00Z',
|
|
14448
|
+
* }
|
|
14449
|
+
* const token = await ai.tokens.create(config);
|
|
14450
|
+
*
|
|
14451
|
+
* // Case 2: If LiveEphemeralParameters is set, lock all fields in
|
|
14452
|
+
* // LiveConnectConfig when using the token in Live API sessions. For
|
|
14453
|
+
* // example, changing `outputAudioTranscription` in the Live API
|
|
14454
|
+
* // connection will be ignored by the API.
|
|
14455
|
+
* const config: CreateAuthTokenConfig =
|
|
14456
|
+
* uses: 3,
|
|
14457
|
+
* expireTime: '2025-05-01T00:00:00Z',
|
|
14458
|
+
* LiveEphemeralParameters: {
|
|
14459
|
+
* model: 'gemini-2.0-flash-001',
|
|
14460
|
+
* config: {
|
|
14461
|
+
* 'responseModalities': ['AUDIO'],
|
|
14462
|
+
* 'systemInstruction': 'Always answer in English.',
|
|
14463
|
+
* }
|
|
14464
|
+
* }
|
|
14465
|
+
* }
|
|
14466
|
+
* const token = await ai.tokens.create(config);
|
|
14467
|
+
*
|
|
14468
|
+
* // Case 3: If LiveEphemeralParameters is set and lockAdditionalFields is
|
|
14469
|
+
* // set, lock LiveConnectConfig with set and additional fields (e.g.
|
|
14470
|
+
* // responseModalities, systemInstruction, temperature in this example) when
|
|
14471
|
+
* // using the token in Live API sessions.
|
|
14472
|
+
* const config: CreateAuthTokenConfig =
|
|
14473
|
+
* uses: 3,
|
|
14474
|
+
* expireTime: '2025-05-01T00:00:00Z',
|
|
14475
|
+
* LiveEphemeralParameters: {
|
|
14476
|
+
* model: 'gemini-2.0-flash-001',
|
|
14477
|
+
* config: {
|
|
14478
|
+
* 'responseModalities': ['AUDIO'],
|
|
14479
|
+
* 'systemInstruction': 'Always answer in English.',
|
|
14480
|
+
* }
|
|
14481
|
+
* },
|
|
14482
|
+
* lockAdditionalFields: ['temperature'],
|
|
14483
|
+
* }
|
|
14484
|
+
* const token = await ai.tokens.create(config);
|
|
14485
|
+
*
|
|
14486
|
+
* // Case 4: If LiveEphemeralParameters is set and lockAdditionalFields is
|
|
14487
|
+
* // empty array, lock LiveConnectConfig with set fields (e.g.
|
|
14488
|
+
* // responseModalities, systemInstruction in this example) when using the
|
|
14489
|
+
* // token in Live API sessions.
|
|
14490
|
+
* const config: CreateAuthTokenConfig =
|
|
14491
|
+
* uses: 3,
|
|
14492
|
+
* expireTime: '2025-05-01T00:00:00Z',
|
|
14493
|
+
* LiveEphemeralParameters: {
|
|
14494
|
+
* model: 'gemini-2.0-flash-001',
|
|
14495
|
+
* config: {
|
|
14496
|
+
* 'responseModalities': ['AUDIO'],
|
|
14497
|
+
* 'systemInstruction': 'Always answer in English.',
|
|
14498
|
+
* }
|
|
14499
|
+
* },
|
|
14500
|
+
* lockAdditionalFields: [],
|
|
14501
|
+
* }
|
|
14502
|
+
* const token = await ai.tokens.create(config);
|
|
14503
|
+
* ```
|
|
14504
|
+
*/
|
|
14505
|
+
async create(params) {
|
|
14506
|
+
var _a, _b;
|
|
14507
|
+
let response;
|
|
14508
|
+
let path = '';
|
|
14509
|
+
let queryParams = {};
|
|
14510
|
+
if (this.apiClient.isVertexAI()) {
|
|
14511
|
+
throw new Error('The client.tokens.create method is only supported by the Gemini Developer API.');
|
|
14512
|
+
}
|
|
14513
|
+
else {
|
|
14514
|
+
const body = createAuthTokenParametersToMldev(this.apiClient, params);
|
|
14515
|
+
path = formatMap('auth_tokens', body['_url']);
|
|
14516
|
+
queryParams = body['_query'];
|
|
14517
|
+
delete body['config'];
|
|
14518
|
+
delete body['_url'];
|
|
14519
|
+
delete body['_query'];
|
|
14520
|
+
const transformedBody = convertBidiSetupToTokenSetup(body, params.config);
|
|
14521
|
+
response = this.apiClient
|
|
14522
|
+
.request({
|
|
14523
|
+
path: path,
|
|
14524
|
+
queryParams: queryParams,
|
|
14525
|
+
body: JSON.stringify(transformedBody),
|
|
14526
|
+
httpMethod: 'POST',
|
|
14527
|
+
httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
|
|
14528
|
+
abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
|
|
14529
|
+
})
|
|
14530
|
+
.then((httpResponse) => {
|
|
14531
|
+
return httpResponse.json();
|
|
14532
|
+
});
|
|
14533
|
+
return response.then((apiResponse) => {
|
|
14534
|
+
const resp = authTokenFromMldev(this.apiClient, apiResponse);
|
|
14535
|
+
return resp;
|
|
14536
|
+
});
|
|
14537
|
+
}
|
|
14538
|
+
}
|
|
14539
|
+
}
|
|
14540
|
+
|
|
14541
|
+
/**
|
|
14542
|
+
* @license
|
|
14543
|
+
* Copyright 2025 Google LLC
|
|
14544
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
14545
|
+
*/
|
|
14546
|
+
function getTuningJobParametersToMldev(apiClient, fromObject) {
|
|
14547
|
+
const toObject = {};
|
|
14548
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
14549
|
+
if (fromName != null) {
|
|
14550
|
+
setValueByPath(toObject, ['_url', 'name'], fromName);
|
|
14551
|
+
}
|
|
14552
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
14553
|
+
if (fromConfig != null) {
|
|
14554
|
+
setValueByPath(toObject, ['config'], fromConfig);
|
|
14555
|
+
}
|
|
14556
|
+
return toObject;
|
|
14557
|
+
}
|
|
14558
|
+
function listTuningJobsConfigToMldev(apiClient, fromObject, parentObject) {
|
|
14559
|
+
const toObject = {};
|
|
14560
|
+
const fromPageSize = getValueByPath(fromObject, ['pageSize']);
|
|
14561
|
+
if (parentObject !== undefined && fromPageSize != null) {
|
|
14562
|
+
setValueByPath(parentObject, ['_query', 'pageSize'], fromPageSize);
|
|
14563
|
+
}
|
|
14564
|
+
const fromPageToken = getValueByPath(fromObject, ['pageToken']);
|
|
14565
|
+
if (parentObject !== undefined && fromPageToken != null) {
|
|
14566
|
+
setValueByPath(parentObject, ['_query', 'pageToken'], fromPageToken);
|
|
14567
|
+
}
|
|
14568
|
+
const fromFilter = getValueByPath(fromObject, ['filter']);
|
|
14569
|
+
if (parentObject !== undefined && fromFilter != null) {
|
|
14570
|
+
setValueByPath(parentObject, ['_query', 'filter'], fromFilter);
|
|
14571
|
+
}
|
|
14572
|
+
return toObject;
|
|
14573
|
+
}
|
|
14574
|
+
function listTuningJobsParametersToMldev(apiClient, fromObject) {
|
|
14575
|
+
const toObject = {};
|
|
14576
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
14577
|
+
if (fromConfig != null) {
|
|
14578
|
+
setValueByPath(toObject, ['config'], listTuningJobsConfigToMldev(apiClient, fromConfig, toObject));
|
|
14579
|
+
}
|
|
14580
|
+
return toObject;
|
|
14581
|
+
}
|
|
14582
|
+
function tuningExampleToMldev(apiClient, fromObject) {
|
|
14583
|
+
const toObject = {};
|
|
14584
|
+
const fromTextInput = getValueByPath(fromObject, ['textInput']);
|
|
14585
|
+
if (fromTextInput != null) {
|
|
14586
|
+
setValueByPath(toObject, ['textInput'], fromTextInput);
|
|
14587
|
+
}
|
|
14588
|
+
const fromOutput = getValueByPath(fromObject, ['output']);
|
|
14589
|
+
if (fromOutput != null) {
|
|
14590
|
+
setValueByPath(toObject, ['output'], fromOutput);
|
|
14591
|
+
}
|
|
14592
|
+
return toObject;
|
|
14593
|
+
}
|
|
14594
|
+
function tuningDatasetToMldev(apiClient, fromObject) {
|
|
14595
|
+
const toObject = {};
|
|
14596
|
+
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
14597
|
+
throw new Error('gcsUri parameter is not supported in Gemini API.');
|
|
14598
|
+
}
|
|
14599
|
+
const fromExamples = getValueByPath(fromObject, ['examples']);
|
|
14600
|
+
if (fromExamples != null) {
|
|
14601
|
+
let transformedList = fromExamples;
|
|
14602
|
+
if (Array.isArray(transformedList)) {
|
|
14603
|
+
transformedList = transformedList.map((item) => {
|
|
14604
|
+
return tuningExampleToMldev(apiClient, item);
|
|
14605
|
+
});
|
|
14606
|
+
}
|
|
14607
|
+
setValueByPath(toObject, ['examples', 'examples'], transformedList);
|
|
14608
|
+
}
|
|
14609
|
+
return toObject;
|
|
14610
|
+
}
|
|
14611
|
+
function createTuningJobConfigToMldev(apiClient, fromObject, parentObject) {
|
|
14612
|
+
const toObject = {};
|
|
14613
|
+
if (getValueByPath(fromObject, ['validationDataset']) !== undefined) {
|
|
14614
|
+
throw new Error('validationDataset parameter is not supported in Gemini API.');
|
|
13718
14615
|
}
|
|
13719
14616
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
13720
14617
|
'tunedModelDisplayName',
|
|
@@ -14438,6 +15335,13 @@ class WebAuth {
|
|
|
14438
15335
|
if (headers.get(GOOGLE_API_KEY_HEADER) !== null) {
|
|
14439
15336
|
return;
|
|
14440
15337
|
}
|
|
15338
|
+
if (this.apiKey.startsWith('auth_tokens/')) {
|
|
15339
|
+
throw new Error('Ephemeral tokens are only supported by the live API.');
|
|
15340
|
+
}
|
|
15341
|
+
// Check if API key is empty or null
|
|
15342
|
+
if (!this.apiKey) {
|
|
15343
|
+
throw new Error('API key is missing. Please provide a valid API key.');
|
|
15344
|
+
}
|
|
14441
15345
|
headers.append(GOOGLE_API_KEY_HEADER, this.apiKey);
|
|
14442
15346
|
}
|
|
14443
15347
|
}
|
|
@@ -14505,9 +15409,10 @@ class GoogleGenAI {
|
|
|
14505
15409
|
this.caches = new Caches(this.apiClient);
|
|
14506
15410
|
this.files = new Files(this.apiClient);
|
|
14507
15411
|
this.operations = new Operations(this.apiClient);
|
|
15412
|
+
this.authTokens = new Tokens(this.apiClient);
|
|
14508
15413
|
this.tunings = new Tunings(this.apiClient);
|
|
14509
15414
|
}
|
|
14510
15415
|
}
|
|
14511
15416
|
|
|
14512
|
-
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, TrafficType, TurnCoverage, Type, UpscaleImageResponse, UrlRetrievalStatus, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
15417
|
+
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 };
|
|
14513
15418
|
//# sourceMappingURL=index.mjs.map
|