@google/genai 1.9.0 → 1.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -12
- package/dist/genai.d.ts +28 -17
- package/dist/index.cjs +1254 -1182
- package/dist/index.mjs +1254 -1182
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +1254 -1182
- package/dist/node/index.mjs +1254 -1182
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +28 -17
- package/dist/web/index.mjs +1254 -1182
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +28 -17
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2383,6 +2383,9 @@ function tBatchJobSource(apiClient, src) {
|
|
|
2383
2383
|
throw new Error(`Unsupported source: ${src}`);
|
|
2384
2384
|
}
|
|
2385
2385
|
function tBatchJobDestination(dest) {
|
|
2386
|
+
if (typeof dest !== 'string') {
|
|
2387
|
+
return dest;
|
|
2388
|
+
}
|
|
2386
2389
|
const destString = dest;
|
|
2387
2390
|
if (destString.startsWith('gs://')) {
|
|
2388
2391
|
return {
|
|
@@ -3368,10 +3371,6 @@ function deleteBatchJobParametersToVertex(apiClient, fromObject) {
|
|
|
3368
3371
|
}
|
|
3369
3372
|
return toObject;
|
|
3370
3373
|
}
|
|
3371
|
-
function jobErrorFromMldev() {
|
|
3372
|
-
const toObject = {};
|
|
3373
|
-
return toObject;
|
|
3374
|
-
}
|
|
3375
3374
|
function videoMetadataFromMldev$2(fromObject) {
|
|
3376
3375
|
const toObject = {};
|
|
3377
3376
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
@@ -3576,6 +3575,12 @@ function candidateFromMldev$1(fromObject) {
|
|
|
3576
3575
|
}
|
|
3577
3576
|
function generateContentResponseFromMldev$1(fromObject) {
|
|
3578
3577
|
const toObject = {};
|
|
3578
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
3579
|
+
'sdkHttpResponse',
|
|
3580
|
+
]);
|
|
3581
|
+
if (fromSdkHttpResponse != null) {
|
|
3582
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
3583
|
+
}
|
|
3579
3584
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
3580
3585
|
if (fromCandidates != null) {
|
|
3581
3586
|
let transformedList = fromCandidates;
|
|
@@ -3604,6 +3609,22 @@ function generateContentResponseFromMldev$1(fromObject) {
|
|
|
3604
3609
|
}
|
|
3605
3610
|
return toObject;
|
|
3606
3611
|
}
|
|
3612
|
+
function jobErrorFromMldev(fromObject) {
|
|
3613
|
+
const toObject = {};
|
|
3614
|
+
const fromDetails = getValueByPath(fromObject, ['details']);
|
|
3615
|
+
if (fromDetails != null) {
|
|
3616
|
+
setValueByPath(toObject, ['details'], fromDetails);
|
|
3617
|
+
}
|
|
3618
|
+
const fromCode = getValueByPath(fromObject, ['code']);
|
|
3619
|
+
if (fromCode != null) {
|
|
3620
|
+
setValueByPath(toObject, ['code'], fromCode);
|
|
3621
|
+
}
|
|
3622
|
+
const fromMessage = getValueByPath(fromObject, ['message']);
|
|
3623
|
+
if (fromMessage != null) {
|
|
3624
|
+
setValueByPath(toObject, ['message'], fromMessage);
|
|
3625
|
+
}
|
|
3626
|
+
return toObject;
|
|
3627
|
+
}
|
|
3607
3628
|
function inlinedResponseFromMldev(fromObject) {
|
|
3608
3629
|
const toObject = {};
|
|
3609
3630
|
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
@@ -3612,7 +3633,7 @@ function inlinedResponseFromMldev(fromObject) {
|
|
|
3612
3633
|
}
|
|
3613
3634
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
3614
3635
|
if (fromError != null) {
|
|
3615
|
-
setValueByPath(toObject, ['error'], jobErrorFromMldev());
|
|
3636
|
+
setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
|
|
3616
3637
|
}
|
|
3617
3638
|
return toObject;
|
|
3618
3639
|
}
|
|
@@ -3717,7 +3738,7 @@ function deleteResourceJobFromMldev(fromObject) {
|
|
|
3717
3738
|
}
|
|
3718
3739
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
3719
3740
|
if (fromError != null) {
|
|
3720
|
-
setValueByPath(toObject, ['error'], jobErrorFromMldev());
|
|
3741
|
+
setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
|
|
3721
3742
|
}
|
|
3722
3743
|
return toObject;
|
|
3723
3744
|
}
|
|
@@ -6250,7 +6271,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
6250
6271
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
6251
6272
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
6252
6273
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
6253
|
-
const SDK_VERSION = '1.
|
|
6274
|
+
const SDK_VERSION = '1.10.0'; // x-release-please-version
|
|
6254
6275
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
6255
6276
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
6256
6277
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -7180,8 +7201,14 @@ function listFilesResponseFromMldev(fromObject) {
|
|
|
7180
7201
|
}
|
|
7181
7202
|
return toObject;
|
|
7182
7203
|
}
|
|
7183
|
-
function createFileResponseFromMldev() {
|
|
7204
|
+
function createFileResponseFromMldev(fromObject) {
|
|
7184
7205
|
const toObject = {};
|
|
7206
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
7207
|
+
'sdkHttpResponse',
|
|
7208
|
+
]);
|
|
7209
|
+
if (fromSdkHttpResponse != null) {
|
|
7210
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
7211
|
+
}
|
|
7185
7212
|
return toObject;
|
|
7186
7213
|
}
|
|
7187
7214
|
function deleteFileResponseFromMldev() {
|
|
@@ -7354,8 +7381,8 @@ class Files extends BaseModule {
|
|
|
7354
7381
|
.then((httpResponse) => {
|
|
7355
7382
|
return httpResponse.json();
|
|
7356
7383
|
});
|
|
7357
|
-
return response.then(() => {
|
|
7358
|
-
const resp = createFileResponseFromMldev();
|
|
7384
|
+
return response.then((apiResponse) => {
|
|
7385
|
+
const resp = createFileResponseFromMldev(apiResponse);
|
|
7359
7386
|
const typedResp = new CreateFileResponse();
|
|
7360
7387
|
Object.assign(typedResp, resp);
|
|
7361
7388
|
return typedResp;
|
|
@@ -7473,14 +7500,6 @@ function prebuiltVoiceConfigToMldev$2(fromObject) {
|
|
|
7473
7500
|
}
|
|
7474
7501
|
return toObject;
|
|
7475
7502
|
}
|
|
7476
|
-
function prebuiltVoiceConfigToVertex$1(fromObject) {
|
|
7477
|
-
const toObject = {};
|
|
7478
|
-
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
7479
|
-
if (fromVoiceName != null) {
|
|
7480
|
-
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
7481
|
-
}
|
|
7482
|
-
return toObject;
|
|
7483
|
-
}
|
|
7484
7503
|
function voiceConfigToMldev$2(fromObject) {
|
|
7485
7504
|
const toObject = {};
|
|
7486
7505
|
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
@@ -7491,16 +7510,6 @@ function voiceConfigToMldev$2(fromObject) {
|
|
|
7491
7510
|
}
|
|
7492
7511
|
return toObject;
|
|
7493
7512
|
}
|
|
7494
|
-
function voiceConfigToVertex$1(fromObject) {
|
|
7495
|
-
const toObject = {};
|
|
7496
|
-
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
7497
|
-
'prebuiltVoiceConfig',
|
|
7498
|
-
]);
|
|
7499
|
-
if (fromPrebuiltVoiceConfig != null) {
|
|
7500
|
-
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
|
|
7501
|
-
}
|
|
7502
|
-
return toObject;
|
|
7503
|
-
}
|
|
7504
7513
|
function speakerVoiceConfigToMldev$2(fromObject) {
|
|
7505
7514
|
const toObject = {};
|
|
7506
7515
|
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
@@ -7547,21 +7556,6 @@ function speechConfigToMldev$2(fromObject) {
|
|
|
7547
7556
|
}
|
|
7548
7557
|
return toObject;
|
|
7549
7558
|
}
|
|
7550
|
-
function speechConfigToVertex$1(fromObject) {
|
|
7551
|
-
const toObject = {};
|
|
7552
|
-
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
7553
|
-
if (fromVoiceConfig != null) {
|
|
7554
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
7555
|
-
}
|
|
7556
|
-
if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
|
|
7557
|
-
throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
|
|
7558
|
-
}
|
|
7559
|
-
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
7560
|
-
if (fromLanguageCode != null) {
|
|
7561
|
-
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
7562
|
-
}
|
|
7563
|
-
return toObject;
|
|
7564
|
-
}
|
|
7565
7559
|
function videoMetadataToMldev$2(fromObject) {
|
|
7566
7560
|
const toObject = {};
|
|
7567
7561
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
@@ -7578,22 +7572,6 @@ function videoMetadataToMldev$2(fromObject) {
|
|
|
7578
7572
|
}
|
|
7579
7573
|
return toObject;
|
|
7580
7574
|
}
|
|
7581
|
-
function videoMetadataToVertex$1(fromObject) {
|
|
7582
|
-
const toObject = {};
|
|
7583
|
-
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
7584
|
-
if (fromFps != null) {
|
|
7585
|
-
setValueByPath(toObject, ['fps'], fromFps);
|
|
7586
|
-
}
|
|
7587
|
-
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
7588
|
-
if (fromEndOffset != null) {
|
|
7589
|
-
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
7590
|
-
}
|
|
7591
|
-
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
7592
|
-
if (fromStartOffset != null) {
|
|
7593
|
-
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
7594
|
-
}
|
|
7595
|
-
return toObject;
|
|
7596
|
-
}
|
|
7597
7575
|
function blobToMldev$2(fromObject) {
|
|
7598
7576
|
const toObject = {};
|
|
7599
7577
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
@@ -7609,22 +7587,6 @@ function blobToMldev$2(fromObject) {
|
|
|
7609
7587
|
}
|
|
7610
7588
|
return toObject;
|
|
7611
7589
|
}
|
|
7612
|
-
function blobToVertex$1(fromObject) {
|
|
7613
|
-
const toObject = {};
|
|
7614
|
-
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
7615
|
-
if (fromDisplayName != null) {
|
|
7616
|
-
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
7617
|
-
}
|
|
7618
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
7619
|
-
if (fromData != null) {
|
|
7620
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
7621
|
-
}
|
|
7622
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
7623
|
-
if (fromMimeType != null) {
|
|
7624
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
7625
|
-
}
|
|
7626
|
-
return toObject;
|
|
7627
|
-
}
|
|
7628
7590
|
function fileDataToMldev$2(fromObject) {
|
|
7629
7591
|
const toObject = {};
|
|
7630
7592
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
@@ -7640,22 +7602,6 @@ function fileDataToMldev$2(fromObject) {
|
|
|
7640
7602
|
}
|
|
7641
7603
|
return toObject;
|
|
7642
7604
|
}
|
|
7643
|
-
function fileDataToVertex$1(fromObject) {
|
|
7644
|
-
const toObject = {};
|
|
7645
|
-
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
7646
|
-
if (fromDisplayName != null) {
|
|
7647
|
-
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
7648
|
-
}
|
|
7649
|
-
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
7650
|
-
if (fromFileUri != null) {
|
|
7651
|
-
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
7652
|
-
}
|
|
7653
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
7654
|
-
if (fromMimeType != null) {
|
|
7655
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
7656
|
-
}
|
|
7657
|
-
return toObject;
|
|
7658
|
-
}
|
|
7659
7605
|
function partToMldev$2(fromObject) {
|
|
7660
7606
|
const toObject = {};
|
|
7661
7607
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7710,60 +7656,6 @@ function partToMldev$2(fromObject) {
|
|
|
7710
7656
|
}
|
|
7711
7657
|
return toObject;
|
|
7712
7658
|
}
|
|
7713
|
-
function partToVertex$1(fromObject) {
|
|
7714
|
-
const toObject = {};
|
|
7715
|
-
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
7716
|
-
'videoMetadata',
|
|
7717
|
-
]);
|
|
7718
|
-
if (fromVideoMetadata != null) {
|
|
7719
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
|
|
7720
|
-
}
|
|
7721
|
-
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
7722
|
-
if (fromThought != null) {
|
|
7723
|
-
setValueByPath(toObject, ['thought'], fromThought);
|
|
7724
|
-
}
|
|
7725
|
-
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
7726
|
-
if (fromInlineData != null) {
|
|
7727
|
-
setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
|
|
7728
|
-
}
|
|
7729
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7730
|
-
if (fromFileData != null) {
|
|
7731
|
-
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
|
|
7732
|
-
}
|
|
7733
|
-
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
7734
|
-
'thoughtSignature',
|
|
7735
|
-
]);
|
|
7736
|
-
if (fromThoughtSignature != null) {
|
|
7737
|
-
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
7738
|
-
}
|
|
7739
|
-
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7740
|
-
'codeExecutionResult',
|
|
7741
|
-
]);
|
|
7742
|
-
if (fromCodeExecutionResult != null) {
|
|
7743
|
-
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
7744
|
-
}
|
|
7745
|
-
const fromExecutableCode = getValueByPath(fromObject, [
|
|
7746
|
-
'executableCode',
|
|
7747
|
-
]);
|
|
7748
|
-
if (fromExecutableCode != null) {
|
|
7749
|
-
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7750
|
-
}
|
|
7751
|
-
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7752
|
-
if (fromFunctionCall != null) {
|
|
7753
|
-
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
7754
|
-
}
|
|
7755
|
-
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
7756
|
-
'functionResponse',
|
|
7757
|
-
]);
|
|
7758
|
-
if (fromFunctionResponse != null) {
|
|
7759
|
-
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
7760
|
-
}
|
|
7761
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
7762
|
-
if (fromText != null) {
|
|
7763
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
7764
|
-
}
|
|
7765
|
-
return toObject;
|
|
7766
|
-
}
|
|
7767
7659
|
function contentToMldev$2(fromObject) {
|
|
7768
7660
|
const toObject = {};
|
|
7769
7661
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -7782,24 +7674,6 @@ function contentToMldev$2(fromObject) {
|
|
|
7782
7674
|
}
|
|
7783
7675
|
return toObject;
|
|
7784
7676
|
}
|
|
7785
|
-
function contentToVertex$1(fromObject) {
|
|
7786
|
-
const toObject = {};
|
|
7787
|
-
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7788
|
-
if (fromParts != null) {
|
|
7789
|
-
let transformedList = fromParts;
|
|
7790
|
-
if (Array.isArray(transformedList)) {
|
|
7791
|
-
transformedList = transformedList.map((item) => {
|
|
7792
|
-
return partToVertex$1(item);
|
|
7793
|
-
});
|
|
7794
|
-
}
|
|
7795
|
-
setValueByPath(toObject, ['parts'], transformedList);
|
|
7796
|
-
}
|
|
7797
|
-
const fromRole = getValueByPath(fromObject, ['role']);
|
|
7798
|
-
if (fromRole != null) {
|
|
7799
|
-
setValueByPath(toObject, ['role'], fromRole);
|
|
7800
|
-
}
|
|
7801
|
-
return toObject;
|
|
7802
|
-
}
|
|
7803
7677
|
function functionDeclarationToMldev$2(fromObject) {
|
|
7804
7678
|
const toObject = {};
|
|
7805
7679
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
@@ -7836,41 +7710,6 @@ function functionDeclarationToMldev$2(fromObject) {
|
|
|
7836
7710
|
}
|
|
7837
7711
|
return toObject;
|
|
7838
7712
|
}
|
|
7839
|
-
function functionDeclarationToVertex$1(fromObject) {
|
|
7840
|
-
const toObject = {};
|
|
7841
|
-
if (getValueByPath(fromObject, ['behavior']) !== undefined) {
|
|
7842
|
-
throw new Error('behavior parameter is not supported in Vertex AI.');
|
|
7843
|
-
}
|
|
7844
|
-
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7845
|
-
if (fromDescription != null) {
|
|
7846
|
-
setValueByPath(toObject, ['description'], fromDescription);
|
|
7847
|
-
}
|
|
7848
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
7849
|
-
if (fromName != null) {
|
|
7850
|
-
setValueByPath(toObject, ['name'], fromName);
|
|
7851
|
-
}
|
|
7852
|
-
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
7853
|
-
if (fromParameters != null) {
|
|
7854
|
-
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
7855
|
-
}
|
|
7856
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
7857
|
-
'parametersJsonSchema',
|
|
7858
|
-
]);
|
|
7859
|
-
if (fromParametersJsonSchema != null) {
|
|
7860
|
-
setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
|
|
7861
|
-
}
|
|
7862
|
-
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
7863
|
-
if (fromResponse != null) {
|
|
7864
|
-
setValueByPath(toObject, ['response'], fromResponse);
|
|
7865
|
-
}
|
|
7866
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
7867
|
-
'responseJsonSchema',
|
|
7868
|
-
]);
|
|
7869
|
-
if (fromResponseJsonSchema != null) {
|
|
7870
|
-
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
7871
|
-
}
|
|
7872
|
-
return toObject;
|
|
7873
|
-
}
|
|
7874
7713
|
function intervalToMldev$2(fromObject) {
|
|
7875
7714
|
const toObject = {};
|
|
7876
7715
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
@@ -7883,18 +7722,6 @@ function intervalToMldev$2(fromObject) {
|
|
|
7883
7722
|
}
|
|
7884
7723
|
return toObject;
|
|
7885
7724
|
}
|
|
7886
|
-
function intervalToVertex$1(fromObject) {
|
|
7887
|
-
const toObject = {};
|
|
7888
|
-
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7889
|
-
if (fromStartTime != null) {
|
|
7890
|
-
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
7891
|
-
}
|
|
7892
|
-
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
7893
|
-
if (fromEndTime != null) {
|
|
7894
|
-
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
7895
|
-
}
|
|
7896
|
-
return toObject;
|
|
7897
|
-
}
|
|
7898
7725
|
function googleSearchToMldev$2(fromObject) {
|
|
7899
7726
|
const toObject = {};
|
|
7900
7727
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
@@ -7905,16 +7732,6 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
7905
7732
|
}
|
|
7906
7733
|
return toObject;
|
|
7907
7734
|
}
|
|
7908
|
-
function googleSearchToVertex$1(fromObject) {
|
|
7909
|
-
const toObject = {};
|
|
7910
|
-
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7911
|
-
'timeRangeFilter',
|
|
7912
|
-
]);
|
|
7913
|
-
if (fromTimeRangeFilter != null) {
|
|
7914
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
|
|
7915
|
-
}
|
|
7916
|
-
return toObject;
|
|
7917
|
-
}
|
|
7918
7735
|
function dynamicRetrievalConfigToMldev$2(fromObject) {
|
|
7919
7736
|
const toObject = {};
|
|
7920
7737
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
@@ -7929,20 +7746,6 @@ function dynamicRetrievalConfigToMldev$2(fromObject) {
|
|
|
7929
7746
|
}
|
|
7930
7747
|
return toObject;
|
|
7931
7748
|
}
|
|
7932
|
-
function dynamicRetrievalConfigToVertex$1(fromObject) {
|
|
7933
|
-
const toObject = {};
|
|
7934
|
-
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
7935
|
-
if (fromMode != null) {
|
|
7936
|
-
setValueByPath(toObject, ['mode'], fromMode);
|
|
7937
|
-
}
|
|
7938
|
-
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
7939
|
-
'dynamicThreshold',
|
|
7940
|
-
]);
|
|
7941
|
-
if (fromDynamicThreshold != null) {
|
|
7942
|
-
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
7943
|
-
}
|
|
7944
|
-
return toObject;
|
|
7945
|
-
}
|
|
7946
7749
|
function googleSearchRetrievalToMldev$2(fromObject) {
|
|
7947
7750
|
const toObject = {};
|
|
7948
7751
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -7953,73 +7756,7 @@ function googleSearchRetrievalToMldev$2(fromObject) {
|
|
|
7953
7756
|
}
|
|
7954
7757
|
return toObject;
|
|
7955
7758
|
}
|
|
7956
|
-
function
|
|
7957
|
-
const toObject = {};
|
|
7958
|
-
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
7959
|
-
'dynamicRetrievalConfig',
|
|
7960
|
-
]);
|
|
7961
|
-
if (fromDynamicRetrievalConfig != null) {
|
|
7962
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
|
|
7963
|
-
}
|
|
7964
|
-
return toObject;
|
|
7965
|
-
}
|
|
7966
|
-
function enterpriseWebSearchToVertex$1() {
|
|
7967
|
-
const toObject = {};
|
|
7968
|
-
return toObject;
|
|
7969
|
-
}
|
|
7970
|
-
function apiKeyConfigToVertex$1(fromObject) {
|
|
7971
|
-
const toObject = {};
|
|
7972
|
-
const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
|
|
7973
|
-
if (fromApiKeyString != null) {
|
|
7974
|
-
setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
|
|
7975
|
-
}
|
|
7976
|
-
return toObject;
|
|
7977
|
-
}
|
|
7978
|
-
function authConfigToVertex$1(fromObject) {
|
|
7979
|
-
const toObject = {};
|
|
7980
|
-
const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
|
|
7981
|
-
if (fromApiKeyConfig != null) {
|
|
7982
|
-
setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
|
|
7983
|
-
}
|
|
7984
|
-
const fromAuthType = getValueByPath(fromObject, ['authType']);
|
|
7985
|
-
if (fromAuthType != null) {
|
|
7986
|
-
setValueByPath(toObject, ['authType'], fromAuthType);
|
|
7987
|
-
}
|
|
7988
|
-
const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
|
|
7989
|
-
'googleServiceAccountConfig',
|
|
7990
|
-
]);
|
|
7991
|
-
if (fromGoogleServiceAccountConfig != null) {
|
|
7992
|
-
setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
|
|
7993
|
-
}
|
|
7994
|
-
const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
|
|
7995
|
-
'httpBasicAuthConfig',
|
|
7996
|
-
]);
|
|
7997
|
-
if (fromHttpBasicAuthConfig != null) {
|
|
7998
|
-
setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
|
|
7999
|
-
}
|
|
8000
|
-
const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
|
|
8001
|
-
if (fromOauthConfig != null) {
|
|
8002
|
-
setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
|
|
8003
|
-
}
|
|
8004
|
-
const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
|
|
8005
|
-
if (fromOidcConfig != null) {
|
|
8006
|
-
setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
|
|
8007
|
-
}
|
|
8008
|
-
return toObject;
|
|
8009
|
-
}
|
|
8010
|
-
function googleMapsToVertex$1(fromObject) {
|
|
8011
|
-
const toObject = {};
|
|
8012
|
-
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
8013
|
-
if (fromAuthConfig != null) {
|
|
8014
|
-
setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
|
|
8015
|
-
}
|
|
8016
|
-
return toObject;
|
|
8017
|
-
}
|
|
8018
|
-
function urlContextToMldev$2() {
|
|
8019
|
-
const toObject = {};
|
|
8020
|
-
return toObject;
|
|
8021
|
-
}
|
|
8022
|
-
function urlContextToVertex$1() {
|
|
7759
|
+
function urlContextToMldev$2() {
|
|
8023
7760
|
const toObject = {};
|
|
8024
7761
|
return toObject;
|
|
8025
7762
|
}
|
|
@@ -8072,60 +7809,6 @@ function toolToMldev$2(fromObject) {
|
|
|
8072
7809
|
}
|
|
8073
7810
|
return toObject;
|
|
8074
7811
|
}
|
|
8075
|
-
function toolToVertex$1(fromObject) {
|
|
8076
|
-
const toObject = {};
|
|
8077
|
-
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
8078
|
-
'functionDeclarations',
|
|
8079
|
-
]);
|
|
8080
|
-
if (fromFunctionDeclarations != null) {
|
|
8081
|
-
let transformedList = fromFunctionDeclarations;
|
|
8082
|
-
if (Array.isArray(transformedList)) {
|
|
8083
|
-
transformedList = transformedList.map((item) => {
|
|
8084
|
-
return functionDeclarationToVertex$1(item);
|
|
8085
|
-
});
|
|
8086
|
-
}
|
|
8087
|
-
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
8088
|
-
}
|
|
8089
|
-
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
8090
|
-
if (fromRetrieval != null) {
|
|
8091
|
-
setValueByPath(toObject, ['retrieval'], fromRetrieval);
|
|
8092
|
-
}
|
|
8093
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
8094
|
-
if (fromGoogleSearch != null) {
|
|
8095
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
|
|
8096
|
-
}
|
|
8097
|
-
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
8098
|
-
'googleSearchRetrieval',
|
|
8099
|
-
]);
|
|
8100
|
-
if (fromGoogleSearchRetrieval != null) {
|
|
8101
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
|
|
8102
|
-
}
|
|
8103
|
-
const fromEnterpriseWebSearch = getValueByPath(fromObject, [
|
|
8104
|
-
'enterpriseWebSearch',
|
|
8105
|
-
]);
|
|
8106
|
-
if (fromEnterpriseWebSearch != null) {
|
|
8107
|
-
setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
|
|
8108
|
-
}
|
|
8109
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8110
|
-
if (fromGoogleMaps != null) {
|
|
8111
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
|
|
8112
|
-
}
|
|
8113
|
-
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
8114
|
-
if (fromUrlContext != null) {
|
|
8115
|
-
setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
|
|
8116
|
-
}
|
|
8117
|
-
const fromCodeExecution = getValueByPath(fromObject, [
|
|
8118
|
-
'codeExecution',
|
|
8119
|
-
]);
|
|
8120
|
-
if (fromCodeExecution != null) {
|
|
8121
|
-
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
8122
|
-
}
|
|
8123
|
-
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
8124
|
-
if (fromComputerUse != null) {
|
|
8125
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
8126
|
-
}
|
|
8127
|
-
return toObject;
|
|
8128
|
-
}
|
|
8129
7812
|
function sessionResumptionConfigToMldev$1(fromObject) {
|
|
8130
7813
|
const toObject = {};
|
|
8131
7814
|
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
@@ -8137,26 +7820,10 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
8137
7820
|
}
|
|
8138
7821
|
return toObject;
|
|
8139
7822
|
}
|
|
8140
|
-
function sessionResumptionConfigToVertex(fromObject) {
|
|
8141
|
-
const toObject = {};
|
|
8142
|
-
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
8143
|
-
if (fromHandle != null) {
|
|
8144
|
-
setValueByPath(toObject, ['handle'], fromHandle);
|
|
8145
|
-
}
|
|
8146
|
-
const fromTransparent = getValueByPath(fromObject, ['transparent']);
|
|
8147
|
-
if (fromTransparent != null) {
|
|
8148
|
-
setValueByPath(toObject, ['transparent'], fromTransparent);
|
|
8149
|
-
}
|
|
8150
|
-
return toObject;
|
|
8151
|
-
}
|
|
8152
7823
|
function audioTranscriptionConfigToMldev$1() {
|
|
8153
7824
|
const toObject = {};
|
|
8154
7825
|
return toObject;
|
|
8155
7826
|
}
|
|
8156
|
-
function audioTranscriptionConfigToVertex() {
|
|
8157
|
-
const toObject = {};
|
|
8158
|
-
return toObject;
|
|
8159
|
-
}
|
|
8160
7827
|
function automaticActivityDetectionToMldev$1(fromObject) {
|
|
8161
7828
|
const toObject = {};
|
|
8162
7829
|
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
@@ -8189,38 +7856,6 @@ function automaticActivityDetectionToMldev$1(fromObject) {
|
|
|
8189
7856
|
}
|
|
8190
7857
|
return toObject;
|
|
8191
7858
|
}
|
|
8192
|
-
function automaticActivityDetectionToVertex(fromObject) {
|
|
8193
|
-
const toObject = {};
|
|
8194
|
-
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
8195
|
-
if (fromDisabled != null) {
|
|
8196
|
-
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
8197
|
-
}
|
|
8198
|
-
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
8199
|
-
'startOfSpeechSensitivity',
|
|
8200
|
-
]);
|
|
8201
|
-
if (fromStartOfSpeechSensitivity != null) {
|
|
8202
|
-
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
8203
|
-
}
|
|
8204
|
-
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
8205
|
-
'endOfSpeechSensitivity',
|
|
8206
|
-
]);
|
|
8207
|
-
if (fromEndOfSpeechSensitivity != null) {
|
|
8208
|
-
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
8209
|
-
}
|
|
8210
|
-
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
8211
|
-
'prefixPaddingMs',
|
|
8212
|
-
]);
|
|
8213
|
-
if (fromPrefixPaddingMs != null) {
|
|
8214
|
-
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
8215
|
-
}
|
|
8216
|
-
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
8217
|
-
'silenceDurationMs',
|
|
8218
|
-
]);
|
|
8219
|
-
if (fromSilenceDurationMs != null) {
|
|
8220
|
-
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
8221
|
-
}
|
|
8222
|
-
return toObject;
|
|
8223
|
-
}
|
|
8224
7859
|
function realtimeInputConfigToMldev$1(fromObject) {
|
|
8225
7860
|
const toObject = {};
|
|
8226
7861
|
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
@@ -8241,26 +7876,6 @@ function realtimeInputConfigToMldev$1(fromObject) {
|
|
|
8241
7876
|
}
|
|
8242
7877
|
return toObject;
|
|
8243
7878
|
}
|
|
8244
|
-
function realtimeInputConfigToVertex(fromObject) {
|
|
8245
|
-
const toObject = {};
|
|
8246
|
-
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
8247
|
-
'automaticActivityDetection',
|
|
8248
|
-
]);
|
|
8249
|
-
if (fromAutomaticActivityDetection != null) {
|
|
8250
|
-
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
|
|
8251
|
-
}
|
|
8252
|
-
const fromActivityHandling = getValueByPath(fromObject, [
|
|
8253
|
-
'activityHandling',
|
|
8254
|
-
]);
|
|
8255
|
-
if (fromActivityHandling != null) {
|
|
8256
|
-
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
8257
|
-
}
|
|
8258
|
-
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
8259
|
-
if (fromTurnCoverage != null) {
|
|
8260
|
-
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
8261
|
-
}
|
|
8262
|
-
return toObject;
|
|
8263
|
-
}
|
|
8264
7879
|
function slidingWindowToMldev$1(fromObject) {
|
|
8265
7880
|
const toObject = {};
|
|
8266
7881
|
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
@@ -8269,14 +7884,6 @@ function slidingWindowToMldev$1(fromObject) {
|
|
|
8269
7884
|
}
|
|
8270
7885
|
return toObject;
|
|
8271
7886
|
}
|
|
8272
|
-
function slidingWindowToVertex(fromObject) {
|
|
8273
|
-
const toObject = {};
|
|
8274
|
-
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
8275
|
-
if (fromTargetTokens != null) {
|
|
8276
|
-
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
8277
|
-
}
|
|
8278
|
-
return toObject;
|
|
8279
|
-
}
|
|
8280
7887
|
function contextWindowCompressionConfigToMldev$1(fromObject) {
|
|
8281
7888
|
const toObject = {};
|
|
8282
7889
|
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
@@ -8293,22 +7900,6 @@ function contextWindowCompressionConfigToMldev$1(fromObject) {
|
|
|
8293
7900
|
}
|
|
8294
7901
|
return toObject;
|
|
8295
7902
|
}
|
|
8296
|
-
function contextWindowCompressionConfigToVertex(fromObject) {
|
|
8297
|
-
const toObject = {};
|
|
8298
|
-
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
8299
|
-
'triggerTokens',
|
|
8300
|
-
]);
|
|
8301
|
-
if (fromTriggerTokens != null) {
|
|
8302
|
-
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
8303
|
-
}
|
|
8304
|
-
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
8305
|
-
'slidingWindow',
|
|
8306
|
-
]);
|
|
8307
|
-
if (fromSlidingWindow != null) {
|
|
8308
|
-
setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
|
|
8309
|
-
}
|
|
8310
|
-
return toObject;
|
|
8311
|
-
}
|
|
8312
7903
|
function proactivityConfigToMldev$1(fromObject) {
|
|
8313
7904
|
const toObject = {};
|
|
8314
7905
|
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
@@ -8319,16 +7910,6 @@ function proactivityConfigToMldev$1(fromObject) {
|
|
|
8319
7910
|
}
|
|
8320
7911
|
return toObject;
|
|
8321
7912
|
}
|
|
8322
|
-
function proactivityConfigToVertex(fromObject) {
|
|
8323
|
-
const toObject = {};
|
|
8324
|
-
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
8325
|
-
'proactiveAudio',
|
|
8326
|
-
]);
|
|
8327
|
-
if (fromProactiveAudio != null) {
|
|
8328
|
-
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
8329
|
-
}
|
|
8330
|
-
return toObject;
|
|
8331
|
-
}
|
|
8332
7913
|
function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
8333
7914
|
const toObject = {};
|
|
8334
7915
|
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
@@ -8433,155 +8014,31 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
8433
8014
|
}
|
|
8434
8015
|
return toObject;
|
|
8435
8016
|
}
|
|
8436
|
-
function
|
|
8017
|
+
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
8437
8018
|
const toObject = {};
|
|
8438
|
-
const
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
8442
|
-
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
8019
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8020
|
+
if (fromModel != null) {
|
|
8021
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
8443
8022
|
}
|
|
8444
|
-
const
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
8448
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
8023
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
8024
|
+
if (fromConfig != null) {
|
|
8025
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
|
|
8449
8026
|
}
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
}
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
}
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
}
|
|
8462
|
-
const
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
8466
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
8467
|
-
}
|
|
8468
|
-
const fromMediaResolution = getValueByPath(fromObject, [
|
|
8469
|
-
'mediaResolution',
|
|
8470
|
-
]);
|
|
8471
|
-
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
8472
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
8473
|
-
}
|
|
8474
|
-
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8475
|
-
if (parentObject !== undefined && fromSeed != null) {
|
|
8476
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
8477
|
-
}
|
|
8478
|
-
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8479
|
-
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8480
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8481
|
-
}
|
|
8482
|
-
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8483
|
-
'enableAffectiveDialog',
|
|
8484
|
-
]);
|
|
8485
|
-
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
8486
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
8487
|
-
}
|
|
8488
|
-
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
8489
|
-
'systemInstruction',
|
|
8490
|
-
]);
|
|
8491
|
-
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
8492
|
-
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
|
|
8493
|
-
}
|
|
8494
|
-
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
8495
|
-
if (parentObject !== undefined && fromTools != null) {
|
|
8496
|
-
let transformedList = tTools(fromTools);
|
|
8497
|
-
if (Array.isArray(transformedList)) {
|
|
8498
|
-
transformedList = transformedList.map((item) => {
|
|
8499
|
-
return toolToVertex$1(tTool(item));
|
|
8500
|
-
});
|
|
8501
|
-
}
|
|
8502
|
-
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
8503
|
-
}
|
|
8504
|
-
const fromSessionResumption = getValueByPath(fromObject, [
|
|
8505
|
-
'sessionResumption',
|
|
8506
|
-
]);
|
|
8507
|
-
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
8508
|
-
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
|
|
8509
|
-
}
|
|
8510
|
-
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
8511
|
-
'inputAudioTranscription',
|
|
8512
|
-
]);
|
|
8513
|
-
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
8514
|
-
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8515
|
-
}
|
|
8516
|
-
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
8517
|
-
'outputAudioTranscription',
|
|
8518
|
-
]);
|
|
8519
|
-
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
8520
|
-
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8521
|
-
}
|
|
8522
|
-
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
8523
|
-
'realtimeInputConfig',
|
|
8524
|
-
]);
|
|
8525
|
-
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
8526
|
-
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
|
|
8527
|
-
}
|
|
8528
|
-
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
8529
|
-
'contextWindowCompression',
|
|
8530
|
-
]);
|
|
8531
|
-
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
8532
|
-
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
|
|
8533
|
-
}
|
|
8534
|
-
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
8535
|
-
if (parentObject !== undefined && fromProactivity != null) {
|
|
8536
|
-
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
|
|
8537
|
-
}
|
|
8538
|
-
return toObject;
|
|
8539
|
-
}
|
|
8540
|
-
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
8541
|
-
const toObject = {};
|
|
8542
|
-
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8543
|
-
if (fromModel != null) {
|
|
8544
|
-
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
8545
|
-
}
|
|
8546
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
8547
|
-
if (fromConfig != null) {
|
|
8548
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
|
|
8549
|
-
}
|
|
8550
|
-
return toObject;
|
|
8551
|
-
}
|
|
8552
|
-
function liveConnectParametersToVertex(apiClient, fromObject) {
|
|
8553
|
-
const toObject = {};
|
|
8554
|
-
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8555
|
-
if (fromModel != null) {
|
|
8556
|
-
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
8557
|
-
}
|
|
8558
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
8559
|
-
if (fromConfig != null) {
|
|
8560
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
|
|
8561
|
-
}
|
|
8562
|
-
return toObject;
|
|
8563
|
-
}
|
|
8564
|
-
function activityStartToMldev() {
|
|
8565
|
-
const toObject = {};
|
|
8566
|
-
return toObject;
|
|
8567
|
-
}
|
|
8568
|
-
function activityStartToVertex() {
|
|
8569
|
-
const toObject = {};
|
|
8570
|
-
return toObject;
|
|
8571
|
-
}
|
|
8572
|
-
function activityEndToMldev() {
|
|
8573
|
-
const toObject = {};
|
|
8574
|
-
return toObject;
|
|
8575
|
-
}
|
|
8576
|
-
function activityEndToVertex() {
|
|
8577
|
-
const toObject = {};
|
|
8578
|
-
return toObject;
|
|
8579
|
-
}
|
|
8580
|
-
function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
8581
|
-
const toObject = {};
|
|
8582
|
-
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
8583
|
-
if (fromMedia != null) {
|
|
8584
|
-
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
8027
|
+
return toObject;
|
|
8028
|
+
}
|
|
8029
|
+
function activityStartToMldev() {
|
|
8030
|
+
const toObject = {};
|
|
8031
|
+
return toObject;
|
|
8032
|
+
}
|
|
8033
|
+
function activityEndToMldev() {
|
|
8034
|
+
const toObject = {};
|
|
8035
|
+
return toObject;
|
|
8036
|
+
}
|
|
8037
|
+
function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
8038
|
+
const toObject = {};
|
|
8039
|
+
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
8040
|
+
if (fromMedia != null) {
|
|
8041
|
+
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
8585
8042
|
}
|
|
8586
8043
|
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
8587
8044
|
if (fromAudio != null) {
|
|
@@ -8613,42 +8070,6 @@ function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
|
8613
8070
|
}
|
|
8614
8071
|
return toObject;
|
|
8615
8072
|
}
|
|
8616
|
-
function liveSendRealtimeInputParametersToVertex(fromObject) {
|
|
8617
|
-
const toObject = {};
|
|
8618
|
-
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
8619
|
-
if (fromMedia != null) {
|
|
8620
|
-
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
8621
|
-
}
|
|
8622
|
-
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
8623
|
-
if (fromAudio != null) {
|
|
8624
|
-
setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
|
|
8625
|
-
}
|
|
8626
|
-
const fromAudioStreamEnd = getValueByPath(fromObject, [
|
|
8627
|
-
'audioStreamEnd',
|
|
8628
|
-
]);
|
|
8629
|
-
if (fromAudioStreamEnd != null) {
|
|
8630
|
-
setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
|
|
8631
|
-
}
|
|
8632
|
-
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
8633
|
-
if (fromVideo != null) {
|
|
8634
|
-
setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
|
|
8635
|
-
}
|
|
8636
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
8637
|
-
if (fromText != null) {
|
|
8638
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
8639
|
-
}
|
|
8640
|
-
const fromActivityStart = getValueByPath(fromObject, [
|
|
8641
|
-
'activityStart',
|
|
8642
|
-
]);
|
|
8643
|
-
if (fromActivityStart != null) {
|
|
8644
|
-
setValueByPath(toObject, ['activityStart'], activityStartToVertex());
|
|
8645
|
-
}
|
|
8646
|
-
const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
|
|
8647
|
-
if (fromActivityEnd != null) {
|
|
8648
|
-
setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
|
|
8649
|
-
}
|
|
8650
|
-
return toObject;
|
|
8651
|
-
}
|
|
8652
8073
|
function weightedPromptToMldev(fromObject) {
|
|
8653
8074
|
const toObject = {};
|
|
8654
8075
|
const fromText = getValueByPath(fromObject, ['text']);
|
|
@@ -8787,35 +8208,40 @@ function liveMusicClientMessageToMldev(fromObject) {
|
|
|
8787
8208
|
}
|
|
8788
8209
|
return toObject;
|
|
8789
8210
|
}
|
|
8790
|
-
function
|
|
8211
|
+
function prebuiltVoiceConfigToVertex$1(fromObject) {
|
|
8791
8212
|
const toObject = {};
|
|
8213
|
+
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
8214
|
+
if (fromVoiceName != null) {
|
|
8215
|
+
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
8216
|
+
}
|
|
8792
8217
|
return toObject;
|
|
8793
8218
|
}
|
|
8794
|
-
function
|
|
8219
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
8795
8220
|
const toObject = {};
|
|
8796
|
-
const
|
|
8797
|
-
|
|
8798
|
-
|
|
8221
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
8222
|
+
'prebuiltVoiceConfig',
|
|
8223
|
+
]);
|
|
8224
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
8225
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
|
|
8799
8226
|
}
|
|
8800
8227
|
return toObject;
|
|
8801
8228
|
}
|
|
8802
|
-
function
|
|
8229
|
+
function speechConfigToVertex$1(fromObject) {
|
|
8803
8230
|
const toObject = {};
|
|
8804
|
-
const
|
|
8805
|
-
if (
|
|
8806
|
-
setValueByPath(toObject, ['
|
|
8231
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
8232
|
+
if (fromVoiceConfig != null) {
|
|
8233
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
8807
8234
|
}
|
|
8808
|
-
|
|
8809
|
-
|
|
8810
|
-
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
8235
|
+
if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
|
|
8236
|
+
throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
|
|
8811
8237
|
}
|
|
8812
|
-
const
|
|
8813
|
-
if (
|
|
8814
|
-
setValueByPath(toObject, ['
|
|
8238
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
8239
|
+
if (fromLanguageCode != null) {
|
|
8240
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8815
8241
|
}
|
|
8816
8242
|
return toObject;
|
|
8817
8243
|
}
|
|
8818
|
-
function
|
|
8244
|
+
function videoMetadataToVertex$1(fromObject) {
|
|
8819
8245
|
const toObject = {};
|
|
8820
8246
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8821
8247
|
if (fromFps != null) {
|
|
@@ -8831,19 +8257,7 @@ function videoMetadataFromVertex$1(fromObject) {
|
|
|
8831
8257
|
}
|
|
8832
8258
|
return toObject;
|
|
8833
8259
|
}
|
|
8834
|
-
function
|
|
8835
|
-
const toObject = {};
|
|
8836
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
8837
|
-
if (fromData != null) {
|
|
8838
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
8839
|
-
}
|
|
8840
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8841
|
-
if (fromMimeType != null) {
|
|
8842
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8843
|
-
}
|
|
8844
|
-
return toObject;
|
|
8845
|
-
}
|
|
8846
|
-
function blobFromVertex$1(fromObject) {
|
|
8260
|
+
function blobToVertex$1(fromObject) {
|
|
8847
8261
|
const toObject = {};
|
|
8848
8262
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8849
8263
|
if (fromDisplayName != null) {
|
|
@@ -8859,19 +8273,7 @@ function blobFromVertex$1(fromObject) {
|
|
|
8859
8273
|
}
|
|
8860
8274
|
return toObject;
|
|
8861
8275
|
}
|
|
8862
|
-
function
|
|
8863
|
-
const toObject = {};
|
|
8864
|
-
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8865
|
-
if (fromFileUri != null) {
|
|
8866
|
-
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8867
|
-
}
|
|
8868
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8869
|
-
if (fromMimeType != null) {
|
|
8870
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8871
|
-
}
|
|
8872
|
-
return toObject;
|
|
8873
|
-
}
|
|
8874
|
-
function fileDataFromVertex$1(fromObject) {
|
|
8276
|
+
function fileDataToVertex$1(fromObject) {
|
|
8875
8277
|
const toObject = {};
|
|
8876
8278
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8877
8279
|
if (fromDisplayName != null) {
|
|
@@ -8887,13 +8289,13 @@ function fileDataFromVertex$1(fromObject) {
|
|
|
8887
8289
|
}
|
|
8888
8290
|
return toObject;
|
|
8889
8291
|
}
|
|
8890
|
-
function
|
|
8292
|
+
function partToVertex$1(fromObject) {
|
|
8891
8293
|
const toObject = {};
|
|
8892
8294
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8893
8295
|
'videoMetadata',
|
|
8894
8296
|
]);
|
|
8895
8297
|
if (fromVideoMetadata != null) {
|
|
8896
|
-
setValueByPath(toObject, ['videoMetadata'],
|
|
8298
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
|
|
8897
8299
|
}
|
|
8898
8300
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8899
8301
|
if (fromThought != null) {
|
|
@@ -8901,11 +8303,11 @@ function partFromMldev$1(fromObject) {
|
|
|
8901
8303
|
}
|
|
8902
8304
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
8903
8305
|
if (fromInlineData != null) {
|
|
8904
|
-
setValueByPath(toObject, ['inlineData'],
|
|
8306
|
+
setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
|
|
8905
8307
|
}
|
|
8906
8308
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8907
8309
|
if (fromFileData != null) {
|
|
8908
|
-
setValueByPath(toObject, ['fileData'],
|
|
8310
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
|
|
8909
8311
|
}
|
|
8910
8312
|
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8911
8313
|
'thoughtSignature',
|
|
@@ -8941,16 +8343,1119 @@ function partFromMldev$1(fromObject) {
|
|
|
8941
8343
|
}
|
|
8942
8344
|
return toObject;
|
|
8943
8345
|
}
|
|
8944
|
-
function
|
|
8346
|
+
function contentToVertex$1(fromObject) {
|
|
8945
8347
|
const toObject = {};
|
|
8946
|
-
const
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
8348
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8349
|
+
if (fromParts != null) {
|
|
8350
|
+
let transformedList = fromParts;
|
|
8351
|
+
if (Array.isArray(transformedList)) {
|
|
8352
|
+
transformedList = transformedList.map((item) => {
|
|
8353
|
+
return partToVertex$1(item);
|
|
8354
|
+
});
|
|
8355
|
+
}
|
|
8356
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
8951
8357
|
}
|
|
8952
|
-
const
|
|
8953
|
-
if (
|
|
8358
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
8359
|
+
if (fromRole != null) {
|
|
8360
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
8361
|
+
}
|
|
8362
|
+
return toObject;
|
|
8363
|
+
}
|
|
8364
|
+
function functionDeclarationToVertex$1(fromObject) {
|
|
8365
|
+
const toObject = {};
|
|
8366
|
+
if (getValueByPath(fromObject, ['behavior']) !== undefined) {
|
|
8367
|
+
throw new Error('behavior parameter is not supported in Vertex AI.');
|
|
8368
|
+
}
|
|
8369
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
8370
|
+
if (fromDescription != null) {
|
|
8371
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
8372
|
+
}
|
|
8373
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
8374
|
+
if (fromName != null) {
|
|
8375
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
8376
|
+
}
|
|
8377
|
+
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
8378
|
+
if (fromParameters != null) {
|
|
8379
|
+
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
8380
|
+
}
|
|
8381
|
+
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
8382
|
+
'parametersJsonSchema',
|
|
8383
|
+
]);
|
|
8384
|
+
if (fromParametersJsonSchema != null) {
|
|
8385
|
+
setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
|
|
8386
|
+
}
|
|
8387
|
+
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
8388
|
+
if (fromResponse != null) {
|
|
8389
|
+
setValueByPath(toObject, ['response'], fromResponse);
|
|
8390
|
+
}
|
|
8391
|
+
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
8392
|
+
'responseJsonSchema',
|
|
8393
|
+
]);
|
|
8394
|
+
if (fromResponseJsonSchema != null) {
|
|
8395
|
+
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
8396
|
+
}
|
|
8397
|
+
return toObject;
|
|
8398
|
+
}
|
|
8399
|
+
function intervalToVertex$1(fromObject) {
|
|
8400
|
+
const toObject = {};
|
|
8401
|
+
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
8402
|
+
if (fromStartTime != null) {
|
|
8403
|
+
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
8404
|
+
}
|
|
8405
|
+
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
8406
|
+
if (fromEndTime != null) {
|
|
8407
|
+
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
8408
|
+
}
|
|
8409
|
+
return toObject;
|
|
8410
|
+
}
|
|
8411
|
+
function googleSearchToVertex$1(fromObject) {
|
|
8412
|
+
const toObject = {};
|
|
8413
|
+
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
8414
|
+
'timeRangeFilter',
|
|
8415
|
+
]);
|
|
8416
|
+
if (fromTimeRangeFilter != null) {
|
|
8417
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
|
|
8418
|
+
}
|
|
8419
|
+
return toObject;
|
|
8420
|
+
}
|
|
8421
|
+
function dynamicRetrievalConfigToVertex$1(fromObject) {
|
|
8422
|
+
const toObject = {};
|
|
8423
|
+
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
8424
|
+
if (fromMode != null) {
|
|
8425
|
+
setValueByPath(toObject, ['mode'], fromMode);
|
|
8426
|
+
}
|
|
8427
|
+
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
8428
|
+
'dynamicThreshold',
|
|
8429
|
+
]);
|
|
8430
|
+
if (fromDynamicThreshold != null) {
|
|
8431
|
+
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
8432
|
+
}
|
|
8433
|
+
return toObject;
|
|
8434
|
+
}
|
|
8435
|
+
function googleSearchRetrievalToVertex$1(fromObject) {
|
|
8436
|
+
const toObject = {};
|
|
8437
|
+
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
8438
|
+
'dynamicRetrievalConfig',
|
|
8439
|
+
]);
|
|
8440
|
+
if (fromDynamicRetrievalConfig != null) {
|
|
8441
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
|
|
8442
|
+
}
|
|
8443
|
+
return toObject;
|
|
8444
|
+
}
|
|
8445
|
+
function enterpriseWebSearchToVertex$1() {
|
|
8446
|
+
const toObject = {};
|
|
8447
|
+
return toObject;
|
|
8448
|
+
}
|
|
8449
|
+
function apiKeyConfigToVertex$1(fromObject) {
|
|
8450
|
+
const toObject = {};
|
|
8451
|
+
const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
|
|
8452
|
+
if (fromApiKeyString != null) {
|
|
8453
|
+
setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
|
|
8454
|
+
}
|
|
8455
|
+
return toObject;
|
|
8456
|
+
}
|
|
8457
|
+
function authConfigToVertex$1(fromObject) {
|
|
8458
|
+
const toObject = {};
|
|
8459
|
+
const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
|
|
8460
|
+
if (fromApiKeyConfig != null) {
|
|
8461
|
+
setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
|
|
8462
|
+
}
|
|
8463
|
+
const fromAuthType = getValueByPath(fromObject, ['authType']);
|
|
8464
|
+
if (fromAuthType != null) {
|
|
8465
|
+
setValueByPath(toObject, ['authType'], fromAuthType);
|
|
8466
|
+
}
|
|
8467
|
+
const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
|
|
8468
|
+
'googleServiceAccountConfig',
|
|
8469
|
+
]);
|
|
8470
|
+
if (fromGoogleServiceAccountConfig != null) {
|
|
8471
|
+
setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
|
|
8472
|
+
}
|
|
8473
|
+
const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
|
|
8474
|
+
'httpBasicAuthConfig',
|
|
8475
|
+
]);
|
|
8476
|
+
if (fromHttpBasicAuthConfig != null) {
|
|
8477
|
+
setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
|
|
8478
|
+
}
|
|
8479
|
+
const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
|
|
8480
|
+
if (fromOauthConfig != null) {
|
|
8481
|
+
setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
|
|
8482
|
+
}
|
|
8483
|
+
const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
|
|
8484
|
+
if (fromOidcConfig != null) {
|
|
8485
|
+
setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
|
|
8486
|
+
}
|
|
8487
|
+
return toObject;
|
|
8488
|
+
}
|
|
8489
|
+
function googleMapsToVertex$1(fromObject) {
|
|
8490
|
+
const toObject = {};
|
|
8491
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
8492
|
+
if (fromAuthConfig != null) {
|
|
8493
|
+
setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
|
|
8494
|
+
}
|
|
8495
|
+
return toObject;
|
|
8496
|
+
}
|
|
8497
|
+
function urlContextToVertex$1() {
|
|
8498
|
+
const toObject = {};
|
|
8499
|
+
return toObject;
|
|
8500
|
+
}
|
|
8501
|
+
function toolToVertex$1(fromObject) {
|
|
8502
|
+
const toObject = {};
|
|
8503
|
+
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
8504
|
+
'functionDeclarations',
|
|
8505
|
+
]);
|
|
8506
|
+
if (fromFunctionDeclarations != null) {
|
|
8507
|
+
let transformedList = fromFunctionDeclarations;
|
|
8508
|
+
if (Array.isArray(transformedList)) {
|
|
8509
|
+
transformedList = transformedList.map((item) => {
|
|
8510
|
+
return functionDeclarationToVertex$1(item);
|
|
8511
|
+
});
|
|
8512
|
+
}
|
|
8513
|
+
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
8514
|
+
}
|
|
8515
|
+
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
8516
|
+
if (fromRetrieval != null) {
|
|
8517
|
+
setValueByPath(toObject, ['retrieval'], fromRetrieval);
|
|
8518
|
+
}
|
|
8519
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
8520
|
+
if (fromGoogleSearch != null) {
|
|
8521
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
|
|
8522
|
+
}
|
|
8523
|
+
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
8524
|
+
'googleSearchRetrieval',
|
|
8525
|
+
]);
|
|
8526
|
+
if (fromGoogleSearchRetrieval != null) {
|
|
8527
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
|
|
8528
|
+
}
|
|
8529
|
+
const fromEnterpriseWebSearch = getValueByPath(fromObject, [
|
|
8530
|
+
'enterpriseWebSearch',
|
|
8531
|
+
]);
|
|
8532
|
+
if (fromEnterpriseWebSearch != null) {
|
|
8533
|
+
setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
|
|
8534
|
+
}
|
|
8535
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
8536
|
+
if (fromGoogleMaps != null) {
|
|
8537
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
|
|
8538
|
+
}
|
|
8539
|
+
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
8540
|
+
if (fromUrlContext != null) {
|
|
8541
|
+
setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
|
|
8542
|
+
}
|
|
8543
|
+
const fromCodeExecution = getValueByPath(fromObject, [
|
|
8544
|
+
'codeExecution',
|
|
8545
|
+
]);
|
|
8546
|
+
if (fromCodeExecution != null) {
|
|
8547
|
+
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
8548
|
+
}
|
|
8549
|
+
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
8550
|
+
if (fromComputerUse != null) {
|
|
8551
|
+
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
8552
|
+
}
|
|
8553
|
+
return toObject;
|
|
8554
|
+
}
|
|
8555
|
+
function sessionResumptionConfigToVertex(fromObject) {
|
|
8556
|
+
const toObject = {};
|
|
8557
|
+
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
8558
|
+
if (fromHandle != null) {
|
|
8559
|
+
setValueByPath(toObject, ['handle'], fromHandle);
|
|
8560
|
+
}
|
|
8561
|
+
const fromTransparent = getValueByPath(fromObject, ['transparent']);
|
|
8562
|
+
if (fromTransparent != null) {
|
|
8563
|
+
setValueByPath(toObject, ['transparent'], fromTransparent);
|
|
8564
|
+
}
|
|
8565
|
+
return toObject;
|
|
8566
|
+
}
|
|
8567
|
+
function audioTranscriptionConfigToVertex() {
|
|
8568
|
+
const toObject = {};
|
|
8569
|
+
return toObject;
|
|
8570
|
+
}
|
|
8571
|
+
function automaticActivityDetectionToVertex(fromObject) {
|
|
8572
|
+
const toObject = {};
|
|
8573
|
+
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
8574
|
+
if (fromDisabled != null) {
|
|
8575
|
+
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
8576
|
+
}
|
|
8577
|
+
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
8578
|
+
'startOfSpeechSensitivity',
|
|
8579
|
+
]);
|
|
8580
|
+
if (fromStartOfSpeechSensitivity != null) {
|
|
8581
|
+
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
8582
|
+
}
|
|
8583
|
+
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
8584
|
+
'endOfSpeechSensitivity',
|
|
8585
|
+
]);
|
|
8586
|
+
if (fromEndOfSpeechSensitivity != null) {
|
|
8587
|
+
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
8588
|
+
}
|
|
8589
|
+
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
8590
|
+
'prefixPaddingMs',
|
|
8591
|
+
]);
|
|
8592
|
+
if (fromPrefixPaddingMs != null) {
|
|
8593
|
+
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
8594
|
+
}
|
|
8595
|
+
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
8596
|
+
'silenceDurationMs',
|
|
8597
|
+
]);
|
|
8598
|
+
if (fromSilenceDurationMs != null) {
|
|
8599
|
+
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
8600
|
+
}
|
|
8601
|
+
return toObject;
|
|
8602
|
+
}
|
|
8603
|
+
function realtimeInputConfigToVertex(fromObject) {
|
|
8604
|
+
const toObject = {};
|
|
8605
|
+
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
8606
|
+
'automaticActivityDetection',
|
|
8607
|
+
]);
|
|
8608
|
+
if (fromAutomaticActivityDetection != null) {
|
|
8609
|
+
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
|
|
8610
|
+
}
|
|
8611
|
+
const fromActivityHandling = getValueByPath(fromObject, [
|
|
8612
|
+
'activityHandling',
|
|
8613
|
+
]);
|
|
8614
|
+
if (fromActivityHandling != null) {
|
|
8615
|
+
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
8616
|
+
}
|
|
8617
|
+
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
8618
|
+
if (fromTurnCoverage != null) {
|
|
8619
|
+
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
8620
|
+
}
|
|
8621
|
+
return toObject;
|
|
8622
|
+
}
|
|
8623
|
+
function slidingWindowToVertex(fromObject) {
|
|
8624
|
+
const toObject = {};
|
|
8625
|
+
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
8626
|
+
if (fromTargetTokens != null) {
|
|
8627
|
+
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
8628
|
+
}
|
|
8629
|
+
return toObject;
|
|
8630
|
+
}
|
|
8631
|
+
function contextWindowCompressionConfigToVertex(fromObject) {
|
|
8632
|
+
const toObject = {};
|
|
8633
|
+
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
8634
|
+
'triggerTokens',
|
|
8635
|
+
]);
|
|
8636
|
+
if (fromTriggerTokens != null) {
|
|
8637
|
+
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
8638
|
+
}
|
|
8639
|
+
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
8640
|
+
'slidingWindow',
|
|
8641
|
+
]);
|
|
8642
|
+
if (fromSlidingWindow != null) {
|
|
8643
|
+
setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
|
|
8644
|
+
}
|
|
8645
|
+
return toObject;
|
|
8646
|
+
}
|
|
8647
|
+
function proactivityConfigToVertex(fromObject) {
|
|
8648
|
+
const toObject = {};
|
|
8649
|
+
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
8650
|
+
'proactiveAudio',
|
|
8651
|
+
]);
|
|
8652
|
+
if (fromProactiveAudio != null) {
|
|
8653
|
+
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
8654
|
+
}
|
|
8655
|
+
return toObject;
|
|
8656
|
+
}
|
|
8657
|
+
function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
8658
|
+
const toObject = {};
|
|
8659
|
+
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
8660
|
+
'generationConfig',
|
|
8661
|
+
]);
|
|
8662
|
+
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
8663
|
+
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
8664
|
+
}
|
|
8665
|
+
const fromResponseModalities = getValueByPath(fromObject, [
|
|
8666
|
+
'responseModalities',
|
|
8667
|
+
]);
|
|
8668
|
+
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
8669
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
8670
|
+
}
|
|
8671
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8672
|
+
if (parentObject !== undefined && fromTemperature != null) {
|
|
8673
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
|
|
8674
|
+
}
|
|
8675
|
+
const fromTopP = getValueByPath(fromObject, ['topP']);
|
|
8676
|
+
if (parentObject !== undefined && fromTopP != null) {
|
|
8677
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
|
|
8678
|
+
}
|
|
8679
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8680
|
+
if (parentObject !== undefined && fromTopK != null) {
|
|
8681
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
|
|
8682
|
+
}
|
|
8683
|
+
const fromMaxOutputTokens = getValueByPath(fromObject, [
|
|
8684
|
+
'maxOutputTokens',
|
|
8685
|
+
]);
|
|
8686
|
+
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
8687
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
8688
|
+
}
|
|
8689
|
+
const fromMediaResolution = getValueByPath(fromObject, [
|
|
8690
|
+
'mediaResolution',
|
|
8691
|
+
]);
|
|
8692
|
+
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
8693
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
8694
|
+
}
|
|
8695
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8696
|
+
if (parentObject !== undefined && fromSeed != null) {
|
|
8697
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
8698
|
+
}
|
|
8699
|
+
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8700
|
+
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8701
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8702
|
+
}
|
|
8703
|
+
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8704
|
+
'enableAffectiveDialog',
|
|
8705
|
+
]);
|
|
8706
|
+
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
8707
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
8708
|
+
}
|
|
8709
|
+
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
8710
|
+
'systemInstruction',
|
|
8711
|
+
]);
|
|
8712
|
+
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
8713
|
+
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
|
|
8714
|
+
}
|
|
8715
|
+
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
8716
|
+
if (parentObject !== undefined && fromTools != null) {
|
|
8717
|
+
let transformedList = tTools(fromTools);
|
|
8718
|
+
if (Array.isArray(transformedList)) {
|
|
8719
|
+
transformedList = transformedList.map((item) => {
|
|
8720
|
+
return toolToVertex$1(tTool(item));
|
|
8721
|
+
});
|
|
8722
|
+
}
|
|
8723
|
+
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
8724
|
+
}
|
|
8725
|
+
const fromSessionResumption = getValueByPath(fromObject, [
|
|
8726
|
+
'sessionResumption',
|
|
8727
|
+
]);
|
|
8728
|
+
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
8729
|
+
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
|
|
8730
|
+
}
|
|
8731
|
+
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
8732
|
+
'inputAudioTranscription',
|
|
8733
|
+
]);
|
|
8734
|
+
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
8735
|
+
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8736
|
+
}
|
|
8737
|
+
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
8738
|
+
'outputAudioTranscription',
|
|
8739
|
+
]);
|
|
8740
|
+
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
8741
|
+
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8742
|
+
}
|
|
8743
|
+
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
8744
|
+
'realtimeInputConfig',
|
|
8745
|
+
]);
|
|
8746
|
+
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
8747
|
+
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
|
|
8748
|
+
}
|
|
8749
|
+
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
8750
|
+
'contextWindowCompression',
|
|
8751
|
+
]);
|
|
8752
|
+
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
8753
|
+
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
|
|
8754
|
+
}
|
|
8755
|
+
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
8756
|
+
if (parentObject !== undefined && fromProactivity != null) {
|
|
8757
|
+
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
|
|
8758
|
+
}
|
|
8759
|
+
return toObject;
|
|
8760
|
+
}
|
|
8761
|
+
function liveConnectParametersToVertex(apiClient, fromObject) {
|
|
8762
|
+
const toObject = {};
|
|
8763
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8764
|
+
if (fromModel != null) {
|
|
8765
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
8766
|
+
}
|
|
8767
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
8768
|
+
if (fromConfig != null) {
|
|
8769
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
|
|
8770
|
+
}
|
|
8771
|
+
return toObject;
|
|
8772
|
+
}
|
|
8773
|
+
function activityStartToVertex() {
|
|
8774
|
+
const toObject = {};
|
|
8775
|
+
return toObject;
|
|
8776
|
+
}
|
|
8777
|
+
function activityEndToVertex() {
|
|
8778
|
+
const toObject = {};
|
|
8779
|
+
return toObject;
|
|
8780
|
+
}
|
|
8781
|
+
function liveSendRealtimeInputParametersToVertex(fromObject) {
|
|
8782
|
+
const toObject = {};
|
|
8783
|
+
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
8784
|
+
if (fromMedia != null) {
|
|
8785
|
+
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
8786
|
+
}
|
|
8787
|
+
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
8788
|
+
if (fromAudio != null) {
|
|
8789
|
+
setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
|
|
8790
|
+
}
|
|
8791
|
+
const fromAudioStreamEnd = getValueByPath(fromObject, [
|
|
8792
|
+
'audioStreamEnd',
|
|
8793
|
+
]);
|
|
8794
|
+
if (fromAudioStreamEnd != null) {
|
|
8795
|
+
setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
|
|
8796
|
+
}
|
|
8797
|
+
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
8798
|
+
if (fromVideo != null) {
|
|
8799
|
+
setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
|
|
8800
|
+
}
|
|
8801
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8802
|
+
if (fromText != null) {
|
|
8803
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8804
|
+
}
|
|
8805
|
+
const fromActivityStart = getValueByPath(fromObject, [
|
|
8806
|
+
'activityStart',
|
|
8807
|
+
]);
|
|
8808
|
+
if (fromActivityStart != null) {
|
|
8809
|
+
setValueByPath(toObject, ['activityStart'], activityStartToVertex());
|
|
8810
|
+
}
|
|
8811
|
+
const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
|
|
8812
|
+
if (fromActivityEnd != null) {
|
|
8813
|
+
setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
|
|
8814
|
+
}
|
|
8815
|
+
return toObject;
|
|
8816
|
+
}
|
|
8817
|
+
function liveServerSetupCompleteFromMldev() {
|
|
8818
|
+
const toObject = {};
|
|
8819
|
+
return toObject;
|
|
8820
|
+
}
|
|
8821
|
+
function videoMetadataFromMldev$1(fromObject) {
|
|
8822
|
+
const toObject = {};
|
|
8823
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8824
|
+
if (fromFps != null) {
|
|
8825
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
8826
|
+
}
|
|
8827
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
8828
|
+
if (fromEndOffset != null) {
|
|
8829
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
8830
|
+
}
|
|
8831
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
8832
|
+
if (fromStartOffset != null) {
|
|
8833
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
8834
|
+
}
|
|
8835
|
+
return toObject;
|
|
8836
|
+
}
|
|
8837
|
+
function blobFromMldev$1(fromObject) {
|
|
8838
|
+
const toObject = {};
|
|
8839
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8840
|
+
if (fromData != null) {
|
|
8841
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8842
|
+
}
|
|
8843
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8844
|
+
if (fromMimeType != null) {
|
|
8845
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8846
|
+
}
|
|
8847
|
+
return toObject;
|
|
8848
|
+
}
|
|
8849
|
+
function fileDataFromMldev$1(fromObject) {
|
|
8850
|
+
const toObject = {};
|
|
8851
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8852
|
+
if (fromFileUri != null) {
|
|
8853
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8854
|
+
}
|
|
8855
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8856
|
+
if (fromMimeType != null) {
|
|
8857
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8858
|
+
}
|
|
8859
|
+
return toObject;
|
|
8860
|
+
}
|
|
8861
|
+
function partFromMldev$1(fromObject) {
|
|
8862
|
+
const toObject = {};
|
|
8863
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8864
|
+
'videoMetadata',
|
|
8865
|
+
]);
|
|
8866
|
+
if (fromVideoMetadata != null) {
|
|
8867
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataFromMldev$1(fromVideoMetadata));
|
|
8868
|
+
}
|
|
8869
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8870
|
+
if (fromThought != null) {
|
|
8871
|
+
setValueByPath(toObject, ['thought'], fromThought);
|
|
8872
|
+
}
|
|
8873
|
+
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
8874
|
+
if (fromInlineData != null) {
|
|
8875
|
+
setValueByPath(toObject, ['inlineData'], blobFromMldev$1(fromInlineData));
|
|
8876
|
+
}
|
|
8877
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8878
|
+
if (fromFileData != null) {
|
|
8879
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(fromFileData));
|
|
8880
|
+
}
|
|
8881
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8882
|
+
'thoughtSignature',
|
|
8883
|
+
]);
|
|
8884
|
+
if (fromThoughtSignature != null) {
|
|
8885
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
8886
|
+
}
|
|
8887
|
+
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
8888
|
+
'codeExecutionResult',
|
|
8889
|
+
]);
|
|
8890
|
+
if (fromCodeExecutionResult != null) {
|
|
8891
|
+
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
8892
|
+
}
|
|
8893
|
+
const fromExecutableCode = getValueByPath(fromObject, [
|
|
8894
|
+
'executableCode',
|
|
8895
|
+
]);
|
|
8896
|
+
if (fromExecutableCode != null) {
|
|
8897
|
+
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
8898
|
+
}
|
|
8899
|
+
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
8900
|
+
if (fromFunctionCall != null) {
|
|
8901
|
+
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
8902
|
+
}
|
|
8903
|
+
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
8904
|
+
'functionResponse',
|
|
8905
|
+
]);
|
|
8906
|
+
if (fromFunctionResponse != null) {
|
|
8907
|
+
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
8908
|
+
}
|
|
8909
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8910
|
+
if (fromText != null) {
|
|
8911
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8912
|
+
}
|
|
8913
|
+
return toObject;
|
|
8914
|
+
}
|
|
8915
|
+
function contentFromMldev$1(fromObject) {
|
|
8916
|
+
const toObject = {};
|
|
8917
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8918
|
+
if (fromParts != null) {
|
|
8919
|
+
let transformedList = fromParts;
|
|
8920
|
+
if (Array.isArray(transformedList)) {
|
|
8921
|
+
transformedList = transformedList.map((item) => {
|
|
8922
|
+
return partFromMldev$1(item);
|
|
8923
|
+
});
|
|
8924
|
+
}
|
|
8925
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
8926
|
+
}
|
|
8927
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
8928
|
+
if (fromRole != null) {
|
|
8929
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
8930
|
+
}
|
|
8931
|
+
return toObject;
|
|
8932
|
+
}
|
|
8933
|
+
function transcriptionFromMldev(fromObject) {
|
|
8934
|
+
const toObject = {};
|
|
8935
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8936
|
+
if (fromText != null) {
|
|
8937
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8938
|
+
}
|
|
8939
|
+
const fromFinished = getValueByPath(fromObject, ['finished']);
|
|
8940
|
+
if (fromFinished != null) {
|
|
8941
|
+
setValueByPath(toObject, ['finished'], fromFinished);
|
|
8942
|
+
}
|
|
8943
|
+
return toObject;
|
|
8944
|
+
}
|
|
8945
|
+
function urlMetadataFromMldev$1(fromObject) {
|
|
8946
|
+
const toObject = {};
|
|
8947
|
+
const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
|
|
8948
|
+
if (fromRetrievedUrl != null) {
|
|
8949
|
+
setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
|
|
8950
|
+
}
|
|
8951
|
+
const fromUrlRetrievalStatus = getValueByPath(fromObject, [
|
|
8952
|
+
'urlRetrievalStatus',
|
|
8953
|
+
]);
|
|
8954
|
+
if (fromUrlRetrievalStatus != null) {
|
|
8955
|
+
setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
|
|
8956
|
+
}
|
|
8957
|
+
return toObject;
|
|
8958
|
+
}
|
|
8959
|
+
function urlContextMetadataFromMldev$1(fromObject) {
|
|
8960
|
+
const toObject = {};
|
|
8961
|
+
const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
|
|
8962
|
+
if (fromUrlMetadata != null) {
|
|
8963
|
+
let transformedList = fromUrlMetadata;
|
|
8964
|
+
if (Array.isArray(transformedList)) {
|
|
8965
|
+
transformedList = transformedList.map((item) => {
|
|
8966
|
+
return urlMetadataFromMldev$1(item);
|
|
8967
|
+
});
|
|
8968
|
+
}
|
|
8969
|
+
setValueByPath(toObject, ['urlMetadata'], transformedList);
|
|
8970
|
+
}
|
|
8971
|
+
return toObject;
|
|
8972
|
+
}
|
|
8973
|
+
function liveServerContentFromMldev(fromObject) {
|
|
8974
|
+
const toObject = {};
|
|
8975
|
+
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
8976
|
+
if (fromModelTurn != null) {
|
|
8977
|
+
setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
|
|
8978
|
+
}
|
|
8979
|
+
const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
|
|
8980
|
+
if (fromTurnComplete != null) {
|
|
8981
|
+
setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
|
|
8982
|
+
}
|
|
8983
|
+
const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
|
|
8984
|
+
if (fromInterrupted != null) {
|
|
8985
|
+
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
8986
|
+
}
|
|
8987
|
+
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
8988
|
+
'groundingMetadata',
|
|
8989
|
+
]);
|
|
8990
|
+
if (fromGroundingMetadata != null) {
|
|
8991
|
+
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
8992
|
+
}
|
|
8993
|
+
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
8994
|
+
'generationComplete',
|
|
8995
|
+
]);
|
|
8996
|
+
if (fromGenerationComplete != null) {
|
|
8997
|
+
setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
|
|
8998
|
+
}
|
|
8999
|
+
const fromInputTranscription = getValueByPath(fromObject, [
|
|
9000
|
+
'inputTranscription',
|
|
9001
|
+
]);
|
|
9002
|
+
if (fromInputTranscription != null) {
|
|
9003
|
+
setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
|
|
9004
|
+
}
|
|
9005
|
+
const fromOutputTranscription = getValueByPath(fromObject, [
|
|
9006
|
+
'outputTranscription',
|
|
9007
|
+
]);
|
|
9008
|
+
if (fromOutputTranscription != null) {
|
|
9009
|
+
setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
|
|
9010
|
+
}
|
|
9011
|
+
const fromUrlContextMetadata = getValueByPath(fromObject, [
|
|
9012
|
+
'urlContextMetadata',
|
|
9013
|
+
]);
|
|
9014
|
+
if (fromUrlContextMetadata != null) {
|
|
9015
|
+
setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
|
|
9016
|
+
}
|
|
9017
|
+
return toObject;
|
|
9018
|
+
}
|
|
9019
|
+
function functionCallFromMldev(fromObject) {
|
|
9020
|
+
const toObject = {};
|
|
9021
|
+
const fromId = getValueByPath(fromObject, ['id']);
|
|
9022
|
+
if (fromId != null) {
|
|
9023
|
+
setValueByPath(toObject, ['id'], fromId);
|
|
9024
|
+
}
|
|
9025
|
+
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
9026
|
+
if (fromArgs != null) {
|
|
9027
|
+
setValueByPath(toObject, ['args'], fromArgs);
|
|
9028
|
+
}
|
|
9029
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
9030
|
+
if (fromName != null) {
|
|
9031
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
9032
|
+
}
|
|
9033
|
+
return toObject;
|
|
9034
|
+
}
|
|
9035
|
+
function liveServerToolCallFromMldev(fromObject) {
|
|
9036
|
+
const toObject = {};
|
|
9037
|
+
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
9038
|
+
'functionCalls',
|
|
9039
|
+
]);
|
|
9040
|
+
if (fromFunctionCalls != null) {
|
|
9041
|
+
let transformedList = fromFunctionCalls;
|
|
9042
|
+
if (Array.isArray(transformedList)) {
|
|
9043
|
+
transformedList = transformedList.map((item) => {
|
|
9044
|
+
return functionCallFromMldev(item);
|
|
9045
|
+
});
|
|
9046
|
+
}
|
|
9047
|
+
setValueByPath(toObject, ['functionCalls'], transformedList);
|
|
9048
|
+
}
|
|
9049
|
+
return toObject;
|
|
9050
|
+
}
|
|
9051
|
+
function liveServerToolCallCancellationFromMldev(fromObject) {
|
|
9052
|
+
const toObject = {};
|
|
9053
|
+
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
9054
|
+
if (fromIds != null) {
|
|
9055
|
+
setValueByPath(toObject, ['ids'], fromIds);
|
|
9056
|
+
}
|
|
9057
|
+
return toObject;
|
|
9058
|
+
}
|
|
9059
|
+
function modalityTokenCountFromMldev(fromObject) {
|
|
9060
|
+
const toObject = {};
|
|
9061
|
+
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
9062
|
+
if (fromModality != null) {
|
|
9063
|
+
setValueByPath(toObject, ['modality'], fromModality);
|
|
9064
|
+
}
|
|
9065
|
+
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
9066
|
+
if (fromTokenCount != null) {
|
|
9067
|
+
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
9068
|
+
}
|
|
9069
|
+
return toObject;
|
|
9070
|
+
}
|
|
9071
|
+
function usageMetadataFromMldev(fromObject) {
|
|
9072
|
+
const toObject = {};
|
|
9073
|
+
const fromPromptTokenCount = getValueByPath(fromObject, [
|
|
9074
|
+
'promptTokenCount',
|
|
9075
|
+
]);
|
|
9076
|
+
if (fromPromptTokenCount != null) {
|
|
9077
|
+
setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
|
|
9078
|
+
}
|
|
9079
|
+
const fromCachedContentTokenCount = getValueByPath(fromObject, [
|
|
9080
|
+
'cachedContentTokenCount',
|
|
9081
|
+
]);
|
|
9082
|
+
if (fromCachedContentTokenCount != null) {
|
|
9083
|
+
setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
|
|
9084
|
+
}
|
|
9085
|
+
const fromResponseTokenCount = getValueByPath(fromObject, [
|
|
9086
|
+
'responseTokenCount',
|
|
9087
|
+
]);
|
|
9088
|
+
if (fromResponseTokenCount != null) {
|
|
9089
|
+
setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
|
|
9090
|
+
}
|
|
9091
|
+
const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
|
|
9092
|
+
'toolUsePromptTokenCount',
|
|
9093
|
+
]);
|
|
9094
|
+
if (fromToolUsePromptTokenCount != null) {
|
|
9095
|
+
setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
|
|
9096
|
+
}
|
|
9097
|
+
const fromThoughtsTokenCount = getValueByPath(fromObject, [
|
|
9098
|
+
'thoughtsTokenCount',
|
|
9099
|
+
]);
|
|
9100
|
+
if (fromThoughtsTokenCount != null) {
|
|
9101
|
+
setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
|
|
9102
|
+
}
|
|
9103
|
+
const fromTotalTokenCount = getValueByPath(fromObject, [
|
|
9104
|
+
'totalTokenCount',
|
|
9105
|
+
]);
|
|
9106
|
+
if (fromTotalTokenCount != null) {
|
|
9107
|
+
setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
|
|
9108
|
+
}
|
|
9109
|
+
const fromPromptTokensDetails = getValueByPath(fromObject, [
|
|
9110
|
+
'promptTokensDetails',
|
|
9111
|
+
]);
|
|
9112
|
+
if (fromPromptTokensDetails != null) {
|
|
9113
|
+
let transformedList = fromPromptTokensDetails;
|
|
9114
|
+
if (Array.isArray(transformedList)) {
|
|
9115
|
+
transformedList = transformedList.map((item) => {
|
|
9116
|
+
return modalityTokenCountFromMldev(item);
|
|
9117
|
+
});
|
|
9118
|
+
}
|
|
9119
|
+
setValueByPath(toObject, ['promptTokensDetails'], transformedList);
|
|
9120
|
+
}
|
|
9121
|
+
const fromCacheTokensDetails = getValueByPath(fromObject, [
|
|
9122
|
+
'cacheTokensDetails',
|
|
9123
|
+
]);
|
|
9124
|
+
if (fromCacheTokensDetails != null) {
|
|
9125
|
+
let transformedList = fromCacheTokensDetails;
|
|
9126
|
+
if (Array.isArray(transformedList)) {
|
|
9127
|
+
transformedList = transformedList.map((item) => {
|
|
9128
|
+
return modalityTokenCountFromMldev(item);
|
|
9129
|
+
});
|
|
9130
|
+
}
|
|
9131
|
+
setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
|
|
9132
|
+
}
|
|
9133
|
+
const fromResponseTokensDetails = getValueByPath(fromObject, [
|
|
9134
|
+
'responseTokensDetails',
|
|
9135
|
+
]);
|
|
9136
|
+
if (fromResponseTokensDetails != null) {
|
|
9137
|
+
let transformedList = fromResponseTokensDetails;
|
|
9138
|
+
if (Array.isArray(transformedList)) {
|
|
9139
|
+
transformedList = transformedList.map((item) => {
|
|
9140
|
+
return modalityTokenCountFromMldev(item);
|
|
9141
|
+
});
|
|
9142
|
+
}
|
|
9143
|
+
setValueByPath(toObject, ['responseTokensDetails'], transformedList);
|
|
9144
|
+
}
|
|
9145
|
+
const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
|
|
9146
|
+
'toolUsePromptTokensDetails',
|
|
9147
|
+
]);
|
|
9148
|
+
if (fromToolUsePromptTokensDetails != null) {
|
|
9149
|
+
let transformedList = fromToolUsePromptTokensDetails;
|
|
9150
|
+
if (Array.isArray(transformedList)) {
|
|
9151
|
+
transformedList = transformedList.map((item) => {
|
|
9152
|
+
return modalityTokenCountFromMldev(item);
|
|
9153
|
+
});
|
|
9154
|
+
}
|
|
9155
|
+
setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
|
|
9156
|
+
}
|
|
9157
|
+
return toObject;
|
|
9158
|
+
}
|
|
9159
|
+
function liveServerGoAwayFromMldev(fromObject) {
|
|
9160
|
+
const toObject = {};
|
|
9161
|
+
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
9162
|
+
if (fromTimeLeft != null) {
|
|
9163
|
+
setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
|
|
9164
|
+
}
|
|
9165
|
+
return toObject;
|
|
9166
|
+
}
|
|
9167
|
+
function liveServerSessionResumptionUpdateFromMldev(fromObject) {
|
|
9168
|
+
const toObject = {};
|
|
9169
|
+
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
9170
|
+
if (fromNewHandle != null) {
|
|
9171
|
+
setValueByPath(toObject, ['newHandle'], fromNewHandle);
|
|
9172
|
+
}
|
|
9173
|
+
const fromResumable = getValueByPath(fromObject, ['resumable']);
|
|
9174
|
+
if (fromResumable != null) {
|
|
9175
|
+
setValueByPath(toObject, ['resumable'], fromResumable);
|
|
9176
|
+
}
|
|
9177
|
+
const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
|
|
9178
|
+
'lastConsumedClientMessageIndex',
|
|
9179
|
+
]);
|
|
9180
|
+
if (fromLastConsumedClientMessageIndex != null) {
|
|
9181
|
+
setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
|
|
9182
|
+
}
|
|
9183
|
+
return toObject;
|
|
9184
|
+
}
|
|
9185
|
+
function liveServerMessageFromMldev(fromObject) {
|
|
9186
|
+
const toObject = {};
|
|
9187
|
+
const fromSetupComplete = getValueByPath(fromObject, [
|
|
9188
|
+
'setupComplete',
|
|
9189
|
+
]);
|
|
9190
|
+
if (fromSetupComplete != null) {
|
|
9191
|
+
setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
|
|
9192
|
+
}
|
|
9193
|
+
const fromServerContent = getValueByPath(fromObject, [
|
|
9194
|
+
'serverContent',
|
|
9195
|
+
]);
|
|
9196
|
+
if (fromServerContent != null) {
|
|
9197
|
+
setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
|
|
9198
|
+
}
|
|
9199
|
+
const fromToolCall = getValueByPath(fromObject, ['toolCall']);
|
|
9200
|
+
if (fromToolCall != null) {
|
|
9201
|
+
setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
|
|
9202
|
+
}
|
|
9203
|
+
const fromToolCallCancellation = getValueByPath(fromObject, [
|
|
9204
|
+
'toolCallCancellation',
|
|
9205
|
+
]);
|
|
9206
|
+
if (fromToolCallCancellation != null) {
|
|
9207
|
+
setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
|
|
9208
|
+
}
|
|
9209
|
+
const fromUsageMetadata = getValueByPath(fromObject, [
|
|
9210
|
+
'usageMetadata',
|
|
9211
|
+
]);
|
|
9212
|
+
if (fromUsageMetadata != null) {
|
|
9213
|
+
setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
|
|
9214
|
+
}
|
|
9215
|
+
const fromGoAway = getValueByPath(fromObject, ['goAway']);
|
|
9216
|
+
if (fromGoAway != null) {
|
|
9217
|
+
setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
|
|
9218
|
+
}
|
|
9219
|
+
const fromSessionResumptionUpdate = getValueByPath(fromObject, [
|
|
9220
|
+
'sessionResumptionUpdate',
|
|
9221
|
+
]);
|
|
9222
|
+
if (fromSessionResumptionUpdate != null) {
|
|
9223
|
+
setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
|
|
9224
|
+
}
|
|
9225
|
+
return toObject;
|
|
9226
|
+
}
|
|
9227
|
+
function liveMusicServerSetupCompleteFromMldev() {
|
|
9228
|
+
const toObject = {};
|
|
9229
|
+
return toObject;
|
|
9230
|
+
}
|
|
9231
|
+
function weightedPromptFromMldev(fromObject) {
|
|
9232
|
+
const toObject = {};
|
|
9233
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
9234
|
+
if (fromText != null) {
|
|
9235
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
9236
|
+
}
|
|
9237
|
+
const fromWeight = getValueByPath(fromObject, ['weight']);
|
|
9238
|
+
if (fromWeight != null) {
|
|
9239
|
+
setValueByPath(toObject, ['weight'], fromWeight);
|
|
9240
|
+
}
|
|
9241
|
+
return toObject;
|
|
9242
|
+
}
|
|
9243
|
+
function liveMusicClientContentFromMldev(fromObject) {
|
|
9244
|
+
const toObject = {};
|
|
9245
|
+
const fromWeightedPrompts = getValueByPath(fromObject, [
|
|
9246
|
+
'weightedPrompts',
|
|
9247
|
+
]);
|
|
9248
|
+
if (fromWeightedPrompts != null) {
|
|
9249
|
+
let transformedList = fromWeightedPrompts;
|
|
9250
|
+
if (Array.isArray(transformedList)) {
|
|
9251
|
+
transformedList = transformedList.map((item) => {
|
|
9252
|
+
return weightedPromptFromMldev(item);
|
|
9253
|
+
});
|
|
9254
|
+
}
|
|
9255
|
+
setValueByPath(toObject, ['weightedPrompts'], transformedList);
|
|
9256
|
+
}
|
|
9257
|
+
return toObject;
|
|
9258
|
+
}
|
|
9259
|
+
function liveMusicGenerationConfigFromMldev(fromObject) {
|
|
9260
|
+
const toObject = {};
|
|
9261
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
9262
|
+
if (fromTemperature != null) {
|
|
9263
|
+
setValueByPath(toObject, ['temperature'], fromTemperature);
|
|
9264
|
+
}
|
|
9265
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
9266
|
+
if (fromTopK != null) {
|
|
9267
|
+
setValueByPath(toObject, ['topK'], fromTopK);
|
|
9268
|
+
}
|
|
9269
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
9270
|
+
if (fromSeed != null) {
|
|
9271
|
+
setValueByPath(toObject, ['seed'], fromSeed);
|
|
9272
|
+
}
|
|
9273
|
+
const fromGuidance = getValueByPath(fromObject, ['guidance']);
|
|
9274
|
+
if (fromGuidance != null) {
|
|
9275
|
+
setValueByPath(toObject, ['guidance'], fromGuidance);
|
|
9276
|
+
}
|
|
9277
|
+
const fromBpm = getValueByPath(fromObject, ['bpm']);
|
|
9278
|
+
if (fromBpm != null) {
|
|
9279
|
+
setValueByPath(toObject, ['bpm'], fromBpm);
|
|
9280
|
+
}
|
|
9281
|
+
const fromDensity = getValueByPath(fromObject, ['density']);
|
|
9282
|
+
if (fromDensity != null) {
|
|
9283
|
+
setValueByPath(toObject, ['density'], fromDensity);
|
|
9284
|
+
}
|
|
9285
|
+
const fromBrightness = getValueByPath(fromObject, ['brightness']);
|
|
9286
|
+
if (fromBrightness != null) {
|
|
9287
|
+
setValueByPath(toObject, ['brightness'], fromBrightness);
|
|
9288
|
+
}
|
|
9289
|
+
const fromScale = getValueByPath(fromObject, ['scale']);
|
|
9290
|
+
if (fromScale != null) {
|
|
9291
|
+
setValueByPath(toObject, ['scale'], fromScale);
|
|
9292
|
+
}
|
|
9293
|
+
const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
|
|
9294
|
+
if (fromMuteBass != null) {
|
|
9295
|
+
setValueByPath(toObject, ['muteBass'], fromMuteBass);
|
|
9296
|
+
}
|
|
9297
|
+
const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
|
|
9298
|
+
if (fromMuteDrums != null) {
|
|
9299
|
+
setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
|
|
9300
|
+
}
|
|
9301
|
+
const fromOnlyBassAndDrums = getValueByPath(fromObject, [
|
|
9302
|
+
'onlyBassAndDrums',
|
|
9303
|
+
]);
|
|
9304
|
+
if (fromOnlyBassAndDrums != null) {
|
|
9305
|
+
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
9306
|
+
}
|
|
9307
|
+
return toObject;
|
|
9308
|
+
}
|
|
9309
|
+
function liveMusicSourceMetadataFromMldev(fromObject) {
|
|
9310
|
+
const toObject = {};
|
|
9311
|
+
const fromClientContent = getValueByPath(fromObject, [
|
|
9312
|
+
'clientContent',
|
|
9313
|
+
]);
|
|
9314
|
+
if (fromClientContent != null) {
|
|
9315
|
+
setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
|
|
9316
|
+
}
|
|
9317
|
+
const fromMusicGenerationConfig = getValueByPath(fromObject, [
|
|
9318
|
+
'musicGenerationConfig',
|
|
9319
|
+
]);
|
|
9320
|
+
if (fromMusicGenerationConfig != null) {
|
|
9321
|
+
setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
|
|
9322
|
+
}
|
|
9323
|
+
return toObject;
|
|
9324
|
+
}
|
|
9325
|
+
function audioChunkFromMldev(fromObject) {
|
|
9326
|
+
const toObject = {};
|
|
9327
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
9328
|
+
if (fromData != null) {
|
|
9329
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
9330
|
+
}
|
|
9331
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9332
|
+
if (fromMimeType != null) {
|
|
9333
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9334
|
+
}
|
|
9335
|
+
const fromSourceMetadata = getValueByPath(fromObject, [
|
|
9336
|
+
'sourceMetadata',
|
|
9337
|
+
]);
|
|
9338
|
+
if (fromSourceMetadata != null) {
|
|
9339
|
+
setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
|
|
9340
|
+
}
|
|
9341
|
+
return toObject;
|
|
9342
|
+
}
|
|
9343
|
+
function liveMusicServerContentFromMldev(fromObject) {
|
|
9344
|
+
const toObject = {};
|
|
9345
|
+
const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
|
|
9346
|
+
if (fromAudioChunks != null) {
|
|
9347
|
+
let transformedList = fromAudioChunks;
|
|
9348
|
+
if (Array.isArray(transformedList)) {
|
|
9349
|
+
transformedList = transformedList.map((item) => {
|
|
9350
|
+
return audioChunkFromMldev(item);
|
|
9351
|
+
});
|
|
9352
|
+
}
|
|
9353
|
+
setValueByPath(toObject, ['audioChunks'], transformedList);
|
|
9354
|
+
}
|
|
9355
|
+
return toObject;
|
|
9356
|
+
}
|
|
9357
|
+
function liveMusicFilteredPromptFromMldev(fromObject) {
|
|
9358
|
+
const toObject = {};
|
|
9359
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
9360
|
+
if (fromText != null) {
|
|
9361
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
9362
|
+
}
|
|
9363
|
+
const fromFilteredReason = getValueByPath(fromObject, [
|
|
9364
|
+
'filteredReason',
|
|
9365
|
+
]);
|
|
9366
|
+
if (fromFilteredReason != null) {
|
|
9367
|
+
setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
|
|
9368
|
+
}
|
|
9369
|
+
return toObject;
|
|
9370
|
+
}
|
|
9371
|
+
function liveMusicServerMessageFromMldev(fromObject) {
|
|
9372
|
+
const toObject = {};
|
|
9373
|
+
const fromSetupComplete = getValueByPath(fromObject, [
|
|
9374
|
+
'setupComplete',
|
|
9375
|
+
]);
|
|
9376
|
+
if (fromSetupComplete != null) {
|
|
9377
|
+
setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
|
|
9378
|
+
}
|
|
9379
|
+
const fromServerContent = getValueByPath(fromObject, [
|
|
9380
|
+
'serverContent',
|
|
9381
|
+
]);
|
|
9382
|
+
if (fromServerContent != null) {
|
|
9383
|
+
setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
|
|
9384
|
+
}
|
|
9385
|
+
const fromFilteredPrompt = getValueByPath(fromObject, [
|
|
9386
|
+
'filteredPrompt',
|
|
9387
|
+
]);
|
|
9388
|
+
if (fromFilteredPrompt != null) {
|
|
9389
|
+
setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
|
|
9390
|
+
}
|
|
9391
|
+
return toObject;
|
|
9392
|
+
}
|
|
9393
|
+
function liveServerSetupCompleteFromVertex(fromObject) {
|
|
9394
|
+
const toObject = {};
|
|
9395
|
+
const fromSessionId = getValueByPath(fromObject, ['sessionId']);
|
|
9396
|
+
if (fromSessionId != null) {
|
|
9397
|
+
setValueByPath(toObject, ['sessionId'], fromSessionId);
|
|
9398
|
+
}
|
|
9399
|
+
return toObject;
|
|
9400
|
+
}
|
|
9401
|
+
function videoMetadataFromVertex$1(fromObject) {
|
|
9402
|
+
const toObject = {};
|
|
9403
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
9404
|
+
if (fromFps != null) {
|
|
9405
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
9406
|
+
}
|
|
9407
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
9408
|
+
if (fromEndOffset != null) {
|
|
9409
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
9410
|
+
}
|
|
9411
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
9412
|
+
if (fromStartOffset != null) {
|
|
9413
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
9414
|
+
}
|
|
9415
|
+
return toObject;
|
|
9416
|
+
}
|
|
9417
|
+
function blobFromVertex$1(fromObject) {
|
|
9418
|
+
const toObject = {};
|
|
9419
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
9420
|
+
if (fromDisplayName != null) {
|
|
9421
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
9422
|
+
}
|
|
9423
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
9424
|
+
if (fromData != null) {
|
|
9425
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
9426
|
+
}
|
|
9427
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9428
|
+
if (fromMimeType != null) {
|
|
9429
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9430
|
+
}
|
|
9431
|
+
return toObject;
|
|
9432
|
+
}
|
|
9433
|
+
function fileDataFromVertex$1(fromObject) {
|
|
9434
|
+
const toObject = {};
|
|
9435
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
9436
|
+
if (fromDisplayName != null) {
|
|
9437
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
9438
|
+
}
|
|
9439
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
9440
|
+
if (fromFileUri != null) {
|
|
9441
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
9442
|
+
}
|
|
9443
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9444
|
+
if (fromMimeType != null) {
|
|
9445
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9446
|
+
}
|
|
9447
|
+
return toObject;
|
|
9448
|
+
}
|
|
9449
|
+
function partFromVertex$1(fromObject) {
|
|
9450
|
+
const toObject = {};
|
|
9451
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
9452
|
+
'videoMetadata',
|
|
9453
|
+
]);
|
|
9454
|
+
if (fromVideoMetadata != null) {
|
|
9455
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataFromVertex$1(fromVideoMetadata));
|
|
9456
|
+
}
|
|
9457
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
9458
|
+
if (fromThought != null) {
|
|
8954
9459
|
setValueByPath(toObject, ['thought'], fromThought);
|
|
8955
9460
|
}
|
|
8956
9461
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
@@ -8995,24 +9500,6 @@ function partFromVertex$1(fromObject) {
|
|
|
8995
9500
|
}
|
|
8996
9501
|
return toObject;
|
|
8997
9502
|
}
|
|
8998
|
-
function contentFromMldev$1(fromObject) {
|
|
8999
|
-
const toObject = {};
|
|
9000
|
-
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
9001
|
-
if (fromParts != null) {
|
|
9002
|
-
let transformedList = fromParts;
|
|
9003
|
-
if (Array.isArray(transformedList)) {
|
|
9004
|
-
transformedList = transformedList.map((item) => {
|
|
9005
|
-
return partFromMldev$1(item);
|
|
9006
|
-
});
|
|
9007
|
-
}
|
|
9008
|
-
setValueByPath(toObject, ['parts'], transformedList);
|
|
9009
|
-
}
|
|
9010
|
-
const fromRole = getValueByPath(fromObject, ['role']);
|
|
9011
|
-
if (fromRole != null) {
|
|
9012
|
-
setValueByPath(toObject, ['role'], fromRole);
|
|
9013
|
-
}
|
|
9014
|
-
return toObject;
|
|
9015
|
-
}
|
|
9016
9503
|
function contentFromVertex$1(fromObject) {
|
|
9017
9504
|
const toObject = {};
|
|
9018
9505
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -9031,18 +9518,6 @@ function contentFromVertex$1(fromObject) {
|
|
|
9031
9518
|
}
|
|
9032
9519
|
return toObject;
|
|
9033
9520
|
}
|
|
9034
|
-
function transcriptionFromMldev(fromObject) {
|
|
9035
|
-
const toObject = {};
|
|
9036
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
9037
|
-
if (fromText != null) {
|
|
9038
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
9039
|
-
}
|
|
9040
|
-
const fromFinished = getValueByPath(fromObject, ['finished']);
|
|
9041
|
-
if (fromFinished != null) {
|
|
9042
|
-
setValueByPath(toObject, ['finished'], fromFinished);
|
|
9043
|
-
}
|
|
9044
|
-
return toObject;
|
|
9045
|
-
}
|
|
9046
9521
|
function transcriptionFromVertex(fromObject) {
|
|
9047
9522
|
const toObject = {};
|
|
9048
9523
|
const fromText = getValueByPath(fromObject, ['text']);
|
|
@@ -9055,80 +9530,6 @@ function transcriptionFromVertex(fromObject) {
|
|
|
9055
9530
|
}
|
|
9056
9531
|
return toObject;
|
|
9057
9532
|
}
|
|
9058
|
-
function urlMetadataFromMldev$1(fromObject) {
|
|
9059
|
-
const toObject = {};
|
|
9060
|
-
const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
|
|
9061
|
-
if (fromRetrievedUrl != null) {
|
|
9062
|
-
setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
|
|
9063
|
-
}
|
|
9064
|
-
const fromUrlRetrievalStatus = getValueByPath(fromObject, [
|
|
9065
|
-
'urlRetrievalStatus',
|
|
9066
|
-
]);
|
|
9067
|
-
if (fromUrlRetrievalStatus != null) {
|
|
9068
|
-
setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
|
|
9069
|
-
}
|
|
9070
|
-
return toObject;
|
|
9071
|
-
}
|
|
9072
|
-
function urlContextMetadataFromMldev$1(fromObject) {
|
|
9073
|
-
const toObject = {};
|
|
9074
|
-
const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
|
|
9075
|
-
if (fromUrlMetadata != null) {
|
|
9076
|
-
let transformedList = fromUrlMetadata;
|
|
9077
|
-
if (Array.isArray(transformedList)) {
|
|
9078
|
-
transformedList = transformedList.map((item) => {
|
|
9079
|
-
return urlMetadataFromMldev$1(item);
|
|
9080
|
-
});
|
|
9081
|
-
}
|
|
9082
|
-
setValueByPath(toObject, ['urlMetadata'], transformedList);
|
|
9083
|
-
}
|
|
9084
|
-
return toObject;
|
|
9085
|
-
}
|
|
9086
|
-
function liveServerContentFromMldev(fromObject) {
|
|
9087
|
-
const toObject = {};
|
|
9088
|
-
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
9089
|
-
if (fromModelTurn != null) {
|
|
9090
|
-
setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
|
|
9091
|
-
}
|
|
9092
|
-
const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
|
|
9093
|
-
if (fromTurnComplete != null) {
|
|
9094
|
-
setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
|
|
9095
|
-
}
|
|
9096
|
-
const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
|
|
9097
|
-
if (fromInterrupted != null) {
|
|
9098
|
-
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
9099
|
-
}
|
|
9100
|
-
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
9101
|
-
'groundingMetadata',
|
|
9102
|
-
]);
|
|
9103
|
-
if (fromGroundingMetadata != null) {
|
|
9104
|
-
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
9105
|
-
}
|
|
9106
|
-
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
9107
|
-
'generationComplete',
|
|
9108
|
-
]);
|
|
9109
|
-
if (fromGenerationComplete != null) {
|
|
9110
|
-
setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
|
|
9111
|
-
}
|
|
9112
|
-
const fromInputTranscription = getValueByPath(fromObject, [
|
|
9113
|
-
'inputTranscription',
|
|
9114
|
-
]);
|
|
9115
|
-
if (fromInputTranscription != null) {
|
|
9116
|
-
setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
|
|
9117
|
-
}
|
|
9118
|
-
const fromOutputTranscription = getValueByPath(fromObject, [
|
|
9119
|
-
'outputTranscription',
|
|
9120
|
-
]);
|
|
9121
|
-
if (fromOutputTranscription != null) {
|
|
9122
|
-
setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
|
|
9123
|
-
}
|
|
9124
|
-
const fromUrlContextMetadata = getValueByPath(fromObject, [
|
|
9125
|
-
'urlContextMetadata',
|
|
9126
|
-
]);
|
|
9127
|
-
if (fromUrlContextMetadata != null) {
|
|
9128
|
-
setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
|
|
9129
|
-
}
|
|
9130
|
-
return toObject;
|
|
9131
|
-
}
|
|
9132
9533
|
function liveServerContentFromVertex(fromObject) {
|
|
9133
9534
|
const toObject = {};
|
|
9134
9535
|
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
@@ -9169,22 +9570,6 @@ function liveServerContentFromVertex(fromObject) {
|
|
|
9169
9570
|
}
|
|
9170
9571
|
return toObject;
|
|
9171
9572
|
}
|
|
9172
|
-
function functionCallFromMldev(fromObject) {
|
|
9173
|
-
const toObject = {};
|
|
9174
|
-
const fromId = getValueByPath(fromObject, ['id']);
|
|
9175
|
-
if (fromId != null) {
|
|
9176
|
-
setValueByPath(toObject, ['id'], fromId);
|
|
9177
|
-
}
|
|
9178
|
-
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
9179
|
-
if (fromArgs != null) {
|
|
9180
|
-
setValueByPath(toObject, ['args'], fromArgs);
|
|
9181
|
-
}
|
|
9182
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
9183
|
-
if (fromName != null) {
|
|
9184
|
-
setValueByPath(toObject, ['name'], fromName);
|
|
9185
|
-
}
|
|
9186
|
-
return toObject;
|
|
9187
|
-
}
|
|
9188
9573
|
function functionCallFromVertex(fromObject) {
|
|
9189
9574
|
const toObject = {};
|
|
9190
9575
|
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
@@ -9197,22 +9582,6 @@ function functionCallFromVertex(fromObject) {
|
|
|
9197
9582
|
}
|
|
9198
9583
|
return toObject;
|
|
9199
9584
|
}
|
|
9200
|
-
function liveServerToolCallFromMldev(fromObject) {
|
|
9201
|
-
const toObject = {};
|
|
9202
|
-
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
9203
|
-
'functionCalls',
|
|
9204
|
-
]);
|
|
9205
|
-
if (fromFunctionCalls != null) {
|
|
9206
|
-
let transformedList = fromFunctionCalls;
|
|
9207
|
-
if (Array.isArray(transformedList)) {
|
|
9208
|
-
transformedList = transformedList.map((item) => {
|
|
9209
|
-
return functionCallFromMldev(item);
|
|
9210
|
-
});
|
|
9211
|
-
}
|
|
9212
|
-
setValueByPath(toObject, ['functionCalls'], transformedList);
|
|
9213
|
-
}
|
|
9214
|
-
return toObject;
|
|
9215
|
-
}
|
|
9216
9585
|
function liveServerToolCallFromVertex(fromObject) {
|
|
9217
9586
|
const toObject = {};
|
|
9218
9587
|
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
@@ -9229,14 +9598,6 @@ function liveServerToolCallFromVertex(fromObject) {
|
|
|
9229
9598
|
}
|
|
9230
9599
|
return toObject;
|
|
9231
9600
|
}
|
|
9232
|
-
function liveServerToolCallCancellationFromMldev(fromObject) {
|
|
9233
|
-
const toObject = {};
|
|
9234
|
-
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
9235
|
-
if (fromIds != null) {
|
|
9236
|
-
setValueByPath(toObject, ['ids'], fromIds);
|
|
9237
|
-
}
|
|
9238
|
-
return toObject;
|
|
9239
|
-
}
|
|
9240
9601
|
function liveServerToolCallCancellationFromVertex(fromObject) {
|
|
9241
9602
|
const toObject = {};
|
|
9242
9603
|
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
@@ -9245,115 +9606,15 @@ function liveServerToolCallCancellationFromVertex(fromObject) {
|
|
|
9245
9606
|
}
|
|
9246
9607
|
return toObject;
|
|
9247
9608
|
}
|
|
9248
|
-
function modalityTokenCountFromMldev(fromObject) {
|
|
9249
|
-
const toObject = {};
|
|
9250
|
-
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
9251
|
-
if (fromModality != null) {
|
|
9252
|
-
setValueByPath(toObject, ['modality'], fromModality);
|
|
9253
|
-
}
|
|
9254
|
-
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
9255
|
-
if (fromTokenCount != null) {
|
|
9256
|
-
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
9257
|
-
}
|
|
9258
|
-
return toObject;
|
|
9259
|
-
}
|
|
9260
9609
|
function modalityTokenCountFromVertex(fromObject) {
|
|
9261
9610
|
const toObject = {};
|
|
9262
9611
|
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
9263
|
-
if (fromModality != null) {
|
|
9264
|
-
setValueByPath(toObject, ['modality'], fromModality);
|
|
9265
|
-
}
|
|
9266
|
-
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
9267
|
-
if (fromTokenCount != null) {
|
|
9268
|
-
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
9269
|
-
}
|
|
9270
|
-
return toObject;
|
|
9271
|
-
}
|
|
9272
|
-
function usageMetadataFromMldev(fromObject) {
|
|
9273
|
-
const toObject = {};
|
|
9274
|
-
const fromPromptTokenCount = getValueByPath(fromObject, [
|
|
9275
|
-
'promptTokenCount',
|
|
9276
|
-
]);
|
|
9277
|
-
if (fromPromptTokenCount != null) {
|
|
9278
|
-
setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
|
|
9279
|
-
}
|
|
9280
|
-
const fromCachedContentTokenCount = getValueByPath(fromObject, [
|
|
9281
|
-
'cachedContentTokenCount',
|
|
9282
|
-
]);
|
|
9283
|
-
if (fromCachedContentTokenCount != null) {
|
|
9284
|
-
setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
|
|
9285
|
-
}
|
|
9286
|
-
const fromResponseTokenCount = getValueByPath(fromObject, [
|
|
9287
|
-
'responseTokenCount',
|
|
9288
|
-
]);
|
|
9289
|
-
if (fromResponseTokenCount != null) {
|
|
9290
|
-
setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
|
|
9291
|
-
}
|
|
9292
|
-
const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
|
|
9293
|
-
'toolUsePromptTokenCount',
|
|
9294
|
-
]);
|
|
9295
|
-
if (fromToolUsePromptTokenCount != null) {
|
|
9296
|
-
setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
|
|
9297
|
-
}
|
|
9298
|
-
const fromThoughtsTokenCount = getValueByPath(fromObject, [
|
|
9299
|
-
'thoughtsTokenCount',
|
|
9300
|
-
]);
|
|
9301
|
-
if (fromThoughtsTokenCount != null) {
|
|
9302
|
-
setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
|
|
9303
|
-
}
|
|
9304
|
-
const fromTotalTokenCount = getValueByPath(fromObject, [
|
|
9305
|
-
'totalTokenCount',
|
|
9306
|
-
]);
|
|
9307
|
-
if (fromTotalTokenCount != null) {
|
|
9308
|
-
setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
|
|
9309
|
-
}
|
|
9310
|
-
const fromPromptTokensDetails = getValueByPath(fromObject, [
|
|
9311
|
-
'promptTokensDetails',
|
|
9312
|
-
]);
|
|
9313
|
-
if (fromPromptTokensDetails != null) {
|
|
9314
|
-
let transformedList = fromPromptTokensDetails;
|
|
9315
|
-
if (Array.isArray(transformedList)) {
|
|
9316
|
-
transformedList = transformedList.map((item) => {
|
|
9317
|
-
return modalityTokenCountFromMldev(item);
|
|
9318
|
-
});
|
|
9319
|
-
}
|
|
9320
|
-
setValueByPath(toObject, ['promptTokensDetails'], transformedList);
|
|
9321
|
-
}
|
|
9322
|
-
const fromCacheTokensDetails = getValueByPath(fromObject, [
|
|
9323
|
-
'cacheTokensDetails',
|
|
9324
|
-
]);
|
|
9325
|
-
if (fromCacheTokensDetails != null) {
|
|
9326
|
-
let transformedList = fromCacheTokensDetails;
|
|
9327
|
-
if (Array.isArray(transformedList)) {
|
|
9328
|
-
transformedList = transformedList.map((item) => {
|
|
9329
|
-
return modalityTokenCountFromMldev(item);
|
|
9330
|
-
});
|
|
9331
|
-
}
|
|
9332
|
-
setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
|
|
9333
|
-
}
|
|
9334
|
-
const fromResponseTokensDetails = getValueByPath(fromObject, [
|
|
9335
|
-
'responseTokensDetails',
|
|
9336
|
-
]);
|
|
9337
|
-
if (fromResponseTokensDetails != null) {
|
|
9338
|
-
let transformedList = fromResponseTokensDetails;
|
|
9339
|
-
if (Array.isArray(transformedList)) {
|
|
9340
|
-
transformedList = transformedList.map((item) => {
|
|
9341
|
-
return modalityTokenCountFromMldev(item);
|
|
9342
|
-
});
|
|
9343
|
-
}
|
|
9344
|
-
setValueByPath(toObject, ['responseTokensDetails'], transformedList);
|
|
9345
|
-
}
|
|
9346
|
-
const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
|
|
9347
|
-
'toolUsePromptTokensDetails',
|
|
9348
|
-
]);
|
|
9349
|
-
if (fromToolUsePromptTokensDetails != null) {
|
|
9350
|
-
let transformedList = fromToolUsePromptTokensDetails;
|
|
9351
|
-
if (Array.isArray(transformedList)) {
|
|
9352
|
-
transformedList = transformedList.map((item) => {
|
|
9353
|
-
return modalityTokenCountFromMldev(item);
|
|
9354
|
-
});
|
|
9355
|
-
}
|
|
9356
|
-
setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
|
|
9612
|
+
if (fromModality != null) {
|
|
9613
|
+
setValueByPath(toObject, ['modality'], fromModality);
|
|
9614
|
+
}
|
|
9615
|
+
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
9616
|
+
if (fromTokenCount != null) {
|
|
9617
|
+
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
9357
9618
|
}
|
|
9358
9619
|
return toObject;
|
|
9359
9620
|
}
|
|
@@ -9449,14 +9710,6 @@ function usageMetadataFromVertex(fromObject) {
|
|
|
9449
9710
|
}
|
|
9450
9711
|
return toObject;
|
|
9451
9712
|
}
|
|
9452
|
-
function liveServerGoAwayFromMldev(fromObject) {
|
|
9453
|
-
const toObject = {};
|
|
9454
|
-
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
9455
|
-
if (fromTimeLeft != null) {
|
|
9456
|
-
setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
|
|
9457
|
-
}
|
|
9458
|
-
return toObject;
|
|
9459
|
-
}
|
|
9460
9713
|
function liveServerGoAwayFromVertex(fromObject) {
|
|
9461
9714
|
const toObject = {};
|
|
9462
9715
|
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
@@ -9465,24 +9718,6 @@ function liveServerGoAwayFromVertex(fromObject) {
|
|
|
9465
9718
|
}
|
|
9466
9719
|
return toObject;
|
|
9467
9720
|
}
|
|
9468
|
-
function liveServerSessionResumptionUpdateFromMldev(fromObject) {
|
|
9469
|
-
const toObject = {};
|
|
9470
|
-
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
9471
|
-
if (fromNewHandle != null) {
|
|
9472
|
-
setValueByPath(toObject, ['newHandle'], fromNewHandle);
|
|
9473
|
-
}
|
|
9474
|
-
const fromResumable = getValueByPath(fromObject, ['resumable']);
|
|
9475
|
-
if (fromResumable != null) {
|
|
9476
|
-
setValueByPath(toObject, ['resumable'], fromResumable);
|
|
9477
|
-
}
|
|
9478
|
-
const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
|
|
9479
|
-
'lastConsumedClientMessageIndex',
|
|
9480
|
-
]);
|
|
9481
|
-
if (fromLastConsumedClientMessageIndex != null) {
|
|
9482
|
-
setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
|
|
9483
|
-
}
|
|
9484
|
-
return toObject;
|
|
9485
|
-
}
|
|
9486
9721
|
function liveServerSessionResumptionUpdateFromVertex(fromObject) {
|
|
9487
9722
|
const toObject = {};
|
|
9488
9723
|
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
@@ -9501,48 +9736,6 @@ function liveServerSessionResumptionUpdateFromVertex(fromObject) {
|
|
|
9501
9736
|
}
|
|
9502
9737
|
return toObject;
|
|
9503
9738
|
}
|
|
9504
|
-
function liveServerMessageFromMldev(fromObject) {
|
|
9505
|
-
const toObject = {};
|
|
9506
|
-
const fromSetupComplete = getValueByPath(fromObject, [
|
|
9507
|
-
'setupComplete',
|
|
9508
|
-
]);
|
|
9509
|
-
if (fromSetupComplete != null) {
|
|
9510
|
-
setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
|
|
9511
|
-
}
|
|
9512
|
-
const fromServerContent = getValueByPath(fromObject, [
|
|
9513
|
-
'serverContent',
|
|
9514
|
-
]);
|
|
9515
|
-
if (fromServerContent != null) {
|
|
9516
|
-
setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
|
|
9517
|
-
}
|
|
9518
|
-
const fromToolCall = getValueByPath(fromObject, ['toolCall']);
|
|
9519
|
-
if (fromToolCall != null) {
|
|
9520
|
-
setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
|
|
9521
|
-
}
|
|
9522
|
-
const fromToolCallCancellation = getValueByPath(fromObject, [
|
|
9523
|
-
'toolCallCancellation',
|
|
9524
|
-
]);
|
|
9525
|
-
if (fromToolCallCancellation != null) {
|
|
9526
|
-
setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
|
|
9527
|
-
}
|
|
9528
|
-
const fromUsageMetadata = getValueByPath(fromObject, [
|
|
9529
|
-
'usageMetadata',
|
|
9530
|
-
]);
|
|
9531
|
-
if (fromUsageMetadata != null) {
|
|
9532
|
-
setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
|
|
9533
|
-
}
|
|
9534
|
-
const fromGoAway = getValueByPath(fromObject, ['goAway']);
|
|
9535
|
-
if (fromGoAway != null) {
|
|
9536
|
-
setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
|
|
9537
|
-
}
|
|
9538
|
-
const fromSessionResumptionUpdate = getValueByPath(fromObject, [
|
|
9539
|
-
'sessionResumptionUpdate',
|
|
9540
|
-
]);
|
|
9541
|
-
if (fromSessionResumptionUpdate != null) {
|
|
9542
|
-
setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
|
|
9543
|
-
}
|
|
9544
|
-
return toObject;
|
|
9545
|
-
}
|
|
9546
9739
|
function liveServerMessageFromVertex(fromObject) {
|
|
9547
9740
|
const toObject = {};
|
|
9548
9741
|
const fromSetupComplete = getValueByPath(fromObject, [
|
|
@@ -9585,172 +9778,6 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
9585
9778
|
}
|
|
9586
9779
|
return toObject;
|
|
9587
9780
|
}
|
|
9588
|
-
function liveMusicServerSetupCompleteFromMldev() {
|
|
9589
|
-
const toObject = {};
|
|
9590
|
-
return toObject;
|
|
9591
|
-
}
|
|
9592
|
-
function weightedPromptFromMldev(fromObject) {
|
|
9593
|
-
const toObject = {};
|
|
9594
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
9595
|
-
if (fromText != null) {
|
|
9596
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
9597
|
-
}
|
|
9598
|
-
const fromWeight = getValueByPath(fromObject, ['weight']);
|
|
9599
|
-
if (fromWeight != null) {
|
|
9600
|
-
setValueByPath(toObject, ['weight'], fromWeight);
|
|
9601
|
-
}
|
|
9602
|
-
return toObject;
|
|
9603
|
-
}
|
|
9604
|
-
function liveMusicClientContentFromMldev(fromObject) {
|
|
9605
|
-
const toObject = {};
|
|
9606
|
-
const fromWeightedPrompts = getValueByPath(fromObject, [
|
|
9607
|
-
'weightedPrompts',
|
|
9608
|
-
]);
|
|
9609
|
-
if (fromWeightedPrompts != null) {
|
|
9610
|
-
let transformedList = fromWeightedPrompts;
|
|
9611
|
-
if (Array.isArray(transformedList)) {
|
|
9612
|
-
transformedList = transformedList.map((item) => {
|
|
9613
|
-
return weightedPromptFromMldev(item);
|
|
9614
|
-
});
|
|
9615
|
-
}
|
|
9616
|
-
setValueByPath(toObject, ['weightedPrompts'], transformedList);
|
|
9617
|
-
}
|
|
9618
|
-
return toObject;
|
|
9619
|
-
}
|
|
9620
|
-
function liveMusicGenerationConfigFromMldev(fromObject) {
|
|
9621
|
-
const toObject = {};
|
|
9622
|
-
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
9623
|
-
if (fromTemperature != null) {
|
|
9624
|
-
setValueByPath(toObject, ['temperature'], fromTemperature);
|
|
9625
|
-
}
|
|
9626
|
-
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
9627
|
-
if (fromTopK != null) {
|
|
9628
|
-
setValueByPath(toObject, ['topK'], fromTopK);
|
|
9629
|
-
}
|
|
9630
|
-
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
9631
|
-
if (fromSeed != null) {
|
|
9632
|
-
setValueByPath(toObject, ['seed'], fromSeed);
|
|
9633
|
-
}
|
|
9634
|
-
const fromGuidance = getValueByPath(fromObject, ['guidance']);
|
|
9635
|
-
if (fromGuidance != null) {
|
|
9636
|
-
setValueByPath(toObject, ['guidance'], fromGuidance);
|
|
9637
|
-
}
|
|
9638
|
-
const fromBpm = getValueByPath(fromObject, ['bpm']);
|
|
9639
|
-
if (fromBpm != null) {
|
|
9640
|
-
setValueByPath(toObject, ['bpm'], fromBpm);
|
|
9641
|
-
}
|
|
9642
|
-
const fromDensity = getValueByPath(fromObject, ['density']);
|
|
9643
|
-
if (fromDensity != null) {
|
|
9644
|
-
setValueByPath(toObject, ['density'], fromDensity);
|
|
9645
|
-
}
|
|
9646
|
-
const fromBrightness = getValueByPath(fromObject, ['brightness']);
|
|
9647
|
-
if (fromBrightness != null) {
|
|
9648
|
-
setValueByPath(toObject, ['brightness'], fromBrightness);
|
|
9649
|
-
}
|
|
9650
|
-
const fromScale = getValueByPath(fromObject, ['scale']);
|
|
9651
|
-
if (fromScale != null) {
|
|
9652
|
-
setValueByPath(toObject, ['scale'], fromScale);
|
|
9653
|
-
}
|
|
9654
|
-
const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
|
|
9655
|
-
if (fromMuteBass != null) {
|
|
9656
|
-
setValueByPath(toObject, ['muteBass'], fromMuteBass);
|
|
9657
|
-
}
|
|
9658
|
-
const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
|
|
9659
|
-
if (fromMuteDrums != null) {
|
|
9660
|
-
setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
|
|
9661
|
-
}
|
|
9662
|
-
const fromOnlyBassAndDrums = getValueByPath(fromObject, [
|
|
9663
|
-
'onlyBassAndDrums',
|
|
9664
|
-
]);
|
|
9665
|
-
if (fromOnlyBassAndDrums != null) {
|
|
9666
|
-
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
9667
|
-
}
|
|
9668
|
-
return toObject;
|
|
9669
|
-
}
|
|
9670
|
-
function liveMusicSourceMetadataFromMldev(fromObject) {
|
|
9671
|
-
const toObject = {};
|
|
9672
|
-
const fromClientContent = getValueByPath(fromObject, [
|
|
9673
|
-
'clientContent',
|
|
9674
|
-
]);
|
|
9675
|
-
if (fromClientContent != null) {
|
|
9676
|
-
setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
|
|
9677
|
-
}
|
|
9678
|
-
const fromMusicGenerationConfig = getValueByPath(fromObject, [
|
|
9679
|
-
'musicGenerationConfig',
|
|
9680
|
-
]);
|
|
9681
|
-
if (fromMusicGenerationConfig != null) {
|
|
9682
|
-
setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
|
|
9683
|
-
}
|
|
9684
|
-
return toObject;
|
|
9685
|
-
}
|
|
9686
|
-
function audioChunkFromMldev(fromObject) {
|
|
9687
|
-
const toObject = {};
|
|
9688
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
9689
|
-
if (fromData != null) {
|
|
9690
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
9691
|
-
}
|
|
9692
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9693
|
-
if (fromMimeType != null) {
|
|
9694
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9695
|
-
}
|
|
9696
|
-
const fromSourceMetadata = getValueByPath(fromObject, [
|
|
9697
|
-
'sourceMetadata',
|
|
9698
|
-
]);
|
|
9699
|
-
if (fromSourceMetadata != null) {
|
|
9700
|
-
setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
|
|
9701
|
-
}
|
|
9702
|
-
return toObject;
|
|
9703
|
-
}
|
|
9704
|
-
function liveMusicServerContentFromMldev(fromObject) {
|
|
9705
|
-
const toObject = {};
|
|
9706
|
-
const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
|
|
9707
|
-
if (fromAudioChunks != null) {
|
|
9708
|
-
let transformedList = fromAudioChunks;
|
|
9709
|
-
if (Array.isArray(transformedList)) {
|
|
9710
|
-
transformedList = transformedList.map((item) => {
|
|
9711
|
-
return audioChunkFromMldev(item);
|
|
9712
|
-
});
|
|
9713
|
-
}
|
|
9714
|
-
setValueByPath(toObject, ['audioChunks'], transformedList);
|
|
9715
|
-
}
|
|
9716
|
-
return toObject;
|
|
9717
|
-
}
|
|
9718
|
-
function liveMusicFilteredPromptFromMldev(fromObject) {
|
|
9719
|
-
const toObject = {};
|
|
9720
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
9721
|
-
if (fromText != null) {
|
|
9722
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
9723
|
-
}
|
|
9724
|
-
const fromFilteredReason = getValueByPath(fromObject, [
|
|
9725
|
-
'filteredReason',
|
|
9726
|
-
]);
|
|
9727
|
-
if (fromFilteredReason != null) {
|
|
9728
|
-
setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
|
|
9729
|
-
}
|
|
9730
|
-
return toObject;
|
|
9731
|
-
}
|
|
9732
|
-
function liveMusicServerMessageFromMldev(fromObject) {
|
|
9733
|
-
const toObject = {};
|
|
9734
|
-
const fromSetupComplete = getValueByPath(fromObject, [
|
|
9735
|
-
'setupComplete',
|
|
9736
|
-
]);
|
|
9737
|
-
if (fromSetupComplete != null) {
|
|
9738
|
-
setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
|
|
9739
|
-
}
|
|
9740
|
-
const fromServerContent = getValueByPath(fromObject, [
|
|
9741
|
-
'serverContent',
|
|
9742
|
-
]);
|
|
9743
|
-
if (fromServerContent != null) {
|
|
9744
|
-
setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
|
|
9745
|
-
}
|
|
9746
|
-
const fromFilteredPrompt = getValueByPath(fromObject, [
|
|
9747
|
-
'filteredPrompt',
|
|
9748
|
-
]);
|
|
9749
|
-
if (fromFilteredPrompt != null) {
|
|
9750
|
-
setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
|
|
9751
|
-
}
|
|
9752
|
-
return toObject;
|
|
9753
|
-
}
|
|
9754
9781
|
|
|
9755
9782
|
/**
|
|
9756
9783
|
* @license
|
|
@@ -11831,6 +11858,10 @@ function editImageConfigToVertex(fromObject, parentObject) {
|
|
|
11831
11858
|
if (parentObject !== undefined && fromOutputCompressionQuality != null) {
|
|
11832
11859
|
setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
11833
11860
|
}
|
|
11861
|
+
const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
|
|
11862
|
+
if (parentObject !== undefined && fromAddWatermark != null) {
|
|
11863
|
+
setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
|
|
11864
|
+
}
|
|
11834
11865
|
const fromEditMode = getValueByPath(fromObject, ['editMode']);
|
|
11835
11866
|
if (parentObject !== undefined && fromEditMode != null) {
|
|
11836
11867
|
setValueByPath(parentObject, ['parameters', 'editMode'], fromEditMode);
|
|
@@ -12405,6 +12436,12 @@ function candidateFromMldev(fromObject) {
|
|
|
12405
12436
|
}
|
|
12406
12437
|
function generateContentResponseFromMldev(fromObject) {
|
|
12407
12438
|
const toObject = {};
|
|
12439
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12440
|
+
'sdkHttpResponse',
|
|
12441
|
+
]);
|
|
12442
|
+
if (fromSdkHttpResponse != null) {
|
|
12443
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
12444
|
+
}
|
|
12408
12445
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
12409
12446
|
if (fromCandidates != null) {
|
|
12410
12447
|
let transformedList = fromCandidates;
|
|
@@ -12931,6 +12968,12 @@ function candidateFromVertex(fromObject) {
|
|
|
12931
12968
|
}
|
|
12932
12969
|
function generateContentResponseFromVertex(fromObject) {
|
|
12933
12970
|
const toObject = {};
|
|
12971
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12972
|
+
'sdkHttpResponse',
|
|
12973
|
+
]);
|
|
12974
|
+
if (fromSdkHttpResponse != null) {
|
|
12975
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
12976
|
+
}
|
|
12934
12977
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
12935
12978
|
if (fromCandidates != null) {
|
|
12936
12979
|
let transformedList = fromCandidates;
|
|
@@ -13365,6 +13408,9 @@ function generateVideosOperationFromVertex$1(fromObject) {
|
|
|
13365
13408
|
*/
|
|
13366
13409
|
// TODO: b/416041229 - Determine how to retrieve the MCP package version.
|
|
13367
13410
|
const MCP_LABEL = 'mcp_used/unknown';
|
|
13411
|
+
// Whether MCP tool usage is detected from mcpToTool. This is used for
|
|
13412
|
+
// telemetry.
|
|
13413
|
+
let hasMcpToolUsageFromMcpToTool = false;
|
|
13368
13414
|
// Checks whether the list of tools contains any MCP tools.
|
|
13369
13415
|
function hasMcpToolUsage(tools) {
|
|
13370
13416
|
for (const tool of tools) {
|
|
@@ -13375,7 +13421,7 @@ function hasMcpToolUsage(tools) {
|
|
|
13375
13421
|
return true;
|
|
13376
13422
|
}
|
|
13377
13423
|
}
|
|
13378
|
-
return
|
|
13424
|
+
return hasMcpToolUsageFromMcpToTool;
|
|
13379
13425
|
}
|
|
13380
13426
|
// Sets the MCP version label in the Google API client header.
|
|
13381
13427
|
function setMcpUsageHeader(headers) {
|
|
@@ -13532,6 +13578,8 @@ function isMcpClient(client) {
|
|
|
13532
13578
|
* versions.
|
|
13533
13579
|
*/
|
|
13534
13580
|
function mcpToTool(...args) {
|
|
13581
|
+
// Set MCP usage for telemetry.
|
|
13582
|
+
hasMcpToolUsageFromMcpToTool = true;
|
|
13535
13583
|
if (args.length === 0) {
|
|
13536
13584
|
throw new Error('No MCP clients provided');
|
|
13537
13585
|
}
|
|
@@ -13877,6 +13925,12 @@ class Live {
|
|
|
13877
13925
|
*/
|
|
13878
13926
|
async connect(params) {
|
|
13879
13927
|
var _a, _b, _c, _d, _e, _f;
|
|
13928
|
+
// TODO: b/404946746 - Support per request HTTP options.
|
|
13929
|
+
if (params.config && params.config.httpOptions) {
|
|
13930
|
+
throw new Error('The Live module does not support httpOptions at request-level in' +
|
|
13931
|
+
' LiveConnectConfig yet. Please use the client-level httpOptions' +
|
|
13932
|
+
' configuration instead.');
|
|
13933
|
+
}
|
|
13880
13934
|
const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();
|
|
13881
13935
|
const apiVersion = this.apiClient.getApiVersion();
|
|
13882
13936
|
let url;
|
|
@@ -14722,7 +14776,13 @@ class Models extends BaseModule {
|
|
|
14722
14776
|
abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
|
|
14723
14777
|
})
|
|
14724
14778
|
.then((httpResponse) => {
|
|
14725
|
-
return httpResponse.json()
|
|
14779
|
+
return httpResponse.json().then((jsonResponse) => {
|
|
14780
|
+
const response = jsonResponse;
|
|
14781
|
+
response.sdkHttpResponse = {
|
|
14782
|
+
headers: httpResponse.headers,
|
|
14783
|
+
};
|
|
14784
|
+
return response;
|
|
14785
|
+
});
|
|
14726
14786
|
});
|
|
14727
14787
|
return response.then((apiResponse) => {
|
|
14728
14788
|
const resp = generateContentResponseFromVertex(apiResponse);
|
|
@@ -14748,7 +14808,13 @@ class Models extends BaseModule {
|
|
|
14748
14808
|
abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
|
|
14749
14809
|
})
|
|
14750
14810
|
.then((httpResponse) => {
|
|
14751
|
-
return httpResponse.json()
|
|
14811
|
+
return httpResponse.json().then((jsonResponse) => {
|
|
14812
|
+
const response = jsonResponse;
|
|
14813
|
+
response.sdkHttpResponse = {
|
|
14814
|
+
headers: httpResponse.headers,
|
|
14815
|
+
};
|
|
14816
|
+
return response;
|
|
14817
|
+
});
|
|
14752
14818
|
});
|
|
14753
14819
|
return response.then((apiResponse) => {
|
|
14754
14820
|
const resp = generateContentResponseFromMldev(apiResponse);
|
|
@@ -14788,6 +14854,9 @@ class Models extends BaseModule {
|
|
|
14788
14854
|
_d = false;
|
|
14789
14855
|
const chunk = _c;
|
|
14790
14856
|
const resp = generateContentResponseFromVertex((yield __await(chunk.json())));
|
|
14857
|
+
resp['sdkHttpResponse'] = {
|
|
14858
|
+
headers: chunk.headers,
|
|
14859
|
+
};
|
|
14791
14860
|
const typedResp = new GenerateContentResponse();
|
|
14792
14861
|
Object.assign(typedResp, resp);
|
|
14793
14862
|
yield yield __await(typedResp);
|
|
@@ -14828,6 +14897,9 @@ class Models extends BaseModule {
|
|
|
14828
14897
|
_d = false;
|
|
14829
14898
|
const chunk = _c;
|
|
14830
14899
|
const resp = generateContentResponseFromMldev((yield __await(chunk.json())));
|
|
14900
|
+
resp['sdkHttpResponse'] = {
|
|
14901
|
+
headers: chunk.headers,
|
|
14902
|
+
};
|
|
14831
14903
|
const typedResp = new GenerateContentResponse();
|
|
14832
14904
|
Object.assign(typedResp, resp);
|
|
14833
14905
|
yield yield __await(typedResp);
|
|
@@ -17114,7 +17186,7 @@ function listTuningJobsResponseFromMldev(fromObject) {
|
|
|
17114
17186
|
}
|
|
17115
17187
|
return toObject;
|
|
17116
17188
|
}
|
|
17117
|
-
function
|
|
17189
|
+
function tuningOperationFromMldev(fromObject) {
|
|
17118
17190
|
const toObject = {};
|
|
17119
17191
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
17120
17192
|
if (fromName != null) {
|
|
@@ -17541,7 +17613,7 @@ class Tunings extends BaseModule {
|
|
|
17541
17613
|
return httpResponse.json();
|
|
17542
17614
|
});
|
|
17543
17615
|
return response.then((apiResponse) => {
|
|
17544
|
-
const resp =
|
|
17616
|
+
const resp = tuningOperationFromMldev(apiResponse);
|
|
17545
17617
|
return resp;
|
|
17546
17618
|
});
|
|
17547
17619
|
}
|