@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/node/index.cjs
CHANGED
|
@@ -2439,6 +2439,9 @@ function tBatchJobSource(apiClient, src) {
|
|
|
2439
2439
|
throw new Error(`Unsupported source: ${src}`);
|
|
2440
2440
|
}
|
|
2441
2441
|
function tBatchJobDestination(dest) {
|
|
2442
|
+
if (typeof dest !== 'string') {
|
|
2443
|
+
return dest;
|
|
2444
|
+
}
|
|
2442
2445
|
const destString = dest;
|
|
2443
2446
|
if (destString.startsWith('gs://')) {
|
|
2444
2447
|
return {
|
|
@@ -3424,10 +3427,6 @@ function deleteBatchJobParametersToVertex(apiClient, fromObject) {
|
|
|
3424
3427
|
}
|
|
3425
3428
|
return toObject;
|
|
3426
3429
|
}
|
|
3427
|
-
function jobErrorFromMldev() {
|
|
3428
|
-
const toObject = {};
|
|
3429
|
-
return toObject;
|
|
3430
|
-
}
|
|
3431
3430
|
function videoMetadataFromMldev$2(fromObject) {
|
|
3432
3431
|
const toObject = {};
|
|
3433
3432
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
@@ -3632,6 +3631,12 @@ function candidateFromMldev$1(fromObject) {
|
|
|
3632
3631
|
}
|
|
3633
3632
|
function generateContentResponseFromMldev$1(fromObject) {
|
|
3634
3633
|
const toObject = {};
|
|
3634
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
3635
|
+
'sdkHttpResponse',
|
|
3636
|
+
]);
|
|
3637
|
+
if (fromSdkHttpResponse != null) {
|
|
3638
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
3639
|
+
}
|
|
3635
3640
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
3636
3641
|
if (fromCandidates != null) {
|
|
3637
3642
|
let transformedList = fromCandidates;
|
|
@@ -3660,6 +3665,22 @@ function generateContentResponseFromMldev$1(fromObject) {
|
|
|
3660
3665
|
}
|
|
3661
3666
|
return toObject;
|
|
3662
3667
|
}
|
|
3668
|
+
function jobErrorFromMldev(fromObject) {
|
|
3669
|
+
const toObject = {};
|
|
3670
|
+
const fromDetails = getValueByPath(fromObject, ['details']);
|
|
3671
|
+
if (fromDetails != null) {
|
|
3672
|
+
setValueByPath(toObject, ['details'], fromDetails);
|
|
3673
|
+
}
|
|
3674
|
+
const fromCode = getValueByPath(fromObject, ['code']);
|
|
3675
|
+
if (fromCode != null) {
|
|
3676
|
+
setValueByPath(toObject, ['code'], fromCode);
|
|
3677
|
+
}
|
|
3678
|
+
const fromMessage = getValueByPath(fromObject, ['message']);
|
|
3679
|
+
if (fromMessage != null) {
|
|
3680
|
+
setValueByPath(toObject, ['message'], fromMessage);
|
|
3681
|
+
}
|
|
3682
|
+
return toObject;
|
|
3683
|
+
}
|
|
3663
3684
|
function inlinedResponseFromMldev(fromObject) {
|
|
3664
3685
|
const toObject = {};
|
|
3665
3686
|
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
@@ -3668,7 +3689,7 @@ function inlinedResponseFromMldev(fromObject) {
|
|
|
3668
3689
|
}
|
|
3669
3690
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
3670
3691
|
if (fromError != null) {
|
|
3671
|
-
setValueByPath(toObject, ['error'], jobErrorFromMldev());
|
|
3692
|
+
setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
|
|
3672
3693
|
}
|
|
3673
3694
|
return toObject;
|
|
3674
3695
|
}
|
|
@@ -3773,7 +3794,7 @@ function deleteResourceJobFromMldev(fromObject) {
|
|
|
3773
3794
|
}
|
|
3774
3795
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
3775
3796
|
if (fromError != null) {
|
|
3776
|
-
setValueByPath(toObject, ['error'], jobErrorFromMldev());
|
|
3797
|
+
setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
|
|
3777
3798
|
}
|
|
3778
3799
|
return toObject;
|
|
3779
3800
|
}
|
|
@@ -6539,8 +6560,14 @@ function listFilesResponseFromMldev(fromObject) {
|
|
|
6539
6560
|
}
|
|
6540
6561
|
return toObject;
|
|
6541
6562
|
}
|
|
6542
|
-
function createFileResponseFromMldev() {
|
|
6563
|
+
function createFileResponseFromMldev(fromObject) {
|
|
6543
6564
|
const toObject = {};
|
|
6565
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
6566
|
+
'sdkHttpResponse',
|
|
6567
|
+
]);
|
|
6568
|
+
if (fromSdkHttpResponse != null) {
|
|
6569
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
6570
|
+
}
|
|
6544
6571
|
return toObject;
|
|
6545
6572
|
}
|
|
6546
6573
|
function deleteFileResponseFromMldev() {
|
|
@@ -6713,8 +6740,8 @@ class Files extends BaseModule {
|
|
|
6713
6740
|
.then((httpResponse) => {
|
|
6714
6741
|
return httpResponse.json();
|
|
6715
6742
|
});
|
|
6716
|
-
return response.then(() => {
|
|
6717
|
-
const resp = createFileResponseFromMldev();
|
|
6743
|
+
return response.then((apiResponse) => {
|
|
6744
|
+
const resp = createFileResponseFromMldev(apiResponse);
|
|
6718
6745
|
const typedResp = new CreateFileResponse();
|
|
6719
6746
|
Object.assign(typedResp, resp);
|
|
6720
6747
|
return typedResp;
|
|
@@ -6832,14 +6859,6 @@ function prebuiltVoiceConfigToMldev$2(fromObject) {
|
|
|
6832
6859
|
}
|
|
6833
6860
|
return toObject;
|
|
6834
6861
|
}
|
|
6835
|
-
function prebuiltVoiceConfigToVertex$1(fromObject) {
|
|
6836
|
-
const toObject = {};
|
|
6837
|
-
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
6838
|
-
if (fromVoiceName != null) {
|
|
6839
|
-
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
6840
|
-
}
|
|
6841
|
-
return toObject;
|
|
6842
|
-
}
|
|
6843
6862
|
function voiceConfigToMldev$2(fromObject) {
|
|
6844
6863
|
const toObject = {};
|
|
6845
6864
|
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
@@ -6850,16 +6869,6 @@ function voiceConfigToMldev$2(fromObject) {
|
|
|
6850
6869
|
}
|
|
6851
6870
|
return toObject;
|
|
6852
6871
|
}
|
|
6853
|
-
function voiceConfigToVertex$1(fromObject) {
|
|
6854
|
-
const toObject = {};
|
|
6855
|
-
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
6856
|
-
'prebuiltVoiceConfig',
|
|
6857
|
-
]);
|
|
6858
|
-
if (fromPrebuiltVoiceConfig != null) {
|
|
6859
|
-
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
|
|
6860
|
-
}
|
|
6861
|
-
return toObject;
|
|
6862
|
-
}
|
|
6863
6872
|
function speakerVoiceConfigToMldev$2(fromObject) {
|
|
6864
6873
|
const toObject = {};
|
|
6865
6874
|
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
@@ -6906,21 +6915,6 @@ function speechConfigToMldev$2(fromObject) {
|
|
|
6906
6915
|
}
|
|
6907
6916
|
return toObject;
|
|
6908
6917
|
}
|
|
6909
|
-
function speechConfigToVertex$1(fromObject) {
|
|
6910
|
-
const toObject = {};
|
|
6911
|
-
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
6912
|
-
if (fromVoiceConfig != null) {
|
|
6913
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
6914
|
-
}
|
|
6915
|
-
if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
|
|
6916
|
-
throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
|
|
6917
|
-
}
|
|
6918
|
-
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
6919
|
-
if (fromLanguageCode != null) {
|
|
6920
|
-
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
6921
|
-
}
|
|
6922
|
-
return toObject;
|
|
6923
|
-
}
|
|
6924
6918
|
function videoMetadataToMldev$2(fromObject) {
|
|
6925
6919
|
const toObject = {};
|
|
6926
6920
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
@@ -6937,22 +6931,6 @@ function videoMetadataToMldev$2(fromObject) {
|
|
|
6937
6931
|
}
|
|
6938
6932
|
return toObject;
|
|
6939
6933
|
}
|
|
6940
|
-
function videoMetadataToVertex$1(fromObject) {
|
|
6941
|
-
const toObject = {};
|
|
6942
|
-
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
6943
|
-
if (fromFps != null) {
|
|
6944
|
-
setValueByPath(toObject, ['fps'], fromFps);
|
|
6945
|
-
}
|
|
6946
|
-
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
6947
|
-
if (fromEndOffset != null) {
|
|
6948
|
-
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
6949
|
-
}
|
|
6950
|
-
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
6951
|
-
if (fromStartOffset != null) {
|
|
6952
|
-
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
6953
|
-
}
|
|
6954
|
-
return toObject;
|
|
6955
|
-
}
|
|
6956
6934
|
function blobToMldev$2(fromObject) {
|
|
6957
6935
|
const toObject = {};
|
|
6958
6936
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
@@ -6968,22 +6946,6 @@ function blobToMldev$2(fromObject) {
|
|
|
6968
6946
|
}
|
|
6969
6947
|
return toObject;
|
|
6970
6948
|
}
|
|
6971
|
-
function blobToVertex$1(fromObject) {
|
|
6972
|
-
const toObject = {};
|
|
6973
|
-
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
6974
|
-
if (fromDisplayName != null) {
|
|
6975
|
-
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
6976
|
-
}
|
|
6977
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
6978
|
-
if (fromData != null) {
|
|
6979
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
6980
|
-
}
|
|
6981
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6982
|
-
if (fromMimeType != null) {
|
|
6983
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6984
|
-
}
|
|
6985
|
-
return toObject;
|
|
6986
|
-
}
|
|
6987
6949
|
function fileDataToMldev$2(fromObject) {
|
|
6988
6950
|
const toObject = {};
|
|
6989
6951
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
@@ -6999,22 +6961,6 @@ function fileDataToMldev$2(fromObject) {
|
|
|
6999
6961
|
}
|
|
7000
6962
|
return toObject;
|
|
7001
6963
|
}
|
|
7002
|
-
function fileDataToVertex$1(fromObject) {
|
|
7003
|
-
const toObject = {};
|
|
7004
|
-
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
7005
|
-
if (fromDisplayName != null) {
|
|
7006
|
-
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
7007
|
-
}
|
|
7008
|
-
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
7009
|
-
if (fromFileUri != null) {
|
|
7010
|
-
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
7011
|
-
}
|
|
7012
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
7013
|
-
if (fromMimeType != null) {
|
|
7014
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
7015
|
-
}
|
|
7016
|
-
return toObject;
|
|
7017
|
-
}
|
|
7018
6964
|
function partToMldev$2(fromObject) {
|
|
7019
6965
|
const toObject = {};
|
|
7020
6966
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7069,60 +7015,6 @@ function partToMldev$2(fromObject) {
|
|
|
7069
7015
|
}
|
|
7070
7016
|
return toObject;
|
|
7071
7017
|
}
|
|
7072
|
-
function partToVertex$1(fromObject) {
|
|
7073
|
-
const toObject = {};
|
|
7074
|
-
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
7075
|
-
'videoMetadata',
|
|
7076
|
-
]);
|
|
7077
|
-
if (fromVideoMetadata != null) {
|
|
7078
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
|
|
7079
|
-
}
|
|
7080
|
-
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
7081
|
-
if (fromThought != null) {
|
|
7082
|
-
setValueByPath(toObject, ['thought'], fromThought);
|
|
7083
|
-
}
|
|
7084
|
-
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
7085
|
-
if (fromInlineData != null) {
|
|
7086
|
-
setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
|
|
7087
|
-
}
|
|
7088
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7089
|
-
if (fromFileData != null) {
|
|
7090
|
-
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
|
|
7091
|
-
}
|
|
7092
|
-
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
7093
|
-
'thoughtSignature',
|
|
7094
|
-
]);
|
|
7095
|
-
if (fromThoughtSignature != null) {
|
|
7096
|
-
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
7097
|
-
}
|
|
7098
|
-
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7099
|
-
'codeExecutionResult',
|
|
7100
|
-
]);
|
|
7101
|
-
if (fromCodeExecutionResult != null) {
|
|
7102
|
-
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
7103
|
-
}
|
|
7104
|
-
const fromExecutableCode = getValueByPath(fromObject, [
|
|
7105
|
-
'executableCode',
|
|
7106
|
-
]);
|
|
7107
|
-
if (fromExecutableCode != null) {
|
|
7108
|
-
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7109
|
-
}
|
|
7110
|
-
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7111
|
-
if (fromFunctionCall != null) {
|
|
7112
|
-
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
7113
|
-
}
|
|
7114
|
-
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
7115
|
-
'functionResponse',
|
|
7116
|
-
]);
|
|
7117
|
-
if (fromFunctionResponse != null) {
|
|
7118
|
-
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
7119
|
-
}
|
|
7120
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
7121
|
-
if (fromText != null) {
|
|
7122
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
7123
|
-
}
|
|
7124
|
-
return toObject;
|
|
7125
|
-
}
|
|
7126
7018
|
function contentToMldev$2(fromObject) {
|
|
7127
7019
|
const toObject = {};
|
|
7128
7020
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -7141,24 +7033,6 @@ function contentToMldev$2(fromObject) {
|
|
|
7141
7033
|
}
|
|
7142
7034
|
return toObject;
|
|
7143
7035
|
}
|
|
7144
|
-
function contentToVertex$1(fromObject) {
|
|
7145
|
-
const toObject = {};
|
|
7146
|
-
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7147
|
-
if (fromParts != null) {
|
|
7148
|
-
let transformedList = fromParts;
|
|
7149
|
-
if (Array.isArray(transformedList)) {
|
|
7150
|
-
transformedList = transformedList.map((item) => {
|
|
7151
|
-
return partToVertex$1(item);
|
|
7152
|
-
});
|
|
7153
|
-
}
|
|
7154
|
-
setValueByPath(toObject, ['parts'], transformedList);
|
|
7155
|
-
}
|
|
7156
|
-
const fromRole = getValueByPath(fromObject, ['role']);
|
|
7157
|
-
if (fromRole != null) {
|
|
7158
|
-
setValueByPath(toObject, ['role'], fromRole);
|
|
7159
|
-
}
|
|
7160
|
-
return toObject;
|
|
7161
|
-
}
|
|
7162
7036
|
function functionDeclarationToMldev$2(fromObject) {
|
|
7163
7037
|
const toObject = {};
|
|
7164
7038
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
@@ -7195,41 +7069,6 @@ function functionDeclarationToMldev$2(fromObject) {
|
|
|
7195
7069
|
}
|
|
7196
7070
|
return toObject;
|
|
7197
7071
|
}
|
|
7198
|
-
function functionDeclarationToVertex$1(fromObject) {
|
|
7199
|
-
const toObject = {};
|
|
7200
|
-
if (getValueByPath(fromObject, ['behavior']) !== undefined) {
|
|
7201
|
-
throw new Error('behavior parameter is not supported in Vertex AI.');
|
|
7202
|
-
}
|
|
7203
|
-
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7204
|
-
if (fromDescription != null) {
|
|
7205
|
-
setValueByPath(toObject, ['description'], fromDescription);
|
|
7206
|
-
}
|
|
7207
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
7208
|
-
if (fromName != null) {
|
|
7209
|
-
setValueByPath(toObject, ['name'], fromName);
|
|
7210
|
-
}
|
|
7211
|
-
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
7212
|
-
if (fromParameters != null) {
|
|
7213
|
-
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
7214
|
-
}
|
|
7215
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
7216
|
-
'parametersJsonSchema',
|
|
7217
|
-
]);
|
|
7218
|
-
if (fromParametersJsonSchema != null) {
|
|
7219
|
-
setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
|
|
7220
|
-
}
|
|
7221
|
-
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
7222
|
-
if (fromResponse != null) {
|
|
7223
|
-
setValueByPath(toObject, ['response'], fromResponse);
|
|
7224
|
-
}
|
|
7225
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
7226
|
-
'responseJsonSchema',
|
|
7227
|
-
]);
|
|
7228
|
-
if (fromResponseJsonSchema != null) {
|
|
7229
|
-
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
7230
|
-
}
|
|
7231
|
-
return toObject;
|
|
7232
|
-
}
|
|
7233
7072
|
function intervalToMldev$2(fromObject) {
|
|
7234
7073
|
const toObject = {};
|
|
7235
7074
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
@@ -7242,18 +7081,6 @@ function intervalToMldev$2(fromObject) {
|
|
|
7242
7081
|
}
|
|
7243
7082
|
return toObject;
|
|
7244
7083
|
}
|
|
7245
|
-
function intervalToVertex$1(fromObject) {
|
|
7246
|
-
const toObject = {};
|
|
7247
|
-
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7248
|
-
if (fromStartTime != null) {
|
|
7249
|
-
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
7250
|
-
}
|
|
7251
|
-
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
7252
|
-
if (fromEndTime != null) {
|
|
7253
|
-
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
7254
|
-
}
|
|
7255
|
-
return toObject;
|
|
7256
|
-
}
|
|
7257
7084
|
function googleSearchToMldev$2(fromObject) {
|
|
7258
7085
|
const toObject = {};
|
|
7259
7086
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
@@ -7264,16 +7091,6 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
7264
7091
|
}
|
|
7265
7092
|
return toObject;
|
|
7266
7093
|
}
|
|
7267
|
-
function googleSearchToVertex$1(fromObject) {
|
|
7268
|
-
const toObject = {};
|
|
7269
|
-
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7270
|
-
'timeRangeFilter',
|
|
7271
|
-
]);
|
|
7272
|
-
if (fromTimeRangeFilter != null) {
|
|
7273
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
|
|
7274
|
-
}
|
|
7275
|
-
return toObject;
|
|
7276
|
-
}
|
|
7277
7094
|
function dynamicRetrievalConfigToMldev$2(fromObject) {
|
|
7278
7095
|
const toObject = {};
|
|
7279
7096
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
@@ -7288,20 +7105,6 @@ function dynamicRetrievalConfigToMldev$2(fromObject) {
|
|
|
7288
7105
|
}
|
|
7289
7106
|
return toObject;
|
|
7290
7107
|
}
|
|
7291
|
-
function dynamicRetrievalConfigToVertex$1(fromObject) {
|
|
7292
|
-
const toObject = {};
|
|
7293
|
-
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
7294
|
-
if (fromMode != null) {
|
|
7295
|
-
setValueByPath(toObject, ['mode'], fromMode);
|
|
7296
|
-
}
|
|
7297
|
-
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
7298
|
-
'dynamicThreshold',
|
|
7299
|
-
]);
|
|
7300
|
-
if (fromDynamicThreshold != null) {
|
|
7301
|
-
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
7302
|
-
}
|
|
7303
|
-
return toObject;
|
|
7304
|
-
}
|
|
7305
7108
|
function googleSearchRetrievalToMldev$2(fromObject) {
|
|
7306
7109
|
const toObject = {};
|
|
7307
7110
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -7312,73 +7115,7 @@ function googleSearchRetrievalToMldev$2(fromObject) {
|
|
|
7312
7115
|
}
|
|
7313
7116
|
return toObject;
|
|
7314
7117
|
}
|
|
7315
|
-
function
|
|
7316
|
-
const toObject = {};
|
|
7317
|
-
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
7318
|
-
'dynamicRetrievalConfig',
|
|
7319
|
-
]);
|
|
7320
|
-
if (fromDynamicRetrievalConfig != null) {
|
|
7321
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
|
|
7322
|
-
}
|
|
7323
|
-
return toObject;
|
|
7324
|
-
}
|
|
7325
|
-
function enterpriseWebSearchToVertex$1() {
|
|
7326
|
-
const toObject = {};
|
|
7327
|
-
return toObject;
|
|
7328
|
-
}
|
|
7329
|
-
function apiKeyConfigToVertex$1(fromObject) {
|
|
7330
|
-
const toObject = {};
|
|
7331
|
-
const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
|
|
7332
|
-
if (fromApiKeyString != null) {
|
|
7333
|
-
setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
|
|
7334
|
-
}
|
|
7335
|
-
return toObject;
|
|
7336
|
-
}
|
|
7337
|
-
function authConfigToVertex$1(fromObject) {
|
|
7338
|
-
const toObject = {};
|
|
7339
|
-
const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
|
|
7340
|
-
if (fromApiKeyConfig != null) {
|
|
7341
|
-
setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
|
|
7342
|
-
}
|
|
7343
|
-
const fromAuthType = getValueByPath(fromObject, ['authType']);
|
|
7344
|
-
if (fromAuthType != null) {
|
|
7345
|
-
setValueByPath(toObject, ['authType'], fromAuthType);
|
|
7346
|
-
}
|
|
7347
|
-
const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
|
|
7348
|
-
'googleServiceAccountConfig',
|
|
7349
|
-
]);
|
|
7350
|
-
if (fromGoogleServiceAccountConfig != null) {
|
|
7351
|
-
setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
|
|
7352
|
-
}
|
|
7353
|
-
const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
|
|
7354
|
-
'httpBasicAuthConfig',
|
|
7355
|
-
]);
|
|
7356
|
-
if (fromHttpBasicAuthConfig != null) {
|
|
7357
|
-
setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
|
|
7358
|
-
}
|
|
7359
|
-
const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
|
|
7360
|
-
if (fromOauthConfig != null) {
|
|
7361
|
-
setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
|
|
7362
|
-
}
|
|
7363
|
-
const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
|
|
7364
|
-
if (fromOidcConfig != null) {
|
|
7365
|
-
setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
|
|
7366
|
-
}
|
|
7367
|
-
return toObject;
|
|
7368
|
-
}
|
|
7369
|
-
function googleMapsToVertex$1(fromObject) {
|
|
7370
|
-
const toObject = {};
|
|
7371
|
-
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7372
|
-
if (fromAuthConfig != null) {
|
|
7373
|
-
setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
|
|
7374
|
-
}
|
|
7375
|
-
return toObject;
|
|
7376
|
-
}
|
|
7377
|
-
function urlContextToMldev$2() {
|
|
7378
|
-
const toObject = {};
|
|
7379
|
-
return toObject;
|
|
7380
|
-
}
|
|
7381
|
-
function urlContextToVertex$1() {
|
|
7118
|
+
function urlContextToMldev$2() {
|
|
7382
7119
|
const toObject = {};
|
|
7383
7120
|
return toObject;
|
|
7384
7121
|
}
|
|
@@ -7431,60 +7168,6 @@ function toolToMldev$2(fromObject) {
|
|
|
7431
7168
|
}
|
|
7432
7169
|
return toObject;
|
|
7433
7170
|
}
|
|
7434
|
-
function toolToVertex$1(fromObject) {
|
|
7435
|
-
const toObject = {};
|
|
7436
|
-
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
7437
|
-
'functionDeclarations',
|
|
7438
|
-
]);
|
|
7439
|
-
if (fromFunctionDeclarations != null) {
|
|
7440
|
-
let transformedList = fromFunctionDeclarations;
|
|
7441
|
-
if (Array.isArray(transformedList)) {
|
|
7442
|
-
transformedList = transformedList.map((item) => {
|
|
7443
|
-
return functionDeclarationToVertex$1(item);
|
|
7444
|
-
});
|
|
7445
|
-
}
|
|
7446
|
-
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
7447
|
-
}
|
|
7448
|
-
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
7449
|
-
if (fromRetrieval != null) {
|
|
7450
|
-
setValueByPath(toObject, ['retrieval'], fromRetrieval);
|
|
7451
|
-
}
|
|
7452
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
7453
|
-
if (fromGoogleSearch != null) {
|
|
7454
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
|
|
7455
|
-
}
|
|
7456
|
-
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
7457
|
-
'googleSearchRetrieval',
|
|
7458
|
-
]);
|
|
7459
|
-
if (fromGoogleSearchRetrieval != null) {
|
|
7460
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
|
|
7461
|
-
}
|
|
7462
|
-
const fromEnterpriseWebSearch = getValueByPath(fromObject, [
|
|
7463
|
-
'enterpriseWebSearch',
|
|
7464
|
-
]);
|
|
7465
|
-
if (fromEnterpriseWebSearch != null) {
|
|
7466
|
-
setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
|
|
7467
|
-
}
|
|
7468
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
7469
|
-
if (fromGoogleMaps != null) {
|
|
7470
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
|
|
7471
|
-
}
|
|
7472
|
-
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
7473
|
-
if (fromUrlContext != null) {
|
|
7474
|
-
setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
|
|
7475
|
-
}
|
|
7476
|
-
const fromCodeExecution = getValueByPath(fromObject, [
|
|
7477
|
-
'codeExecution',
|
|
7478
|
-
]);
|
|
7479
|
-
if (fromCodeExecution != null) {
|
|
7480
|
-
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
7481
|
-
}
|
|
7482
|
-
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
7483
|
-
if (fromComputerUse != null) {
|
|
7484
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
7485
|
-
}
|
|
7486
|
-
return toObject;
|
|
7487
|
-
}
|
|
7488
7171
|
function sessionResumptionConfigToMldev$1(fromObject) {
|
|
7489
7172
|
const toObject = {};
|
|
7490
7173
|
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
@@ -7496,26 +7179,10 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
7496
7179
|
}
|
|
7497
7180
|
return toObject;
|
|
7498
7181
|
}
|
|
7499
|
-
function sessionResumptionConfigToVertex(fromObject) {
|
|
7500
|
-
const toObject = {};
|
|
7501
|
-
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
7502
|
-
if (fromHandle != null) {
|
|
7503
|
-
setValueByPath(toObject, ['handle'], fromHandle);
|
|
7504
|
-
}
|
|
7505
|
-
const fromTransparent = getValueByPath(fromObject, ['transparent']);
|
|
7506
|
-
if (fromTransparent != null) {
|
|
7507
|
-
setValueByPath(toObject, ['transparent'], fromTransparent);
|
|
7508
|
-
}
|
|
7509
|
-
return toObject;
|
|
7510
|
-
}
|
|
7511
7182
|
function audioTranscriptionConfigToMldev$1() {
|
|
7512
7183
|
const toObject = {};
|
|
7513
7184
|
return toObject;
|
|
7514
7185
|
}
|
|
7515
|
-
function audioTranscriptionConfigToVertex() {
|
|
7516
|
-
const toObject = {};
|
|
7517
|
-
return toObject;
|
|
7518
|
-
}
|
|
7519
7186
|
function automaticActivityDetectionToMldev$1(fromObject) {
|
|
7520
7187
|
const toObject = {};
|
|
7521
7188
|
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
@@ -7548,38 +7215,6 @@ function automaticActivityDetectionToMldev$1(fromObject) {
|
|
|
7548
7215
|
}
|
|
7549
7216
|
return toObject;
|
|
7550
7217
|
}
|
|
7551
|
-
function automaticActivityDetectionToVertex(fromObject) {
|
|
7552
|
-
const toObject = {};
|
|
7553
|
-
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
7554
|
-
if (fromDisabled != null) {
|
|
7555
|
-
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
7556
|
-
}
|
|
7557
|
-
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7558
|
-
'startOfSpeechSensitivity',
|
|
7559
|
-
]);
|
|
7560
|
-
if (fromStartOfSpeechSensitivity != null) {
|
|
7561
|
-
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
7562
|
-
}
|
|
7563
|
-
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7564
|
-
'endOfSpeechSensitivity',
|
|
7565
|
-
]);
|
|
7566
|
-
if (fromEndOfSpeechSensitivity != null) {
|
|
7567
|
-
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
7568
|
-
}
|
|
7569
|
-
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
7570
|
-
'prefixPaddingMs',
|
|
7571
|
-
]);
|
|
7572
|
-
if (fromPrefixPaddingMs != null) {
|
|
7573
|
-
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
7574
|
-
}
|
|
7575
|
-
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
7576
|
-
'silenceDurationMs',
|
|
7577
|
-
]);
|
|
7578
|
-
if (fromSilenceDurationMs != null) {
|
|
7579
|
-
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
7580
|
-
}
|
|
7581
|
-
return toObject;
|
|
7582
|
-
}
|
|
7583
7218
|
function realtimeInputConfigToMldev$1(fromObject) {
|
|
7584
7219
|
const toObject = {};
|
|
7585
7220
|
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
@@ -7600,26 +7235,6 @@ function realtimeInputConfigToMldev$1(fromObject) {
|
|
|
7600
7235
|
}
|
|
7601
7236
|
return toObject;
|
|
7602
7237
|
}
|
|
7603
|
-
function realtimeInputConfigToVertex(fromObject) {
|
|
7604
|
-
const toObject = {};
|
|
7605
|
-
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
7606
|
-
'automaticActivityDetection',
|
|
7607
|
-
]);
|
|
7608
|
-
if (fromAutomaticActivityDetection != null) {
|
|
7609
|
-
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
|
|
7610
|
-
}
|
|
7611
|
-
const fromActivityHandling = getValueByPath(fromObject, [
|
|
7612
|
-
'activityHandling',
|
|
7613
|
-
]);
|
|
7614
|
-
if (fromActivityHandling != null) {
|
|
7615
|
-
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
7616
|
-
}
|
|
7617
|
-
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
7618
|
-
if (fromTurnCoverage != null) {
|
|
7619
|
-
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
7620
|
-
}
|
|
7621
|
-
return toObject;
|
|
7622
|
-
}
|
|
7623
7238
|
function slidingWindowToMldev$1(fromObject) {
|
|
7624
7239
|
const toObject = {};
|
|
7625
7240
|
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
@@ -7628,14 +7243,6 @@ function slidingWindowToMldev$1(fromObject) {
|
|
|
7628
7243
|
}
|
|
7629
7244
|
return toObject;
|
|
7630
7245
|
}
|
|
7631
|
-
function slidingWindowToVertex(fromObject) {
|
|
7632
|
-
const toObject = {};
|
|
7633
|
-
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
7634
|
-
if (fromTargetTokens != null) {
|
|
7635
|
-
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
7636
|
-
}
|
|
7637
|
-
return toObject;
|
|
7638
|
-
}
|
|
7639
7246
|
function contextWindowCompressionConfigToMldev$1(fromObject) {
|
|
7640
7247
|
const toObject = {};
|
|
7641
7248
|
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
@@ -7652,22 +7259,6 @@ function contextWindowCompressionConfigToMldev$1(fromObject) {
|
|
|
7652
7259
|
}
|
|
7653
7260
|
return toObject;
|
|
7654
7261
|
}
|
|
7655
|
-
function contextWindowCompressionConfigToVertex(fromObject) {
|
|
7656
|
-
const toObject = {};
|
|
7657
|
-
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
7658
|
-
'triggerTokens',
|
|
7659
|
-
]);
|
|
7660
|
-
if (fromTriggerTokens != null) {
|
|
7661
|
-
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
7662
|
-
}
|
|
7663
|
-
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
7664
|
-
'slidingWindow',
|
|
7665
|
-
]);
|
|
7666
|
-
if (fromSlidingWindow != null) {
|
|
7667
|
-
setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
|
|
7668
|
-
}
|
|
7669
|
-
return toObject;
|
|
7670
|
-
}
|
|
7671
7262
|
function proactivityConfigToMldev$1(fromObject) {
|
|
7672
7263
|
const toObject = {};
|
|
7673
7264
|
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
@@ -7678,16 +7269,6 @@ function proactivityConfigToMldev$1(fromObject) {
|
|
|
7678
7269
|
}
|
|
7679
7270
|
return toObject;
|
|
7680
7271
|
}
|
|
7681
|
-
function proactivityConfigToVertex(fromObject) {
|
|
7682
|
-
const toObject = {};
|
|
7683
|
-
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
7684
|
-
'proactiveAudio',
|
|
7685
|
-
]);
|
|
7686
|
-
if (fromProactiveAudio != null) {
|
|
7687
|
-
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
7688
|
-
}
|
|
7689
|
-
return toObject;
|
|
7690
|
-
}
|
|
7691
7272
|
function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
7692
7273
|
const toObject = {};
|
|
7693
7274
|
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
@@ -7792,155 +7373,31 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
7792
7373
|
}
|
|
7793
7374
|
return toObject;
|
|
7794
7375
|
}
|
|
7795
|
-
function
|
|
7376
|
+
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
7796
7377
|
const toObject = {};
|
|
7797
|
-
const
|
|
7798
|
-
|
|
7799
|
-
|
|
7800
|
-
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
7801
|
-
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
7378
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7379
|
+
if (fromModel != null) {
|
|
7380
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7802
7381
|
}
|
|
7803
|
-
const
|
|
7804
|
-
|
|
7805
|
-
|
|
7806
|
-
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
7807
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
7382
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7383
|
+
if (fromConfig != null) {
|
|
7384
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
|
|
7808
7385
|
}
|
|
7809
|
-
|
|
7810
|
-
|
|
7811
|
-
|
|
7812
|
-
}
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
7816
|
-
}
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
|
|
7820
|
-
}
|
|
7821
|
-
const
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
7825
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
7826
|
-
}
|
|
7827
|
-
const fromMediaResolution = getValueByPath(fromObject, [
|
|
7828
|
-
'mediaResolution',
|
|
7829
|
-
]);
|
|
7830
|
-
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
7831
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
7832
|
-
}
|
|
7833
|
-
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
7834
|
-
if (parentObject !== undefined && fromSeed != null) {
|
|
7835
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
7836
|
-
}
|
|
7837
|
-
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
7838
|
-
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
7839
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
7840
|
-
}
|
|
7841
|
-
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
7842
|
-
'enableAffectiveDialog',
|
|
7843
|
-
]);
|
|
7844
|
-
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
7845
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
7846
|
-
}
|
|
7847
|
-
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
7848
|
-
'systemInstruction',
|
|
7849
|
-
]);
|
|
7850
|
-
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
7851
|
-
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
|
|
7852
|
-
}
|
|
7853
|
-
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
7854
|
-
if (parentObject !== undefined && fromTools != null) {
|
|
7855
|
-
let transformedList = tTools(fromTools);
|
|
7856
|
-
if (Array.isArray(transformedList)) {
|
|
7857
|
-
transformedList = transformedList.map((item) => {
|
|
7858
|
-
return toolToVertex$1(tTool(item));
|
|
7859
|
-
});
|
|
7860
|
-
}
|
|
7861
|
-
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
7862
|
-
}
|
|
7863
|
-
const fromSessionResumption = getValueByPath(fromObject, [
|
|
7864
|
-
'sessionResumption',
|
|
7865
|
-
]);
|
|
7866
|
-
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
7867
|
-
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
|
|
7868
|
-
}
|
|
7869
|
-
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
7870
|
-
'inputAudioTranscription',
|
|
7871
|
-
]);
|
|
7872
|
-
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
7873
|
-
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
7874
|
-
}
|
|
7875
|
-
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
7876
|
-
'outputAudioTranscription',
|
|
7877
|
-
]);
|
|
7878
|
-
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
7879
|
-
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
7880
|
-
}
|
|
7881
|
-
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
7882
|
-
'realtimeInputConfig',
|
|
7883
|
-
]);
|
|
7884
|
-
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
7885
|
-
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
|
|
7886
|
-
}
|
|
7887
|
-
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
7888
|
-
'contextWindowCompression',
|
|
7889
|
-
]);
|
|
7890
|
-
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
7891
|
-
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
|
|
7892
|
-
}
|
|
7893
|
-
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
7894
|
-
if (parentObject !== undefined && fromProactivity != null) {
|
|
7895
|
-
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
|
|
7896
|
-
}
|
|
7897
|
-
return toObject;
|
|
7898
|
-
}
|
|
7899
|
-
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
7900
|
-
const toObject = {};
|
|
7901
|
-
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7902
|
-
if (fromModel != null) {
|
|
7903
|
-
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7904
|
-
}
|
|
7905
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7906
|
-
if (fromConfig != null) {
|
|
7907
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
|
|
7908
|
-
}
|
|
7909
|
-
return toObject;
|
|
7910
|
-
}
|
|
7911
|
-
function liveConnectParametersToVertex(apiClient, fromObject) {
|
|
7912
|
-
const toObject = {};
|
|
7913
|
-
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7914
|
-
if (fromModel != null) {
|
|
7915
|
-
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7916
|
-
}
|
|
7917
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7918
|
-
if (fromConfig != null) {
|
|
7919
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
|
|
7920
|
-
}
|
|
7921
|
-
return toObject;
|
|
7922
|
-
}
|
|
7923
|
-
function activityStartToMldev() {
|
|
7924
|
-
const toObject = {};
|
|
7925
|
-
return toObject;
|
|
7926
|
-
}
|
|
7927
|
-
function activityStartToVertex() {
|
|
7928
|
-
const toObject = {};
|
|
7929
|
-
return toObject;
|
|
7930
|
-
}
|
|
7931
|
-
function activityEndToMldev() {
|
|
7932
|
-
const toObject = {};
|
|
7933
|
-
return toObject;
|
|
7934
|
-
}
|
|
7935
|
-
function activityEndToVertex() {
|
|
7936
|
-
const toObject = {};
|
|
7937
|
-
return toObject;
|
|
7938
|
-
}
|
|
7939
|
-
function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
7940
|
-
const toObject = {};
|
|
7941
|
-
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7942
|
-
if (fromMedia != null) {
|
|
7943
|
-
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7386
|
+
return toObject;
|
|
7387
|
+
}
|
|
7388
|
+
function activityStartToMldev() {
|
|
7389
|
+
const toObject = {};
|
|
7390
|
+
return toObject;
|
|
7391
|
+
}
|
|
7392
|
+
function activityEndToMldev() {
|
|
7393
|
+
const toObject = {};
|
|
7394
|
+
return toObject;
|
|
7395
|
+
}
|
|
7396
|
+
function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
7397
|
+
const toObject = {};
|
|
7398
|
+
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7399
|
+
if (fromMedia != null) {
|
|
7400
|
+
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7944
7401
|
}
|
|
7945
7402
|
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
7946
7403
|
if (fromAudio != null) {
|
|
@@ -7972,42 +7429,6 @@ function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
|
7972
7429
|
}
|
|
7973
7430
|
return toObject;
|
|
7974
7431
|
}
|
|
7975
|
-
function liveSendRealtimeInputParametersToVertex(fromObject) {
|
|
7976
|
-
const toObject = {};
|
|
7977
|
-
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7978
|
-
if (fromMedia != null) {
|
|
7979
|
-
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7980
|
-
}
|
|
7981
|
-
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
7982
|
-
if (fromAudio != null) {
|
|
7983
|
-
setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
|
|
7984
|
-
}
|
|
7985
|
-
const fromAudioStreamEnd = getValueByPath(fromObject, [
|
|
7986
|
-
'audioStreamEnd',
|
|
7987
|
-
]);
|
|
7988
|
-
if (fromAudioStreamEnd != null) {
|
|
7989
|
-
setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
|
|
7990
|
-
}
|
|
7991
|
-
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
7992
|
-
if (fromVideo != null) {
|
|
7993
|
-
setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
|
|
7994
|
-
}
|
|
7995
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
7996
|
-
if (fromText != null) {
|
|
7997
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
7998
|
-
}
|
|
7999
|
-
const fromActivityStart = getValueByPath(fromObject, [
|
|
8000
|
-
'activityStart',
|
|
8001
|
-
]);
|
|
8002
|
-
if (fromActivityStart != null) {
|
|
8003
|
-
setValueByPath(toObject, ['activityStart'], activityStartToVertex());
|
|
8004
|
-
}
|
|
8005
|
-
const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
|
|
8006
|
-
if (fromActivityEnd != null) {
|
|
8007
|
-
setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
|
|
8008
|
-
}
|
|
8009
|
-
return toObject;
|
|
8010
|
-
}
|
|
8011
7432
|
function weightedPromptToMldev(fromObject) {
|
|
8012
7433
|
const toObject = {};
|
|
8013
7434
|
const fromText = getValueByPath(fromObject, ['text']);
|
|
@@ -8146,35 +7567,40 @@ function liveMusicClientMessageToMldev(fromObject) {
|
|
|
8146
7567
|
}
|
|
8147
7568
|
return toObject;
|
|
8148
7569
|
}
|
|
8149
|
-
function
|
|
7570
|
+
function prebuiltVoiceConfigToVertex$1(fromObject) {
|
|
8150
7571
|
const toObject = {};
|
|
7572
|
+
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
7573
|
+
if (fromVoiceName != null) {
|
|
7574
|
+
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
7575
|
+
}
|
|
8151
7576
|
return toObject;
|
|
8152
7577
|
}
|
|
8153
|
-
function
|
|
7578
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
8154
7579
|
const toObject = {};
|
|
8155
|
-
const
|
|
8156
|
-
|
|
8157
|
-
|
|
7580
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
7581
|
+
'prebuiltVoiceConfig',
|
|
7582
|
+
]);
|
|
7583
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
7584
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
|
|
8158
7585
|
}
|
|
8159
7586
|
return toObject;
|
|
8160
7587
|
}
|
|
8161
|
-
function
|
|
7588
|
+
function speechConfigToVertex$1(fromObject) {
|
|
8162
7589
|
const toObject = {};
|
|
8163
|
-
const
|
|
8164
|
-
if (
|
|
8165
|
-
setValueByPath(toObject, ['
|
|
7590
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
7591
|
+
if (fromVoiceConfig != null) {
|
|
7592
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
8166
7593
|
}
|
|
8167
|
-
|
|
8168
|
-
|
|
8169
|
-
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
7594
|
+
if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
|
|
7595
|
+
throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
|
|
8170
7596
|
}
|
|
8171
|
-
const
|
|
8172
|
-
if (
|
|
8173
|
-
setValueByPath(toObject, ['
|
|
7597
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
7598
|
+
if (fromLanguageCode != null) {
|
|
7599
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8174
7600
|
}
|
|
8175
7601
|
return toObject;
|
|
8176
7602
|
}
|
|
8177
|
-
function
|
|
7603
|
+
function videoMetadataToVertex$1(fromObject) {
|
|
8178
7604
|
const toObject = {};
|
|
8179
7605
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8180
7606
|
if (fromFps != null) {
|
|
@@ -8190,19 +7616,7 @@ function videoMetadataFromVertex$1(fromObject) {
|
|
|
8190
7616
|
}
|
|
8191
7617
|
return toObject;
|
|
8192
7618
|
}
|
|
8193
|
-
function
|
|
8194
|
-
const toObject = {};
|
|
8195
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
8196
|
-
if (fromData != null) {
|
|
8197
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
8198
|
-
}
|
|
8199
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8200
|
-
if (fromMimeType != null) {
|
|
8201
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8202
|
-
}
|
|
8203
|
-
return toObject;
|
|
8204
|
-
}
|
|
8205
|
-
function blobFromVertex$1(fromObject) {
|
|
7619
|
+
function blobToVertex$1(fromObject) {
|
|
8206
7620
|
const toObject = {};
|
|
8207
7621
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8208
7622
|
if (fromDisplayName != null) {
|
|
@@ -8218,19 +7632,7 @@ function blobFromVertex$1(fromObject) {
|
|
|
8218
7632
|
}
|
|
8219
7633
|
return toObject;
|
|
8220
7634
|
}
|
|
8221
|
-
function
|
|
8222
|
-
const toObject = {};
|
|
8223
|
-
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8224
|
-
if (fromFileUri != null) {
|
|
8225
|
-
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8226
|
-
}
|
|
8227
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8228
|
-
if (fromMimeType != null) {
|
|
8229
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8230
|
-
}
|
|
8231
|
-
return toObject;
|
|
8232
|
-
}
|
|
8233
|
-
function fileDataFromVertex$1(fromObject) {
|
|
7635
|
+
function fileDataToVertex$1(fromObject) {
|
|
8234
7636
|
const toObject = {};
|
|
8235
7637
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8236
7638
|
if (fromDisplayName != null) {
|
|
@@ -8246,13 +7648,13 @@ function fileDataFromVertex$1(fromObject) {
|
|
|
8246
7648
|
}
|
|
8247
7649
|
return toObject;
|
|
8248
7650
|
}
|
|
8249
|
-
function
|
|
7651
|
+
function partToVertex$1(fromObject) {
|
|
8250
7652
|
const toObject = {};
|
|
8251
7653
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8252
7654
|
'videoMetadata',
|
|
8253
7655
|
]);
|
|
8254
7656
|
if (fromVideoMetadata != null) {
|
|
8255
|
-
setValueByPath(toObject, ['videoMetadata'],
|
|
7657
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
|
|
8256
7658
|
}
|
|
8257
7659
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8258
7660
|
if (fromThought != null) {
|
|
@@ -8260,11 +7662,11 @@ function partFromMldev$1(fromObject) {
|
|
|
8260
7662
|
}
|
|
8261
7663
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
8262
7664
|
if (fromInlineData != null) {
|
|
8263
|
-
setValueByPath(toObject, ['inlineData'],
|
|
7665
|
+
setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
|
|
8264
7666
|
}
|
|
8265
7667
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8266
7668
|
if (fromFileData != null) {
|
|
8267
|
-
setValueByPath(toObject, ['fileData'],
|
|
7669
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
|
|
8268
7670
|
}
|
|
8269
7671
|
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8270
7672
|
'thoughtSignature',
|
|
@@ -8300,16 +7702,1119 @@ function partFromMldev$1(fromObject) {
|
|
|
8300
7702
|
}
|
|
8301
7703
|
return toObject;
|
|
8302
7704
|
}
|
|
8303
|
-
function
|
|
7705
|
+
function contentToVertex$1(fromObject) {
|
|
8304
7706
|
const toObject = {};
|
|
8305
|
-
const
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
7707
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7708
|
+
if (fromParts != null) {
|
|
7709
|
+
let transformedList = fromParts;
|
|
7710
|
+
if (Array.isArray(transformedList)) {
|
|
7711
|
+
transformedList = transformedList.map((item) => {
|
|
7712
|
+
return partToVertex$1(item);
|
|
7713
|
+
});
|
|
7714
|
+
}
|
|
7715
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
8310
7716
|
}
|
|
8311
|
-
const
|
|
8312
|
-
if (
|
|
7717
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
7718
|
+
if (fromRole != null) {
|
|
7719
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
7720
|
+
}
|
|
7721
|
+
return toObject;
|
|
7722
|
+
}
|
|
7723
|
+
function functionDeclarationToVertex$1(fromObject) {
|
|
7724
|
+
const toObject = {};
|
|
7725
|
+
if (getValueByPath(fromObject, ['behavior']) !== undefined) {
|
|
7726
|
+
throw new Error('behavior parameter is not supported in Vertex AI.');
|
|
7727
|
+
}
|
|
7728
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7729
|
+
if (fromDescription != null) {
|
|
7730
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
7731
|
+
}
|
|
7732
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
7733
|
+
if (fromName != null) {
|
|
7734
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
7735
|
+
}
|
|
7736
|
+
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
7737
|
+
if (fromParameters != null) {
|
|
7738
|
+
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
7739
|
+
}
|
|
7740
|
+
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
7741
|
+
'parametersJsonSchema',
|
|
7742
|
+
]);
|
|
7743
|
+
if (fromParametersJsonSchema != null) {
|
|
7744
|
+
setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
|
|
7745
|
+
}
|
|
7746
|
+
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
7747
|
+
if (fromResponse != null) {
|
|
7748
|
+
setValueByPath(toObject, ['response'], fromResponse);
|
|
7749
|
+
}
|
|
7750
|
+
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
7751
|
+
'responseJsonSchema',
|
|
7752
|
+
]);
|
|
7753
|
+
if (fromResponseJsonSchema != null) {
|
|
7754
|
+
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
7755
|
+
}
|
|
7756
|
+
return toObject;
|
|
7757
|
+
}
|
|
7758
|
+
function intervalToVertex$1(fromObject) {
|
|
7759
|
+
const toObject = {};
|
|
7760
|
+
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7761
|
+
if (fromStartTime != null) {
|
|
7762
|
+
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
7763
|
+
}
|
|
7764
|
+
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
7765
|
+
if (fromEndTime != null) {
|
|
7766
|
+
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
7767
|
+
}
|
|
7768
|
+
return toObject;
|
|
7769
|
+
}
|
|
7770
|
+
function googleSearchToVertex$1(fromObject) {
|
|
7771
|
+
const toObject = {};
|
|
7772
|
+
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7773
|
+
'timeRangeFilter',
|
|
7774
|
+
]);
|
|
7775
|
+
if (fromTimeRangeFilter != null) {
|
|
7776
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
|
|
7777
|
+
}
|
|
7778
|
+
return toObject;
|
|
7779
|
+
}
|
|
7780
|
+
function dynamicRetrievalConfigToVertex$1(fromObject) {
|
|
7781
|
+
const toObject = {};
|
|
7782
|
+
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
7783
|
+
if (fromMode != null) {
|
|
7784
|
+
setValueByPath(toObject, ['mode'], fromMode);
|
|
7785
|
+
}
|
|
7786
|
+
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
7787
|
+
'dynamicThreshold',
|
|
7788
|
+
]);
|
|
7789
|
+
if (fromDynamicThreshold != null) {
|
|
7790
|
+
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
7791
|
+
}
|
|
7792
|
+
return toObject;
|
|
7793
|
+
}
|
|
7794
|
+
function googleSearchRetrievalToVertex$1(fromObject) {
|
|
7795
|
+
const toObject = {};
|
|
7796
|
+
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
7797
|
+
'dynamicRetrievalConfig',
|
|
7798
|
+
]);
|
|
7799
|
+
if (fromDynamicRetrievalConfig != null) {
|
|
7800
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
|
|
7801
|
+
}
|
|
7802
|
+
return toObject;
|
|
7803
|
+
}
|
|
7804
|
+
function enterpriseWebSearchToVertex$1() {
|
|
7805
|
+
const toObject = {};
|
|
7806
|
+
return toObject;
|
|
7807
|
+
}
|
|
7808
|
+
function apiKeyConfigToVertex$1(fromObject) {
|
|
7809
|
+
const toObject = {};
|
|
7810
|
+
const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
|
|
7811
|
+
if (fromApiKeyString != null) {
|
|
7812
|
+
setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
|
|
7813
|
+
}
|
|
7814
|
+
return toObject;
|
|
7815
|
+
}
|
|
7816
|
+
function authConfigToVertex$1(fromObject) {
|
|
7817
|
+
const toObject = {};
|
|
7818
|
+
const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
|
|
7819
|
+
if (fromApiKeyConfig != null) {
|
|
7820
|
+
setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
|
|
7821
|
+
}
|
|
7822
|
+
const fromAuthType = getValueByPath(fromObject, ['authType']);
|
|
7823
|
+
if (fromAuthType != null) {
|
|
7824
|
+
setValueByPath(toObject, ['authType'], fromAuthType);
|
|
7825
|
+
}
|
|
7826
|
+
const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
|
|
7827
|
+
'googleServiceAccountConfig',
|
|
7828
|
+
]);
|
|
7829
|
+
if (fromGoogleServiceAccountConfig != null) {
|
|
7830
|
+
setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
|
|
7831
|
+
}
|
|
7832
|
+
const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
|
|
7833
|
+
'httpBasicAuthConfig',
|
|
7834
|
+
]);
|
|
7835
|
+
if (fromHttpBasicAuthConfig != null) {
|
|
7836
|
+
setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
|
|
7837
|
+
}
|
|
7838
|
+
const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
|
|
7839
|
+
if (fromOauthConfig != null) {
|
|
7840
|
+
setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
|
|
7841
|
+
}
|
|
7842
|
+
const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
|
|
7843
|
+
if (fromOidcConfig != null) {
|
|
7844
|
+
setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
|
|
7845
|
+
}
|
|
7846
|
+
return toObject;
|
|
7847
|
+
}
|
|
7848
|
+
function googleMapsToVertex$1(fromObject) {
|
|
7849
|
+
const toObject = {};
|
|
7850
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7851
|
+
if (fromAuthConfig != null) {
|
|
7852
|
+
setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
|
|
7853
|
+
}
|
|
7854
|
+
return toObject;
|
|
7855
|
+
}
|
|
7856
|
+
function urlContextToVertex$1() {
|
|
7857
|
+
const toObject = {};
|
|
7858
|
+
return toObject;
|
|
7859
|
+
}
|
|
7860
|
+
function toolToVertex$1(fromObject) {
|
|
7861
|
+
const toObject = {};
|
|
7862
|
+
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
7863
|
+
'functionDeclarations',
|
|
7864
|
+
]);
|
|
7865
|
+
if (fromFunctionDeclarations != null) {
|
|
7866
|
+
let transformedList = fromFunctionDeclarations;
|
|
7867
|
+
if (Array.isArray(transformedList)) {
|
|
7868
|
+
transformedList = transformedList.map((item) => {
|
|
7869
|
+
return functionDeclarationToVertex$1(item);
|
|
7870
|
+
});
|
|
7871
|
+
}
|
|
7872
|
+
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
7873
|
+
}
|
|
7874
|
+
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
7875
|
+
if (fromRetrieval != null) {
|
|
7876
|
+
setValueByPath(toObject, ['retrieval'], fromRetrieval);
|
|
7877
|
+
}
|
|
7878
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
7879
|
+
if (fromGoogleSearch != null) {
|
|
7880
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
|
|
7881
|
+
}
|
|
7882
|
+
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
7883
|
+
'googleSearchRetrieval',
|
|
7884
|
+
]);
|
|
7885
|
+
if (fromGoogleSearchRetrieval != null) {
|
|
7886
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
|
|
7887
|
+
}
|
|
7888
|
+
const fromEnterpriseWebSearch = getValueByPath(fromObject, [
|
|
7889
|
+
'enterpriseWebSearch',
|
|
7890
|
+
]);
|
|
7891
|
+
if (fromEnterpriseWebSearch != null) {
|
|
7892
|
+
setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
|
|
7893
|
+
}
|
|
7894
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
7895
|
+
if (fromGoogleMaps != null) {
|
|
7896
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
|
|
7897
|
+
}
|
|
7898
|
+
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
7899
|
+
if (fromUrlContext != null) {
|
|
7900
|
+
setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
|
|
7901
|
+
}
|
|
7902
|
+
const fromCodeExecution = getValueByPath(fromObject, [
|
|
7903
|
+
'codeExecution',
|
|
7904
|
+
]);
|
|
7905
|
+
if (fromCodeExecution != null) {
|
|
7906
|
+
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
7907
|
+
}
|
|
7908
|
+
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
7909
|
+
if (fromComputerUse != null) {
|
|
7910
|
+
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
7911
|
+
}
|
|
7912
|
+
return toObject;
|
|
7913
|
+
}
|
|
7914
|
+
function sessionResumptionConfigToVertex(fromObject) {
|
|
7915
|
+
const toObject = {};
|
|
7916
|
+
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
7917
|
+
if (fromHandle != null) {
|
|
7918
|
+
setValueByPath(toObject, ['handle'], fromHandle);
|
|
7919
|
+
}
|
|
7920
|
+
const fromTransparent = getValueByPath(fromObject, ['transparent']);
|
|
7921
|
+
if (fromTransparent != null) {
|
|
7922
|
+
setValueByPath(toObject, ['transparent'], fromTransparent);
|
|
7923
|
+
}
|
|
7924
|
+
return toObject;
|
|
7925
|
+
}
|
|
7926
|
+
function audioTranscriptionConfigToVertex() {
|
|
7927
|
+
const toObject = {};
|
|
7928
|
+
return toObject;
|
|
7929
|
+
}
|
|
7930
|
+
function automaticActivityDetectionToVertex(fromObject) {
|
|
7931
|
+
const toObject = {};
|
|
7932
|
+
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
7933
|
+
if (fromDisabled != null) {
|
|
7934
|
+
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
7935
|
+
}
|
|
7936
|
+
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7937
|
+
'startOfSpeechSensitivity',
|
|
7938
|
+
]);
|
|
7939
|
+
if (fromStartOfSpeechSensitivity != null) {
|
|
7940
|
+
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
7941
|
+
}
|
|
7942
|
+
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7943
|
+
'endOfSpeechSensitivity',
|
|
7944
|
+
]);
|
|
7945
|
+
if (fromEndOfSpeechSensitivity != null) {
|
|
7946
|
+
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
7947
|
+
}
|
|
7948
|
+
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
7949
|
+
'prefixPaddingMs',
|
|
7950
|
+
]);
|
|
7951
|
+
if (fromPrefixPaddingMs != null) {
|
|
7952
|
+
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
7953
|
+
}
|
|
7954
|
+
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
7955
|
+
'silenceDurationMs',
|
|
7956
|
+
]);
|
|
7957
|
+
if (fromSilenceDurationMs != null) {
|
|
7958
|
+
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
7959
|
+
}
|
|
7960
|
+
return toObject;
|
|
7961
|
+
}
|
|
7962
|
+
function realtimeInputConfigToVertex(fromObject) {
|
|
7963
|
+
const toObject = {};
|
|
7964
|
+
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
7965
|
+
'automaticActivityDetection',
|
|
7966
|
+
]);
|
|
7967
|
+
if (fromAutomaticActivityDetection != null) {
|
|
7968
|
+
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
|
|
7969
|
+
}
|
|
7970
|
+
const fromActivityHandling = getValueByPath(fromObject, [
|
|
7971
|
+
'activityHandling',
|
|
7972
|
+
]);
|
|
7973
|
+
if (fromActivityHandling != null) {
|
|
7974
|
+
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
7975
|
+
}
|
|
7976
|
+
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
7977
|
+
if (fromTurnCoverage != null) {
|
|
7978
|
+
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
7979
|
+
}
|
|
7980
|
+
return toObject;
|
|
7981
|
+
}
|
|
7982
|
+
function slidingWindowToVertex(fromObject) {
|
|
7983
|
+
const toObject = {};
|
|
7984
|
+
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
7985
|
+
if (fromTargetTokens != null) {
|
|
7986
|
+
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
7987
|
+
}
|
|
7988
|
+
return toObject;
|
|
7989
|
+
}
|
|
7990
|
+
function contextWindowCompressionConfigToVertex(fromObject) {
|
|
7991
|
+
const toObject = {};
|
|
7992
|
+
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
7993
|
+
'triggerTokens',
|
|
7994
|
+
]);
|
|
7995
|
+
if (fromTriggerTokens != null) {
|
|
7996
|
+
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
7997
|
+
}
|
|
7998
|
+
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
7999
|
+
'slidingWindow',
|
|
8000
|
+
]);
|
|
8001
|
+
if (fromSlidingWindow != null) {
|
|
8002
|
+
setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
|
|
8003
|
+
}
|
|
8004
|
+
return toObject;
|
|
8005
|
+
}
|
|
8006
|
+
function proactivityConfigToVertex(fromObject) {
|
|
8007
|
+
const toObject = {};
|
|
8008
|
+
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
8009
|
+
'proactiveAudio',
|
|
8010
|
+
]);
|
|
8011
|
+
if (fromProactiveAudio != null) {
|
|
8012
|
+
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
8013
|
+
}
|
|
8014
|
+
return toObject;
|
|
8015
|
+
}
|
|
8016
|
+
function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
8017
|
+
const toObject = {};
|
|
8018
|
+
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
8019
|
+
'generationConfig',
|
|
8020
|
+
]);
|
|
8021
|
+
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
8022
|
+
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
8023
|
+
}
|
|
8024
|
+
const fromResponseModalities = getValueByPath(fromObject, [
|
|
8025
|
+
'responseModalities',
|
|
8026
|
+
]);
|
|
8027
|
+
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
8028
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
8029
|
+
}
|
|
8030
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8031
|
+
if (parentObject !== undefined && fromTemperature != null) {
|
|
8032
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
|
|
8033
|
+
}
|
|
8034
|
+
const fromTopP = getValueByPath(fromObject, ['topP']);
|
|
8035
|
+
if (parentObject !== undefined && fromTopP != null) {
|
|
8036
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
|
|
8037
|
+
}
|
|
8038
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8039
|
+
if (parentObject !== undefined && fromTopK != null) {
|
|
8040
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
|
|
8041
|
+
}
|
|
8042
|
+
const fromMaxOutputTokens = getValueByPath(fromObject, [
|
|
8043
|
+
'maxOutputTokens',
|
|
8044
|
+
]);
|
|
8045
|
+
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
8046
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
8047
|
+
}
|
|
8048
|
+
const fromMediaResolution = getValueByPath(fromObject, [
|
|
8049
|
+
'mediaResolution',
|
|
8050
|
+
]);
|
|
8051
|
+
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
8052
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
8053
|
+
}
|
|
8054
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8055
|
+
if (parentObject !== undefined && fromSeed != null) {
|
|
8056
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
8057
|
+
}
|
|
8058
|
+
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8059
|
+
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8060
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8061
|
+
}
|
|
8062
|
+
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8063
|
+
'enableAffectiveDialog',
|
|
8064
|
+
]);
|
|
8065
|
+
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
8066
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
8067
|
+
}
|
|
8068
|
+
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
8069
|
+
'systemInstruction',
|
|
8070
|
+
]);
|
|
8071
|
+
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
8072
|
+
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
|
|
8073
|
+
}
|
|
8074
|
+
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
8075
|
+
if (parentObject !== undefined && fromTools != null) {
|
|
8076
|
+
let transformedList = tTools(fromTools);
|
|
8077
|
+
if (Array.isArray(transformedList)) {
|
|
8078
|
+
transformedList = transformedList.map((item) => {
|
|
8079
|
+
return toolToVertex$1(tTool(item));
|
|
8080
|
+
});
|
|
8081
|
+
}
|
|
8082
|
+
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
8083
|
+
}
|
|
8084
|
+
const fromSessionResumption = getValueByPath(fromObject, [
|
|
8085
|
+
'sessionResumption',
|
|
8086
|
+
]);
|
|
8087
|
+
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
8088
|
+
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
|
|
8089
|
+
}
|
|
8090
|
+
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
8091
|
+
'inputAudioTranscription',
|
|
8092
|
+
]);
|
|
8093
|
+
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
8094
|
+
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8095
|
+
}
|
|
8096
|
+
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
8097
|
+
'outputAudioTranscription',
|
|
8098
|
+
]);
|
|
8099
|
+
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
8100
|
+
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8101
|
+
}
|
|
8102
|
+
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
8103
|
+
'realtimeInputConfig',
|
|
8104
|
+
]);
|
|
8105
|
+
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
8106
|
+
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
|
|
8107
|
+
}
|
|
8108
|
+
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
8109
|
+
'contextWindowCompression',
|
|
8110
|
+
]);
|
|
8111
|
+
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
8112
|
+
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
|
|
8113
|
+
}
|
|
8114
|
+
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
8115
|
+
if (parentObject !== undefined && fromProactivity != null) {
|
|
8116
|
+
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
|
|
8117
|
+
}
|
|
8118
|
+
return toObject;
|
|
8119
|
+
}
|
|
8120
|
+
function liveConnectParametersToVertex(apiClient, fromObject) {
|
|
8121
|
+
const toObject = {};
|
|
8122
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8123
|
+
if (fromModel != null) {
|
|
8124
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
8125
|
+
}
|
|
8126
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
8127
|
+
if (fromConfig != null) {
|
|
8128
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
|
|
8129
|
+
}
|
|
8130
|
+
return toObject;
|
|
8131
|
+
}
|
|
8132
|
+
function activityStartToVertex() {
|
|
8133
|
+
const toObject = {};
|
|
8134
|
+
return toObject;
|
|
8135
|
+
}
|
|
8136
|
+
function activityEndToVertex() {
|
|
8137
|
+
const toObject = {};
|
|
8138
|
+
return toObject;
|
|
8139
|
+
}
|
|
8140
|
+
function liveSendRealtimeInputParametersToVertex(fromObject) {
|
|
8141
|
+
const toObject = {};
|
|
8142
|
+
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
8143
|
+
if (fromMedia != null) {
|
|
8144
|
+
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
8145
|
+
}
|
|
8146
|
+
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
8147
|
+
if (fromAudio != null) {
|
|
8148
|
+
setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
|
|
8149
|
+
}
|
|
8150
|
+
const fromAudioStreamEnd = getValueByPath(fromObject, [
|
|
8151
|
+
'audioStreamEnd',
|
|
8152
|
+
]);
|
|
8153
|
+
if (fromAudioStreamEnd != null) {
|
|
8154
|
+
setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
|
|
8155
|
+
}
|
|
8156
|
+
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
8157
|
+
if (fromVideo != null) {
|
|
8158
|
+
setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
|
|
8159
|
+
}
|
|
8160
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8161
|
+
if (fromText != null) {
|
|
8162
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8163
|
+
}
|
|
8164
|
+
const fromActivityStart = getValueByPath(fromObject, [
|
|
8165
|
+
'activityStart',
|
|
8166
|
+
]);
|
|
8167
|
+
if (fromActivityStart != null) {
|
|
8168
|
+
setValueByPath(toObject, ['activityStart'], activityStartToVertex());
|
|
8169
|
+
}
|
|
8170
|
+
const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
|
|
8171
|
+
if (fromActivityEnd != null) {
|
|
8172
|
+
setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
|
|
8173
|
+
}
|
|
8174
|
+
return toObject;
|
|
8175
|
+
}
|
|
8176
|
+
function liveServerSetupCompleteFromMldev() {
|
|
8177
|
+
const toObject = {};
|
|
8178
|
+
return toObject;
|
|
8179
|
+
}
|
|
8180
|
+
function videoMetadataFromMldev$1(fromObject) {
|
|
8181
|
+
const toObject = {};
|
|
8182
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8183
|
+
if (fromFps != null) {
|
|
8184
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
8185
|
+
}
|
|
8186
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
8187
|
+
if (fromEndOffset != null) {
|
|
8188
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
8189
|
+
}
|
|
8190
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
8191
|
+
if (fromStartOffset != null) {
|
|
8192
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
8193
|
+
}
|
|
8194
|
+
return toObject;
|
|
8195
|
+
}
|
|
8196
|
+
function blobFromMldev$1(fromObject) {
|
|
8197
|
+
const toObject = {};
|
|
8198
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8199
|
+
if (fromData != null) {
|
|
8200
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8201
|
+
}
|
|
8202
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8203
|
+
if (fromMimeType != null) {
|
|
8204
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8205
|
+
}
|
|
8206
|
+
return toObject;
|
|
8207
|
+
}
|
|
8208
|
+
function fileDataFromMldev$1(fromObject) {
|
|
8209
|
+
const toObject = {};
|
|
8210
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8211
|
+
if (fromFileUri != null) {
|
|
8212
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8213
|
+
}
|
|
8214
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8215
|
+
if (fromMimeType != null) {
|
|
8216
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8217
|
+
}
|
|
8218
|
+
return toObject;
|
|
8219
|
+
}
|
|
8220
|
+
function partFromMldev$1(fromObject) {
|
|
8221
|
+
const toObject = {};
|
|
8222
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8223
|
+
'videoMetadata',
|
|
8224
|
+
]);
|
|
8225
|
+
if (fromVideoMetadata != null) {
|
|
8226
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataFromMldev$1(fromVideoMetadata));
|
|
8227
|
+
}
|
|
8228
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8229
|
+
if (fromThought != null) {
|
|
8230
|
+
setValueByPath(toObject, ['thought'], fromThought);
|
|
8231
|
+
}
|
|
8232
|
+
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
8233
|
+
if (fromInlineData != null) {
|
|
8234
|
+
setValueByPath(toObject, ['inlineData'], blobFromMldev$1(fromInlineData));
|
|
8235
|
+
}
|
|
8236
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8237
|
+
if (fromFileData != null) {
|
|
8238
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(fromFileData));
|
|
8239
|
+
}
|
|
8240
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8241
|
+
'thoughtSignature',
|
|
8242
|
+
]);
|
|
8243
|
+
if (fromThoughtSignature != null) {
|
|
8244
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
8245
|
+
}
|
|
8246
|
+
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
8247
|
+
'codeExecutionResult',
|
|
8248
|
+
]);
|
|
8249
|
+
if (fromCodeExecutionResult != null) {
|
|
8250
|
+
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
8251
|
+
}
|
|
8252
|
+
const fromExecutableCode = getValueByPath(fromObject, [
|
|
8253
|
+
'executableCode',
|
|
8254
|
+
]);
|
|
8255
|
+
if (fromExecutableCode != null) {
|
|
8256
|
+
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
8257
|
+
}
|
|
8258
|
+
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
8259
|
+
if (fromFunctionCall != null) {
|
|
8260
|
+
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
8261
|
+
}
|
|
8262
|
+
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
8263
|
+
'functionResponse',
|
|
8264
|
+
]);
|
|
8265
|
+
if (fromFunctionResponse != null) {
|
|
8266
|
+
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
8267
|
+
}
|
|
8268
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8269
|
+
if (fromText != null) {
|
|
8270
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8271
|
+
}
|
|
8272
|
+
return toObject;
|
|
8273
|
+
}
|
|
8274
|
+
function contentFromMldev$1(fromObject) {
|
|
8275
|
+
const toObject = {};
|
|
8276
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8277
|
+
if (fromParts != null) {
|
|
8278
|
+
let transformedList = fromParts;
|
|
8279
|
+
if (Array.isArray(transformedList)) {
|
|
8280
|
+
transformedList = transformedList.map((item) => {
|
|
8281
|
+
return partFromMldev$1(item);
|
|
8282
|
+
});
|
|
8283
|
+
}
|
|
8284
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
8285
|
+
}
|
|
8286
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
8287
|
+
if (fromRole != null) {
|
|
8288
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
8289
|
+
}
|
|
8290
|
+
return toObject;
|
|
8291
|
+
}
|
|
8292
|
+
function transcriptionFromMldev(fromObject) {
|
|
8293
|
+
const toObject = {};
|
|
8294
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8295
|
+
if (fromText != null) {
|
|
8296
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8297
|
+
}
|
|
8298
|
+
const fromFinished = getValueByPath(fromObject, ['finished']);
|
|
8299
|
+
if (fromFinished != null) {
|
|
8300
|
+
setValueByPath(toObject, ['finished'], fromFinished);
|
|
8301
|
+
}
|
|
8302
|
+
return toObject;
|
|
8303
|
+
}
|
|
8304
|
+
function urlMetadataFromMldev$1(fromObject) {
|
|
8305
|
+
const toObject = {};
|
|
8306
|
+
const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
|
|
8307
|
+
if (fromRetrievedUrl != null) {
|
|
8308
|
+
setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
|
|
8309
|
+
}
|
|
8310
|
+
const fromUrlRetrievalStatus = getValueByPath(fromObject, [
|
|
8311
|
+
'urlRetrievalStatus',
|
|
8312
|
+
]);
|
|
8313
|
+
if (fromUrlRetrievalStatus != null) {
|
|
8314
|
+
setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
|
|
8315
|
+
}
|
|
8316
|
+
return toObject;
|
|
8317
|
+
}
|
|
8318
|
+
function urlContextMetadataFromMldev$1(fromObject) {
|
|
8319
|
+
const toObject = {};
|
|
8320
|
+
const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
|
|
8321
|
+
if (fromUrlMetadata != null) {
|
|
8322
|
+
let transformedList = fromUrlMetadata;
|
|
8323
|
+
if (Array.isArray(transformedList)) {
|
|
8324
|
+
transformedList = transformedList.map((item) => {
|
|
8325
|
+
return urlMetadataFromMldev$1(item);
|
|
8326
|
+
});
|
|
8327
|
+
}
|
|
8328
|
+
setValueByPath(toObject, ['urlMetadata'], transformedList);
|
|
8329
|
+
}
|
|
8330
|
+
return toObject;
|
|
8331
|
+
}
|
|
8332
|
+
function liveServerContentFromMldev(fromObject) {
|
|
8333
|
+
const toObject = {};
|
|
8334
|
+
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
8335
|
+
if (fromModelTurn != null) {
|
|
8336
|
+
setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
|
|
8337
|
+
}
|
|
8338
|
+
const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
|
|
8339
|
+
if (fromTurnComplete != null) {
|
|
8340
|
+
setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
|
|
8341
|
+
}
|
|
8342
|
+
const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
|
|
8343
|
+
if (fromInterrupted != null) {
|
|
8344
|
+
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
8345
|
+
}
|
|
8346
|
+
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
8347
|
+
'groundingMetadata',
|
|
8348
|
+
]);
|
|
8349
|
+
if (fromGroundingMetadata != null) {
|
|
8350
|
+
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
8351
|
+
}
|
|
8352
|
+
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
8353
|
+
'generationComplete',
|
|
8354
|
+
]);
|
|
8355
|
+
if (fromGenerationComplete != null) {
|
|
8356
|
+
setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
|
|
8357
|
+
}
|
|
8358
|
+
const fromInputTranscription = getValueByPath(fromObject, [
|
|
8359
|
+
'inputTranscription',
|
|
8360
|
+
]);
|
|
8361
|
+
if (fromInputTranscription != null) {
|
|
8362
|
+
setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
|
|
8363
|
+
}
|
|
8364
|
+
const fromOutputTranscription = getValueByPath(fromObject, [
|
|
8365
|
+
'outputTranscription',
|
|
8366
|
+
]);
|
|
8367
|
+
if (fromOutputTranscription != null) {
|
|
8368
|
+
setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
|
|
8369
|
+
}
|
|
8370
|
+
const fromUrlContextMetadata = getValueByPath(fromObject, [
|
|
8371
|
+
'urlContextMetadata',
|
|
8372
|
+
]);
|
|
8373
|
+
if (fromUrlContextMetadata != null) {
|
|
8374
|
+
setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
|
|
8375
|
+
}
|
|
8376
|
+
return toObject;
|
|
8377
|
+
}
|
|
8378
|
+
function functionCallFromMldev(fromObject) {
|
|
8379
|
+
const toObject = {};
|
|
8380
|
+
const fromId = getValueByPath(fromObject, ['id']);
|
|
8381
|
+
if (fromId != null) {
|
|
8382
|
+
setValueByPath(toObject, ['id'], fromId);
|
|
8383
|
+
}
|
|
8384
|
+
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
8385
|
+
if (fromArgs != null) {
|
|
8386
|
+
setValueByPath(toObject, ['args'], fromArgs);
|
|
8387
|
+
}
|
|
8388
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
8389
|
+
if (fromName != null) {
|
|
8390
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
8391
|
+
}
|
|
8392
|
+
return toObject;
|
|
8393
|
+
}
|
|
8394
|
+
function liveServerToolCallFromMldev(fromObject) {
|
|
8395
|
+
const toObject = {};
|
|
8396
|
+
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
8397
|
+
'functionCalls',
|
|
8398
|
+
]);
|
|
8399
|
+
if (fromFunctionCalls != null) {
|
|
8400
|
+
let transformedList = fromFunctionCalls;
|
|
8401
|
+
if (Array.isArray(transformedList)) {
|
|
8402
|
+
transformedList = transformedList.map((item) => {
|
|
8403
|
+
return functionCallFromMldev(item);
|
|
8404
|
+
});
|
|
8405
|
+
}
|
|
8406
|
+
setValueByPath(toObject, ['functionCalls'], transformedList);
|
|
8407
|
+
}
|
|
8408
|
+
return toObject;
|
|
8409
|
+
}
|
|
8410
|
+
function liveServerToolCallCancellationFromMldev(fromObject) {
|
|
8411
|
+
const toObject = {};
|
|
8412
|
+
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
8413
|
+
if (fromIds != null) {
|
|
8414
|
+
setValueByPath(toObject, ['ids'], fromIds);
|
|
8415
|
+
}
|
|
8416
|
+
return toObject;
|
|
8417
|
+
}
|
|
8418
|
+
function modalityTokenCountFromMldev(fromObject) {
|
|
8419
|
+
const toObject = {};
|
|
8420
|
+
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8421
|
+
if (fromModality != null) {
|
|
8422
|
+
setValueByPath(toObject, ['modality'], fromModality);
|
|
8423
|
+
}
|
|
8424
|
+
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8425
|
+
if (fromTokenCount != null) {
|
|
8426
|
+
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8427
|
+
}
|
|
8428
|
+
return toObject;
|
|
8429
|
+
}
|
|
8430
|
+
function usageMetadataFromMldev(fromObject) {
|
|
8431
|
+
const toObject = {};
|
|
8432
|
+
const fromPromptTokenCount = getValueByPath(fromObject, [
|
|
8433
|
+
'promptTokenCount',
|
|
8434
|
+
]);
|
|
8435
|
+
if (fromPromptTokenCount != null) {
|
|
8436
|
+
setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
|
|
8437
|
+
}
|
|
8438
|
+
const fromCachedContentTokenCount = getValueByPath(fromObject, [
|
|
8439
|
+
'cachedContentTokenCount',
|
|
8440
|
+
]);
|
|
8441
|
+
if (fromCachedContentTokenCount != null) {
|
|
8442
|
+
setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
|
|
8443
|
+
}
|
|
8444
|
+
const fromResponseTokenCount = getValueByPath(fromObject, [
|
|
8445
|
+
'responseTokenCount',
|
|
8446
|
+
]);
|
|
8447
|
+
if (fromResponseTokenCount != null) {
|
|
8448
|
+
setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
|
|
8449
|
+
}
|
|
8450
|
+
const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
|
|
8451
|
+
'toolUsePromptTokenCount',
|
|
8452
|
+
]);
|
|
8453
|
+
if (fromToolUsePromptTokenCount != null) {
|
|
8454
|
+
setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
|
|
8455
|
+
}
|
|
8456
|
+
const fromThoughtsTokenCount = getValueByPath(fromObject, [
|
|
8457
|
+
'thoughtsTokenCount',
|
|
8458
|
+
]);
|
|
8459
|
+
if (fromThoughtsTokenCount != null) {
|
|
8460
|
+
setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
|
|
8461
|
+
}
|
|
8462
|
+
const fromTotalTokenCount = getValueByPath(fromObject, [
|
|
8463
|
+
'totalTokenCount',
|
|
8464
|
+
]);
|
|
8465
|
+
if (fromTotalTokenCount != null) {
|
|
8466
|
+
setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
|
|
8467
|
+
}
|
|
8468
|
+
const fromPromptTokensDetails = getValueByPath(fromObject, [
|
|
8469
|
+
'promptTokensDetails',
|
|
8470
|
+
]);
|
|
8471
|
+
if (fromPromptTokensDetails != null) {
|
|
8472
|
+
let transformedList = fromPromptTokensDetails;
|
|
8473
|
+
if (Array.isArray(transformedList)) {
|
|
8474
|
+
transformedList = transformedList.map((item) => {
|
|
8475
|
+
return modalityTokenCountFromMldev(item);
|
|
8476
|
+
});
|
|
8477
|
+
}
|
|
8478
|
+
setValueByPath(toObject, ['promptTokensDetails'], transformedList);
|
|
8479
|
+
}
|
|
8480
|
+
const fromCacheTokensDetails = getValueByPath(fromObject, [
|
|
8481
|
+
'cacheTokensDetails',
|
|
8482
|
+
]);
|
|
8483
|
+
if (fromCacheTokensDetails != null) {
|
|
8484
|
+
let transformedList = fromCacheTokensDetails;
|
|
8485
|
+
if (Array.isArray(transformedList)) {
|
|
8486
|
+
transformedList = transformedList.map((item) => {
|
|
8487
|
+
return modalityTokenCountFromMldev(item);
|
|
8488
|
+
});
|
|
8489
|
+
}
|
|
8490
|
+
setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
|
|
8491
|
+
}
|
|
8492
|
+
const fromResponseTokensDetails = getValueByPath(fromObject, [
|
|
8493
|
+
'responseTokensDetails',
|
|
8494
|
+
]);
|
|
8495
|
+
if (fromResponseTokensDetails != null) {
|
|
8496
|
+
let transformedList = fromResponseTokensDetails;
|
|
8497
|
+
if (Array.isArray(transformedList)) {
|
|
8498
|
+
transformedList = transformedList.map((item) => {
|
|
8499
|
+
return modalityTokenCountFromMldev(item);
|
|
8500
|
+
});
|
|
8501
|
+
}
|
|
8502
|
+
setValueByPath(toObject, ['responseTokensDetails'], transformedList);
|
|
8503
|
+
}
|
|
8504
|
+
const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
|
|
8505
|
+
'toolUsePromptTokensDetails',
|
|
8506
|
+
]);
|
|
8507
|
+
if (fromToolUsePromptTokensDetails != null) {
|
|
8508
|
+
let transformedList = fromToolUsePromptTokensDetails;
|
|
8509
|
+
if (Array.isArray(transformedList)) {
|
|
8510
|
+
transformedList = transformedList.map((item) => {
|
|
8511
|
+
return modalityTokenCountFromMldev(item);
|
|
8512
|
+
});
|
|
8513
|
+
}
|
|
8514
|
+
setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
|
|
8515
|
+
}
|
|
8516
|
+
return toObject;
|
|
8517
|
+
}
|
|
8518
|
+
function liveServerGoAwayFromMldev(fromObject) {
|
|
8519
|
+
const toObject = {};
|
|
8520
|
+
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
8521
|
+
if (fromTimeLeft != null) {
|
|
8522
|
+
setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
|
|
8523
|
+
}
|
|
8524
|
+
return toObject;
|
|
8525
|
+
}
|
|
8526
|
+
function liveServerSessionResumptionUpdateFromMldev(fromObject) {
|
|
8527
|
+
const toObject = {};
|
|
8528
|
+
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
8529
|
+
if (fromNewHandle != null) {
|
|
8530
|
+
setValueByPath(toObject, ['newHandle'], fromNewHandle);
|
|
8531
|
+
}
|
|
8532
|
+
const fromResumable = getValueByPath(fromObject, ['resumable']);
|
|
8533
|
+
if (fromResumable != null) {
|
|
8534
|
+
setValueByPath(toObject, ['resumable'], fromResumable);
|
|
8535
|
+
}
|
|
8536
|
+
const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
|
|
8537
|
+
'lastConsumedClientMessageIndex',
|
|
8538
|
+
]);
|
|
8539
|
+
if (fromLastConsumedClientMessageIndex != null) {
|
|
8540
|
+
setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
|
|
8541
|
+
}
|
|
8542
|
+
return toObject;
|
|
8543
|
+
}
|
|
8544
|
+
function liveServerMessageFromMldev(fromObject) {
|
|
8545
|
+
const toObject = {};
|
|
8546
|
+
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8547
|
+
'setupComplete',
|
|
8548
|
+
]);
|
|
8549
|
+
if (fromSetupComplete != null) {
|
|
8550
|
+
setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
|
|
8551
|
+
}
|
|
8552
|
+
const fromServerContent = getValueByPath(fromObject, [
|
|
8553
|
+
'serverContent',
|
|
8554
|
+
]);
|
|
8555
|
+
if (fromServerContent != null) {
|
|
8556
|
+
setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
|
|
8557
|
+
}
|
|
8558
|
+
const fromToolCall = getValueByPath(fromObject, ['toolCall']);
|
|
8559
|
+
if (fromToolCall != null) {
|
|
8560
|
+
setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
|
|
8561
|
+
}
|
|
8562
|
+
const fromToolCallCancellation = getValueByPath(fromObject, [
|
|
8563
|
+
'toolCallCancellation',
|
|
8564
|
+
]);
|
|
8565
|
+
if (fromToolCallCancellation != null) {
|
|
8566
|
+
setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
|
|
8567
|
+
}
|
|
8568
|
+
const fromUsageMetadata = getValueByPath(fromObject, [
|
|
8569
|
+
'usageMetadata',
|
|
8570
|
+
]);
|
|
8571
|
+
if (fromUsageMetadata != null) {
|
|
8572
|
+
setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
|
|
8573
|
+
}
|
|
8574
|
+
const fromGoAway = getValueByPath(fromObject, ['goAway']);
|
|
8575
|
+
if (fromGoAway != null) {
|
|
8576
|
+
setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
|
|
8577
|
+
}
|
|
8578
|
+
const fromSessionResumptionUpdate = getValueByPath(fromObject, [
|
|
8579
|
+
'sessionResumptionUpdate',
|
|
8580
|
+
]);
|
|
8581
|
+
if (fromSessionResumptionUpdate != null) {
|
|
8582
|
+
setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
|
|
8583
|
+
}
|
|
8584
|
+
return toObject;
|
|
8585
|
+
}
|
|
8586
|
+
function liveMusicServerSetupCompleteFromMldev() {
|
|
8587
|
+
const toObject = {};
|
|
8588
|
+
return toObject;
|
|
8589
|
+
}
|
|
8590
|
+
function weightedPromptFromMldev(fromObject) {
|
|
8591
|
+
const toObject = {};
|
|
8592
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8593
|
+
if (fromText != null) {
|
|
8594
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8595
|
+
}
|
|
8596
|
+
const fromWeight = getValueByPath(fromObject, ['weight']);
|
|
8597
|
+
if (fromWeight != null) {
|
|
8598
|
+
setValueByPath(toObject, ['weight'], fromWeight);
|
|
8599
|
+
}
|
|
8600
|
+
return toObject;
|
|
8601
|
+
}
|
|
8602
|
+
function liveMusicClientContentFromMldev(fromObject) {
|
|
8603
|
+
const toObject = {};
|
|
8604
|
+
const fromWeightedPrompts = getValueByPath(fromObject, [
|
|
8605
|
+
'weightedPrompts',
|
|
8606
|
+
]);
|
|
8607
|
+
if (fromWeightedPrompts != null) {
|
|
8608
|
+
let transformedList = fromWeightedPrompts;
|
|
8609
|
+
if (Array.isArray(transformedList)) {
|
|
8610
|
+
transformedList = transformedList.map((item) => {
|
|
8611
|
+
return weightedPromptFromMldev(item);
|
|
8612
|
+
});
|
|
8613
|
+
}
|
|
8614
|
+
setValueByPath(toObject, ['weightedPrompts'], transformedList);
|
|
8615
|
+
}
|
|
8616
|
+
return toObject;
|
|
8617
|
+
}
|
|
8618
|
+
function liveMusicGenerationConfigFromMldev(fromObject) {
|
|
8619
|
+
const toObject = {};
|
|
8620
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8621
|
+
if (fromTemperature != null) {
|
|
8622
|
+
setValueByPath(toObject, ['temperature'], fromTemperature);
|
|
8623
|
+
}
|
|
8624
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8625
|
+
if (fromTopK != null) {
|
|
8626
|
+
setValueByPath(toObject, ['topK'], fromTopK);
|
|
8627
|
+
}
|
|
8628
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8629
|
+
if (fromSeed != null) {
|
|
8630
|
+
setValueByPath(toObject, ['seed'], fromSeed);
|
|
8631
|
+
}
|
|
8632
|
+
const fromGuidance = getValueByPath(fromObject, ['guidance']);
|
|
8633
|
+
if (fromGuidance != null) {
|
|
8634
|
+
setValueByPath(toObject, ['guidance'], fromGuidance);
|
|
8635
|
+
}
|
|
8636
|
+
const fromBpm = getValueByPath(fromObject, ['bpm']);
|
|
8637
|
+
if (fromBpm != null) {
|
|
8638
|
+
setValueByPath(toObject, ['bpm'], fromBpm);
|
|
8639
|
+
}
|
|
8640
|
+
const fromDensity = getValueByPath(fromObject, ['density']);
|
|
8641
|
+
if (fromDensity != null) {
|
|
8642
|
+
setValueByPath(toObject, ['density'], fromDensity);
|
|
8643
|
+
}
|
|
8644
|
+
const fromBrightness = getValueByPath(fromObject, ['brightness']);
|
|
8645
|
+
if (fromBrightness != null) {
|
|
8646
|
+
setValueByPath(toObject, ['brightness'], fromBrightness);
|
|
8647
|
+
}
|
|
8648
|
+
const fromScale = getValueByPath(fromObject, ['scale']);
|
|
8649
|
+
if (fromScale != null) {
|
|
8650
|
+
setValueByPath(toObject, ['scale'], fromScale);
|
|
8651
|
+
}
|
|
8652
|
+
const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
|
|
8653
|
+
if (fromMuteBass != null) {
|
|
8654
|
+
setValueByPath(toObject, ['muteBass'], fromMuteBass);
|
|
8655
|
+
}
|
|
8656
|
+
const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
|
|
8657
|
+
if (fromMuteDrums != null) {
|
|
8658
|
+
setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
|
|
8659
|
+
}
|
|
8660
|
+
const fromOnlyBassAndDrums = getValueByPath(fromObject, [
|
|
8661
|
+
'onlyBassAndDrums',
|
|
8662
|
+
]);
|
|
8663
|
+
if (fromOnlyBassAndDrums != null) {
|
|
8664
|
+
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
8665
|
+
}
|
|
8666
|
+
return toObject;
|
|
8667
|
+
}
|
|
8668
|
+
function liveMusicSourceMetadataFromMldev(fromObject) {
|
|
8669
|
+
const toObject = {};
|
|
8670
|
+
const fromClientContent = getValueByPath(fromObject, [
|
|
8671
|
+
'clientContent',
|
|
8672
|
+
]);
|
|
8673
|
+
if (fromClientContent != null) {
|
|
8674
|
+
setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
|
|
8675
|
+
}
|
|
8676
|
+
const fromMusicGenerationConfig = getValueByPath(fromObject, [
|
|
8677
|
+
'musicGenerationConfig',
|
|
8678
|
+
]);
|
|
8679
|
+
if (fromMusicGenerationConfig != null) {
|
|
8680
|
+
setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
|
|
8681
|
+
}
|
|
8682
|
+
return toObject;
|
|
8683
|
+
}
|
|
8684
|
+
function audioChunkFromMldev(fromObject) {
|
|
8685
|
+
const toObject = {};
|
|
8686
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8687
|
+
if (fromData != null) {
|
|
8688
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8689
|
+
}
|
|
8690
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8691
|
+
if (fromMimeType != null) {
|
|
8692
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8693
|
+
}
|
|
8694
|
+
const fromSourceMetadata = getValueByPath(fromObject, [
|
|
8695
|
+
'sourceMetadata',
|
|
8696
|
+
]);
|
|
8697
|
+
if (fromSourceMetadata != null) {
|
|
8698
|
+
setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
|
|
8699
|
+
}
|
|
8700
|
+
return toObject;
|
|
8701
|
+
}
|
|
8702
|
+
function liveMusicServerContentFromMldev(fromObject) {
|
|
8703
|
+
const toObject = {};
|
|
8704
|
+
const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
|
|
8705
|
+
if (fromAudioChunks != null) {
|
|
8706
|
+
let transformedList = fromAudioChunks;
|
|
8707
|
+
if (Array.isArray(transformedList)) {
|
|
8708
|
+
transformedList = transformedList.map((item) => {
|
|
8709
|
+
return audioChunkFromMldev(item);
|
|
8710
|
+
});
|
|
8711
|
+
}
|
|
8712
|
+
setValueByPath(toObject, ['audioChunks'], transformedList);
|
|
8713
|
+
}
|
|
8714
|
+
return toObject;
|
|
8715
|
+
}
|
|
8716
|
+
function liveMusicFilteredPromptFromMldev(fromObject) {
|
|
8717
|
+
const toObject = {};
|
|
8718
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8719
|
+
if (fromText != null) {
|
|
8720
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8721
|
+
}
|
|
8722
|
+
const fromFilteredReason = getValueByPath(fromObject, [
|
|
8723
|
+
'filteredReason',
|
|
8724
|
+
]);
|
|
8725
|
+
if (fromFilteredReason != null) {
|
|
8726
|
+
setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
|
|
8727
|
+
}
|
|
8728
|
+
return toObject;
|
|
8729
|
+
}
|
|
8730
|
+
function liveMusicServerMessageFromMldev(fromObject) {
|
|
8731
|
+
const toObject = {};
|
|
8732
|
+
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8733
|
+
'setupComplete',
|
|
8734
|
+
]);
|
|
8735
|
+
if (fromSetupComplete != null) {
|
|
8736
|
+
setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
|
|
8737
|
+
}
|
|
8738
|
+
const fromServerContent = getValueByPath(fromObject, [
|
|
8739
|
+
'serverContent',
|
|
8740
|
+
]);
|
|
8741
|
+
if (fromServerContent != null) {
|
|
8742
|
+
setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
|
|
8743
|
+
}
|
|
8744
|
+
const fromFilteredPrompt = getValueByPath(fromObject, [
|
|
8745
|
+
'filteredPrompt',
|
|
8746
|
+
]);
|
|
8747
|
+
if (fromFilteredPrompt != null) {
|
|
8748
|
+
setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
|
|
8749
|
+
}
|
|
8750
|
+
return toObject;
|
|
8751
|
+
}
|
|
8752
|
+
function liveServerSetupCompleteFromVertex(fromObject) {
|
|
8753
|
+
const toObject = {};
|
|
8754
|
+
const fromSessionId = getValueByPath(fromObject, ['sessionId']);
|
|
8755
|
+
if (fromSessionId != null) {
|
|
8756
|
+
setValueByPath(toObject, ['sessionId'], fromSessionId);
|
|
8757
|
+
}
|
|
8758
|
+
return toObject;
|
|
8759
|
+
}
|
|
8760
|
+
function videoMetadataFromVertex$1(fromObject) {
|
|
8761
|
+
const toObject = {};
|
|
8762
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8763
|
+
if (fromFps != null) {
|
|
8764
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
8765
|
+
}
|
|
8766
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
8767
|
+
if (fromEndOffset != null) {
|
|
8768
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
8769
|
+
}
|
|
8770
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
8771
|
+
if (fromStartOffset != null) {
|
|
8772
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
8773
|
+
}
|
|
8774
|
+
return toObject;
|
|
8775
|
+
}
|
|
8776
|
+
function blobFromVertex$1(fromObject) {
|
|
8777
|
+
const toObject = {};
|
|
8778
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8779
|
+
if (fromDisplayName != null) {
|
|
8780
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8781
|
+
}
|
|
8782
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8783
|
+
if (fromData != null) {
|
|
8784
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8785
|
+
}
|
|
8786
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8787
|
+
if (fromMimeType != null) {
|
|
8788
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8789
|
+
}
|
|
8790
|
+
return toObject;
|
|
8791
|
+
}
|
|
8792
|
+
function fileDataFromVertex$1(fromObject) {
|
|
8793
|
+
const toObject = {};
|
|
8794
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8795
|
+
if (fromDisplayName != null) {
|
|
8796
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8797
|
+
}
|
|
8798
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8799
|
+
if (fromFileUri != null) {
|
|
8800
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8801
|
+
}
|
|
8802
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8803
|
+
if (fromMimeType != null) {
|
|
8804
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8805
|
+
}
|
|
8806
|
+
return toObject;
|
|
8807
|
+
}
|
|
8808
|
+
function partFromVertex$1(fromObject) {
|
|
8809
|
+
const toObject = {};
|
|
8810
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8811
|
+
'videoMetadata',
|
|
8812
|
+
]);
|
|
8813
|
+
if (fromVideoMetadata != null) {
|
|
8814
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataFromVertex$1(fromVideoMetadata));
|
|
8815
|
+
}
|
|
8816
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8817
|
+
if (fromThought != null) {
|
|
8313
8818
|
setValueByPath(toObject, ['thought'], fromThought);
|
|
8314
8819
|
}
|
|
8315
8820
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
@@ -8354,24 +8859,6 @@ function partFromVertex$1(fromObject) {
|
|
|
8354
8859
|
}
|
|
8355
8860
|
return toObject;
|
|
8356
8861
|
}
|
|
8357
|
-
function contentFromMldev$1(fromObject) {
|
|
8358
|
-
const toObject = {};
|
|
8359
|
-
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8360
|
-
if (fromParts != null) {
|
|
8361
|
-
let transformedList = fromParts;
|
|
8362
|
-
if (Array.isArray(transformedList)) {
|
|
8363
|
-
transformedList = transformedList.map((item) => {
|
|
8364
|
-
return partFromMldev$1(item);
|
|
8365
|
-
});
|
|
8366
|
-
}
|
|
8367
|
-
setValueByPath(toObject, ['parts'], transformedList);
|
|
8368
|
-
}
|
|
8369
|
-
const fromRole = getValueByPath(fromObject, ['role']);
|
|
8370
|
-
if (fromRole != null) {
|
|
8371
|
-
setValueByPath(toObject, ['role'], fromRole);
|
|
8372
|
-
}
|
|
8373
|
-
return toObject;
|
|
8374
|
-
}
|
|
8375
8862
|
function contentFromVertex$1(fromObject) {
|
|
8376
8863
|
const toObject = {};
|
|
8377
8864
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -8390,18 +8877,6 @@ function contentFromVertex$1(fromObject) {
|
|
|
8390
8877
|
}
|
|
8391
8878
|
return toObject;
|
|
8392
8879
|
}
|
|
8393
|
-
function transcriptionFromMldev(fromObject) {
|
|
8394
|
-
const toObject = {};
|
|
8395
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
8396
|
-
if (fromText != null) {
|
|
8397
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
8398
|
-
}
|
|
8399
|
-
const fromFinished = getValueByPath(fromObject, ['finished']);
|
|
8400
|
-
if (fromFinished != null) {
|
|
8401
|
-
setValueByPath(toObject, ['finished'], fromFinished);
|
|
8402
|
-
}
|
|
8403
|
-
return toObject;
|
|
8404
|
-
}
|
|
8405
8880
|
function transcriptionFromVertex(fromObject) {
|
|
8406
8881
|
const toObject = {};
|
|
8407
8882
|
const fromText = getValueByPath(fromObject, ['text']);
|
|
@@ -8414,80 +8889,6 @@ function transcriptionFromVertex(fromObject) {
|
|
|
8414
8889
|
}
|
|
8415
8890
|
return toObject;
|
|
8416
8891
|
}
|
|
8417
|
-
function urlMetadataFromMldev$1(fromObject) {
|
|
8418
|
-
const toObject = {};
|
|
8419
|
-
const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
|
|
8420
|
-
if (fromRetrievedUrl != null) {
|
|
8421
|
-
setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
|
|
8422
|
-
}
|
|
8423
|
-
const fromUrlRetrievalStatus = getValueByPath(fromObject, [
|
|
8424
|
-
'urlRetrievalStatus',
|
|
8425
|
-
]);
|
|
8426
|
-
if (fromUrlRetrievalStatus != null) {
|
|
8427
|
-
setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
|
|
8428
|
-
}
|
|
8429
|
-
return toObject;
|
|
8430
|
-
}
|
|
8431
|
-
function urlContextMetadataFromMldev$1(fromObject) {
|
|
8432
|
-
const toObject = {};
|
|
8433
|
-
const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
|
|
8434
|
-
if (fromUrlMetadata != null) {
|
|
8435
|
-
let transformedList = fromUrlMetadata;
|
|
8436
|
-
if (Array.isArray(transformedList)) {
|
|
8437
|
-
transformedList = transformedList.map((item) => {
|
|
8438
|
-
return urlMetadataFromMldev$1(item);
|
|
8439
|
-
});
|
|
8440
|
-
}
|
|
8441
|
-
setValueByPath(toObject, ['urlMetadata'], transformedList);
|
|
8442
|
-
}
|
|
8443
|
-
return toObject;
|
|
8444
|
-
}
|
|
8445
|
-
function liveServerContentFromMldev(fromObject) {
|
|
8446
|
-
const toObject = {};
|
|
8447
|
-
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
8448
|
-
if (fromModelTurn != null) {
|
|
8449
|
-
setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
|
|
8450
|
-
}
|
|
8451
|
-
const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
|
|
8452
|
-
if (fromTurnComplete != null) {
|
|
8453
|
-
setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
|
|
8454
|
-
}
|
|
8455
|
-
const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
|
|
8456
|
-
if (fromInterrupted != null) {
|
|
8457
|
-
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
8458
|
-
}
|
|
8459
|
-
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
8460
|
-
'groundingMetadata',
|
|
8461
|
-
]);
|
|
8462
|
-
if (fromGroundingMetadata != null) {
|
|
8463
|
-
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
8464
|
-
}
|
|
8465
|
-
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
8466
|
-
'generationComplete',
|
|
8467
|
-
]);
|
|
8468
|
-
if (fromGenerationComplete != null) {
|
|
8469
|
-
setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
|
|
8470
|
-
}
|
|
8471
|
-
const fromInputTranscription = getValueByPath(fromObject, [
|
|
8472
|
-
'inputTranscription',
|
|
8473
|
-
]);
|
|
8474
|
-
if (fromInputTranscription != null) {
|
|
8475
|
-
setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
|
|
8476
|
-
}
|
|
8477
|
-
const fromOutputTranscription = getValueByPath(fromObject, [
|
|
8478
|
-
'outputTranscription',
|
|
8479
|
-
]);
|
|
8480
|
-
if (fromOutputTranscription != null) {
|
|
8481
|
-
setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
|
|
8482
|
-
}
|
|
8483
|
-
const fromUrlContextMetadata = getValueByPath(fromObject, [
|
|
8484
|
-
'urlContextMetadata',
|
|
8485
|
-
]);
|
|
8486
|
-
if (fromUrlContextMetadata != null) {
|
|
8487
|
-
setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
|
|
8488
|
-
}
|
|
8489
|
-
return toObject;
|
|
8490
|
-
}
|
|
8491
8892
|
function liveServerContentFromVertex(fromObject) {
|
|
8492
8893
|
const toObject = {};
|
|
8493
8894
|
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
@@ -8528,22 +8929,6 @@ function liveServerContentFromVertex(fromObject) {
|
|
|
8528
8929
|
}
|
|
8529
8930
|
return toObject;
|
|
8530
8931
|
}
|
|
8531
|
-
function functionCallFromMldev(fromObject) {
|
|
8532
|
-
const toObject = {};
|
|
8533
|
-
const fromId = getValueByPath(fromObject, ['id']);
|
|
8534
|
-
if (fromId != null) {
|
|
8535
|
-
setValueByPath(toObject, ['id'], fromId);
|
|
8536
|
-
}
|
|
8537
|
-
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
8538
|
-
if (fromArgs != null) {
|
|
8539
|
-
setValueByPath(toObject, ['args'], fromArgs);
|
|
8540
|
-
}
|
|
8541
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
8542
|
-
if (fromName != null) {
|
|
8543
|
-
setValueByPath(toObject, ['name'], fromName);
|
|
8544
|
-
}
|
|
8545
|
-
return toObject;
|
|
8546
|
-
}
|
|
8547
8932
|
function functionCallFromVertex(fromObject) {
|
|
8548
8933
|
const toObject = {};
|
|
8549
8934
|
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
@@ -8556,22 +8941,6 @@ function functionCallFromVertex(fromObject) {
|
|
|
8556
8941
|
}
|
|
8557
8942
|
return toObject;
|
|
8558
8943
|
}
|
|
8559
|
-
function liveServerToolCallFromMldev(fromObject) {
|
|
8560
|
-
const toObject = {};
|
|
8561
|
-
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
8562
|
-
'functionCalls',
|
|
8563
|
-
]);
|
|
8564
|
-
if (fromFunctionCalls != null) {
|
|
8565
|
-
let transformedList = fromFunctionCalls;
|
|
8566
|
-
if (Array.isArray(transformedList)) {
|
|
8567
|
-
transformedList = transformedList.map((item) => {
|
|
8568
|
-
return functionCallFromMldev(item);
|
|
8569
|
-
});
|
|
8570
|
-
}
|
|
8571
|
-
setValueByPath(toObject, ['functionCalls'], transformedList);
|
|
8572
|
-
}
|
|
8573
|
-
return toObject;
|
|
8574
|
-
}
|
|
8575
8944
|
function liveServerToolCallFromVertex(fromObject) {
|
|
8576
8945
|
const toObject = {};
|
|
8577
8946
|
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
@@ -8588,14 +8957,6 @@ function liveServerToolCallFromVertex(fromObject) {
|
|
|
8588
8957
|
}
|
|
8589
8958
|
return toObject;
|
|
8590
8959
|
}
|
|
8591
|
-
function liveServerToolCallCancellationFromMldev(fromObject) {
|
|
8592
|
-
const toObject = {};
|
|
8593
|
-
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
8594
|
-
if (fromIds != null) {
|
|
8595
|
-
setValueByPath(toObject, ['ids'], fromIds);
|
|
8596
|
-
}
|
|
8597
|
-
return toObject;
|
|
8598
|
-
}
|
|
8599
8960
|
function liveServerToolCallCancellationFromVertex(fromObject) {
|
|
8600
8961
|
const toObject = {};
|
|
8601
8962
|
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
@@ -8604,115 +8965,15 @@ function liveServerToolCallCancellationFromVertex(fromObject) {
|
|
|
8604
8965
|
}
|
|
8605
8966
|
return toObject;
|
|
8606
8967
|
}
|
|
8607
|
-
function modalityTokenCountFromMldev(fromObject) {
|
|
8608
|
-
const toObject = {};
|
|
8609
|
-
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8610
|
-
if (fromModality != null) {
|
|
8611
|
-
setValueByPath(toObject, ['modality'], fromModality);
|
|
8612
|
-
}
|
|
8613
|
-
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8614
|
-
if (fromTokenCount != null) {
|
|
8615
|
-
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8616
|
-
}
|
|
8617
|
-
return toObject;
|
|
8618
|
-
}
|
|
8619
8968
|
function modalityTokenCountFromVertex(fromObject) {
|
|
8620
8969
|
const toObject = {};
|
|
8621
8970
|
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8622
|
-
if (fromModality != null) {
|
|
8623
|
-
setValueByPath(toObject, ['modality'], fromModality);
|
|
8624
|
-
}
|
|
8625
|
-
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8626
|
-
if (fromTokenCount != null) {
|
|
8627
|
-
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8628
|
-
}
|
|
8629
|
-
return toObject;
|
|
8630
|
-
}
|
|
8631
|
-
function usageMetadataFromMldev(fromObject) {
|
|
8632
|
-
const toObject = {};
|
|
8633
|
-
const fromPromptTokenCount = getValueByPath(fromObject, [
|
|
8634
|
-
'promptTokenCount',
|
|
8635
|
-
]);
|
|
8636
|
-
if (fromPromptTokenCount != null) {
|
|
8637
|
-
setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
|
|
8638
|
-
}
|
|
8639
|
-
const fromCachedContentTokenCount = getValueByPath(fromObject, [
|
|
8640
|
-
'cachedContentTokenCount',
|
|
8641
|
-
]);
|
|
8642
|
-
if (fromCachedContentTokenCount != null) {
|
|
8643
|
-
setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
|
|
8644
|
-
}
|
|
8645
|
-
const fromResponseTokenCount = getValueByPath(fromObject, [
|
|
8646
|
-
'responseTokenCount',
|
|
8647
|
-
]);
|
|
8648
|
-
if (fromResponseTokenCount != null) {
|
|
8649
|
-
setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
|
|
8650
|
-
}
|
|
8651
|
-
const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
|
|
8652
|
-
'toolUsePromptTokenCount',
|
|
8653
|
-
]);
|
|
8654
|
-
if (fromToolUsePromptTokenCount != null) {
|
|
8655
|
-
setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
|
|
8656
|
-
}
|
|
8657
|
-
const fromThoughtsTokenCount = getValueByPath(fromObject, [
|
|
8658
|
-
'thoughtsTokenCount',
|
|
8659
|
-
]);
|
|
8660
|
-
if (fromThoughtsTokenCount != null) {
|
|
8661
|
-
setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
|
|
8662
|
-
}
|
|
8663
|
-
const fromTotalTokenCount = getValueByPath(fromObject, [
|
|
8664
|
-
'totalTokenCount',
|
|
8665
|
-
]);
|
|
8666
|
-
if (fromTotalTokenCount != null) {
|
|
8667
|
-
setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
|
|
8668
|
-
}
|
|
8669
|
-
const fromPromptTokensDetails = getValueByPath(fromObject, [
|
|
8670
|
-
'promptTokensDetails',
|
|
8671
|
-
]);
|
|
8672
|
-
if (fromPromptTokensDetails != null) {
|
|
8673
|
-
let transformedList = fromPromptTokensDetails;
|
|
8674
|
-
if (Array.isArray(transformedList)) {
|
|
8675
|
-
transformedList = transformedList.map((item) => {
|
|
8676
|
-
return modalityTokenCountFromMldev(item);
|
|
8677
|
-
});
|
|
8678
|
-
}
|
|
8679
|
-
setValueByPath(toObject, ['promptTokensDetails'], transformedList);
|
|
8680
|
-
}
|
|
8681
|
-
const fromCacheTokensDetails = getValueByPath(fromObject, [
|
|
8682
|
-
'cacheTokensDetails',
|
|
8683
|
-
]);
|
|
8684
|
-
if (fromCacheTokensDetails != null) {
|
|
8685
|
-
let transformedList = fromCacheTokensDetails;
|
|
8686
|
-
if (Array.isArray(transformedList)) {
|
|
8687
|
-
transformedList = transformedList.map((item) => {
|
|
8688
|
-
return modalityTokenCountFromMldev(item);
|
|
8689
|
-
});
|
|
8690
|
-
}
|
|
8691
|
-
setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
|
|
8692
|
-
}
|
|
8693
|
-
const fromResponseTokensDetails = getValueByPath(fromObject, [
|
|
8694
|
-
'responseTokensDetails',
|
|
8695
|
-
]);
|
|
8696
|
-
if (fromResponseTokensDetails != null) {
|
|
8697
|
-
let transformedList = fromResponseTokensDetails;
|
|
8698
|
-
if (Array.isArray(transformedList)) {
|
|
8699
|
-
transformedList = transformedList.map((item) => {
|
|
8700
|
-
return modalityTokenCountFromMldev(item);
|
|
8701
|
-
});
|
|
8702
|
-
}
|
|
8703
|
-
setValueByPath(toObject, ['responseTokensDetails'], transformedList);
|
|
8704
|
-
}
|
|
8705
|
-
const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
|
|
8706
|
-
'toolUsePromptTokensDetails',
|
|
8707
|
-
]);
|
|
8708
|
-
if (fromToolUsePromptTokensDetails != null) {
|
|
8709
|
-
let transformedList = fromToolUsePromptTokensDetails;
|
|
8710
|
-
if (Array.isArray(transformedList)) {
|
|
8711
|
-
transformedList = transformedList.map((item) => {
|
|
8712
|
-
return modalityTokenCountFromMldev(item);
|
|
8713
|
-
});
|
|
8714
|
-
}
|
|
8715
|
-
setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
|
|
8971
|
+
if (fromModality != null) {
|
|
8972
|
+
setValueByPath(toObject, ['modality'], fromModality);
|
|
8973
|
+
}
|
|
8974
|
+
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8975
|
+
if (fromTokenCount != null) {
|
|
8976
|
+
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8716
8977
|
}
|
|
8717
8978
|
return toObject;
|
|
8718
8979
|
}
|
|
@@ -8808,14 +9069,6 @@ function usageMetadataFromVertex(fromObject) {
|
|
|
8808
9069
|
}
|
|
8809
9070
|
return toObject;
|
|
8810
9071
|
}
|
|
8811
|
-
function liveServerGoAwayFromMldev(fromObject) {
|
|
8812
|
-
const toObject = {};
|
|
8813
|
-
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
8814
|
-
if (fromTimeLeft != null) {
|
|
8815
|
-
setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
|
|
8816
|
-
}
|
|
8817
|
-
return toObject;
|
|
8818
|
-
}
|
|
8819
9072
|
function liveServerGoAwayFromVertex(fromObject) {
|
|
8820
9073
|
const toObject = {};
|
|
8821
9074
|
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
@@ -8824,24 +9077,6 @@ function liveServerGoAwayFromVertex(fromObject) {
|
|
|
8824
9077
|
}
|
|
8825
9078
|
return toObject;
|
|
8826
9079
|
}
|
|
8827
|
-
function liveServerSessionResumptionUpdateFromMldev(fromObject) {
|
|
8828
|
-
const toObject = {};
|
|
8829
|
-
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
8830
|
-
if (fromNewHandle != null) {
|
|
8831
|
-
setValueByPath(toObject, ['newHandle'], fromNewHandle);
|
|
8832
|
-
}
|
|
8833
|
-
const fromResumable = getValueByPath(fromObject, ['resumable']);
|
|
8834
|
-
if (fromResumable != null) {
|
|
8835
|
-
setValueByPath(toObject, ['resumable'], fromResumable);
|
|
8836
|
-
}
|
|
8837
|
-
const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
|
|
8838
|
-
'lastConsumedClientMessageIndex',
|
|
8839
|
-
]);
|
|
8840
|
-
if (fromLastConsumedClientMessageIndex != null) {
|
|
8841
|
-
setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
|
|
8842
|
-
}
|
|
8843
|
-
return toObject;
|
|
8844
|
-
}
|
|
8845
9080
|
function liveServerSessionResumptionUpdateFromVertex(fromObject) {
|
|
8846
9081
|
const toObject = {};
|
|
8847
9082
|
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
@@ -8860,48 +9095,6 @@ function liveServerSessionResumptionUpdateFromVertex(fromObject) {
|
|
|
8860
9095
|
}
|
|
8861
9096
|
return toObject;
|
|
8862
9097
|
}
|
|
8863
|
-
function liveServerMessageFromMldev(fromObject) {
|
|
8864
|
-
const toObject = {};
|
|
8865
|
-
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8866
|
-
'setupComplete',
|
|
8867
|
-
]);
|
|
8868
|
-
if (fromSetupComplete != null) {
|
|
8869
|
-
setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
|
|
8870
|
-
}
|
|
8871
|
-
const fromServerContent = getValueByPath(fromObject, [
|
|
8872
|
-
'serverContent',
|
|
8873
|
-
]);
|
|
8874
|
-
if (fromServerContent != null) {
|
|
8875
|
-
setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
|
|
8876
|
-
}
|
|
8877
|
-
const fromToolCall = getValueByPath(fromObject, ['toolCall']);
|
|
8878
|
-
if (fromToolCall != null) {
|
|
8879
|
-
setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
|
|
8880
|
-
}
|
|
8881
|
-
const fromToolCallCancellation = getValueByPath(fromObject, [
|
|
8882
|
-
'toolCallCancellation',
|
|
8883
|
-
]);
|
|
8884
|
-
if (fromToolCallCancellation != null) {
|
|
8885
|
-
setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
|
|
8886
|
-
}
|
|
8887
|
-
const fromUsageMetadata = getValueByPath(fromObject, [
|
|
8888
|
-
'usageMetadata',
|
|
8889
|
-
]);
|
|
8890
|
-
if (fromUsageMetadata != null) {
|
|
8891
|
-
setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
|
|
8892
|
-
}
|
|
8893
|
-
const fromGoAway = getValueByPath(fromObject, ['goAway']);
|
|
8894
|
-
if (fromGoAway != null) {
|
|
8895
|
-
setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
|
|
8896
|
-
}
|
|
8897
|
-
const fromSessionResumptionUpdate = getValueByPath(fromObject, [
|
|
8898
|
-
'sessionResumptionUpdate',
|
|
8899
|
-
]);
|
|
8900
|
-
if (fromSessionResumptionUpdate != null) {
|
|
8901
|
-
setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
|
|
8902
|
-
}
|
|
8903
|
-
return toObject;
|
|
8904
|
-
}
|
|
8905
9098
|
function liveServerMessageFromVertex(fromObject) {
|
|
8906
9099
|
const toObject = {};
|
|
8907
9100
|
const fromSetupComplete = getValueByPath(fromObject, [
|
|
@@ -8944,172 +9137,6 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
8944
9137
|
}
|
|
8945
9138
|
return toObject;
|
|
8946
9139
|
}
|
|
8947
|
-
function liveMusicServerSetupCompleteFromMldev() {
|
|
8948
|
-
const toObject = {};
|
|
8949
|
-
return toObject;
|
|
8950
|
-
}
|
|
8951
|
-
function weightedPromptFromMldev(fromObject) {
|
|
8952
|
-
const toObject = {};
|
|
8953
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
8954
|
-
if (fromText != null) {
|
|
8955
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
8956
|
-
}
|
|
8957
|
-
const fromWeight = getValueByPath(fromObject, ['weight']);
|
|
8958
|
-
if (fromWeight != null) {
|
|
8959
|
-
setValueByPath(toObject, ['weight'], fromWeight);
|
|
8960
|
-
}
|
|
8961
|
-
return toObject;
|
|
8962
|
-
}
|
|
8963
|
-
function liveMusicClientContentFromMldev(fromObject) {
|
|
8964
|
-
const toObject = {};
|
|
8965
|
-
const fromWeightedPrompts = getValueByPath(fromObject, [
|
|
8966
|
-
'weightedPrompts',
|
|
8967
|
-
]);
|
|
8968
|
-
if (fromWeightedPrompts != null) {
|
|
8969
|
-
let transformedList = fromWeightedPrompts;
|
|
8970
|
-
if (Array.isArray(transformedList)) {
|
|
8971
|
-
transformedList = transformedList.map((item) => {
|
|
8972
|
-
return weightedPromptFromMldev(item);
|
|
8973
|
-
});
|
|
8974
|
-
}
|
|
8975
|
-
setValueByPath(toObject, ['weightedPrompts'], transformedList);
|
|
8976
|
-
}
|
|
8977
|
-
return toObject;
|
|
8978
|
-
}
|
|
8979
|
-
function liveMusicGenerationConfigFromMldev(fromObject) {
|
|
8980
|
-
const toObject = {};
|
|
8981
|
-
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8982
|
-
if (fromTemperature != null) {
|
|
8983
|
-
setValueByPath(toObject, ['temperature'], fromTemperature);
|
|
8984
|
-
}
|
|
8985
|
-
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8986
|
-
if (fromTopK != null) {
|
|
8987
|
-
setValueByPath(toObject, ['topK'], fromTopK);
|
|
8988
|
-
}
|
|
8989
|
-
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8990
|
-
if (fromSeed != null) {
|
|
8991
|
-
setValueByPath(toObject, ['seed'], fromSeed);
|
|
8992
|
-
}
|
|
8993
|
-
const fromGuidance = getValueByPath(fromObject, ['guidance']);
|
|
8994
|
-
if (fromGuidance != null) {
|
|
8995
|
-
setValueByPath(toObject, ['guidance'], fromGuidance);
|
|
8996
|
-
}
|
|
8997
|
-
const fromBpm = getValueByPath(fromObject, ['bpm']);
|
|
8998
|
-
if (fromBpm != null) {
|
|
8999
|
-
setValueByPath(toObject, ['bpm'], fromBpm);
|
|
9000
|
-
}
|
|
9001
|
-
const fromDensity = getValueByPath(fromObject, ['density']);
|
|
9002
|
-
if (fromDensity != null) {
|
|
9003
|
-
setValueByPath(toObject, ['density'], fromDensity);
|
|
9004
|
-
}
|
|
9005
|
-
const fromBrightness = getValueByPath(fromObject, ['brightness']);
|
|
9006
|
-
if (fromBrightness != null) {
|
|
9007
|
-
setValueByPath(toObject, ['brightness'], fromBrightness);
|
|
9008
|
-
}
|
|
9009
|
-
const fromScale = getValueByPath(fromObject, ['scale']);
|
|
9010
|
-
if (fromScale != null) {
|
|
9011
|
-
setValueByPath(toObject, ['scale'], fromScale);
|
|
9012
|
-
}
|
|
9013
|
-
const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
|
|
9014
|
-
if (fromMuteBass != null) {
|
|
9015
|
-
setValueByPath(toObject, ['muteBass'], fromMuteBass);
|
|
9016
|
-
}
|
|
9017
|
-
const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
|
|
9018
|
-
if (fromMuteDrums != null) {
|
|
9019
|
-
setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
|
|
9020
|
-
}
|
|
9021
|
-
const fromOnlyBassAndDrums = getValueByPath(fromObject, [
|
|
9022
|
-
'onlyBassAndDrums',
|
|
9023
|
-
]);
|
|
9024
|
-
if (fromOnlyBassAndDrums != null) {
|
|
9025
|
-
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
9026
|
-
}
|
|
9027
|
-
return toObject;
|
|
9028
|
-
}
|
|
9029
|
-
function liveMusicSourceMetadataFromMldev(fromObject) {
|
|
9030
|
-
const toObject = {};
|
|
9031
|
-
const fromClientContent = getValueByPath(fromObject, [
|
|
9032
|
-
'clientContent',
|
|
9033
|
-
]);
|
|
9034
|
-
if (fromClientContent != null) {
|
|
9035
|
-
setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
|
|
9036
|
-
}
|
|
9037
|
-
const fromMusicGenerationConfig = getValueByPath(fromObject, [
|
|
9038
|
-
'musicGenerationConfig',
|
|
9039
|
-
]);
|
|
9040
|
-
if (fromMusicGenerationConfig != null) {
|
|
9041
|
-
setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
|
|
9042
|
-
}
|
|
9043
|
-
return toObject;
|
|
9044
|
-
}
|
|
9045
|
-
function audioChunkFromMldev(fromObject) {
|
|
9046
|
-
const toObject = {};
|
|
9047
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
9048
|
-
if (fromData != null) {
|
|
9049
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
9050
|
-
}
|
|
9051
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9052
|
-
if (fromMimeType != null) {
|
|
9053
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9054
|
-
}
|
|
9055
|
-
const fromSourceMetadata = getValueByPath(fromObject, [
|
|
9056
|
-
'sourceMetadata',
|
|
9057
|
-
]);
|
|
9058
|
-
if (fromSourceMetadata != null) {
|
|
9059
|
-
setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
|
|
9060
|
-
}
|
|
9061
|
-
return toObject;
|
|
9062
|
-
}
|
|
9063
|
-
function liveMusicServerContentFromMldev(fromObject) {
|
|
9064
|
-
const toObject = {};
|
|
9065
|
-
const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
|
|
9066
|
-
if (fromAudioChunks != null) {
|
|
9067
|
-
let transformedList = fromAudioChunks;
|
|
9068
|
-
if (Array.isArray(transformedList)) {
|
|
9069
|
-
transformedList = transformedList.map((item) => {
|
|
9070
|
-
return audioChunkFromMldev(item);
|
|
9071
|
-
});
|
|
9072
|
-
}
|
|
9073
|
-
setValueByPath(toObject, ['audioChunks'], transformedList);
|
|
9074
|
-
}
|
|
9075
|
-
return toObject;
|
|
9076
|
-
}
|
|
9077
|
-
function liveMusicFilteredPromptFromMldev(fromObject) {
|
|
9078
|
-
const toObject = {};
|
|
9079
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
9080
|
-
if (fromText != null) {
|
|
9081
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
9082
|
-
}
|
|
9083
|
-
const fromFilteredReason = getValueByPath(fromObject, [
|
|
9084
|
-
'filteredReason',
|
|
9085
|
-
]);
|
|
9086
|
-
if (fromFilteredReason != null) {
|
|
9087
|
-
setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
|
|
9088
|
-
}
|
|
9089
|
-
return toObject;
|
|
9090
|
-
}
|
|
9091
|
-
function liveMusicServerMessageFromMldev(fromObject) {
|
|
9092
|
-
const toObject = {};
|
|
9093
|
-
const fromSetupComplete = getValueByPath(fromObject, [
|
|
9094
|
-
'setupComplete',
|
|
9095
|
-
]);
|
|
9096
|
-
if (fromSetupComplete != null) {
|
|
9097
|
-
setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
|
|
9098
|
-
}
|
|
9099
|
-
const fromServerContent = getValueByPath(fromObject, [
|
|
9100
|
-
'serverContent',
|
|
9101
|
-
]);
|
|
9102
|
-
if (fromServerContent != null) {
|
|
9103
|
-
setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
|
|
9104
|
-
}
|
|
9105
|
-
const fromFilteredPrompt = getValueByPath(fromObject, [
|
|
9106
|
-
'filteredPrompt',
|
|
9107
|
-
]);
|
|
9108
|
-
if (fromFilteredPrompt != null) {
|
|
9109
|
-
setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
|
|
9110
|
-
}
|
|
9111
|
-
return toObject;
|
|
9112
|
-
}
|
|
9113
9140
|
|
|
9114
9141
|
/**
|
|
9115
9142
|
* @license
|
|
@@ -11190,6 +11217,10 @@ function editImageConfigToVertex(fromObject, parentObject) {
|
|
|
11190
11217
|
if (parentObject !== undefined && fromOutputCompressionQuality != null) {
|
|
11191
11218
|
setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
11192
11219
|
}
|
|
11220
|
+
const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
|
|
11221
|
+
if (parentObject !== undefined && fromAddWatermark != null) {
|
|
11222
|
+
setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
|
|
11223
|
+
}
|
|
11193
11224
|
const fromEditMode = getValueByPath(fromObject, ['editMode']);
|
|
11194
11225
|
if (parentObject !== undefined && fromEditMode != null) {
|
|
11195
11226
|
setValueByPath(parentObject, ['parameters', 'editMode'], fromEditMode);
|
|
@@ -11764,6 +11795,12 @@ function candidateFromMldev(fromObject) {
|
|
|
11764
11795
|
}
|
|
11765
11796
|
function generateContentResponseFromMldev(fromObject) {
|
|
11766
11797
|
const toObject = {};
|
|
11798
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11799
|
+
'sdkHttpResponse',
|
|
11800
|
+
]);
|
|
11801
|
+
if (fromSdkHttpResponse != null) {
|
|
11802
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
11803
|
+
}
|
|
11767
11804
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
11768
11805
|
if (fromCandidates != null) {
|
|
11769
11806
|
let transformedList = fromCandidates;
|
|
@@ -12290,6 +12327,12 @@ function candidateFromVertex(fromObject) {
|
|
|
12290
12327
|
}
|
|
12291
12328
|
function generateContentResponseFromVertex(fromObject) {
|
|
12292
12329
|
const toObject = {};
|
|
12330
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12331
|
+
'sdkHttpResponse',
|
|
12332
|
+
]);
|
|
12333
|
+
if (fromSdkHttpResponse != null) {
|
|
12334
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
12335
|
+
}
|
|
12293
12336
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
12294
12337
|
if (fromCandidates != null) {
|
|
12295
12338
|
let transformedList = fromCandidates;
|
|
@@ -12726,7 +12769,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
12726
12769
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
12727
12770
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
12728
12771
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
12729
|
-
const SDK_VERSION = '1.
|
|
12772
|
+
const SDK_VERSION = '1.10.0'; // x-release-please-version
|
|
12730
12773
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
12731
12774
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
12732
12775
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -13298,6 +13341,9 @@ function includeExtraBodyToRequestInit(requestInit, extraBody) {
|
|
|
13298
13341
|
*/
|
|
13299
13342
|
// TODO: b/416041229 - Determine how to retrieve the MCP package version.
|
|
13300
13343
|
const MCP_LABEL = 'mcp_used/unknown';
|
|
13344
|
+
// Whether MCP tool usage is detected from mcpToTool. This is used for
|
|
13345
|
+
// telemetry.
|
|
13346
|
+
let hasMcpToolUsageFromMcpToTool = false;
|
|
13301
13347
|
// Checks whether the list of tools contains any MCP tools.
|
|
13302
13348
|
function hasMcpToolUsage(tools) {
|
|
13303
13349
|
for (const tool of tools) {
|
|
@@ -13308,7 +13354,7 @@ function hasMcpToolUsage(tools) {
|
|
|
13308
13354
|
return true;
|
|
13309
13355
|
}
|
|
13310
13356
|
}
|
|
13311
|
-
return
|
|
13357
|
+
return hasMcpToolUsageFromMcpToTool;
|
|
13312
13358
|
}
|
|
13313
13359
|
// Sets the MCP version label in the Google API client header.
|
|
13314
13360
|
function setMcpUsageHeader(headers) {
|
|
@@ -13465,6 +13511,8 @@ function isMcpClient(client) {
|
|
|
13465
13511
|
* versions.
|
|
13466
13512
|
*/
|
|
13467
13513
|
function mcpToTool(...args) {
|
|
13514
|
+
// Set MCP usage for telemetry.
|
|
13515
|
+
hasMcpToolUsageFromMcpToTool = true;
|
|
13468
13516
|
if (args.length === 0) {
|
|
13469
13517
|
throw new Error('No MCP clients provided');
|
|
13470
13518
|
}
|
|
@@ -13810,6 +13858,12 @@ class Live {
|
|
|
13810
13858
|
*/
|
|
13811
13859
|
async connect(params) {
|
|
13812
13860
|
var _a, _b, _c, _d, _e, _f;
|
|
13861
|
+
// TODO: b/404946746 - Support per request HTTP options.
|
|
13862
|
+
if (params.config && params.config.httpOptions) {
|
|
13863
|
+
throw new Error('The Live module does not support httpOptions at request-level in' +
|
|
13864
|
+
' LiveConnectConfig yet. Please use the client-level httpOptions' +
|
|
13865
|
+
' configuration instead.');
|
|
13866
|
+
}
|
|
13813
13867
|
const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();
|
|
13814
13868
|
const apiVersion = this.apiClient.getApiVersion();
|
|
13815
13869
|
let url;
|
|
@@ -14655,7 +14709,13 @@ class Models extends BaseModule {
|
|
|
14655
14709
|
abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
|
|
14656
14710
|
})
|
|
14657
14711
|
.then((httpResponse) => {
|
|
14658
|
-
return httpResponse.json()
|
|
14712
|
+
return httpResponse.json().then((jsonResponse) => {
|
|
14713
|
+
const response = jsonResponse;
|
|
14714
|
+
response.sdkHttpResponse = {
|
|
14715
|
+
headers: httpResponse.headers,
|
|
14716
|
+
};
|
|
14717
|
+
return response;
|
|
14718
|
+
});
|
|
14659
14719
|
});
|
|
14660
14720
|
return response.then((apiResponse) => {
|
|
14661
14721
|
const resp = generateContentResponseFromVertex(apiResponse);
|
|
@@ -14681,7 +14741,13 @@ class Models extends BaseModule {
|
|
|
14681
14741
|
abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
|
|
14682
14742
|
})
|
|
14683
14743
|
.then((httpResponse) => {
|
|
14684
|
-
return httpResponse.json()
|
|
14744
|
+
return httpResponse.json().then((jsonResponse) => {
|
|
14745
|
+
const response = jsonResponse;
|
|
14746
|
+
response.sdkHttpResponse = {
|
|
14747
|
+
headers: httpResponse.headers,
|
|
14748
|
+
};
|
|
14749
|
+
return response;
|
|
14750
|
+
});
|
|
14685
14751
|
});
|
|
14686
14752
|
return response.then((apiResponse) => {
|
|
14687
14753
|
const resp = generateContentResponseFromMldev(apiResponse);
|
|
@@ -14721,6 +14787,9 @@ class Models extends BaseModule {
|
|
|
14721
14787
|
_d = false;
|
|
14722
14788
|
const chunk = _c;
|
|
14723
14789
|
const resp = generateContentResponseFromVertex((yield __await(chunk.json())));
|
|
14790
|
+
resp['sdkHttpResponse'] = {
|
|
14791
|
+
headers: chunk.headers,
|
|
14792
|
+
};
|
|
14724
14793
|
const typedResp = new GenerateContentResponse();
|
|
14725
14794
|
Object.assign(typedResp, resp);
|
|
14726
14795
|
yield yield __await(typedResp);
|
|
@@ -14761,6 +14830,9 @@ class Models extends BaseModule {
|
|
|
14761
14830
|
_d = false;
|
|
14762
14831
|
const chunk = _c;
|
|
14763
14832
|
const resp = generateContentResponseFromMldev((yield __await(chunk.json())));
|
|
14833
|
+
resp['sdkHttpResponse'] = {
|
|
14834
|
+
headers: chunk.headers,
|
|
14835
|
+
};
|
|
14764
14836
|
const typedResp = new GenerateContentResponse();
|
|
14765
14837
|
Object.assign(typedResp, resp);
|
|
14766
14838
|
yield yield __await(typedResp);
|
|
@@ -17221,7 +17293,7 @@ function listTuningJobsResponseFromMldev(fromObject) {
|
|
|
17221
17293
|
}
|
|
17222
17294
|
return toObject;
|
|
17223
17295
|
}
|
|
17224
|
-
function
|
|
17296
|
+
function tuningOperationFromMldev(fromObject) {
|
|
17225
17297
|
const toObject = {};
|
|
17226
17298
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
17227
17299
|
if (fromName != null) {
|
|
@@ -17648,7 +17720,7 @@ class Tunings extends BaseModule {
|
|
|
17648
17720
|
return httpResponse.json();
|
|
17649
17721
|
});
|
|
17650
17722
|
return response.then((apiResponse) => {
|
|
17651
|
-
const resp =
|
|
17723
|
+
const resp = tuningOperationFromMldev(apiResponse);
|
|
17652
17724
|
return resp;
|
|
17653
17725
|
});
|
|
17654
17726
|
}
|