@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.mjs
CHANGED
|
@@ -2417,6 +2417,9 @@ function tBatchJobSource(apiClient, src) {
|
|
|
2417
2417
|
throw new Error(`Unsupported source: ${src}`);
|
|
2418
2418
|
}
|
|
2419
2419
|
function tBatchJobDestination(dest) {
|
|
2420
|
+
if (typeof dest !== 'string') {
|
|
2421
|
+
return dest;
|
|
2422
|
+
}
|
|
2420
2423
|
const destString = dest;
|
|
2421
2424
|
if (destString.startsWith('gs://')) {
|
|
2422
2425
|
return {
|
|
@@ -3402,10 +3405,6 @@ function deleteBatchJobParametersToVertex(apiClient, fromObject) {
|
|
|
3402
3405
|
}
|
|
3403
3406
|
return toObject;
|
|
3404
3407
|
}
|
|
3405
|
-
function jobErrorFromMldev() {
|
|
3406
|
-
const toObject = {};
|
|
3407
|
-
return toObject;
|
|
3408
|
-
}
|
|
3409
3408
|
function videoMetadataFromMldev$2(fromObject) {
|
|
3410
3409
|
const toObject = {};
|
|
3411
3410
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
@@ -3610,6 +3609,12 @@ function candidateFromMldev$1(fromObject) {
|
|
|
3610
3609
|
}
|
|
3611
3610
|
function generateContentResponseFromMldev$1(fromObject) {
|
|
3612
3611
|
const toObject = {};
|
|
3612
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
3613
|
+
'sdkHttpResponse',
|
|
3614
|
+
]);
|
|
3615
|
+
if (fromSdkHttpResponse != null) {
|
|
3616
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
3617
|
+
}
|
|
3613
3618
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
3614
3619
|
if (fromCandidates != null) {
|
|
3615
3620
|
let transformedList = fromCandidates;
|
|
@@ -3638,6 +3643,22 @@ function generateContentResponseFromMldev$1(fromObject) {
|
|
|
3638
3643
|
}
|
|
3639
3644
|
return toObject;
|
|
3640
3645
|
}
|
|
3646
|
+
function jobErrorFromMldev(fromObject) {
|
|
3647
|
+
const toObject = {};
|
|
3648
|
+
const fromDetails = getValueByPath(fromObject, ['details']);
|
|
3649
|
+
if (fromDetails != null) {
|
|
3650
|
+
setValueByPath(toObject, ['details'], fromDetails);
|
|
3651
|
+
}
|
|
3652
|
+
const fromCode = getValueByPath(fromObject, ['code']);
|
|
3653
|
+
if (fromCode != null) {
|
|
3654
|
+
setValueByPath(toObject, ['code'], fromCode);
|
|
3655
|
+
}
|
|
3656
|
+
const fromMessage = getValueByPath(fromObject, ['message']);
|
|
3657
|
+
if (fromMessage != null) {
|
|
3658
|
+
setValueByPath(toObject, ['message'], fromMessage);
|
|
3659
|
+
}
|
|
3660
|
+
return toObject;
|
|
3661
|
+
}
|
|
3641
3662
|
function inlinedResponseFromMldev(fromObject) {
|
|
3642
3663
|
const toObject = {};
|
|
3643
3664
|
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
@@ -3646,7 +3667,7 @@ function inlinedResponseFromMldev(fromObject) {
|
|
|
3646
3667
|
}
|
|
3647
3668
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
3648
3669
|
if (fromError != null) {
|
|
3649
|
-
setValueByPath(toObject, ['error'], jobErrorFromMldev());
|
|
3670
|
+
setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
|
|
3650
3671
|
}
|
|
3651
3672
|
return toObject;
|
|
3652
3673
|
}
|
|
@@ -3751,7 +3772,7 @@ function deleteResourceJobFromMldev(fromObject) {
|
|
|
3751
3772
|
}
|
|
3752
3773
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
3753
3774
|
if (fromError != null) {
|
|
3754
|
-
setValueByPath(toObject, ['error'], jobErrorFromMldev());
|
|
3775
|
+
setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
|
|
3755
3776
|
}
|
|
3756
3777
|
return toObject;
|
|
3757
3778
|
}
|
|
@@ -6517,8 +6538,14 @@ function listFilesResponseFromMldev(fromObject) {
|
|
|
6517
6538
|
}
|
|
6518
6539
|
return toObject;
|
|
6519
6540
|
}
|
|
6520
|
-
function createFileResponseFromMldev() {
|
|
6541
|
+
function createFileResponseFromMldev(fromObject) {
|
|
6521
6542
|
const toObject = {};
|
|
6543
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
6544
|
+
'sdkHttpResponse',
|
|
6545
|
+
]);
|
|
6546
|
+
if (fromSdkHttpResponse != null) {
|
|
6547
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
6548
|
+
}
|
|
6522
6549
|
return toObject;
|
|
6523
6550
|
}
|
|
6524
6551
|
function deleteFileResponseFromMldev() {
|
|
@@ -6691,8 +6718,8 @@ class Files extends BaseModule {
|
|
|
6691
6718
|
.then((httpResponse) => {
|
|
6692
6719
|
return httpResponse.json();
|
|
6693
6720
|
});
|
|
6694
|
-
return response.then(() => {
|
|
6695
|
-
const resp = createFileResponseFromMldev();
|
|
6721
|
+
return response.then((apiResponse) => {
|
|
6722
|
+
const resp = createFileResponseFromMldev(apiResponse);
|
|
6696
6723
|
const typedResp = new CreateFileResponse();
|
|
6697
6724
|
Object.assign(typedResp, resp);
|
|
6698
6725
|
return typedResp;
|
|
@@ -6810,14 +6837,6 @@ function prebuiltVoiceConfigToMldev$2(fromObject) {
|
|
|
6810
6837
|
}
|
|
6811
6838
|
return toObject;
|
|
6812
6839
|
}
|
|
6813
|
-
function prebuiltVoiceConfigToVertex$1(fromObject) {
|
|
6814
|
-
const toObject = {};
|
|
6815
|
-
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
6816
|
-
if (fromVoiceName != null) {
|
|
6817
|
-
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
6818
|
-
}
|
|
6819
|
-
return toObject;
|
|
6820
|
-
}
|
|
6821
6840
|
function voiceConfigToMldev$2(fromObject) {
|
|
6822
6841
|
const toObject = {};
|
|
6823
6842
|
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
@@ -6828,16 +6847,6 @@ function voiceConfigToMldev$2(fromObject) {
|
|
|
6828
6847
|
}
|
|
6829
6848
|
return toObject;
|
|
6830
6849
|
}
|
|
6831
|
-
function voiceConfigToVertex$1(fromObject) {
|
|
6832
|
-
const toObject = {};
|
|
6833
|
-
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
6834
|
-
'prebuiltVoiceConfig',
|
|
6835
|
-
]);
|
|
6836
|
-
if (fromPrebuiltVoiceConfig != null) {
|
|
6837
|
-
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
|
|
6838
|
-
}
|
|
6839
|
-
return toObject;
|
|
6840
|
-
}
|
|
6841
6850
|
function speakerVoiceConfigToMldev$2(fromObject) {
|
|
6842
6851
|
const toObject = {};
|
|
6843
6852
|
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
@@ -6884,21 +6893,6 @@ function speechConfigToMldev$2(fromObject) {
|
|
|
6884
6893
|
}
|
|
6885
6894
|
return toObject;
|
|
6886
6895
|
}
|
|
6887
|
-
function speechConfigToVertex$1(fromObject) {
|
|
6888
|
-
const toObject = {};
|
|
6889
|
-
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
6890
|
-
if (fromVoiceConfig != null) {
|
|
6891
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
6892
|
-
}
|
|
6893
|
-
if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
|
|
6894
|
-
throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
|
|
6895
|
-
}
|
|
6896
|
-
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
6897
|
-
if (fromLanguageCode != null) {
|
|
6898
|
-
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
6899
|
-
}
|
|
6900
|
-
return toObject;
|
|
6901
|
-
}
|
|
6902
6896
|
function videoMetadataToMldev$2(fromObject) {
|
|
6903
6897
|
const toObject = {};
|
|
6904
6898
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
@@ -6915,22 +6909,6 @@ function videoMetadataToMldev$2(fromObject) {
|
|
|
6915
6909
|
}
|
|
6916
6910
|
return toObject;
|
|
6917
6911
|
}
|
|
6918
|
-
function videoMetadataToVertex$1(fromObject) {
|
|
6919
|
-
const toObject = {};
|
|
6920
|
-
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
6921
|
-
if (fromFps != null) {
|
|
6922
|
-
setValueByPath(toObject, ['fps'], fromFps);
|
|
6923
|
-
}
|
|
6924
|
-
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
6925
|
-
if (fromEndOffset != null) {
|
|
6926
|
-
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
6927
|
-
}
|
|
6928
|
-
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
6929
|
-
if (fromStartOffset != null) {
|
|
6930
|
-
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
6931
|
-
}
|
|
6932
|
-
return toObject;
|
|
6933
|
-
}
|
|
6934
6912
|
function blobToMldev$2(fromObject) {
|
|
6935
6913
|
const toObject = {};
|
|
6936
6914
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
@@ -6946,22 +6924,6 @@ function blobToMldev$2(fromObject) {
|
|
|
6946
6924
|
}
|
|
6947
6925
|
return toObject;
|
|
6948
6926
|
}
|
|
6949
|
-
function blobToVertex$1(fromObject) {
|
|
6950
|
-
const toObject = {};
|
|
6951
|
-
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
6952
|
-
if (fromDisplayName != null) {
|
|
6953
|
-
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
6954
|
-
}
|
|
6955
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
6956
|
-
if (fromData != null) {
|
|
6957
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
6958
|
-
}
|
|
6959
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6960
|
-
if (fromMimeType != null) {
|
|
6961
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6962
|
-
}
|
|
6963
|
-
return toObject;
|
|
6964
|
-
}
|
|
6965
6927
|
function fileDataToMldev$2(fromObject) {
|
|
6966
6928
|
const toObject = {};
|
|
6967
6929
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
@@ -6977,22 +6939,6 @@ function fileDataToMldev$2(fromObject) {
|
|
|
6977
6939
|
}
|
|
6978
6940
|
return toObject;
|
|
6979
6941
|
}
|
|
6980
|
-
function fileDataToVertex$1(fromObject) {
|
|
6981
|
-
const toObject = {};
|
|
6982
|
-
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
6983
|
-
if (fromDisplayName != null) {
|
|
6984
|
-
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
6985
|
-
}
|
|
6986
|
-
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6987
|
-
if (fromFileUri != null) {
|
|
6988
|
-
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
6989
|
-
}
|
|
6990
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6991
|
-
if (fromMimeType != null) {
|
|
6992
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6993
|
-
}
|
|
6994
|
-
return toObject;
|
|
6995
|
-
}
|
|
6996
6942
|
function partToMldev$2(fromObject) {
|
|
6997
6943
|
const toObject = {};
|
|
6998
6944
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7047,60 +6993,6 @@ function partToMldev$2(fromObject) {
|
|
|
7047
6993
|
}
|
|
7048
6994
|
return toObject;
|
|
7049
6995
|
}
|
|
7050
|
-
function partToVertex$1(fromObject) {
|
|
7051
|
-
const toObject = {};
|
|
7052
|
-
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
7053
|
-
'videoMetadata',
|
|
7054
|
-
]);
|
|
7055
|
-
if (fromVideoMetadata != null) {
|
|
7056
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
|
|
7057
|
-
}
|
|
7058
|
-
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
7059
|
-
if (fromThought != null) {
|
|
7060
|
-
setValueByPath(toObject, ['thought'], fromThought);
|
|
7061
|
-
}
|
|
7062
|
-
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
7063
|
-
if (fromInlineData != null) {
|
|
7064
|
-
setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
|
|
7065
|
-
}
|
|
7066
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7067
|
-
if (fromFileData != null) {
|
|
7068
|
-
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
|
|
7069
|
-
}
|
|
7070
|
-
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
7071
|
-
'thoughtSignature',
|
|
7072
|
-
]);
|
|
7073
|
-
if (fromThoughtSignature != null) {
|
|
7074
|
-
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
7075
|
-
}
|
|
7076
|
-
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7077
|
-
'codeExecutionResult',
|
|
7078
|
-
]);
|
|
7079
|
-
if (fromCodeExecutionResult != null) {
|
|
7080
|
-
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
7081
|
-
}
|
|
7082
|
-
const fromExecutableCode = getValueByPath(fromObject, [
|
|
7083
|
-
'executableCode',
|
|
7084
|
-
]);
|
|
7085
|
-
if (fromExecutableCode != null) {
|
|
7086
|
-
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7087
|
-
}
|
|
7088
|
-
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7089
|
-
if (fromFunctionCall != null) {
|
|
7090
|
-
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
7091
|
-
}
|
|
7092
|
-
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
7093
|
-
'functionResponse',
|
|
7094
|
-
]);
|
|
7095
|
-
if (fromFunctionResponse != null) {
|
|
7096
|
-
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
7097
|
-
}
|
|
7098
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
7099
|
-
if (fromText != null) {
|
|
7100
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
7101
|
-
}
|
|
7102
|
-
return toObject;
|
|
7103
|
-
}
|
|
7104
6996
|
function contentToMldev$2(fromObject) {
|
|
7105
6997
|
const toObject = {};
|
|
7106
6998
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -7119,24 +7011,6 @@ function contentToMldev$2(fromObject) {
|
|
|
7119
7011
|
}
|
|
7120
7012
|
return toObject;
|
|
7121
7013
|
}
|
|
7122
|
-
function contentToVertex$1(fromObject) {
|
|
7123
|
-
const toObject = {};
|
|
7124
|
-
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7125
|
-
if (fromParts != null) {
|
|
7126
|
-
let transformedList = fromParts;
|
|
7127
|
-
if (Array.isArray(transformedList)) {
|
|
7128
|
-
transformedList = transformedList.map((item) => {
|
|
7129
|
-
return partToVertex$1(item);
|
|
7130
|
-
});
|
|
7131
|
-
}
|
|
7132
|
-
setValueByPath(toObject, ['parts'], transformedList);
|
|
7133
|
-
}
|
|
7134
|
-
const fromRole = getValueByPath(fromObject, ['role']);
|
|
7135
|
-
if (fromRole != null) {
|
|
7136
|
-
setValueByPath(toObject, ['role'], fromRole);
|
|
7137
|
-
}
|
|
7138
|
-
return toObject;
|
|
7139
|
-
}
|
|
7140
7014
|
function functionDeclarationToMldev$2(fromObject) {
|
|
7141
7015
|
const toObject = {};
|
|
7142
7016
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
@@ -7173,41 +7047,6 @@ function functionDeclarationToMldev$2(fromObject) {
|
|
|
7173
7047
|
}
|
|
7174
7048
|
return toObject;
|
|
7175
7049
|
}
|
|
7176
|
-
function functionDeclarationToVertex$1(fromObject) {
|
|
7177
|
-
const toObject = {};
|
|
7178
|
-
if (getValueByPath(fromObject, ['behavior']) !== undefined) {
|
|
7179
|
-
throw new Error('behavior parameter is not supported in Vertex AI.');
|
|
7180
|
-
}
|
|
7181
|
-
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7182
|
-
if (fromDescription != null) {
|
|
7183
|
-
setValueByPath(toObject, ['description'], fromDescription);
|
|
7184
|
-
}
|
|
7185
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
7186
|
-
if (fromName != null) {
|
|
7187
|
-
setValueByPath(toObject, ['name'], fromName);
|
|
7188
|
-
}
|
|
7189
|
-
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
7190
|
-
if (fromParameters != null) {
|
|
7191
|
-
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
7192
|
-
}
|
|
7193
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
7194
|
-
'parametersJsonSchema',
|
|
7195
|
-
]);
|
|
7196
|
-
if (fromParametersJsonSchema != null) {
|
|
7197
|
-
setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
|
|
7198
|
-
}
|
|
7199
|
-
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
7200
|
-
if (fromResponse != null) {
|
|
7201
|
-
setValueByPath(toObject, ['response'], fromResponse);
|
|
7202
|
-
}
|
|
7203
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
7204
|
-
'responseJsonSchema',
|
|
7205
|
-
]);
|
|
7206
|
-
if (fromResponseJsonSchema != null) {
|
|
7207
|
-
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
7208
|
-
}
|
|
7209
|
-
return toObject;
|
|
7210
|
-
}
|
|
7211
7050
|
function intervalToMldev$2(fromObject) {
|
|
7212
7051
|
const toObject = {};
|
|
7213
7052
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
@@ -7220,18 +7059,6 @@ function intervalToMldev$2(fromObject) {
|
|
|
7220
7059
|
}
|
|
7221
7060
|
return toObject;
|
|
7222
7061
|
}
|
|
7223
|
-
function intervalToVertex$1(fromObject) {
|
|
7224
|
-
const toObject = {};
|
|
7225
|
-
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7226
|
-
if (fromStartTime != null) {
|
|
7227
|
-
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
7228
|
-
}
|
|
7229
|
-
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
7230
|
-
if (fromEndTime != null) {
|
|
7231
|
-
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
7232
|
-
}
|
|
7233
|
-
return toObject;
|
|
7234
|
-
}
|
|
7235
7062
|
function googleSearchToMldev$2(fromObject) {
|
|
7236
7063
|
const toObject = {};
|
|
7237
7064
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
@@ -7242,16 +7069,6 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
7242
7069
|
}
|
|
7243
7070
|
return toObject;
|
|
7244
7071
|
}
|
|
7245
|
-
function googleSearchToVertex$1(fromObject) {
|
|
7246
|
-
const toObject = {};
|
|
7247
|
-
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7248
|
-
'timeRangeFilter',
|
|
7249
|
-
]);
|
|
7250
|
-
if (fromTimeRangeFilter != null) {
|
|
7251
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
|
|
7252
|
-
}
|
|
7253
|
-
return toObject;
|
|
7254
|
-
}
|
|
7255
7072
|
function dynamicRetrievalConfigToMldev$2(fromObject) {
|
|
7256
7073
|
const toObject = {};
|
|
7257
7074
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
@@ -7266,20 +7083,6 @@ function dynamicRetrievalConfigToMldev$2(fromObject) {
|
|
|
7266
7083
|
}
|
|
7267
7084
|
return toObject;
|
|
7268
7085
|
}
|
|
7269
|
-
function dynamicRetrievalConfigToVertex$1(fromObject) {
|
|
7270
|
-
const toObject = {};
|
|
7271
|
-
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
7272
|
-
if (fromMode != null) {
|
|
7273
|
-
setValueByPath(toObject, ['mode'], fromMode);
|
|
7274
|
-
}
|
|
7275
|
-
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
7276
|
-
'dynamicThreshold',
|
|
7277
|
-
]);
|
|
7278
|
-
if (fromDynamicThreshold != null) {
|
|
7279
|
-
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
7280
|
-
}
|
|
7281
|
-
return toObject;
|
|
7282
|
-
}
|
|
7283
7086
|
function googleSearchRetrievalToMldev$2(fromObject) {
|
|
7284
7087
|
const toObject = {};
|
|
7285
7088
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -7290,73 +7093,7 @@ function googleSearchRetrievalToMldev$2(fromObject) {
|
|
|
7290
7093
|
}
|
|
7291
7094
|
return toObject;
|
|
7292
7095
|
}
|
|
7293
|
-
function
|
|
7294
|
-
const toObject = {};
|
|
7295
|
-
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
7296
|
-
'dynamicRetrievalConfig',
|
|
7297
|
-
]);
|
|
7298
|
-
if (fromDynamicRetrievalConfig != null) {
|
|
7299
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
|
|
7300
|
-
}
|
|
7301
|
-
return toObject;
|
|
7302
|
-
}
|
|
7303
|
-
function enterpriseWebSearchToVertex$1() {
|
|
7304
|
-
const toObject = {};
|
|
7305
|
-
return toObject;
|
|
7306
|
-
}
|
|
7307
|
-
function apiKeyConfigToVertex$1(fromObject) {
|
|
7308
|
-
const toObject = {};
|
|
7309
|
-
const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
|
|
7310
|
-
if (fromApiKeyString != null) {
|
|
7311
|
-
setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
|
|
7312
|
-
}
|
|
7313
|
-
return toObject;
|
|
7314
|
-
}
|
|
7315
|
-
function authConfigToVertex$1(fromObject) {
|
|
7316
|
-
const toObject = {};
|
|
7317
|
-
const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
|
|
7318
|
-
if (fromApiKeyConfig != null) {
|
|
7319
|
-
setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
|
|
7320
|
-
}
|
|
7321
|
-
const fromAuthType = getValueByPath(fromObject, ['authType']);
|
|
7322
|
-
if (fromAuthType != null) {
|
|
7323
|
-
setValueByPath(toObject, ['authType'], fromAuthType);
|
|
7324
|
-
}
|
|
7325
|
-
const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
|
|
7326
|
-
'googleServiceAccountConfig',
|
|
7327
|
-
]);
|
|
7328
|
-
if (fromGoogleServiceAccountConfig != null) {
|
|
7329
|
-
setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
|
|
7330
|
-
}
|
|
7331
|
-
const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
|
|
7332
|
-
'httpBasicAuthConfig',
|
|
7333
|
-
]);
|
|
7334
|
-
if (fromHttpBasicAuthConfig != null) {
|
|
7335
|
-
setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
|
|
7336
|
-
}
|
|
7337
|
-
const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
|
|
7338
|
-
if (fromOauthConfig != null) {
|
|
7339
|
-
setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
|
|
7340
|
-
}
|
|
7341
|
-
const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
|
|
7342
|
-
if (fromOidcConfig != null) {
|
|
7343
|
-
setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
|
|
7344
|
-
}
|
|
7345
|
-
return toObject;
|
|
7346
|
-
}
|
|
7347
|
-
function googleMapsToVertex$1(fromObject) {
|
|
7348
|
-
const toObject = {};
|
|
7349
|
-
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7350
|
-
if (fromAuthConfig != null) {
|
|
7351
|
-
setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
|
|
7352
|
-
}
|
|
7353
|
-
return toObject;
|
|
7354
|
-
}
|
|
7355
|
-
function urlContextToMldev$2() {
|
|
7356
|
-
const toObject = {};
|
|
7357
|
-
return toObject;
|
|
7358
|
-
}
|
|
7359
|
-
function urlContextToVertex$1() {
|
|
7096
|
+
function urlContextToMldev$2() {
|
|
7360
7097
|
const toObject = {};
|
|
7361
7098
|
return toObject;
|
|
7362
7099
|
}
|
|
@@ -7409,60 +7146,6 @@ function toolToMldev$2(fromObject) {
|
|
|
7409
7146
|
}
|
|
7410
7147
|
return toObject;
|
|
7411
7148
|
}
|
|
7412
|
-
function toolToVertex$1(fromObject) {
|
|
7413
|
-
const toObject = {};
|
|
7414
|
-
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
7415
|
-
'functionDeclarations',
|
|
7416
|
-
]);
|
|
7417
|
-
if (fromFunctionDeclarations != null) {
|
|
7418
|
-
let transformedList = fromFunctionDeclarations;
|
|
7419
|
-
if (Array.isArray(transformedList)) {
|
|
7420
|
-
transformedList = transformedList.map((item) => {
|
|
7421
|
-
return functionDeclarationToVertex$1(item);
|
|
7422
|
-
});
|
|
7423
|
-
}
|
|
7424
|
-
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
7425
|
-
}
|
|
7426
|
-
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
7427
|
-
if (fromRetrieval != null) {
|
|
7428
|
-
setValueByPath(toObject, ['retrieval'], fromRetrieval);
|
|
7429
|
-
}
|
|
7430
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
7431
|
-
if (fromGoogleSearch != null) {
|
|
7432
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
|
|
7433
|
-
}
|
|
7434
|
-
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
7435
|
-
'googleSearchRetrieval',
|
|
7436
|
-
]);
|
|
7437
|
-
if (fromGoogleSearchRetrieval != null) {
|
|
7438
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
|
|
7439
|
-
}
|
|
7440
|
-
const fromEnterpriseWebSearch = getValueByPath(fromObject, [
|
|
7441
|
-
'enterpriseWebSearch',
|
|
7442
|
-
]);
|
|
7443
|
-
if (fromEnterpriseWebSearch != null) {
|
|
7444
|
-
setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
|
|
7445
|
-
}
|
|
7446
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
7447
|
-
if (fromGoogleMaps != null) {
|
|
7448
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
|
|
7449
|
-
}
|
|
7450
|
-
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
7451
|
-
if (fromUrlContext != null) {
|
|
7452
|
-
setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
|
|
7453
|
-
}
|
|
7454
|
-
const fromCodeExecution = getValueByPath(fromObject, [
|
|
7455
|
-
'codeExecution',
|
|
7456
|
-
]);
|
|
7457
|
-
if (fromCodeExecution != null) {
|
|
7458
|
-
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
7459
|
-
}
|
|
7460
|
-
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
7461
|
-
if (fromComputerUse != null) {
|
|
7462
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
7463
|
-
}
|
|
7464
|
-
return toObject;
|
|
7465
|
-
}
|
|
7466
7149
|
function sessionResumptionConfigToMldev$1(fromObject) {
|
|
7467
7150
|
const toObject = {};
|
|
7468
7151
|
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
@@ -7474,26 +7157,10 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
7474
7157
|
}
|
|
7475
7158
|
return toObject;
|
|
7476
7159
|
}
|
|
7477
|
-
function sessionResumptionConfigToVertex(fromObject) {
|
|
7478
|
-
const toObject = {};
|
|
7479
|
-
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
7480
|
-
if (fromHandle != null) {
|
|
7481
|
-
setValueByPath(toObject, ['handle'], fromHandle);
|
|
7482
|
-
}
|
|
7483
|
-
const fromTransparent = getValueByPath(fromObject, ['transparent']);
|
|
7484
|
-
if (fromTransparent != null) {
|
|
7485
|
-
setValueByPath(toObject, ['transparent'], fromTransparent);
|
|
7486
|
-
}
|
|
7487
|
-
return toObject;
|
|
7488
|
-
}
|
|
7489
7160
|
function audioTranscriptionConfigToMldev$1() {
|
|
7490
7161
|
const toObject = {};
|
|
7491
7162
|
return toObject;
|
|
7492
7163
|
}
|
|
7493
|
-
function audioTranscriptionConfigToVertex() {
|
|
7494
|
-
const toObject = {};
|
|
7495
|
-
return toObject;
|
|
7496
|
-
}
|
|
7497
7164
|
function automaticActivityDetectionToMldev$1(fromObject) {
|
|
7498
7165
|
const toObject = {};
|
|
7499
7166
|
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
@@ -7526,38 +7193,6 @@ function automaticActivityDetectionToMldev$1(fromObject) {
|
|
|
7526
7193
|
}
|
|
7527
7194
|
return toObject;
|
|
7528
7195
|
}
|
|
7529
|
-
function automaticActivityDetectionToVertex(fromObject) {
|
|
7530
|
-
const toObject = {};
|
|
7531
|
-
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
7532
|
-
if (fromDisabled != null) {
|
|
7533
|
-
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
7534
|
-
}
|
|
7535
|
-
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7536
|
-
'startOfSpeechSensitivity',
|
|
7537
|
-
]);
|
|
7538
|
-
if (fromStartOfSpeechSensitivity != null) {
|
|
7539
|
-
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
7540
|
-
}
|
|
7541
|
-
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7542
|
-
'endOfSpeechSensitivity',
|
|
7543
|
-
]);
|
|
7544
|
-
if (fromEndOfSpeechSensitivity != null) {
|
|
7545
|
-
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
7546
|
-
}
|
|
7547
|
-
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
7548
|
-
'prefixPaddingMs',
|
|
7549
|
-
]);
|
|
7550
|
-
if (fromPrefixPaddingMs != null) {
|
|
7551
|
-
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
7552
|
-
}
|
|
7553
|
-
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
7554
|
-
'silenceDurationMs',
|
|
7555
|
-
]);
|
|
7556
|
-
if (fromSilenceDurationMs != null) {
|
|
7557
|
-
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
7558
|
-
}
|
|
7559
|
-
return toObject;
|
|
7560
|
-
}
|
|
7561
7196
|
function realtimeInputConfigToMldev$1(fromObject) {
|
|
7562
7197
|
const toObject = {};
|
|
7563
7198
|
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
@@ -7578,26 +7213,6 @@ function realtimeInputConfigToMldev$1(fromObject) {
|
|
|
7578
7213
|
}
|
|
7579
7214
|
return toObject;
|
|
7580
7215
|
}
|
|
7581
|
-
function realtimeInputConfigToVertex(fromObject) {
|
|
7582
|
-
const toObject = {};
|
|
7583
|
-
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
7584
|
-
'automaticActivityDetection',
|
|
7585
|
-
]);
|
|
7586
|
-
if (fromAutomaticActivityDetection != null) {
|
|
7587
|
-
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
|
|
7588
|
-
}
|
|
7589
|
-
const fromActivityHandling = getValueByPath(fromObject, [
|
|
7590
|
-
'activityHandling',
|
|
7591
|
-
]);
|
|
7592
|
-
if (fromActivityHandling != null) {
|
|
7593
|
-
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
7594
|
-
}
|
|
7595
|
-
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
7596
|
-
if (fromTurnCoverage != null) {
|
|
7597
|
-
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
7598
|
-
}
|
|
7599
|
-
return toObject;
|
|
7600
|
-
}
|
|
7601
7216
|
function slidingWindowToMldev$1(fromObject) {
|
|
7602
7217
|
const toObject = {};
|
|
7603
7218
|
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
@@ -7606,14 +7221,6 @@ function slidingWindowToMldev$1(fromObject) {
|
|
|
7606
7221
|
}
|
|
7607
7222
|
return toObject;
|
|
7608
7223
|
}
|
|
7609
|
-
function slidingWindowToVertex(fromObject) {
|
|
7610
|
-
const toObject = {};
|
|
7611
|
-
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
7612
|
-
if (fromTargetTokens != null) {
|
|
7613
|
-
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
7614
|
-
}
|
|
7615
|
-
return toObject;
|
|
7616
|
-
}
|
|
7617
7224
|
function contextWindowCompressionConfigToMldev$1(fromObject) {
|
|
7618
7225
|
const toObject = {};
|
|
7619
7226
|
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
@@ -7630,22 +7237,6 @@ function contextWindowCompressionConfigToMldev$1(fromObject) {
|
|
|
7630
7237
|
}
|
|
7631
7238
|
return toObject;
|
|
7632
7239
|
}
|
|
7633
|
-
function contextWindowCompressionConfigToVertex(fromObject) {
|
|
7634
|
-
const toObject = {};
|
|
7635
|
-
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
7636
|
-
'triggerTokens',
|
|
7637
|
-
]);
|
|
7638
|
-
if (fromTriggerTokens != null) {
|
|
7639
|
-
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
7640
|
-
}
|
|
7641
|
-
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
7642
|
-
'slidingWindow',
|
|
7643
|
-
]);
|
|
7644
|
-
if (fromSlidingWindow != null) {
|
|
7645
|
-
setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
|
|
7646
|
-
}
|
|
7647
|
-
return toObject;
|
|
7648
|
-
}
|
|
7649
7240
|
function proactivityConfigToMldev$1(fromObject) {
|
|
7650
7241
|
const toObject = {};
|
|
7651
7242
|
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
@@ -7656,16 +7247,6 @@ function proactivityConfigToMldev$1(fromObject) {
|
|
|
7656
7247
|
}
|
|
7657
7248
|
return toObject;
|
|
7658
7249
|
}
|
|
7659
|
-
function proactivityConfigToVertex(fromObject) {
|
|
7660
|
-
const toObject = {};
|
|
7661
|
-
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
7662
|
-
'proactiveAudio',
|
|
7663
|
-
]);
|
|
7664
|
-
if (fromProactiveAudio != null) {
|
|
7665
|
-
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
7666
|
-
}
|
|
7667
|
-
return toObject;
|
|
7668
|
-
}
|
|
7669
7250
|
function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
7670
7251
|
const toObject = {};
|
|
7671
7252
|
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
@@ -7770,155 +7351,31 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
7770
7351
|
}
|
|
7771
7352
|
return toObject;
|
|
7772
7353
|
}
|
|
7773
|
-
function
|
|
7354
|
+
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
7774
7355
|
const toObject = {};
|
|
7775
|
-
const
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
7779
|
-
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
7356
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7357
|
+
if (fromModel != null) {
|
|
7358
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7780
7359
|
}
|
|
7781
|
-
const
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
7785
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
7360
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7361
|
+
if (fromConfig != null) {
|
|
7362
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
|
|
7786
7363
|
}
|
|
7787
|
-
|
|
7788
|
-
|
|
7789
|
-
|
|
7790
|
-
}
|
|
7791
|
-
|
|
7792
|
-
|
|
7793
|
-
|
|
7794
|
-
}
|
|
7795
|
-
|
|
7796
|
-
|
|
7797
|
-
|
|
7798
|
-
}
|
|
7799
|
-
const
|
|
7800
|
-
|
|
7801
|
-
|
|
7802
|
-
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
7803
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
7804
|
-
}
|
|
7805
|
-
const fromMediaResolution = getValueByPath(fromObject, [
|
|
7806
|
-
'mediaResolution',
|
|
7807
|
-
]);
|
|
7808
|
-
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
7809
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
7810
|
-
}
|
|
7811
|
-
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
7812
|
-
if (parentObject !== undefined && fromSeed != null) {
|
|
7813
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
7814
|
-
}
|
|
7815
|
-
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
7816
|
-
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
7817
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
7818
|
-
}
|
|
7819
|
-
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
7820
|
-
'enableAffectiveDialog',
|
|
7821
|
-
]);
|
|
7822
|
-
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
7823
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
7824
|
-
}
|
|
7825
|
-
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
7826
|
-
'systemInstruction',
|
|
7827
|
-
]);
|
|
7828
|
-
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
7829
|
-
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
|
|
7830
|
-
}
|
|
7831
|
-
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
7832
|
-
if (parentObject !== undefined && fromTools != null) {
|
|
7833
|
-
let transformedList = tTools(fromTools);
|
|
7834
|
-
if (Array.isArray(transformedList)) {
|
|
7835
|
-
transformedList = transformedList.map((item) => {
|
|
7836
|
-
return toolToVertex$1(tTool(item));
|
|
7837
|
-
});
|
|
7838
|
-
}
|
|
7839
|
-
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
7840
|
-
}
|
|
7841
|
-
const fromSessionResumption = getValueByPath(fromObject, [
|
|
7842
|
-
'sessionResumption',
|
|
7843
|
-
]);
|
|
7844
|
-
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
7845
|
-
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
|
|
7846
|
-
}
|
|
7847
|
-
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
7848
|
-
'inputAudioTranscription',
|
|
7849
|
-
]);
|
|
7850
|
-
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
7851
|
-
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
7852
|
-
}
|
|
7853
|
-
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
7854
|
-
'outputAudioTranscription',
|
|
7855
|
-
]);
|
|
7856
|
-
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
7857
|
-
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
7858
|
-
}
|
|
7859
|
-
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
7860
|
-
'realtimeInputConfig',
|
|
7861
|
-
]);
|
|
7862
|
-
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
7863
|
-
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
|
|
7864
|
-
}
|
|
7865
|
-
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
7866
|
-
'contextWindowCompression',
|
|
7867
|
-
]);
|
|
7868
|
-
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
7869
|
-
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
|
|
7870
|
-
}
|
|
7871
|
-
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
7872
|
-
if (parentObject !== undefined && fromProactivity != null) {
|
|
7873
|
-
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
|
|
7874
|
-
}
|
|
7875
|
-
return toObject;
|
|
7876
|
-
}
|
|
7877
|
-
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
7878
|
-
const toObject = {};
|
|
7879
|
-
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7880
|
-
if (fromModel != null) {
|
|
7881
|
-
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7882
|
-
}
|
|
7883
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7884
|
-
if (fromConfig != null) {
|
|
7885
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
|
|
7886
|
-
}
|
|
7887
|
-
return toObject;
|
|
7888
|
-
}
|
|
7889
|
-
function liveConnectParametersToVertex(apiClient, fromObject) {
|
|
7890
|
-
const toObject = {};
|
|
7891
|
-
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7892
|
-
if (fromModel != null) {
|
|
7893
|
-
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7894
|
-
}
|
|
7895
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7896
|
-
if (fromConfig != null) {
|
|
7897
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
|
|
7898
|
-
}
|
|
7899
|
-
return toObject;
|
|
7900
|
-
}
|
|
7901
|
-
function activityStartToMldev() {
|
|
7902
|
-
const toObject = {};
|
|
7903
|
-
return toObject;
|
|
7904
|
-
}
|
|
7905
|
-
function activityStartToVertex() {
|
|
7906
|
-
const toObject = {};
|
|
7907
|
-
return toObject;
|
|
7908
|
-
}
|
|
7909
|
-
function activityEndToMldev() {
|
|
7910
|
-
const toObject = {};
|
|
7911
|
-
return toObject;
|
|
7912
|
-
}
|
|
7913
|
-
function activityEndToVertex() {
|
|
7914
|
-
const toObject = {};
|
|
7915
|
-
return toObject;
|
|
7916
|
-
}
|
|
7917
|
-
function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
7918
|
-
const toObject = {};
|
|
7919
|
-
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7920
|
-
if (fromMedia != null) {
|
|
7921
|
-
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7364
|
+
return toObject;
|
|
7365
|
+
}
|
|
7366
|
+
function activityStartToMldev() {
|
|
7367
|
+
const toObject = {};
|
|
7368
|
+
return toObject;
|
|
7369
|
+
}
|
|
7370
|
+
function activityEndToMldev() {
|
|
7371
|
+
const toObject = {};
|
|
7372
|
+
return toObject;
|
|
7373
|
+
}
|
|
7374
|
+
function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
7375
|
+
const toObject = {};
|
|
7376
|
+
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7377
|
+
if (fromMedia != null) {
|
|
7378
|
+
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7922
7379
|
}
|
|
7923
7380
|
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
7924
7381
|
if (fromAudio != null) {
|
|
@@ -7950,42 +7407,6 @@ function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
|
7950
7407
|
}
|
|
7951
7408
|
return toObject;
|
|
7952
7409
|
}
|
|
7953
|
-
function liveSendRealtimeInputParametersToVertex(fromObject) {
|
|
7954
|
-
const toObject = {};
|
|
7955
|
-
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7956
|
-
if (fromMedia != null) {
|
|
7957
|
-
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7958
|
-
}
|
|
7959
|
-
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
7960
|
-
if (fromAudio != null) {
|
|
7961
|
-
setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
|
|
7962
|
-
}
|
|
7963
|
-
const fromAudioStreamEnd = getValueByPath(fromObject, [
|
|
7964
|
-
'audioStreamEnd',
|
|
7965
|
-
]);
|
|
7966
|
-
if (fromAudioStreamEnd != null) {
|
|
7967
|
-
setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
|
|
7968
|
-
}
|
|
7969
|
-
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
7970
|
-
if (fromVideo != null) {
|
|
7971
|
-
setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
|
|
7972
|
-
}
|
|
7973
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
7974
|
-
if (fromText != null) {
|
|
7975
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
7976
|
-
}
|
|
7977
|
-
const fromActivityStart = getValueByPath(fromObject, [
|
|
7978
|
-
'activityStart',
|
|
7979
|
-
]);
|
|
7980
|
-
if (fromActivityStart != null) {
|
|
7981
|
-
setValueByPath(toObject, ['activityStart'], activityStartToVertex());
|
|
7982
|
-
}
|
|
7983
|
-
const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
|
|
7984
|
-
if (fromActivityEnd != null) {
|
|
7985
|
-
setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
|
|
7986
|
-
}
|
|
7987
|
-
return toObject;
|
|
7988
|
-
}
|
|
7989
7410
|
function weightedPromptToMldev(fromObject) {
|
|
7990
7411
|
const toObject = {};
|
|
7991
7412
|
const fromText = getValueByPath(fromObject, ['text']);
|
|
@@ -8124,35 +7545,40 @@ function liveMusicClientMessageToMldev(fromObject) {
|
|
|
8124
7545
|
}
|
|
8125
7546
|
return toObject;
|
|
8126
7547
|
}
|
|
8127
|
-
function
|
|
7548
|
+
function prebuiltVoiceConfigToVertex$1(fromObject) {
|
|
8128
7549
|
const toObject = {};
|
|
7550
|
+
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
7551
|
+
if (fromVoiceName != null) {
|
|
7552
|
+
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
7553
|
+
}
|
|
8129
7554
|
return toObject;
|
|
8130
7555
|
}
|
|
8131
|
-
function
|
|
7556
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
8132
7557
|
const toObject = {};
|
|
8133
|
-
const
|
|
8134
|
-
|
|
8135
|
-
|
|
7558
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
7559
|
+
'prebuiltVoiceConfig',
|
|
7560
|
+
]);
|
|
7561
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
7562
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
|
|
8136
7563
|
}
|
|
8137
7564
|
return toObject;
|
|
8138
7565
|
}
|
|
8139
|
-
function
|
|
7566
|
+
function speechConfigToVertex$1(fromObject) {
|
|
8140
7567
|
const toObject = {};
|
|
8141
|
-
const
|
|
8142
|
-
if (
|
|
8143
|
-
setValueByPath(toObject, ['
|
|
7568
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
7569
|
+
if (fromVoiceConfig != null) {
|
|
7570
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
8144
7571
|
}
|
|
8145
|
-
|
|
8146
|
-
|
|
8147
|
-
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
7572
|
+
if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
|
|
7573
|
+
throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
|
|
8148
7574
|
}
|
|
8149
|
-
const
|
|
8150
|
-
if (
|
|
8151
|
-
setValueByPath(toObject, ['
|
|
7575
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
7576
|
+
if (fromLanguageCode != null) {
|
|
7577
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8152
7578
|
}
|
|
8153
7579
|
return toObject;
|
|
8154
7580
|
}
|
|
8155
|
-
function
|
|
7581
|
+
function videoMetadataToVertex$1(fromObject) {
|
|
8156
7582
|
const toObject = {};
|
|
8157
7583
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8158
7584
|
if (fromFps != null) {
|
|
@@ -8168,19 +7594,7 @@ function videoMetadataFromVertex$1(fromObject) {
|
|
|
8168
7594
|
}
|
|
8169
7595
|
return toObject;
|
|
8170
7596
|
}
|
|
8171
|
-
function
|
|
8172
|
-
const toObject = {};
|
|
8173
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
8174
|
-
if (fromData != null) {
|
|
8175
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
8176
|
-
}
|
|
8177
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8178
|
-
if (fromMimeType != null) {
|
|
8179
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8180
|
-
}
|
|
8181
|
-
return toObject;
|
|
8182
|
-
}
|
|
8183
|
-
function blobFromVertex$1(fromObject) {
|
|
7597
|
+
function blobToVertex$1(fromObject) {
|
|
8184
7598
|
const toObject = {};
|
|
8185
7599
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8186
7600
|
if (fromDisplayName != null) {
|
|
@@ -8196,19 +7610,7 @@ function blobFromVertex$1(fromObject) {
|
|
|
8196
7610
|
}
|
|
8197
7611
|
return toObject;
|
|
8198
7612
|
}
|
|
8199
|
-
function
|
|
8200
|
-
const toObject = {};
|
|
8201
|
-
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8202
|
-
if (fromFileUri != null) {
|
|
8203
|
-
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8204
|
-
}
|
|
8205
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8206
|
-
if (fromMimeType != null) {
|
|
8207
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8208
|
-
}
|
|
8209
|
-
return toObject;
|
|
8210
|
-
}
|
|
8211
|
-
function fileDataFromVertex$1(fromObject) {
|
|
7613
|
+
function fileDataToVertex$1(fromObject) {
|
|
8212
7614
|
const toObject = {};
|
|
8213
7615
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8214
7616
|
if (fromDisplayName != null) {
|
|
@@ -8224,13 +7626,13 @@ function fileDataFromVertex$1(fromObject) {
|
|
|
8224
7626
|
}
|
|
8225
7627
|
return toObject;
|
|
8226
7628
|
}
|
|
8227
|
-
function
|
|
7629
|
+
function partToVertex$1(fromObject) {
|
|
8228
7630
|
const toObject = {};
|
|
8229
7631
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8230
7632
|
'videoMetadata',
|
|
8231
7633
|
]);
|
|
8232
7634
|
if (fromVideoMetadata != null) {
|
|
8233
|
-
setValueByPath(toObject, ['videoMetadata'],
|
|
7635
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
|
|
8234
7636
|
}
|
|
8235
7637
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8236
7638
|
if (fromThought != null) {
|
|
@@ -8238,11 +7640,11 @@ function partFromMldev$1(fromObject) {
|
|
|
8238
7640
|
}
|
|
8239
7641
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
8240
7642
|
if (fromInlineData != null) {
|
|
8241
|
-
setValueByPath(toObject, ['inlineData'],
|
|
7643
|
+
setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
|
|
8242
7644
|
}
|
|
8243
7645
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8244
7646
|
if (fromFileData != null) {
|
|
8245
|
-
setValueByPath(toObject, ['fileData'],
|
|
7647
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
|
|
8246
7648
|
}
|
|
8247
7649
|
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8248
7650
|
'thoughtSignature',
|
|
@@ -8278,16 +7680,1119 @@ function partFromMldev$1(fromObject) {
|
|
|
8278
7680
|
}
|
|
8279
7681
|
return toObject;
|
|
8280
7682
|
}
|
|
8281
|
-
function
|
|
7683
|
+
function contentToVertex$1(fromObject) {
|
|
8282
7684
|
const toObject = {};
|
|
8283
|
-
const
|
|
8284
|
-
|
|
8285
|
-
|
|
8286
|
-
|
|
8287
|
-
|
|
7685
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7686
|
+
if (fromParts != null) {
|
|
7687
|
+
let transformedList = fromParts;
|
|
7688
|
+
if (Array.isArray(transformedList)) {
|
|
7689
|
+
transformedList = transformedList.map((item) => {
|
|
7690
|
+
return partToVertex$1(item);
|
|
7691
|
+
});
|
|
7692
|
+
}
|
|
7693
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
8288
7694
|
}
|
|
8289
|
-
const
|
|
8290
|
-
if (
|
|
7695
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
7696
|
+
if (fromRole != null) {
|
|
7697
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
7698
|
+
}
|
|
7699
|
+
return toObject;
|
|
7700
|
+
}
|
|
7701
|
+
function functionDeclarationToVertex$1(fromObject) {
|
|
7702
|
+
const toObject = {};
|
|
7703
|
+
if (getValueByPath(fromObject, ['behavior']) !== undefined) {
|
|
7704
|
+
throw new Error('behavior parameter is not supported in Vertex AI.');
|
|
7705
|
+
}
|
|
7706
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7707
|
+
if (fromDescription != null) {
|
|
7708
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
7709
|
+
}
|
|
7710
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
7711
|
+
if (fromName != null) {
|
|
7712
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
7713
|
+
}
|
|
7714
|
+
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
7715
|
+
if (fromParameters != null) {
|
|
7716
|
+
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
7717
|
+
}
|
|
7718
|
+
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
7719
|
+
'parametersJsonSchema',
|
|
7720
|
+
]);
|
|
7721
|
+
if (fromParametersJsonSchema != null) {
|
|
7722
|
+
setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
|
|
7723
|
+
}
|
|
7724
|
+
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
7725
|
+
if (fromResponse != null) {
|
|
7726
|
+
setValueByPath(toObject, ['response'], fromResponse);
|
|
7727
|
+
}
|
|
7728
|
+
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
7729
|
+
'responseJsonSchema',
|
|
7730
|
+
]);
|
|
7731
|
+
if (fromResponseJsonSchema != null) {
|
|
7732
|
+
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
7733
|
+
}
|
|
7734
|
+
return toObject;
|
|
7735
|
+
}
|
|
7736
|
+
function intervalToVertex$1(fromObject) {
|
|
7737
|
+
const toObject = {};
|
|
7738
|
+
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7739
|
+
if (fromStartTime != null) {
|
|
7740
|
+
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
7741
|
+
}
|
|
7742
|
+
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
7743
|
+
if (fromEndTime != null) {
|
|
7744
|
+
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
7745
|
+
}
|
|
7746
|
+
return toObject;
|
|
7747
|
+
}
|
|
7748
|
+
function googleSearchToVertex$1(fromObject) {
|
|
7749
|
+
const toObject = {};
|
|
7750
|
+
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7751
|
+
'timeRangeFilter',
|
|
7752
|
+
]);
|
|
7753
|
+
if (fromTimeRangeFilter != null) {
|
|
7754
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
|
|
7755
|
+
}
|
|
7756
|
+
return toObject;
|
|
7757
|
+
}
|
|
7758
|
+
function dynamicRetrievalConfigToVertex$1(fromObject) {
|
|
7759
|
+
const toObject = {};
|
|
7760
|
+
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
7761
|
+
if (fromMode != null) {
|
|
7762
|
+
setValueByPath(toObject, ['mode'], fromMode);
|
|
7763
|
+
}
|
|
7764
|
+
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
7765
|
+
'dynamicThreshold',
|
|
7766
|
+
]);
|
|
7767
|
+
if (fromDynamicThreshold != null) {
|
|
7768
|
+
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
7769
|
+
}
|
|
7770
|
+
return toObject;
|
|
7771
|
+
}
|
|
7772
|
+
function googleSearchRetrievalToVertex$1(fromObject) {
|
|
7773
|
+
const toObject = {};
|
|
7774
|
+
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
7775
|
+
'dynamicRetrievalConfig',
|
|
7776
|
+
]);
|
|
7777
|
+
if (fromDynamicRetrievalConfig != null) {
|
|
7778
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
|
|
7779
|
+
}
|
|
7780
|
+
return toObject;
|
|
7781
|
+
}
|
|
7782
|
+
function enterpriseWebSearchToVertex$1() {
|
|
7783
|
+
const toObject = {};
|
|
7784
|
+
return toObject;
|
|
7785
|
+
}
|
|
7786
|
+
function apiKeyConfigToVertex$1(fromObject) {
|
|
7787
|
+
const toObject = {};
|
|
7788
|
+
const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
|
|
7789
|
+
if (fromApiKeyString != null) {
|
|
7790
|
+
setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
|
|
7791
|
+
}
|
|
7792
|
+
return toObject;
|
|
7793
|
+
}
|
|
7794
|
+
function authConfigToVertex$1(fromObject) {
|
|
7795
|
+
const toObject = {};
|
|
7796
|
+
const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
|
|
7797
|
+
if (fromApiKeyConfig != null) {
|
|
7798
|
+
setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
|
|
7799
|
+
}
|
|
7800
|
+
const fromAuthType = getValueByPath(fromObject, ['authType']);
|
|
7801
|
+
if (fromAuthType != null) {
|
|
7802
|
+
setValueByPath(toObject, ['authType'], fromAuthType);
|
|
7803
|
+
}
|
|
7804
|
+
const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
|
|
7805
|
+
'googleServiceAccountConfig',
|
|
7806
|
+
]);
|
|
7807
|
+
if (fromGoogleServiceAccountConfig != null) {
|
|
7808
|
+
setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
|
|
7809
|
+
}
|
|
7810
|
+
const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
|
|
7811
|
+
'httpBasicAuthConfig',
|
|
7812
|
+
]);
|
|
7813
|
+
if (fromHttpBasicAuthConfig != null) {
|
|
7814
|
+
setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
|
|
7815
|
+
}
|
|
7816
|
+
const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
|
|
7817
|
+
if (fromOauthConfig != null) {
|
|
7818
|
+
setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
|
|
7819
|
+
}
|
|
7820
|
+
const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
|
|
7821
|
+
if (fromOidcConfig != null) {
|
|
7822
|
+
setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
|
|
7823
|
+
}
|
|
7824
|
+
return toObject;
|
|
7825
|
+
}
|
|
7826
|
+
function googleMapsToVertex$1(fromObject) {
|
|
7827
|
+
const toObject = {};
|
|
7828
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7829
|
+
if (fromAuthConfig != null) {
|
|
7830
|
+
setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
|
|
7831
|
+
}
|
|
7832
|
+
return toObject;
|
|
7833
|
+
}
|
|
7834
|
+
function urlContextToVertex$1() {
|
|
7835
|
+
const toObject = {};
|
|
7836
|
+
return toObject;
|
|
7837
|
+
}
|
|
7838
|
+
function toolToVertex$1(fromObject) {
|
|
7839
|
+
const toObject = {};
|
|
7840
|
+
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
7841
|
+
'functionDeclarations',
|
|
7842
|
+
]);
|
|
7843
|
+
if (fromFunctionDeclarations != null) {
|
|
7844
|
+
let transformedList = fromFunctionDeclarations;
|
|
7845
|
+
if (Array.isArray(transformedList)) {
|
|
7846
|
+
transformedList = transformedList.map((item) => {
|
|
7847
|
+
return functionDeclarationToVertex$1(item);
|
|
7848
|
+
});
|
|
7849
|
+
}
|
|
7850
|
+
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
7851
|
+
}
|
|
7852
|
+
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
7853
|
+
if (fromRetrieval != null) {
|
|
7854
|
+
setValueByPath(toObject, ['retrieval'], fromRetrieval);
|
|
7855
|
+
}
|
|
7856
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
7857
|
+
if (fromGoogleSearch != null) {
|
|
7858
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
|
|
7859
|
+
}
|
|
7860
|
+
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
7861
|
+
'googleSearchRetrieval',
|
|
7862
|
+
]);
|
|
7863
|
+
if (fromGoogleSearchRetrieval != null) {
|
|
7864
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
|
|
7865
|
+
}
|
|
7866
|
+
const fromEnterpriseWebSearch = getValueByPath(fromObject, [
|
|
7867
|
+
'enterpriseWebSearch',
|
|
7868
|
+
]);
|
|
7869
|
+
if (fromEnterpriseWebSearch != null) {
|
|
7870
|
+
setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
|
|
7871
|
+
}
|
|
7872
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
7873
|
+
if (fromGoogleMaps != null) {
|
|
7874
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
|
|
7875
|
+
}
|
|
7876
|
+
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
7877
|
+
if (fromUrlContext != null) {
|
|
7878
|
+
setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
|
|
7879
|
+
}
|
|
7880
|
+
const fromCodeExecution = getValueByPath(fromObject, [
|
|
7881
|
+
'codeExecution',
|
|
7882
|
+
]);
|
|
7883
|
+
if (fromCodeExecution != null) {
|
|
7884
|
+
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
7885
|
+
}
|
|
7886
|
+
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
7887
|
+
if (fromComputerUse != null) {
|
|
7888
|
+
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
7889
|
+
}
|
|
7890
|
+
return toObject;
|
|
7891
|
+
}
|
|
7892
|
+
function sessionResumptionConfigToVertex(fromObject) {
|
|
7893
|
+
const toObject = {};
|
|
7894
|
+
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
7895
|
+
if (fromHandle != null) {
|
|
7896
|
+
setValueByPath(toObject, ['handle'], fromHandle);
|
|
7897
|
+
}
|
|
7898
|
+
const fromTransparent = getValueByPath(fromObject, ['transparent']);
|
|
7899
|
+
if (fromTransparent != null) {
|
|
7900
|
+
setValueByPath(toObject, ['transparent'], fromTransparent);
|
|
7901
|
+
}
|
|
7902
|
+
return toObject;
|
|
7903
|
+
}
|
|
7904
|
+
function audioTranscriptionConfigToVertex() {
|
|
7905
|
+
const toObject = {};
|
|
7906
|
+
return toObject;
|
|
7907
|
+
}
|
|
7908
|
+
function automaticActivityDetectionToVertex(fromObject) {
|
|
7909
|
+
const toObject = {};
|
|
7910
|
+
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
7911
|
+
if (fromDisabled != null) {
|
|
7912
|
+
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
7913
|
+
}
|
|
7914
|
+
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7915
|
+
'startOfSpeechSensitivity',
|
|
7916
|
+
]);
|
|
7917
|
+
if (fromStartOfSpeechSensitivity != null) {
|
|
7918
|
+
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
7919
|
+
}
|
|
7920
|
+
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7921
|
+
'endOfSpeechSensitivity',
|
|
7922
|
+
]);
|
|
7923
|
+
if (fromEndOfSpeechSensitivity != null) {
|
|
7924
|
+
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
7925
|
+
}
|
|
7926
|
+
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
7927
|
+
'prefixPaddingMs',
|
|
7928
|
+
]);
|
|
7929
|
+
if (fromPrefixPaddingMs != null) {
|
|
7930
|
+
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
7931
|
+
}
|
|
7932
|
+
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
7933
|
+
'silenceDurationMs',
|
|
7934
|
+
]);
|
|
7935
|
+
if (fromSilenceDurationMs != null) {
|
|
7936
|
+
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
7937
|
+
}
|
|
7938
|
+
return toObject;
|
|
7939
|
+
}
|
|
7940
|
+
function realtimeInputConfigToVertex(fromObject) {
|
|
7941
|
+
const toObject = {};
|
|
7942
|
+
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
7943
|
+
'automaticActivityDetection',
|
|
7944
|
+
]);
|
|
7945
|
+
if (fromAutomaticActivityDetection != null) {
|
|
7946
|
+
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
|
|
7947
|
+
}
|
|
7948
|
+
const fromActivityHandling = getValueByPath(fromObject, [
|
|
7949
|
+
'activityHandling',
|
|
7950
|
+
]);
|
|
7951
|
+
if (fromActivityHandling != null) {
|
|
7952
|
+
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
7953
|
+
}
|
|
7954
|
+
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
7955
|
+
if (fromTurnCoverage != null) {
|
|
7956
|
+
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
7957
|
+
}
|
|
7958
|
+
return toObject;
|
|
7959
|
+
}
|
|
7960
|
+
function slidingWindowToVertex(fromObject) {
|
|
7961
|
+
const toObject = {};
|
|
7962
|
+
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
7963
|
+
if (fromTargetTokens != null) {
|
|
7964
|
+
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
7965
|
+
}
|
|
7966
|
+
return toObject;
|
|
7967
|
+
}
|
|
7968
|
+
function contextWindowCompressionConfigToVertex(fromObject) {
|
|
7969
|
+
const toObject = {};
|
|
7970
|
+
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
7971
|
+
'triggerTokens',
|
|
7972
|
+
]);
|
|
7973
|
+
if (fromTriggerTokens != null) {
|
|
7974
|
+
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
7975
|
+
}
|
|
7976
|
+
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
7977
|
+
'slidingWindow',
|
|
7978
|
+
]);
|
|
7979
|
+
if (fromSlidingWindow != null) {
|
|
7980
|
+
setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
|
|
7981
|
+
}
|
|
7982
|
+
return toObject;
|
|
7983
|
+
}
|
|
7984
|
+
function proactivityConfigToVertex(fromObject) {
|
|
7985
|
+
const toObject = {};
|
|
7986
|
+
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
7987
|
+
'proactiveAudio',
|
|
7988
|
+
]);
|
|
7989
|
+
if (fromProactiveAudio != null) {
|
|
7990
|
+
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
7991
|
+
}
|
|
7992
|
+
return toObject;
|
|
7993
|
+
}
|
|
7994
|
+
function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
7995
|
+
const toObject = {};
|
|
7996
|
+
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
7997
|
+
'generationConfig',
|
|
7998
|
+
]);
|
|
7999
|
+
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
8000
|
+
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
8001
|
+
}
|
|
8002
|
+
const fromResponseModalities = getValueByPath(fromObject, [
|
|
8003
|
+
'responseModalities',
|
|
8004
|
+
]);
|
|
8005
|
+
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
8006
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
8007
|
+
}
|
|
8008
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8009
|
+
if (parentObject !== undefined && fromTemperature != null) {
|
|
8010
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
|
|
8011
|
+
}
|
|
8012
|
+
const fromTopP = getValueByPath(fromObject, ['topP']);
|
|
8013
|
+
if (parentObject !== undefined && fromTopP != null) {
|
|
8014
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
|
|
8015
|
+
}
|
|
8016
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8017
|
+
if (parentObject !== undefined && fromTopK != null) {
|
|
8018
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
|
|
8019
|
+
}
|
|
8020
|
+
const fromMaxOutputTokens = getValueByPath(fromObject, [
|
|
8021
|
+
'maxOutputTokens',
|
|
8022
|
+
]);
|
|
8023
|
+
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
8024
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
8025
|
+
}
|
|
8026
|
+
const fromMediaResolution = getValueByPath(fromObject, [
|
|
8027
|
+
'mediaResolution',
|
|
8028
|
+
]);
|
|
8029
|
+
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
8030
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
8031
|
+
}
|
|
8032
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8033
|
+
if (parentObject !== undefined && fromSeed != null) {
|
|
8034
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
8035
|
+
}
|
|
8036
|
+
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8037
|
+
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8038
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8039
|
+
}
|
|
8040
|
+
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8041
|
+
'enableAffectiveDialog',
|
|
8042
|
+
]);
|
|
8043
|
+
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
8044
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
8045
|
+
}
|
|
8046
|
+
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
8047
|
+
'systemInstruction',
|
|
8048
|
+
]);
|
|
8049
|
+
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
8050
|
+
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
|
|
8051
|
+
}
|
|
8052
|
+
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
8053
|
+
if (parentObject !== undefined && fromTools != null) {
|
|
8054
|
+
let transformedList = tTools(fromTools);
|
|
8055
|
+
if (Array.isArray(transformedList)) {
|
|
8056
|
+
transformedList = transformedList.map((item) => {
|
|
8057
|
+
return toolToVertex$1(tTool(item));
|
|
8058
|
+
});
|
|
8059
|
+
}
|
|
8060
|
+
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
8061
|
+
}
|
|
8062
|
+
const fromSessionResumption = getValueByPath(fromObject, [
|
|
8063
|
+
'sessionResumption',
|
|
8064
|
+
]);
|
|
8065
|
+
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
8066
|
+
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
|
|
8067
|
+
}
|
|
8068
|
+
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
8069
|
+
'inputAudioTranscription',
|
|
8070
|
+
]);
|
|
8071
|
+
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
8072
|
+
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8073
|
+
}
|
|
8074
|
+
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
8075
|
+
'outputAudioTranscription',
|
|
8076
|
+
]);
|
|
8077
|
+
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
8078
|
+
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8079
|
+
}
|
|
8080
|
+
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
8081
|
+
'realtimeInputConfig',
|
|
8082
|
+
]);
|
|
8083
|
+
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
8084
|
+
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
|
|
8085
|
+
}
|
|
8086
|
+
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
8087
|
+
'contextWindowCompression',
|
|
8088
|
+
]);
|
|
8089
|
+
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
8090
|
+
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
|
|
8091
|
+
}
|
|
8092
|
+
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
8093
|
+
if (parentObject !== undefined && fromProactivity != null) {
|
|
8094
|
+
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
|
|
8095
|
+
}
|
|
8096
|
+
return toObject;
|
|
8097
|
+
}
|
|
8098
|
+
function liveConnectParametersToVertex(apiClient, fromObject) {
|
|
8099
|
+
const toObject = {};
|
|
8100
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8101
|
+
if (fromModel != null) {
|
|
8102
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
8103
|
+
}
|
|
8104
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
8105
|
+
if (fromConfig != null) {
|
|
8106
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
|
|
8107
|
+
}
|
|
8108
|
+
return toObject;
|
|
8109
|
+
}
|
|
8110
|
+
function activityStartToVertex() {
|
|
8111
|
+
const toObject = {};
|
|
8112
|
+
return toObject;
|
|
8113
|
+
}
|
|
8114
|
+
function activityEndToVertex() {
|
|
8115
|
+
const toObject = {};
|
|
8116
|
+
return toObject;
|
|
8117
|
+
}
|
|
8118
|
+
function liveSendRealtimeInputParametersToVertex(fromObject) {
|
|
8119
|
+
const toObject = {};
|
|
8120
|
+
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
8121
|
+
if (fromMedia != null) {
|
|
8122
|
+
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
8123
|
+
}
|
|
8124
|
+
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
8125
|
+
if (fromAudio != null) {
|
|
8126
|
+
setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
|
|
8127
|
+
}
|
|
8128
|
+
const fromAudioStreamEnd = getValueByPath(fromObject, [
|
|
8129
|
+
'audioStreamEnd',
|
|
8130
|
+
]);
|
|
8131
|
+
if (fromAudioStreamEnd != null) {
|
|
8132
|
+
setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
|
|
8133
|
+
}
|
|
8134
|
+
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
8135
|
+
if (fromVideo != null) {
|
|
8136
|
+
setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
|
|
8137
|
+
}
|
|
8138
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8139
|
+
if (fromText != null) {
|
|
8140
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8141
|
+
}
|
|
8142
|
+
const fromActivityStart = getValueByPath(fromObject, [
|
|
8143
|
+
'activityStart',
|
|
8144
|
+
]);
|
|
8145
|
+
if (fromActivityStart != null) {
|
|
8146
|
+
setValueByPath(toObject, ['activityStart'], activityStartToVertex());
|
|
8147
|
+
}
|
|
8148
|
+
const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
|
|
8149
|
+
if (fromActivityEnd != null) {
|
|
8150
|
+
setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
|
|
8151
|
+
}
|
|
8152
|
+
return toObject;
|
|
8153
|
+
}
|
|
8154
|
+
function liveServerSetupCompleteFromMldev() {
|
|
8155
|
+
const toObject = {};
|
|
8156
|
+
return toObject;
|
|
8157
|
+
}
|
|
8158
|
+
function videoMetadataFromMldev$1(fromObject) {
|
|
8159
|
+
const toObject = {};
|
|
8160
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8161
|
+
if (fromFps != null) {
|
|
8162
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
8163
|
+
}
|
|
8164
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
8165
|
+
if (fromEndOffset != null) {
|
|
8166
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
8167
|
+
}
|
|
8168
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
8169
|
+
if (fromStartOffset != null) {
|
|
8170
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
8171
|
+
}
|
|
8172
|
+
return toObject;
|
|
8173
|
+
}
|
|
8174
|
+
function blobFromMldev$1(fromObject) {
|
|
8175
|
+
const toObject = {};
|
|
8176
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8177
|
+
if (fromData != null) {
|
|
8178
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8179
|
+
}
|
|
8180
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8181
|
+
if (fromMimeType != null) {
|
|
8182
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8183
|
+
}
|
|
8184
|
+
return toObject;
|
|
8185
|
+
}
|
|
8186
|
+
function fileDataFromMldev$1(fromObject) {
|
|
8187
|
+
const toObject = {};
|
|
8188
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8189
|
+
if (fromFileUri != null) {
|
|
8190
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8191
|
+
}
|
|
8192
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8193
|
+
if (fromMimeType != null) {
|
|
8194
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8195
|
+
}
|
|
8196
|
+
return toObject;
|
|
8197
|
+
}
|
|
8198
|
+
function partFromMldev$1(fromObject) {
|
|
8199
|
+
const toObject = {};
|
|
8200
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8201
|
+
'videoMetadata',
|
|
8202
|
+
]);
|
|
8203
|
+
if (fromVideoMetadata != null) {
|
|
8204
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataFromMldev$1(fromVideoMetadata));
|
|
8205
|
+
}
|
|
8206
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8207
|
+
if (fromThought != null) {
|
|
8208
|
+
setValueByPath(toObject, ['thought'], fromThought);
|
|
8209
|
+
}
|
|
8210
|
+
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
8211
|
+
if (fromInlineData != null) {
|
|
8212
|
+
setValueByPath(toObject, ['inlineData'], blobFromMldev$1(fromInlineData));
|
|
8213
|
+
}
|
|
8214
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8215
|
+
if (fromFileData != null) {
|
|
8216
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(fromFileData));
|
|
8217
|
+
}
|
|
8218
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8219
|
+
'thoughtSignature',
|
|
8220
|
+
]);
|
|
8221
|
+
if (fromThoughtSignature != null) {
|
|
8222
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
8223
|
+
}
|
|
8224
|
+
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
8225
|
+
'codeExecutionResult',
|
|
8226
|
+
]);
|
|
8227
|
+
if (fromCodeExecutionResult != null) {
|
|
8228
|
+
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
8229
|
+
}
|
|
8230
|
+
const fromExecutableCode = getValueByPath(fromObject, [
|
|
8231
|
+
'executableCode',
|
|
8232
|
+
]);
|
|
8233
|
+
if (fromExecutableCode != null) {
|
|
8234
|
+
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
8235
|
+
}
|
|
8236
|
+
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
8237
|
+
if (fromFunctionCall != null) {
|
|
8238
|
+
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
8239
|
+
}
|
|
8240
|
+
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
8241
|
+
'functionResponse',
|
|
8242
|
+
]);
|
|
8243
|
+
if (fromFunctionResponse != null) {
|
|
8244
|
+
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
8245
|
+
}
|
|
8246
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8247
|
+
if (fromText != null) {
|
|
8248
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8249
|
+
}
|
|
8250
|
+
return toObject;
|
|
8251
|
+
}
|
|
8252
|
+
function contentFromMldev$1(fromObject) {
|
|
8253
|
+
const toObject = {};
|
|
8254
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8255
|
+
if (fromParts != null) {
|
|
8256
|
+
let transformedList = fromParts;
|
|
8257
|
+
if (Array.isArray(transformedList)) {
|
|
8258
|
+
transformedList = transformedList.map((item) => {
|
|
8259
|
+
return partFromMldev$1(item);
|
|
8260
|
+
});
|
|
8261
|
+
}
|
|
8262
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
8263
|
+
}
|
|
8264
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
8265
|
+
if (fromRole != null) {
|
|
8266
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
8267
|
+
}
|
|
8268
|
+
return toObject;
|
|
8269
|
+
}
|
|
8270
|
+
function transcriptionFromMldev(fromObject) {
|
|
8271
|
+
const toObject = {};
|
|
8272
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8273
|
+
if (fromText != null) {
|
|
8274
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8275
|
+
}
|
|
8276
|
+
const fromFinished = getValueByPath(fromObject, ['finished']);
|
|
8277
|
+
if (fromFinished != null) {
|
|
8278
|
+
setValueByPath(toObject, ['finished'], fromFinished);
|
|
8279
|
+
}
|
|
8280
|
+
return toObject;
|
|
8281
|
+
}
|
|
8282
|
+
function urlMetadataFromMldev$1(fromObject) {
|
|
8283
|
+
const toObject = {};
|
|
8284
|
+
const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
|
|
8285
|
+
if (fromRetrievedUrl != null) {
|
|
8286
|
+
setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
|
|
8287
|
+
}
|
|
8288
|
+
const fromUrlRetrievalStatus = getValueByPath(fromObject, [
|
|
8289
|
+
'urlRetrievalStatus',
|
|
8290
|
+
]);
|
|
8291
|
+
if (fromUrlRetrievalStatus != null) {
|
|
8292
|
+
setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
|
|
8293
|
+
}
|
|
8294
|
+
return toObject;
|
|
8295
|
+
}
|
|
8296
|
+
function urlContextMetadataFromMldev$1(fromObject) {
|
|
8297
|
+
const toObject = {};
|
|
8298
|
+
const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
|
|
8299
|
+
if (fromUrlMetadata != null) {
|
|
8300
|
+
let transformedList = fromUrlMetadata;
|
|
8301
|
+
if (Array.isArray(transformedList)) {
|
|
8302
|
+
transformedList = transformedList.map((item) => {
|
|
8303
|
+
return urlMetadataFromMldev$1(item);
|
|
8304
|
+
});
|
|
8305
|
+
}
|
|
8306
|
+
setValueByPath(toObject, ['urlMetadata'], transformedList);
|
|
8307
|
+
}
|
|
8308
|
+
return toObject;
|
|
8309
|
+
}
|
|
8310
|
+
function liveServerContentFromMldev(fromObject) {
|
|
8311
|
+
const toObject = {};
|
|
8312
|
+
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
8313
|
+
if (fromModelTurn != null) {
|
|
8314
|
+
setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
|
|
8315
|
+
}
|
|
8316
|
+
const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
|
|
8317
|
+
if (fromTurnComplete != null) {
|
|
8318
|
+
setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
|
|
8319
|
+
}
|
|
8320
|
+
const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
|
|
8321
|
+
if (fromInterrupted != null) {
|
|
8322
|
+
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
8323
|
+
}
|
|
8324
|
+
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
8325
|
+
'groundingMetadata',
|
|
8326
|
+
]);
|
|
8327
|
+
if (fromGroundingMetadata != null) {
|
|
8328
|
+
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
8329
|
+
}
|
|
8330
|
+
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
8331
|
+
'generationComplete',
|
|
8332
|
+
]);
|
|
8333
|
+
if (fromGenerationComplete != null) {
|
|
8334
|
+
setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
|
|
8335
|
+
}
|
|
8336
|
+
const fromInputTranscription = getValueByPath(fromObject, [
|
|
8337
|
+
'inputTranscription',
|
|
8338
|
+
]);
|
|
8339
|
+
if (fromInputTranscription != null) {
|
|
8340
|
+
setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
|
|
8341
|
+
}
|
|
8342
|
+
const fromOutputTranscription = getValueByPath(fromObject, [
|
|
8343
|
+
'outputTranscription',
|
|
8344
|
+
]);
|
|
8345
|
+
if (fromOutputTranscription != null) {
|
|
8346
|
+
setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
|
|
8347
|
+
}
|
|
8348
|
+
const fromUrlContextMetadata = getValueByPath(fromObject, [
|
|
8349
|
+
'urlContextMetadata',
|
|
8350
|
+
]);
|
|
8351
|
+
if (fromUrlContextMetadata != null) {
|
|
8352
|
+
setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
|
|
8353
|
+
}
|
|
8354
|
+
return toObject;
|
|
8355
|
+
}
|
|
8356
|
+
function functionCallFromMldev(fromObject) {
|
|
8357
|
+
const toObject = {};
|
|
8358
|
+
const fromId = getValueByPath(fromObject, ['id']);
|
|
8359
|
+
if (fromId != null) {
|
|
8360
|
+
setValueByPath(toObject, ['id'], fromId);
|
|
8361
|
+
}
|
|
8362
|
+
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
8363
|
+
if (fromArgs != null) {
|
|
8364
|
+
setValueByPath(toObject, ['args'], fromArgs);
|
|
8365
|
+
}
|
|
8366
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
8367
|
+
if (fromName != null) {
|
|
8368
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
8369
|
+
}
|
|
8370
|
+
return toObject;
|
|
8371
|
+
}
|
|
8372
|
+
function liveServerToolCallFromMldev(fromObject) {
|
|
8373
|
+
const toObject = {};
|
|
8374
|
+
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
8375
|
+
'functionCalls',
|
|
8376
|
+
]);
|
|
8377
|
+
if (fromFunctionCalls != null) {
|
|
8378
|
+
let transformedList = fromFunctionCalls;
|
|
8379
|
+
if (Array.isArray(transformedList)) {
|
|
8380
|
+
transformedList = transformedList.map((item) => {
|
|
8381
|
+
return functionCallFromMldev(item);
|
|
8382
|
+
});
|
|
8383
|
+
}
|
|
8384
|
+
setValueByPath(toObject, ['functionCalls'], transformedList);
|
|
8385
|
+
}
|
|
8386
|
+
return toObject;
|
|
8387
|
+
}
|
|
8388
|
+
function liveServerToolCallCancellationFromMldev(fromObject) {
|
|
8389
|
+
const toObject = {};
|
|
8390
|
+
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
8391
|
+
if (fromIds != null) {
|
|
8392
|
+
setValueByPath(toObject, ['ids'], fromIds);
|
|
8393
|
+
}
|
|
8394
|
+
return toObject;
|
|
8395
|
+
}
|
|
8396
|
+
function modalityTokenCountFromMldev(fromObject) {
|
|
8397
|
+
const toObject = {};
|
|
8398
|
+
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8399
|
+
if (fromModality != null) {
|
|
8400
|
+
setValueByPath(toObject, ['modality'], fromModality);
|
|
8401
|
+
}
|
|
8402
|
+
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8403
|
+
if (fromTokenCount != null) {
|
|
8404
|
+
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8405
|
+
}
|
|
8406
|
+
return toObject;
|
|
8407
|
+
}
|
|
8408
|
+
function usageMetadataFromMldev(fromObject) {
|
|
8409
|
+
const toObject = {};
|
|
8410
|
+
const fromPromptTokenCount = getValueByPath(fromObject, [
|
|
8411
|
+
'promptTokenCount',
|
|
8412
|
+
]);
|
|
8413
|
+
if (fromPromptTokenCount != null) {
|
|
8414
|
+
setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
|
|
8415
|
+
}
|
|
8416
|
+
const fromCachedContentTokenCount = getValueByPath(fromObject, [
|
|
8417
|
+
'cachedContentTokenCount',
|
|
8418
|
+
]);
|
|
8419
|
+
if (fromCachedContentTokenCount != null) {
|
|
8420
|
+
setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
|
|
8421
|
+
}
|
|
8422
|
+
const fromResponseTokenCount = getValueByPath(fromObject, [
|
|
8423
|
+
'responseTokenCount',
|
|
8424
|
+
]);
|
|
8425
|
+
if (fromResponseTokenCount != null) {
|
|
8426
|
+
setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
|
|
8427
|
+
}
|
|
8428
|
+
const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
|
|
8429
|
+
'toolUsePromptTokenCount',
|
|
8430
|
+
]);
|
|
8431
|
+
if (fromToolUsePromptTokenCount != null) {
|
|
8432
|
+
setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
|
|
8433
|
+
}
|
|
8434
|
+
const fromThoughtsTokenCount = getValueByPath(fromObject, [
|
|
8435
|
+
'thoughtsTokenCount',
|
|
8436
|
+
]);
|
|
8437
|
+
if (fromThoughtsTokenCount != null) {
|
|
8438
|
+
setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
|
|
8439
|
+
}
|
|
8440
|
+
const fromTotalTokenCount = getValueByPath(fromObject, [
|
|
8441
|
+
'totalTokenCount',
|
|
8442
|
+
]);
|
|
8443
|
+
if (fromTotalTokenCount != null) {
|
|
8444
|
+
setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
|
|
8445
|
+
}
|
|
8446
|
+
const fromPromptTokensDetails = getValueByPath(fromObject, [
|
|
8447
|
+
'promptTokensDetails',
|
|
8448
|
+
]);
|
|
8449
|
+
if (fromPromptTokensDetails != null) {
|
|
8450
|
+
let transformedList = fromPromptTokensDetails;
|
|
8451
|
+
if (Array.isArray(transformedList)) {
|
|
8452
|
+
transformedList = transformedList.map((item) => {
|
|
8453
|
+
return modalityTokenCountFromMldev(item);
|
|
8454
|
+
});
|
|
8455
|
+
}
|
|
8456
|
+
setValueByPath(toObject, ['promptTokensDetails'], transformedList);
|
|
8457
|
+
}
|
|
8458
|
+
const fromCacheTokensDetails = getValueByPath(fromObject, [
|
|
8459
|
+
'cacheTokensDetails',
|
|
8460
|
+
]);
|
|
8461
|
+
if (fromCacheTokensDetails != null) {
|
|
8462
|
+
let transformedList = fromCacheTokensDetails;
|
|
8463
|
+
if (Array.isArray(transformedList)) {
|
|
8464
|
+
transformedList = transformedList.map((item) => {
|
|
8465
|
+
return modalityTokenCountFromMldev(item);
|
|
8466
|
+
});
|
|
8467
|
+
}
|
|
8468
|
+
setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
|
|
8469
|
+
}
|
|
8470
|
+
const fromResponseTokensDetails = getValueByPath(fromObject, [
|
|
8471
|
+
'responseTokensDetails',
|
|
8472
|
+
]);
|
|
8473
|
+
if (fromResponseTokensDetails != null) {
|
|
8474
|
+
let transformedList = fromResponseTokensDetails;
|
|
8475
|
+
if (Array.isArray(transformedList)) {
|
|
8476
|
+
transformedList = transformedList.map((item) => {
|
|
8477
|
+
return modalityTokenCountFromMldev(item);
|
|
8478
|
+
});
|
|
8479
|
+
}
|
|
8480
|
+
setValueByPath(toObject, ['responseTokensDetails'], transformedList);
|
|
8481
|
+
}
|
|
8482
|
+
const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
|
|
8483
|
+
'toolUsePromptTokensDetails',
|
|
8484
|
+
]);
|
|
8485
|
+
if (fromToolUsePromptTokensDetails != null) {
|
|
8486
|
+
let transformedList = fromToolUsePromptTokensDetails;
|
|
8487
|
+
if (Array.isArray(transformedList)) {
|
|
8488
|
+
transformedList = transformedList.map((item) => {
|
|
8489
|
+
return modalityTokenCountFromMldev(item);
|
|
8490
|
+
});
|
|
8491
|
+
}
|
|
8492
|
+
setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
|
|
8493
|
+
}
|
|
8494
|
+
return toObject;
|
|
8495
|
+
}
|
|
8496
|
+
function liveServerGoAwayFromMldev(fromObject) {
|
|
8497
|
+
const toObject = {};
|
|
8498
|
+
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
8499
|
+
if (fromTimeLeft != null) {
|
|
8500
|
+
setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
|
|
8501
|
+
}
|
|
8502
|
+
return toObject;
|
|
8503
|
+
}
|
|
8504
|
+
function liveServerSessionResumptionUpdateFromMldev(fromObject) {
|
|
8505
|
+
const toObject = {};
|
|
8506
|
+
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
8507
|
+
if (fromNewHandle != null) {
|
|
8508
|
+
setValueByPath(toObject, ['newHandle'], fromNewHandle);
|
|
8509
|
+
}
|
|
8510
|
+
const fromResumable = getValueByPath(fromObject, ['resumable']);
|
|
8511
|
+
if (fromResumable != null) {
|
|
8512
|
+
setValueByPath(toObject, ['resumable'], fromResumable);
|
|
8513
|
+
}
|
|
8514
|
+
const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
|
|
8515
|
+
'lastConsumedClientMessageIndex',
|
|
8516
|
+
]);
|
|
8517
|
+
if (fromLastConsumedClientMessageIndex != null) {
|
|
8518
|
+
setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
|
|
8519
|
+
}
|
|
8520
|
+
return toObject;
|
|
8521
|
+
}
|
|
8522
|
+
function liveServerMessageFromMldev(fromObject) {
|
|
8523
|
+
const toObject = {};
|
|
8524
|
+
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8525
|
+
'setupComplete',
|
|
8526
|
+
]);
|
|
8527
|
+
if (fromSetupComplete != null) {
|
|
8528
|
+
setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
|
|
8529
|
+
}
|
|
8530
|
+
const fromServerContent = getValueByPath(fromObject, [
|
|
8531
|
+
'serverContent',
|
|
8532
|
+
]);
|
|
8533
|
+
if (fromServerContent != null) {
|
|
8534
|
+
setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
|
|
8535
|
+
}
|
|
8536
|
+
const fromToolCall = getValueByPath(fromObject, ['toolCall']);
|
|
8537
|
+
if (fromToolCall != null) {
|
|
8538
|
+
setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
|
|
8539
|
+
}
|
|
8540
|
+
const fromToolCallCancellation = getValueByPath(fromObject, [
|
|
8541
|
+
'toolCallCancellation',
|
|
8542
|
+
]);
|
|
8543
|
+
if (fromToolCallCancellation != null) {
|
|
8544
|
+
setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
|
|
8545
|
+
}
|
|
8546
|
+
const fromUsageMetadata = getValueByPath(fromObject, [
|
|
8547
|
+
'usageMetadata',
|
|
8548
|
+
]);
|
|
8549
|
+
if (fromUsageMetadata != null) {
|
|
8550
|
+
setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
|
|
8551
|
+
}
|
|
8552
|
+
const fromGoAway = getValueByPath(fromObject, ['goAway']);
|
|
8553
|
+
if (fromGoAway != null) {
|
|
8554
|
+
setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
|
|
8555
|
+
}
|
|
8556
|
+
const fromSessionResumptionUpdate = getValueByPath(fromObject, [
|
|
8557
|
+
'sessionResumptionUpdate',
|
|
8558
|
+
]);
|
|
8559
|
+
if (fromSessionResumptionUpdate != null) {
|
|
8560
|
+
setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
|
|
8561
|
+
}
|
|
8562
|
+
return toObject;
|
|
8563
|
+
}
|
|
8564
|
+
function liveMusicServerSetupCompleteFromMldev() {
|
|
8565
|
+
const toObject = {};
|
|
8566
|
+
return toObject;
|
|
8567
|
+
}
|
|
8568
|
+
function weightedPromptFromMldev(fromObject) {
|
|
8569
|
+
const toObject = {};
|
|
8570
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8571
|
+
if (fromText != null) {
|
|
8572
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8573
|
+
}
|
|
8574
|
+
const fromWeight = getValueByPath(fromObject, ['weight']);
|
|
8575
|
+
if (fromWeight != null) {
|
|
8576
|
+
setValueByPath(toObject, ['weight'], fromWeight);
|
|
8577
|
+
}
|
|
8578
|
+
return toObject;
|
|
8579
|
+
}
|
|
8580
|
+
function liveMusicClientContentFromMldev(fromObject) {
|
|
8581
|
+
const toObject = {};
|
|
8582
|
+
const fromWeightedPrompts = getValueByPath(fromObject, [
|
|
8583
|
+
'weightedPrompts',
|
|
8584
|
+
]);
|
|
8585
|
+
if (fromWeightedPrompts != null) {
|
|
8586
|
+
let transformedList = fromWeightedPrompts;
|
|
8587
|
+
if (Array.isArray(transformedList)) {
|
|
8588
|
+
transformedList = transformedList.map((item) => {
|
|
8589
|
+
return weightedPromptFromMldev(item);
|
|
8590
|
+
});
|
|
8591
|
+
}
|
|
8592
|
+
setValueByPath(toObject, ['weightedPrompts'], transformedList);
|
|
8593
|
+
}
|
|
8594
|
+
return toObject;
|
|
8595
|
+
}
|
|
8596
|
+
function liveMusicGenerationConfigFromMldev(fromObject) {
|
|
8597
|
+
const toObject = {};
|
|
8598
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8599
|
+
if (fromTemperature != null) {
|
|
8600
|
+
setValueByPath(toObject, ['temperature'], fromTemperature);
|
|
8601
|
+
}
|
|
8602
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8603
|
+
if (fromTopK != null) {
|
|
8604
|
+
setValueByPath(toObject, ['topK'], fromTopK);
|
|
8605
|
+
}
|
|
8606
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8607
|
+
if (fromSeed != null) {
|
|
8608
|
+
setValueByPath(toObject, ['seed'], fromSeed);
|
|
8609
|
+
}
|
|
8610
|
+
const fromGuidance = getValueByPath(fromObject, ['guidance']);
|
|
8611
|
+
if (fromGuidance != null) {
|
|
8612
|
+
setValueByPath(toObject, ['guidance'], fromGuidance);
|
|
8613
|
+
}
|
|
8614
|
+
const fromBpm = getValueByPath(fromObject, ['bpm']);
|
|
8615
|
+
if (fromBpm != null) {
|
|
8616
|
+
setValueByPath(toObject, ['bpm'], fromBpm);
|
|
8617
|
+
}
|
|
8618
|
+
const fromDensity = getValueByPath(fromObject, ['density']);
|
|
8619
|
+
if (fromDensity != null) {
|
|
8620
|
+
setValueByPath(toObject, ['density'], fromDensity);
|
|
8621
|
+
}
|
|
8622
|
+
const fromBrightness = getValueByPath(fromObject, ['brightness']);
|
|
8623
|
+
if (fromBrightness != null) {
|
|
8624
|
+
setValueByPath(toObject, ['brightness'], fromBrightness);
|
|
8625
|
+
}
|
|
8626
|
+
const fromScale = getValueByPath(fromObject, ['scale']);
|
|
8627
|
+
if (fromScale != null) {
|
|
8628
|
+
setValueByPath(toObject, ['scale'], fromScale);
|
|
8629
|
+
}
|
|
8630
|
+
const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
|
|
8631
|
+
if (fromMuteBass != null) {
|
|
8632
|
+
setValueByPath(toObject, ['muteBass'], fromMuteBass);
|
|
8633
|
+
}
|
|
8634
|
+
const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
|
|
8635
|
+
if (fromMuteDrums != null) {
|
|
8636
|
+
setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
|
|
8637
|
+
}
|
|
8638
|
+
const fromOnlyBassAndDrums = getValueByPath(fromObject, [
|
|
8639
|
+
'onlyBassAndDrums',
|
|
8640
|
+
]);
|
|
8641
|
+
if (fromOnlyBassAndDrums != null) {
|
|
8642
|
+
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
8643
|
+
}
|
|
8644
|
+
return toObject;
|
|
8645
|
+
}
|
|
8646
|
+
function liveMusicSourceMetadataFromMldev(fromObject) {
|
|
8647
|
+
const toObject = {};
|
|
8648
|
+
const fromClientContent = getValueByPath(fromObject, [
|
|
8649
|
+
'clientContent',
|
|
8650
|
+
]);
|
|
8651
|
+
if (fromClientContent != null) {
|
|
8652
|
+
setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
|
|
8653
|
+
}
|
|
8654
|
+
const fromMusicGenerationConfig = getValueByPath(fromObject, [
|
|
8655
|
+
'musicGenerationConfig',
|
|
8656
|
+
]);
|
|
8657
|
+
if (fromMusicGenerationConfig != null) {
|
|
8658
|
+
setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
|
|
8659
|
+
}
|
|
8660
|
+
return toObject;
|
|
8661
|
+
}
|
|
8662
|
+
function audioChunkFromMldev(fromObject) {
|
|
8663
|
+
const toObject = {};
|
|
8664
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8665
|
+
if (fromData != null) {
|
|
8666
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8667
|
+
}
|
|
8668
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8669
|
+
if (fromMimeType != null) {
|
|
8670
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8671
|
+
}
|
|
8672
|
+
const fromSourceMetadata = getValueByPath(fromObject, [
|
|
8673
|
+
'sourceMetadata',
|
|
8674
|
+
]);
|
|
8675
|
+
if (fromSourceMetadata != null) {
|
|
8676
|
+
setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
|
|
8677
|
+
}
|
|
8678
|
+
return toObject;
|
|
8679
|
+
}
|
|
8680
|
+
function liveMusicServerContentFromMldev(fromObject) {
|
|
8681
|
+
const toObject = {};
|
|
8682
|
+
const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
|
|
8683
|
+
if (fromAudioChunks != null) {
|
|
8684
|
+
let transformedList = fromAudioChunks;
|
|
8685
|
+
if (Array.isArray(transformedList)) {
|
|
8686
|
+
transformedList = transformedList.map((item) => {
|
|
8687
|
+
return audioChunkFromMldev(item);
|
|
8688
|
+
});
|
|
8689
|
+
}
|
|
8690
|
+
setValueByPath(toObject, ['audioChunks'], transformedList);
|
|
8691
|
+
}
|
|
8692
|
+
return toObject;
|
|
8693
|
+
}
|
|
8694
|
+
function liveMusicFilteredPromptFromMldev(fromObject) {
|
|
8695
|
+
const toObject = {};
|
|
8696
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8697
|
+
if (fromText != null) {
|
|
8698
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8699
|
+
}
|
|
8700
|
+
const fromFilteredReason = getValueByPath(fromObject, [
|
|
8701
|
+
'filteredReason',
|
|
8702
|
+
]);
|
|
8703
|
+
if (fromFilteredReason != null) {
|
|
8704
|
+
setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
|
|
8705
|
+
}
|
|
8706
|
+
return toObject;
|
|
8707
|
+
}
|
|
8708
|
+
function liveMusicServerMessageFromMldev(fromObject) {
|
|
8709
|
+
const toObject = {};
|
|
8710
|
+
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8711
|
+
'setupComplete',
|
|
8712
|
+
]);
|
|
8713
|
+
if (fromSetupComplete != null) {
|
|
8714
|
+
setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
|
|
8715
|
+
}
|
|
8716
|
+
const fromServerContent = getValueByPath(fromObject, [
|
|
8717
|
+
'serverContent',
|
|
8718
|
+
]);
|
|
8719
|
+
if (fromServerContent != null) {
|
|
8720
|
+
setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
|
|
8721
|
+
}
|
|
8722
|
+
const fromFilteredPrompt = getValueByPath(fromObject, [
|
|
8723
|
+
'filteredPrompt',
|
|
8724
|
+
]);
|
|
8725
|
+
if (fromFilteredPrompt != null) {
|
|
8726
|
+
setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
|
|
8727
|
+
}
|
|
8728
|
+
return toObject;
|
|
8729
|
+
}
|
|
8730
|
+
function liveServerSetupCompleteFromVertex(fromObject) {
|
|
8731
|
+
const toObject = {};
|
|
8732
|
+
const fromSessionId = getValueByPath(fromObject, ['sessionId']);
|
|
8733
|
+
if (fromSessionId != null) {
|
|
8734
|
+
setValueByPath(toObject, ['sessionId'], fromSessionId);
|
|
8735
|
+
}
|
|
8736
|
+
return toObject;
|
|
8737
|
+
}
|
|
8738
|
+
function videoMetadataFromVertex$1(fromObject) {
|
|
8739
|
+
const toObject = {};
|
|
8740
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8741
|
+
if (fromFps != null) {
|
|
8742
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
8743
|
+
}
|
|
8744
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
8745
|
+
if (fromEndOffset != null) {
|
|
8746
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
8747
|
+
}
|
|
8748
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
8749
|
+
if (fromStartOffset != null) {
|
|
8750
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
8751
|
+
}
|
|
8752
|
+
return toObject;
|
|
8753
|
+
}
|
|
8754
|
+
function blobFromVertex$1(fromObject) {
|
|
8755
|
+
const toObject = {};
|
|
8756
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8757
|
+
if (fromDisplayName != null) {
|
|
8758
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8759
|
+
}
|
|
8760
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8761
|
+
if (fromData != null) {
|
|
8762
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8763
|
+
}
|
|
8764
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8765
|
+
if (fromMimeType != null) {
|
|
8766
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8767
|
+
}
|
|
8768
|
+
return toObject;
|
|
8769
|
+
}
|
|
8770
|
+
function fileDataFromVertex$1(fromObject) {
|
|
8771
|
+
const toObject = {};
|
|
8772
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8773
|
+
if (fromDisplayName != null) {
|
|
8774
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8775
|
+
}
|
|
8776
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8777
|
+
if (fromFileUri != null) {
|
|
8778
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8779
|
+
}
|
|
8780
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8781
|
+
if (fromMimeType != null) {
|
|
8782
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8783
|
+
}
|
|
8784
|
+
return toObject;
|
|
8785
|
+
}
|
|
8786
|
+
function partFromVertex$1(fromObject) {
|
|
8787
|
+
const toObject = {};
|
|
8788
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8789
|
+
'videoMetadata',
|
|
8790
|
+
]);
|
|
8791
|
+
if (fromVideoMetadata != null) {
|
|
8792
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataFromVertex$1(fromVideoMetadata));
|
|
8793
|
+
}
|
|
8794
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8795
|
+
if (fromThought != null) {
|
|
8291
8796
|
setValueByPath(toObject, ['thought'], fromThought);
|
|
8292
8797
|
}
|
|
8293
8798
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
@@ -8332,24 +8837,6 @@ function partFromVertex$1(fromObject) {
|
|
|
8332
8837
|
}
|
|
8333
8838
|
return toObject;
|
|
8334
8839
|
}
|
|
8335
|
-
function contentFromMldev$1(fromObject) {
|
|
8336
|
-
const toObject = {};
|
|
8337
|
-
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8338
|
-
if (fromParts != null) {
|
|
8339
|
-
let transformedList = fromParts;
|
|
8340
|
-
if (Array.isArray(transformedList)) {
|
|
8341
|
-
transformedList = transformedList.map((item) => {
|
|
8342
|
-
return partFromMldev$1(item);
|
|
8343
|
-
});
|
|
8344
|
-
}
|
|
8345
|
-
setValueByPath(toObject, ['parts'], transformedList);
|
|
8346
|
-
}
|
|
8347
|
-
const fromRole = getValueByPath(fromObject, ['role']);
|
|
8348
|
-
if (fromRole != null) {
|
|
8349
|
-
setValueByPath(toObject, ['role'], fromRole);
|
|
8350
|
-
}
|
|
8351
|
-
return toObject;
|
|
8352
|
-
}
|
|
8353
8840
|
function contentFromVertex$1(fromObject) {
|
|
8354
8841
|
const toObject = {};
|
|
8355
8842
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -8368,18 +8855,6 @@ function contentFromVertex$1(fromObject) {
|
|
|
8368
8855
|
}
|
|
8369
8856
|
return toObject;
|
|
8370
8857
|
}
|
|
8371
|
-
function transcriptionFromMldev(fromObject) {
|
|
8372
|
-
const toObject = {};
|
|
8373
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
8374
|
-
if (fromText != null) {
|
|
8375
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
8376
|
-
}
|
|
8377
|
-
const fromFinished = getValueByPath(fromObject, ['finished']);
|
|
8378
|
-
if (fromFinished != null) {
|
|
8379
|
-
setValueByPath(toObject, ['finished'], fromFinished);
|
|
8380
|
-
}
|
|
8381
|
-
return toObject;
|
|
8382
|
-
}
|
|
8383
8858
|
function transcriptionFromVertex(fromObject) {
|
|
8384
8859
|
const toObject = {};
|
|
8385
8860
|
const fromText = getValueByPath(fromObject, ['text']);
|
|
@@ -8392,80 +8867,6 @@ function transcriptionFromVertex(fromObject) {
|
|
|
8392
8867
|
}
|
|
8393
8868
|
return toObject;
|
|
8394
8869
|
}
|
|
8395
|
-
function urlMetadataFromMldev$1(fromObject) {
|
|
8396
|
-
const toObject = {};
|
|
8397
|
-
const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
|
|
8398
|
-
if (fromRetrievedUrl != null) {
|
|
8399
|
-
setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
|
|
8400
|
-
}
|
|
8401
|
-
const fromUrlRetrievalStatus = getValueByPath(fromObject, [
|
|
8402
|
-
'urlRetrievalStatus',
|
|
8403
|
-
]);
|
|
8404
|
-
if (fromUrlRetrievalStatus != null) {
|
|
8405
|
-
setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
|
|
8406
|
-
}
|
|
8407
|
-
return toObject;
|
|
8408
|
-
}
|
|
8409
|
-
function urlContextMetadataFromMldev$1(fromObject) {
|
|
8410
|
-
const toObject = {};
|
|
8411
|
-
const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
|
|
8412
|
-
if (fromUrlMetadata != null) {
|
|
8413
|
-
let transformedList = fromUrlMetadata;
|
|
8414
|
-
if (Array.isArray(transformedList)) {
|
|
8415
|
-
transformedList = transformedList.map((item) => {
|
|
8416
|
-
return urlMetadataFromMldev$1(item);
|
|
8417
|
-
});
|
|
8418
|
-
}
|
|
8419
|
-
setValueByPath(toObject, ['urlMetadata'], transformedList);
|
|
8420
|
-
}
|
|
8421
|
-
return toObject;
|
|
8422
|
-
}
|
|
8423
|
-
function liveServerContentFromMldev(fromObject) {
|
|
8424
|
-
const toObject = {};
|
|
8425
|
-
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
8426
|
-
if (fromModelTurn != null) {
|
|
8427
|
-
setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
|
|
8428
|
-
}
|
|
8429
|
-
const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
|
|
8430
|
-
if (fromTurnComplete != null) {
|
|
8431
|
-
setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
|
|
8432
|
-
}
|
|
8433
|
-
const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
|
|
8434
|
-
if (fromInterrupted != null) {
|
|
8435
|
-
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
8436
|
-
}
|
|
8437
|
-
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
8438
|
-
'groundingMetadata',
|
|
8439
|
-
]);
|
|
8440
|
-
if (fromGroundingMetadata != null) {
|
|
8441
|
-
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
8442
|
-
}
|
|
8443
|
-
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
8444
|
-
'generationComplete',
|
|
8445
|
-
]);
|
|
8446
|
-
if (fromGenerationComplete != null) {
|
|
8447
|
-
setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
|
|
8448
|
-
}
|
|
8449
|
-
const fromInputTranscription = getValueByPath(fromObject, [
|
|
8450
|
-
'inputTranscription',
|
|
8451
|
-
]);
|
|
8452
|
-
if (fromInputTranscription != null) {
|
|
8453
|
-
setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
|
|
8454
|
-
}
|
|
8455
|
-
const fromOutputTranscription = getValueByPath(fromObject, [
|
|
8456
|
-
'outputTranscription',
|
|
8457
|
-
]);
|
|
8458
|
-
if (fromOutputTranscription != null) {
|
|
8459
|
-
setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
|
|
8460
|
-
}
|
|
8461
|
-
const fromUrlContextMetadata = getValueByPath(fromObject, [
|
|
8462
|
-
'urlContextMetadata',
|
|
8463
|
-
]);
|
|
8464
|
-
if (fromUrlContextMetadata != null) {
|
|
8465
|
-
setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
|
|
8466
|
-
}
|
|
8467
|
-
return toObject;
|
|
8468
|
-
}
|
|
8469
8870
|
function liveServerContentFromVertex(fromObject) {
|
|
8470
8871
|
const toObject = {};
|
|
8471
8872
|
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
@@ -8506,22 +8907,6 @@ function liveServerContentFromVertex(fromObject) {
|
|
|
8506
8907
|
}
|
|
8507
8908
|
return toObject;
|
|
8508
8909
|
}
|
|
8509
|
-
function functionCallFromMldev(fromObject) {
|
|
8510
|
-
const toObject = {};
|
|
8511
|
-
const fromId = getValueByPath(fromObject, ['id']);
|
|
8512
|
-
if (fromId != null) {
|
|
8513
|
-
setValueByPath(toObject, ['id'], fromId);
|
|
8514
|
-
}
|
|
8515
|
-
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
8516
|
-
if (fromArgs != null) {
|
|
8517
|
-
setValueByPath(toObject, ['args'], fromArgs);
|
|
8518
|
-
}
|
|
8519
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
8520
|
-
if (fromName != null) {
|
|
8521
|
-
setValueByPath(toObject, ['name'], fromName);
|
|
8522
|
-
}
|
|
8523
|
-
return toObject;
|
|
8524
|
-
}
|
|
8525
8910
|
function functionCallFromVertex(fromObject) {
|
|
8526
8911
|
const toObject = {};
|
|
8527
8912
|
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
@@ -8534,22 +8919,6 @@ function functionCallFromVertex(fromObject) {
|
|
|
8534
8919
|
}
|
|
8535
8920
|
return toObject;
|
|
8536
8921
|
}
|
|
8537
|
-
function liveServerToolCallFromMldev(fromObject) {
|
|
8538
|
-
const toObject = {};
|
|
8539
|
-
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
8540
|
-
'functionCalls',
|
|
8541
|
-
]);
|
|
8542
|
-
if (fromFunctionCalls != null) {
|
|
8543
|
-
let transformedList = fromFunctionCalls;
|
|
8544
|
-
if (Array.isArray(transformedList)) {
|
|
8545
|
-
transformedList = transformedList.map((item) => {
|
|
8546
|
-
return functionCallFromMldev(item);
|
|
8547
|
-
});
|
|
8548
|
-
}
|
|
8549
|
-
setValueByPath(toObject, ['functionCalls'], transformedList);
|
|
8550
|
-
}
|
|
8551
|
-
return toObject;
|
|
8552
|
-
}
|
|
8553
8922
|
function liveServerToolCallFromVertex(fromObject) {
|
|
8554
8923
|
const toObject = {};
|
|
8555
8924
|
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
@@ -8566,14 +8935,6 @@ function liveServerToolCallFromVertex(fromObject) {
|
|
|
8566
8935
|
}
|
|
8567
8936
|
return toObject;
|
|
8568
8937
|
}
|
|
8569
|
-
function liveServerToolCallCancellationFromMldev(fromObject) {
|
|
8570
|
-
const toObject = {};
|
|
8571
|
-
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
8572
|
-
if (fromIds != null) {
|
|
8573
|
-
setValueByPath(toObject, ['ids'], fromIds);
|
|
8574
|
-
}
|
|
8575
|
-
return toObject;
|
|
8576
|
-
}
|
|
8577
8938
|
function liveServerToolCallCancellationFromVertex(fromObject) {
|
|
8578
8939
|
const toObject = {};
|
|
8579
8940
|
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
@@ -8582,115 +8943,15 @@ function liveServerToolCallCancellationFromVertex(fromObject) {
|
|
|
8582
8943
|
}
|
|
8583
8944
|
return toObject;
|
|
8584
8945
|
}
|
|
8585
|
-
function modalityTokenCountFromMldev(fromObject) {
|
|
8586
|
-
const toObject = {};
|
|
8587
|
-
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8588
|
-
if (fromModality != null) {
|
|
8589
|
-
setValueByPath(toObject, ['modality'], fromModality);
|
|
8590
|
-
}
|
|
8591
|
-
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8592
|
-
if (fromTokenCount != null) {
|
|
8593
|
-
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8594
|
-
}
|
|
8595
|
-
return toObject;
|
|
8596
|
-
}
|
|
8597
8946
|
function modalityTokenCountFromVertex(fromObject) {
|
|
8598
8947
|
const toObject = {};
|
|
8599
8948
|
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8600
|
-
if (fromModality != null) {
|
|
8601
|
-
setValueByPath(toObject, ['modality'], fromModality);
|
|
8602
|
-
}
|
|
8603
|
-
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8604
|
-
if (fromTokenCount != null) {
|
|
8605
|
-
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8606
|
-
}
|
|
8607
|
-
return toObject;
|
|
8608
|
-
}
|
|
8609
|
-
function usageMetadataFromMldev(fromObject) {
|
|
8610
|
-
const toObject = {};
|
|
8611
|
-
const fromPromptTokenCount = getValueByPath(fromObject, [
|
|
8612
|
-
'promptTokenCount',
|
|
8613
|
-
]);
|
|
8614
|
-
if (fromPromptTokenCount != null) {
|
|
8615
|
-
setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
|
|
8616
|
-
}
|
|
8617
|
-
const fromCachedContentTokenCount = getValueByPath(fromObject, [
|
|
8618
|
-
'cachedContentTokenCount',
|
|
8619
|
-
]);
|
|
8620
|
-
if (fromCachedContentTokenCount != null) {
|
|
8621
|
-
setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
|
|
8622
|
-
}
|
|
8623
|
-
const fromResponseTokenCount = getValueByPath(fromObject, [
|
|
8624
|
-
'responseTokenCount',
|
|
8625
|
-
]);
|
|
8626
|
-
if (fromResponseTokenCount != null) {
|
|
8627
|
-
setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
|
|
8628
|
-
}
|
|
8629
|
-
const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
|
|
8630
|
-
'toolUsePromptTokenCount',
|
|
8631
|
-
]);
|
|
8632
|
-
if (fromToolUsePromptTokenCount != null) {
|
|
8633
|
-
setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
|
|
8634
|
-
}
|
|
8635
|
-
const fromThoughtsTokenCount = getValueByPath(fromObject, [
|
|
8636
|
-
'thoughtsTokenCount',
|
|
8637
|
-
]);
|
|
8638
|
-
if (fromThoughtsTokenCount != null) {
|
|
8639
|
-
setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
|
|
8640
|
-
}
|
|
8641
|
-
const fromTotalTokenCount = getValueByPath(fromObject, [
|
|
8642
|
-
'totalTokenCount',
|
|
8643
|
-
]);
|
|
8644
|
-
if (fromTotalTokenCount != null) {
|
|
8645
|
-
setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
|
|
8646
|
-
}
|
|
8647
|
-
const fromPromptTokensDetails = getValueByPath(fromObject, [
|
|
8648
|
-
'promptTokensDetails',
|
|
8649
|
-
]);
|
|
8650
|
-
if (fromPromptTokensDetails != null) {
|
|
8651
|
-
let transformedList = fromPromptTokensDetails;
|
|
8652
|
-
if (Array.isArray(transformedList)) {
|
|
8653
|
-
transformedList = transformedList.map((item) => {
|
|
8654
|
-
return modalityTokenCountFromMldev(item);
|
|
8655
|
-
});
|
|
8656
|
-
}
|
|
8657
|
-
setValueByPath(toObject, ['promptTokensDetails'], transformedList);
|
|
8658
|
-
}
|
|
8659
|
-
const fromCacheTokensDetails = getValueByPath(fromObject, [
|
|
8660
|
-
'cacheTokensDetails',
|
|
8661
|
-
]);
|
|
8662
|
-
if (fromCacheTokensDetails != null) {
|
|
8663
|
-
let transformedList = fromCacheTokensDetails;
|
|
8664
|
-
if (Array.isArray(transformedList)) {
|
|
8665
|
-
transformedList = transformedList.map((item) => {
|
|
8666
|
-
return modalityTokenCountFromMldev(item);
|
|
8667
|
-
});
|
|
8668
|
-
}
|
|
8669
|
-
setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
|
|
8670
|
-
}
|
|
8671
|
-
const fromResponseTokensDetails = getValueByPath(fromObject, [
|
|
8672
|
-
'responseTokensDetails',
|
|
8673
|
-
]);
|
|
8674
|
-
if (fromResponseTokensDetails != null) {
|
|
8675
|
-
let transformedList = fromResponseTokensDetails;
|
|
8676
|
-
if (Array.isArray(transformedList)) {
|
|
8677
|
-
transformedList = transformedList.map((item) => {
|
|
8678
|
-
return modalityTokenCountFromMldev(item);
|
|
8679
|
-
});
|
|
8680
|
-
}
|
|
8681
|
-
setValueByPath(toObject, ['responseTokensDetails'], transformedList);
|
|
8682
|
-
}
|
|
8683
|
-
const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
|
|
8684
|
-
'toolUsePromptTokensDetails',
|
|
8685
|
-
]);
|
|
8686
|
-
if (fromToolUsePromptTokensDetails != null) {
|
|
8687
|
-
let transformedList = fromToolUsePromptTokensDetails;
|
|
8688
|
-
if (Array.isArray(transformedList)) {
|
|
8689
|
-
transformedList = transformedList.map((item) => {
|
|
8690
|
-
return modalityTokenCountFromMldev(item);
|
|
8691
|
-
});
|
|
8692
|
-
}
|
|
8693
|
-
setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
|
|
8949
|
+
if (fromModality != null) {
|
|
8950
|
+
setValueByPath(toObject, ['modality'], fromModality);
|
|
8951
|
+
}
|
|
8952
|
+
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8953
|
+
if (fromTokenCount != null) {
|
|
8954
|
+
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8694
8955
|
}
|
|
8695
8956
|
return toObject;
|
|
8696
8957
|
}
|
|
@@ -8786,14 +9047,6 @@ function usageMetadataFromVertex(fromObject) {
|
|
|
8786
9047
|
}
|
|
8787
9048
|
return toObject;
|
|
8788
9049
|
}
|
|
8789
|
-
function liveServerGoAwayFromMldev(fromObject) {
|
|
8790
|
-
const toObject = {};
|
|
8791
|
-
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
8792
|
-
if (fromTimeLeft != null) {
|
|
8793
|
-
setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
|
|
8794
|
-
}
|
|
8795
|
-
return toObject;
|
|
8796
|
-
}
|
|
8797
9050
|
function liveServerGoAwayFromVertex(fromObject) {
|
|
8798
9051
|
const toObject = {};
|
|
8799
9052
|
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
@@ -8802,24 +9055,6 @@ function liveServerGoAwayFromVertex(fromObject) {
|
|
|
8802
9055
|
}
|
|
8803
9056
|
return toObject;
|
|
8804
9057
|
}
|
|
8805
|
-
function liveServerSessionResumptionUpdateFromMldev(fromObject) {
|
|
8806
|
-
const toObject = {};
|
|
8807
|
-
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
8808
|
-
if (fromNewHandle != null) {
|
|
8809
|
-
setValueByPath(toObject, ['newHandle'], fromNewHandle);
|
|
8810
|
-
}
|
|
8811
|
-
const fromResumable = getValueByPath(fromObject, ['resumable']);
|
|
8812
|
-
if (fromResumable != null) {
|
|
8813
|
-
setValueByPath(toObject, ['resumable'], fromResumable);
|
|
8814
|
-
}
|
|
8815
|
-
const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
|
|
8816
|
-
'lastConsumedClientMessageIndex',
|
|
8817
|
-
]);
|
|
8818
|
-
if (fromLastConsumedClientMessageIndex != null) {
|
|
8819
|
-
setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
|
|
8820
|
-
}
|
|
8821
|
-
return toObject;
|
|
8822
|
-
}
|
|
8823
9058
|
function liveServerSessionResumptionUpdateFromVertex(fromObject) {
|
|
8824
9059
|
const toObject = {};
|
|
8825
9060
|
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
@@ -8838,48 +9073,6 @@ function liveServerSessionResumptionUpdateFromVertex(fromObject) {
|
|
|
8838
9073
|
}
|
|
8839
9074
|
return toObject;
|
|
8840
9075
|
}
|
|
8841
|
-
function liveServerMessageFromMldev(fromObject) {
|
|
8842
|
-
const toObject = {};
|
|
8843
|
-
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8844
|
-
'setupComplete',
|
|
8845
|
-
]);
|
|
8846
|
-
if (fromSetupComplete != null) {
|
|
8847
|
-
setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
|
|
8848
|
-
}
|
|
8849
|
-
const fromServerContent = getValueByPath(fromObject, [
|
|
8850
|
-
'serverContent',
|
|
8851
|
-
]);
|
|
8852
|
-
if (fromServerContent != null) {
|
|
8853
|
-
setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
|
|
8854
|
-
}
|
|
8855
|
-
const fromToolCall = getValueByPath(fromObject, ['toolCall']);
|
|
8856
|
-
if (fromToolCall != null) {
|
|
8857
|
-
setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
|
|
8858
|
-
}
|
|
8859
|
-
const fromToolCallCancellation = getValueByPath(fromObject, [
|
|
8860
|
-
'toolCallCancellation',
|
|
8861
|
-
]);
|
|
8862
|
-
if (fromToolCallCancellation != null) {
|
|
8863
|
-
setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
|
|
8864
|
-
}
|
|
8865
|
-
const fromUsageMetadata = getValueByPath(fromObject, [
|
|
8866
|
-
'usageMetadata',
|
|
8867
|
-
]);
|
|
8868
|
-
if (fromUsageMetadata != null) {
|
|
8869
|
-
setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
|
|
8870
|
-
}
|
|
8871
|
-
const fromGoAway = getValueByPath(fromObject, ['goAway']);
|
|
8872
|
-
if (fromGoAway != null) {
|
|
8873
|
-
setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
|
|
8874
|
-
}
|
|
8875
|
-
const fromSessionResumptionUpdate = getValueByPath(fromObject, [
|
|
8876
|
-
'sessionResumptionUpdate',
|
|
8877
|
-
]);
|
|
8878
|
-
if (fromSessionResumptionUpdate != null) {
|
|
8879
|
-
setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
|
|
8880
|
-
}
|
|
8881
|
-
return toObject;
|
|
8882
|
-
}
|
|
8883
9076
|
function liveServerMessageFromVertex(fromObject) {
|
|
8884
9077
|
const toObject = {};
|
|
8885
9078
|
const fromSetupComplete = getValueByPath(fromObject, [
|
|
@@ -8922,172 +9115,6 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
8922
9115
|
}
|
|
8923
9116
|
return toObject;
|
|
8924
9117
|
}
|
|
8925
|
-
function liveMusicServerSetupCompleteFromMldev() {
|
|
8926
|
-
const toObject = {};
|
|
8927
|
-
return toObject;
|
|
8928
|
-
}
|
|
8929
|
-
function weightedPromptFromMldev(fromObject) {
|
|
8930
|
-
const toObject = {};
|
|
8931
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
8932
|
-
if (fromText != null) {
|
|
8933
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
8934
|
-
}
|
|
8935
|
-
const fromWeight = getValueByPath(fromObject, ['weight']);
|
|
8936
|
-
if (fromWeight != null) {
|
|
8937
|
-
setValueByPath(toObject, ['weight'], fromWeight);
|
|
8938
|
-
}
|
|
8939
|
-
return toObject;
|
|
8940
|
-
}
|
|
8941
|
-
function liveMusicClientContentFromMldev(fromObject) {
|
|
8942
|
-
const toObject = {};
|
|
8943
|
-
const fromWeightedPrompts = getValueByPath(fromObject, [
|
|
8944
|
-
'weightedPrompts',
|
|
8945
|
-
]);
|
|
8946
|
-
if (fromWeightedPrompts != null) {
|
|
8947
|
-
let transformedList = fromWeightedPrompts;
|
|
8948
|
-
if (Array.isArray(transformedList)) {
|
|
8949
|
-
transformedList = transformedList.map((item) => {
|
|
8950
|
-
return weightedPromptFromMldev(item);
|
|
8951
|
-
});
|
|
8952
|
-
}
|
|
8953
|
-
setValueByPath(toObject, ['weightedPrompts'], transformedList);
|
|
8954
|
-
}
|
|
8955
|
-
return toObject;
|
|
8956
|
-
}
|
|
8957
|
-
function liveMusicGenerationConfigFromMldev(fromObject) {
|
|
8958
|
-
const toObject = {};
|
|
8959
|
-
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8960
|
-
if (fromTemperature != null) {
|
|
8961
|
-
setValueByPath(toObject, ['temperature'], fromTemperature);
|
|
8962
|
-
}
|
|
8963
|
-
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8964
|
-
if (fromTopK != null) {
|
|
8965
|
-
setValueByPath(toObject, ['topK'], fromTopK);
|
|
8966
|
-
}
|
|
8967
|
-
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8968
|
-
if (fromSeed != null) {
|
|
8969
|
-
setValueByPath(toObject, ['seed'], fromSeed);
|
|
8970
|
-
}
|
|
8971
|
-
const fromGuidance = getValueByPath(fromObject, ['guidance']);
|
|
8972
|
-
if (fromGuidance != null) {
|
|
8973
|
-
setValueByPath(toObject, ['guidance'], fromGuidance);
|
|
8974
|
-
}
|
|
8975
|
-
const fromBpm = getValueByPath(fromObject, ['bpm']);
|
|
8976
|
-
if (fromBpm != null) {
|
|
8977
|
-
setValueByPath(toObject, ['bpm'], fromBpm);
|
|
8978
|
-
}
|
|
8979
|
-
const fromDensity = getValueByPath(fromObject, ['density']);
|
|
8980
|
-
if (fromDensity != null) {
|
|
8981
|
-
setValueByPath(toObject, ['density'], fromDensity);
|
|
8982
|
-
}
|
|
8983
|
-
const fromBrightness = getValueByPath(fromObject, ['brightness']);
|
|
8984
|
-
if (fromBrightness != null) {
|
|
8985
|
-
setValueByPath(toObject, ['brightness'], fromBrightness);
|
|
8986
|
-
}
|
|
8987
|
-
const fromScale = getValueByPath(fromObject, ['scale']);
|
|
8988
|
-
if (fromScale != null) {
|
|
8989
|
-
setValueByPath(toObject, ['scale'], fromScale);
|
|
8990
|
-
}
|
|
8991
|
-
const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
|
|
8992
|
-
if (fromMuteBass != null) {
|
|
8993
|
-
setValueByPath(toObject, ['muteBass'], fromMuteBass);
|
|
8994
|
-
}
|
|
8995
|
-
const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
|
|
8996
|
-
if (fromMuteDrums != null) {
|
|
8997
|
-
setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
|
|
8998
|
-
}
|
|
8999
|
-
const fromOnlyBassAndDrums = getValueByPath(fromObject, [
|
|
9000
|
-
'onlyBassAndDrums',
|
|
9001
|
-
]);
|
|
9002
|
-
if (fromOnlyBassAndDrums != null) {
|
|
9003
|
-
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
9004
|
-
}
|
|
9005
|
-
return toObject;
|
|
9006
|
-
}
|
|
9007
|
-
function liveMusicSourceMetadataFromMldev(fromObject) {
|
|
9008
|
-
const toObject = {};
|
|
9009
|
-
const fromClientContent = getValueByPath(fromObject, [
|
|
9010
|
-
'clientContent',
|
|
9011
|
-
]);
|
|
9012
|
-
if (fromClientContent != null) {
|
|
9013
|
-
setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
|
|
9014
|
-
}
|
|
9015
|
-
const fromMusicGenerationConfig = getValueByPath(fromObject, [
|
|
9016
|
-
'musicGenerationConfig',
|
|
9017
|
-
]);
|
|
9018
|
-
if (fromMusicGenerationConfig != null) {
|
|
9019
|
-
setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
|
|
9020
|
-
}
|
|
9021
|
-
return toObject;
|
|
9022
|
-
}
|
|
9023
|
-
function audioChunkFromMldev(fromObject) {
|
|
9024
|
-
const toObject = {};
|
|
9025
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
9026
|
-
if (fromData != null) {
|
|
9027
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
9028
|
-
}
|
|
9029
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9030
|
-
if (fromMimeType != null) {
|
|
9031
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9032
|
-
}
|
|
9033
|
-
const fromSourceMetadata = getValueByPath(fromObject, [
|
|
9034
|
-
'sourceMetadata',
|
|
9035
|
-
]);
|
|
9036
|
-
if (fromSourceMetadata != null) {
|
|
9037
|
-
setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
|
|
9038
|
-
}
|
|
9039
|
-
return toObject;
|
|
9040
|
-
}
|
|
9041
|
-
function liveMusicServerContentFromMldev(fromObject) {
|
|
9042
|
-
const toObject = {};
|
|
9043
|
-
const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
|
|
9044
|
-
if (fromAudioChunks != null) {
|
|
9045
|
-
let transformedList = fromAudioChunks;
|
|
9046
|
-
if (Array.isArray(transformedList)) {
|
|
9047
|
-
transformedList = transformedList.map((item) => {
|
|
9048
|
-
return audioChunkFromMldev(item);
|
|
9049
|
-
});
|
|
9050
|
-
}
|
|
9051
|
-
setValueByPath(toObject, ['audioChunks'], transformedList);
|
|
9052
|
-
}
|
|
9053
|
-
return toObject;
|
|
9054
|
-
}
|
|
9055
|
-
function liveMusicFilteredPromptFromMldev(fromObject) {
|
|
9056
|
-
const toObject = {};
|
|
9057
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
9058
|
-
if (fromText != null) {
|
|
9059
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
9060
|
-
}
|
|
9061
|
-
const fromFilteredReason = getValueByPath(fromObject, [
|
|
9062
|
-
'filteredReason',
|
|
9063
|
-
]);
|
|
9064
|
-
if (fromFilteredReason != null) {
|
|
9065
|
-
setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
|
|
9066
|
-
}
|
|
9067
|
-
return toObject;
|
|
9068
|
-
}
|
|
9069
|
-
function liveMusicServerMessageFromMldev(fromObject) {
|
|
9070
|
-
const toObject = {};
|
|
9071
|
-
const fromSetupComplete = getValueByPath(fromObject, [
|
|
9072
|
-
'setupComplete',
|
|
9073
|
-
]);
|
|
9074
|
-
if (fromSetupComplete != null) {
|
|
9075
|
-
setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
|
|
9076
|
-
}
|
|
9077
|
-
const fromServerContent = getValueByPath(fromObject, [
|
|
9078
|
-
'serverContent',
|
|
9079
|
-
]);
|
|
9080
|
-
if (fromServerContent != null) {
|
|
9081
|
-
setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
|
|
9082
|
-
}
|
|
9083
|
-
const fromFilteredPrompt = getValueByPath(fromObject, [
|
|
9084
|
-
'filteredPrompt',
|
|
9085
|
-
]);
|
|
9086
|
-
if (fromFilteredPrompt != null) {
|
|
9087
|
-
setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
|
|
9088
|
-
}
|
|
9089
|
-
return toObject;
|
|
9090
|
-
}
|
|
9091
9118
|
|
|
9092
9119
|
/**
|
|
9093
9120
|
* @license
|
|
@@ -11168,6 +11195,10 @@ function editImageConfigToVertex(fromObject, parentObject) {
|
|
|
11168
11195
|
if (parentObject !== undefined && fromOutputCompressionQuality != null) {
|
|
11169
11196
|
setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
11170
11197
|
}
|
|
11198
|
+
const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
|
|
11199
|
+
if (parentObject !== undefined && fromAddWatermark != null) {
|
|
11200
|
+
setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
|
|
11201
|
+
}
|
|
11171
11202
|
const fromEditMode = getValueByPath(fromObject, ['editMode']);
|
|
11172
11203
|
if (parentObject !== undefined && fromEditMode != null) {
|
|
11173
11204
|
setValueByPath(parentObject, ['parameters', 'editMode'], fromEditMode);
|
|
@@ -11742,6 +11773,12 @@ function candidateFromMldev(fromObject) {
|
|
|
11742
11773
|
}
|
|
11743
11774
|
function generateContentResponseFromMldev(fromObject) {
|
|
11744
11775
|
const toObject = {};
|
|
11776
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11777
|
+
'sdkHttpResponse',
|
|
11778
|
+
]);
|
|
11779
|
+
if (fromSdkHttpResponse != null) {
|
|
11780
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
11781
|
+
}
|
|
11745
11782
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
11746
11783
|
if (fromCandidates != null) {
|
|
11747
11784
|
let transformedList = fromCandidates;
|
|
@@ -12268,6 +12305,12 @@ function candidateFromVertex(fromObject) {
|
|
|
12268
12305
|
}
|
|
12269
12306
|
function generateContentResponseFromVertex(fromObject) {
|
|
12270
12307
|
const toObject = {};
|
|
12308
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12309
|
+
'sdkHttpResponse',
|
|
12310
|
+
]);
|
|
12311
|
+
if (fromSdkHttpResponse != null) {
|
|
12312
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
12313
|
+
}
|
|
12271
12314
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
12272
12315
|
if (fromCandidates != null) {
|
|
12273
12316
|
let transformedList = fromCandidates;
|
|
@@ -12704,7 +12747,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
12704
12747
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
12705
12748
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
12706
12749
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
12707
|
-
const SDK_VERSION = '1.
|
|
12750
|
+
const SDK_VERSION = '1.10.0'; // x-release-please-version
|
|
12708
12751
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
12709
12752
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
12710
12753
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -13276,6 +13319,9 @@ function includeExtraBodyToRequestInit(requestInit, extraBody) {
|
|
|
13276
13319
|
*/
|
|
13277
13320
|
// TODO: b/416041229 - Determine how to retrieve the MCP package version.
|
|
13278
13321
|
const MCP_LABEL = 'mcp_used/unknown';
|
|
13322
|
+
// Whether MCP tool usage is detected from mcpToTool. This is used for
|
|
13323
|
+
// telemetry.
|
|
13324
|
+
let hasMcpToolUsageFromMcpToTool = false;
|
|
13279
13325
|
// Checks whether the list of tools contains any MCP tools.
|
|
13280
13326
|
function hasMcpToolUsage(tools) {
|
|
13281
13327
|
for (const tool of tools) {
|
|
@@ -13286,7 +13332,7 @@ function hasMcpToolUsage(tools) {
|
|
|
13286
13332
|
return true;
|
|
13287
13333
|
}
|
|
13288
13334
|
}
|
|
13289
|
-
return
|
|
13335
|
+
return hasMcpToolUsageFromMcpToTool;
|
|
13290
13336
|
}
|
|
13291
13337
|
// Sets the MCP version label in the Google API client header.
|
|
13292
13338
|
function setMcpUsageHeader(headers) {
|
|
@@ -13443,6 +13489,8 @@ function isMcpClient(client) {
|
|
|
13443
13489
|
* versions.
|
|
13444
13490
|
*/
|
|
13445
13491
|
function mcpToTool(...args) {
|
|
13492
|
+
// Set MCP usage for telemetry.
|
|
13493
|
+
hasMcpToolUsageFromMcpToTool = true;
|
|
13446
13494
|
if (args.length === 0) {
|
|
13447
13495
|
throw new Error('No MCP clients provided');
|
|
13448
13496
|
}
|
|
@@ -13788,6 +13836,12 @@ class Live {
|
|
|
13788
13836
|
*/
|
|
13789
13837
|
async connect(params) {
|
|
13790
13838
|
var _a, _b, _c, _d, _e, _f;
|
|
13839
|
+
// TODO: b/404946746 - Support per request HTTP options.
|
|
13840
|
+
if (params.config && params.config.httpOptions) {
|
|
13841
|
+
throw new Error('The Live module does not support httpOptions at request-level in' +
|
|
13842
|
+
' LiveConnectConfig yet. Please use the client-level httpOptions' +
|
|
13843
|
+
' configuration instead.');
|
|
13844
|
+
}
|
|
13791
13845
|
const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();
|
|
13792
13846
|
const apiVersion = this.apiClient.getApiVersion();
|
|
13793
13847
|
let url;
|
|
@@ -14633,7 +14687,13 @@ class Models extends BaseModule {
|
|
|
14633
14687
|
abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
|
|
14634
14688
|
})
|
|
14635
14689
|
.then((httpResponse) => {
|
|
14636
|
-
return httpResponse.json()
|
|
14690
|
+
return httpResponse.json().then((jsonResponse) => {
|
|
14691
|
+
const response = jsonResponse;
|
|
14692
|
+
response.sdkHttpResponse = {
|
|
14693
|
+
headers: httpResponse.headers,
|
|
14694
|
+
};
|
|
14695
|
+
return response;
|
|
14696
|
+
});
|
|
14637
14697
|
});
|
|
14638
14698
|
return response.then((apiResponse) => {
|
|
14639
14699
|
const resp = generateContentResponseFromVertex(apiResponse);
|
|
@@ -14659,7 +14719,13 @@ class Models extends BaseModule {
|
|
|
14659
14719
|
abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
|
|
14660
14720
|
})
|
|
14661
14721
|
.then((httpResponse) => {
|
|
14662
|
-
return httpResponse.json()
|
|
14722
|
+
return httpResponse.json().then((jsonResponse) => {
|
|
14723
|
+
const response = jsonResponse;
|
|
14724
|
+
response.sdkHttpResponse = {
|
|
14725
|
+
headers: httpResponse.headers,
|
|
14726
|
+
};
|
|
14727
|
+
return response;
|
|
14728
|
+
});
|
|
14663
14729
|
});
|
|
14664
14730
|
return response.then((apiResponse) => {
|
|
14665
14731
|
const resp = generateContentResponseFromMldev(apiResponse);
|
|
@@ -14699,6 +14765,9 @@ class Models extends BaseModule {
|
|
|
14699
14765
|
_d = false;
|
|
14700
14766
|
const chunk = _c;
|
|
14701
14767
|
const resp = generateContentResponseFromVertex((yield __await(chunk.json())));
|
|
14768
|
+
resp['sdkHttpResponse'] = {
|
|
14769
|
+
headers: chunk.headers,
|
|
14770
|
+
};
|
|
14702
14771
|
const typedResp = new GenerateContentResponse();
|
|
14703
14772
|
Object.assign(typedResp, resp);
|
|
14704
14773
|
yield yield __await(typedResp);
|
|
@@ -14739,6 +14808,9 @@ class Models extends BaseModule {
|
|
|
14739
14808
|
_d = false;
|
|
14740
14809
|
const chunk = _c;
|
|
14741
14810
|
const resp = generateContentResponseFromMldev((yield __await(chunk.json())));
|
|
14811
|
+
resp['sdkHttpResponse'] = {
|
|
14812
|
+
headers: chunk.headers,
|
|
14813
|
+
};
|
|
14742
14814
|
const typedResp = new GenerateContentResponse();
|
|
14743
14815
|
Object.assign(typedResp, resp);
|
|
14744
14816
|
yield yield __await(typedResp);
|
|
@@ -17199,7 +17271,7 @@ function listTuningJobsResponseFromMldev(fromObject) {
|
|
|
17199
17271
|
}
|
|
17200
17272
|
return toObject;
|
|
17201
17273
|
}
|
|
17202
|
-
function
|
|
17274
|
+
function tuningOperationFromMldev(fromObject) {
|
|
17203
17275
|
const toObject = {};
|
|
17204
17276
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
17205
17277
|
if (fromName != null) {
|
|
@@ -17626,7 +17698,7 @@ class Tunings extends BaseModule {
|
|
|
17626
17698
|
return httpResponse.json();
|
|
17627
17699
|
});
|
|
17628
17700
|
return response.then((apiResponse) => {
|
|
17629
|
-
const resp =
|
|
17701
|
+
const resp = tuningOperationFromMldev(apiResponse);
|
|
17630
17702
|
return resp;
|
|
17631
17703
|
});
|
|
17632
17704
|
}
|