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