@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/web/index.mjs
CHANGED
|
@@ -2411,6 +2411,9 @@ function tBatchJobSource(apiClient, src) {
|
|
|
2411
2411
|
throw new Error(`Unsupported source: ${src}`);
|
|
2412
2412
|
}
|
|
2413
2413
|
function tBatchJobDestination(dest) {
|
|
2414
|
+
if (typeof dest !== 'string') {
|
|
2415
|
+
return dest;
|
|
2416
|
+
}
|
|
2414
2417
|
const destString = dest;
|
|
2415
2418
|
if (destString.startsWith('gs://')) {
|
|
2416
2419
|
return {
|
|
@@ -3396,10 +3399,6 @@ function deleteBatchJobParametersToVertex(apiClient, fromObject) {
|
|
|
3396
3399
|
}
|
|
3397
3400
|
return toObject;
|
|
3398
3401
|
}
|
|
3399
|
-
function jobErrorFromMldev() {
|
|
3400
|
-
const toObject = {};
|
|
3401
|
-
return toObject;
|
|
3402
|
-
}
|
|
3403
3402
|
function videoMetadataFromMldev$2(fromObject) {
|
|
3404
3403
|
const toObject = {};
|
|
3405
3404
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
@@ -3604,6 +3603,12 @@ function candidateFromMldev$1(fromObject) {
|
|
|
3604
3603
|
}
|
|
3605
3604
|
function generateContentResponseFromMldev$1(fromObject) {
|
|
3606
3605
|
const toObject = {};
|
|
3606
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
3607
|
+
'sdkHttpResponse',
|
|
3608
|
+
]);
|
|
3609
|
+
if (fromSdkHttpResponse != null) {
|
|
3610
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
3611
|
+
}
|
|
3607
3612
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
3608
3613
|
if (fromCandidates != null) {
|
|
3609
3614
|
let transformedList = fromCandidates;
|
|
@@ -3632,6 +3637,22 @@ function generateContentResponseFromMldev$1(fromObject) {
|
|
|
3632
3637
|
}
|
|
3633
3638
|
return toObject;
|
|
3634
3639
|
}
|
|
3640
|
+
function jobErrorFromMldev(fromObject) {
|
|
3641
|
+
const toObject = {};
|
|
3642
|
+
const fromDetails = getValueByPath(fromObject, ['details']);
|
|
3643
|
+
if (fromDetails != null) {
|
|
3644
|
+
setValueByPath(toObject, ['details'], fromDetails);
|
|
3645
|
+
}
|
|
3646
|
+
const fromCode = getValueByPath(fromObject, ['code']);
|
|
3647
|
+
if (fromCode != null) {
|
|
3648
|
+
setValueByPath(toObject, ['code'], fromCode);
|
|
3649
|
+
}
|
|
3650
|
+
const fromMessage = getValueByPath(fromObject, ['message']);
|
|
3651
|
+
if (fromMessage != null) {
|
|
3652
|
+
setValueByPath(toObject, ['message'], fromMessage);
|
|
3653
|
+
}
|
|
3654
|
+
return toObject;
|
|
3655
|
+
}
|
|
3635
3656
|
function inlinedResponseFromMldev(fromObject) {
|
|
3636
3657
|
const toObject = {};
|
|
3637
3658
|
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
@@ -3640,7 +3661,7 @@ function inlinedResponseFromMldev(fromObject) {
|
|
|
3640
3661
|
}
|
|
3641
3662
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
3642
3663
|
if (fromError != null) {
|
|
3643
|
-
setValueByPath(toObject, ['error'], jobErrorFromMldev());
|
|
3664
|
+
setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
|
|
3644
3665
|
}
|
|
3645
3666
|
return toObject;
|
|
3646
3667
|
}
|
|
@@ -3745,7 +3766,7 @@ function deleteResourceJobFromMldev(fromObject) {
|
|
|
3745
3766
|
}
|
|
3746
3767
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
3747
3768
|
if (fromError != null) {
|
|
3748
|
-
setValueByPath(toObject, ['error'], jobErrorFromMldev());
|
|
3769
|
+
setValueByPath(toObject, ['error'], jobErrorFromMldev(fromError));
|
|
3749
3770
|
}
|
|
3750
3771
|
return toObject;
|
|
3751
3772
|
}
|
|
@@ -6511,8 +6532,14 @@ function listFilesResponseFromMldev(fromObject) {
|
|
|
6511
6532
|
}
|
|
6512
6533
|
return toObject;
|
|
6513
6534
|
}
|
|
6514
|
-
function createFileResponseFromMldev() {
|
|
6535
|
+
function createFileResponseFromMldev(fromObject) {
|
|
6515
6536
|
const toObject = {};
|
|
6537
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
6538
|
+
'sdkHttpResponse',
|
|
6539
|
+
]);
|
|
6540
|
+
if (fromSdkHttpResponse != null) {
|
|
6541
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
6542
|
+
}
|
|
6516
6543
|
return toObject;
|
|
6517
6544
|
}
|
|
6518
6545
|
function deleteFileResponseFromMldev() {
|
|
@@ -6685,8 +6712,8 @@ class Files extends BaseModule {
|
|
|
6685
6712
|
.then((httpResponse) => {
|
|
6686
6713
|
return httpResponse.json();
|
|
6687
6714
|
});
|
|
6688
|
-
return response.then(() => {
|
|
6689
|
-
const resp = createFileResponseFromMldev();
|
|
6715
|
+
return response.then((apiResponse) => {
|
|
6716
|
+
const resp = createFileResponseFromMldev(apiResponse);
|
|
6690
6717
|
const typedResp = new CreateFileResponse();
|
|
6691
6718
|
Object.assign(typedResp, resp);
|
|
6692
6719
|
return typedResp;
|
|
@@ -6804,14 +6831,6 @@ function prebuiltVoiceConfigToMldev$2(fromObject) {
|
|
|
6804
6831
|
}
|
|
6805
6832
|
return toObject;
|
|
6806
6833
|
}
|
|
6807
|
-
function prebuiltVoiceConfigToVertex$1(fromObject) {
|
|
6808
|
-
const toObject = {};
|
|
6809
|
-
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
6810
|
-
if (fromVoiceName != null) {
|
|
6811
|
-
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
6812
|
-
}
|
|
6813
|
-
return toObject;
|
|
6814
|
-
}
|
|
6815
6834
|
function voiceConfigToMldev$2(fromObject) {
|
|
6816
6835
|
const toObject = {};
|
|
6817
6836
|
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
@@ -6822,16 +6841,6 @@ function voiceConfigToMldev$2(fromObject) {
|
|
|
6822
6841
|
}
|
|
6823
6842
|
return toObject;
|
|
6824
6843
|
}
|
|
6825
|
-
function voiceConfigToVertex$1(fromObject) {
|
|
6826
|
-
const toObject = {};
|
|
6827
|
-
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
6828
|
-
'prebuiltVoiceConfig',
|
|
6829
|
-
]);
|
|
6830
|
-
if (fromPrebuiltVoiceConfig != null) {
|
|
6831
|
-
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
|
|
6832
|
-
}
|
|
6833
|
-
return toObject;
|
|
6834
|
-
}
|
|
6835
6844
|
function speakerVoiceConfigToMldev$2(fromObject) {
|
|
6836
6845
|
const toObject = {};
|
|
6837
6846
|
const fromSpeaker = getValueByPath(fromObject, ['speaker']);
|
|
@@ -6878,21 +6887,6 @@ function speechConfigToMldev$2(fromObject) {
|
|
|
6878
6887
|
}
|
|
6879
6888
|
return toObject;
|
|
6880
6889
|
}
|
|
6881
|
-
function speechConfigToVertex$1(fromObject) {
|
|
6882
|
-
const toObject = {};
|
|
6883
|
-
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
6884
|
-
if (fromVoiceConfig != null) {
|
|
6885
|
-
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
6886
|
-
}
|
|
6887
|
-
if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
|
|
6888
|
-
throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
|
|
6889
|
-
}
|
|
6890
|
-
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
6891
|
-
if (fromLanguageCode != null) {
|
|
6892
|
-
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
6893
|
-
}
|
|
6894
|
-
return toObject;
|
|
6895
|
-
}
|
|
6896
6890
|
function videoMetadataToMldev$2(fromObject) {
|
|
6897
6891
|
const toObject = {};
|
|
6898
6892
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
@@ -6909,22 +6903,6 @@ function videoMetadataToMldev$2(fromObject) {
|
|
|
6909
6903
|
}
|
|
6910
6904
|
return toObject;
|
|
6911
6905
|
}
|
|
6912
|
-
function videoMetadataToVertex$1(fromObject) {
|
|
6913
|
-
const toObject = {};
|
|
6914
|
-
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
6915
|
-
if (fromFps != null) {
|
|
6916
|
-
setValueByPath(toObject, ['fps'], fromFps);
|
|
6917
|
-
}
|
|
6918
|
-
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
6919
|
-
if (fromEndOffset != null) {
|
|
6920
|
-
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
6921
|
-
}
|
|
6922
|
-
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
6923
|
-
if (fromStartOffset != null) {
|
|
6924
|
-
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
6925
|
-
}
|
|
6926
|
-
return toObject;
|
|
6927
|
-
}
|
|
6928
6906
|
function blobToMldev$2(fromObject) {
|
|
6929
6907
|
const toObject = {};
|
|
6930
6908
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
@@ -6940,22 +6918,6 @@ function blobToMldev$2(fromObject) {
|
|
|
6940
6918
|
}
|
|
6941
6919
|
return toObject;
|
|
6942
6920
|
}
|
|
6943
|
-
function blobToVertex$1(fromObject) {
|
|
6944
|
-
const toObject = {};
|
|
6945
|
-
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
6946
|
-
if (fromDisplayName != null) {
|
|
6947
|
-
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
6948
|
-
}
|
|
6949
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
6950
|
-
if (fromData != null) {
|
|
6951
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
6952
|
-
}
|
|
6953
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6954
|
-
if (fromMimeType != null) {
|
|
6955
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6956
|
-
}
|
|
6957
|
-
return toObject;
|
|
6958
|
-
}
|
|
6959
6921
|
function fileDataToMldev$2(fromObject) {
|
|
6960
6922
|
const toObject = {};
|
|
6961
6923
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
@@ -6971,22 +6933,6 @@ function fileDataToMldev$2(fromObject) {
|
|
|
6971
6933
|
}
|
|
6972
6934
|
return toObject;
|
|
6973
6935
|
}
|
|
6974
|
-
function fileDataToVertex$1(fromObject) {
|
|
6975
|
-
const toObject = {};
|
|
6976
|
-
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
6977
|
-
if (fromDisplayName != null) {
|
|
6978
|
-
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
6979
|
-
}
|
|
6980
|
-
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6981
|
-
if (fromFileUri != null) {
|
|
6982
|
-
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
6983
|
-
}
|
|
6984
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6985
|
-
if (fromMimeType != null) {
|
|
6986
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6987
|
-
}
|
|
6988
|
-
return toObject;
|
|
6989
|
-
}
|
|
6990
6936
|
function partToMldev$2(fromObject) {
|
|
6991
6937
|
const toObject = {};
|
|
6992
6938
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7041,60 +6987,6 @@ function partToMldev$2(fromObject) {
|
|
|
7041
6987
|
}
|
|
7042
6988
|
return toObject;
|
|
7043
6989
|
}
|
|
7044
|
-
function partToVertex$1(fromObject) {
|
|
7045
|
-
const toObject = {};
|
|
7046
|
-
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
7047
|
-
'videoMetadata',
|
|
7048
|
-
]);
|
|
7049
|
-
if (fromVideoMetadata != null) {
|
|
7050
|
-
setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
|
|
7051
|
-
}
|
|
7052
|
-
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
7053
|
-
if (fromThought != null) {
|
|
7054
|
-
setValueByPath(toObject, ['thought'], fromThought);
|
|
7055
|
-
}
|
|
7056
|
-
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
7057
|
-
if (fromInlineData != null) {
|
|
7058
|
-
setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
|
|
7059
|
-
}
|
|
7060
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7061
|
-
if (fromFileData != null) {
|
|
7062
|
-
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
|
|
7063
|
-
}
|
|
7064
|
-
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
7065
|
-
'thoughtSignature',
|
|
7066
|
-
]);
|
|
7067
|
-
if (fromThoughtSignature != null) {
|
|
7068
|
-
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
7069
|
-
}
|
|
7070
|
-
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7071
|
-
'codeExecutionResult',
|
|
7072
|
-
]);
|
|
7073
|
-
if (fromCodeExecutionResult != null) {
|
|
7074
|
-
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
7075
|
-
}
|
|
7076
|
-
const fromExecutableCode = getValueByPath(fromObject, [
|
|
7077
|
-
'executableCode',
|
|
7078
|
-
]);
|
|
7079
|
-
if (fromExecutableCode != null) {
|
|
7080
|
-
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7081
|
-
}
|
|
7082
|
-
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7083
|
-
if (fromFunctionCall != null) {
|
|
7084
|
-
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
7085
|
-
}
|
|
7086
|
-
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
7087
|
-
'functionResponse',
|
|
7088
|
-
]);
|
|
7089
|
-
if (fromFunctionResponse != null) {
|
|
7090
|
-
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
7091
|
-
}
|
|
7092
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
7093
|
-
if (fromText != null) {
|
|
7094
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
7095
|
-
}
|
|
7096
|
-
return toObject;
|
|
7097
|
-
}
|
|
7098
6990
|
function contentToMldev$2(fromObject) {
|
|
7099
6991
|
const toObject = {};
|
|
7100
6992
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -7113,24 +7005,6 @@ function contentToMldev$2(fromObject) {
|
|
|
7113
7005
|
}
|
|
7114
7006
|
return toObject;
|
|
7115
7007
|
}
|
|
7116
|
-
function contentToVertex$1(fromObject) {
|
|
7117
|
-
const toObject = {};
|
|
7118
|
-
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7119
|
-
if (fromParts != null) {
|
|
7120
|
-
let transformedList = fromParts;
|
|
7121
|
-
if (Array.isArray(transformedList)) {
|
|
7122
|
-
transformedList = transformedList.map((item) => {
|
|
7123
|
-
return partToVertex$1(item);
|
|
7124
|
-
});
|
|
7125
|
-
}
|
|
7126
|
-
setValueByPath(toObject, ['parts'], transformedList);
|
|
7127
|
-
}
|
|
7128
|
-
const fromRole = getValueByPath(fromObject, ['role']);
|
|
7129
|
-
if (fromRole != null) {
|
|
7130
|
-
setValueByPath(toObject, ['role'], fromRole);
|
|
7131
|
-
}
|
|
7132
|
-
return toObject;
|
|
7133
|
-
}
|
|
7134
7008
|
function functionDeclarationToMldev$2(fromObject) {
|
|
7135
7009
|
const toObject = {};
|
|
7136
7010
|
const fromBehavior = getValueByPath(fromObject, ['behavior']);
|
|
@@ -7167,41 +7041,6 @@ function functionDeclarationToMldev$2(fromObject) {
|
|
|
7167
7041
|
}
|
|
7168
7042
|
return toObject;
|
|
7169
7043
|
}
|
|
7170
|
-
function functionDeclarationToVertex$1(fromObject) {
|
|
7171
|
-
const toObject = {};
|
|
7172
|
-
if (getValueByPath(fromObject, ['behavior']) !== undefined) {
|
|
7173
|
-
throw new Error('behavior parameter is not supported in Vertex AI.');
|
|
7174
|
-
}
|
|
7175
|
-
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7176
|
-
if (fromDescription != null) {
|
|
7177
|
-
setValueByPath(toObject, ['description'], fromDescription);
|
|
7178
|
-
}
|
|
7179
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
7180
|
-
if (fromName != null) {
|
|
7181
|
-
setValueByPath(toObject, ['name'], fromName);
|
|
7182
|
-
}
|
|
7183
|
-
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
7184
|
-
if (fromParameters != null) {
|
|
7185
|
-
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
7186
|
-
}
|
|
7187
|
-
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
7188
|
-
'parametersJsonSchema',
|
|
7189
|
-
]);
|
|
7190
|
-
if (fromParametersJsonSchema != null) {
|
|
7191
|
-
setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
|
|
7192
|
-
}
|
|
7193
|
-
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
7194
|
-
if (fromResponse != null) {
|
|
7195
|
-
setValueByPath(toObject, ['response'], fromResponse);
|
|
7196
|
-
}
|
|
7197
|
-
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
7198
|
-
'responseJsonSchema',
|
|
7199
|
-
]);
|
|
7200
|
-
if (fromResponseJsonSchema != null) {
|
|
7201
|
-
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
7202
|
-
}
|
|
7203
|
-
return toObject;
|
|
7204
|
-
}
|
|
7205
7044
|
function intervalToMldev$2(fromObject) {
|
|
7206
7045
|
const toObject = {};
|
|
7207
7046
|
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
@@ -7214,18 +7053,6 @@ function intervalToMldev$2(fromObject) {
|
|
|
7214
7053
|
}
|
|
7215
7054
|
return toObject;
|
|
7216
7055
|
}
|
|
7217
|
-
function intervalToVertex$1(fromObject) {
|
|
7218
|
-
const toObject = {};
|
|
7219
|
-
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7220
|
-
if (fromStartTime != null) {
|
|
7221
|
-
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
7222
|
-
}
|
|
7223
|
-
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
7224
|
-
if (fromEndTime != null) {
|
|
7225
|
-
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
7226
|
-
}
|
|
7227
|
-
return toObject;
|
|
7228
|
-
}
|
|
7229
7056
|
function googleSearchToMldev$2(fromObject) {
|
|
7230
7057
|
const toObject = {};
|
|
7231
7058
|
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
@@ -7236,16 +7063,6 @@ function googleSearchToMldev$2(fromObject) {
|
|
|
7236
7063
|
}
|
|
7237
7064
|
return toObject;
|
|
7238
7065
|
}
|
|
7239
|
-
function googleSearchToVertex$1(fromObject) {
|
|
7240
|
-
const toObject = {};
|
|
7241
|
-
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7242
|
-
'timeRangeFilter',
|
|
7243
|
-
]);
|
|
7244
|
-
if (fromTimeRangeFilter != null) {
|
|
7245
|
-
setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
|
|
7246
|
-
}
|
|
7247
|
-
return toObject;
|
|
7248
|
-
}
|
|
7249
7066
|
function dynamicRetrievalConfigToMldev$2(fromObject) {
|
|
7250
7067
|
const toObject = {};
|
|
7251
7068
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
@@ -7260,20 +7077,6 @@ function dynamicRetrievalConfigToMldev$2(fromObject) {
|
|
|
7260
7077
|
}
|
|
7261
7078
|
return toObject;
|
|
7262
7079
|
}
|
|
7263
|
-
function dynamicRetrievalConfigToVertex$1(fromObject) {
|
|
7264
|
-
const toObject = {};
|
|
7265
|
-
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
7266
|
-
if (fromMode != null) {
|
|
7267
|
-
setValueByPath(toObject, ['mode'], fromMode);
|
|
7268
|
-
}
|
|
7269
|
-
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
7270
|
-
'dynamicThreshold',
|
|
7271
|
-
]);
|
|
7272
|
-
if (fromDynamicThreshold != null) {
|
|
7273
|
-
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
7274
|
-
}
|
|
7275
|
-
return toObject;
|
|
7276
|
-
}
|
|
7277
7080
|
function googleSearchRetrievalToMldev$2(fromObject) {
|
|
7278
7081
|
const toObject = {};
|
|
7279
7082
|
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
@@ -7284,73 +7087,7 @@ function googleSearchRetrievalToMldev$2(fromObject) {
|
|
|
7284
7087
|
}
|
|
7285
7088
|
return toObject;
|
|
7286
7089
|
}
|
|
7287
|
-
function
|
|
7288
|
-
const toObject = {};
|
|
7289
|
-
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
7290
|
-
'dynamicRetrievalConfig',
|
|
7291
|
-
]);
|
|
7292
|
-
if (fromDynamicRetrievalConfig != null) {
|
|
7293
|
-
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
|
|
7294
|
-
}
|
|
7295
|
-
return toObject;
|
|
7296
|
-
}
|
|
7297
|
-
function enterpriseWebSearchToVertex$1() {
|
|
7298
|
-
const toObject = {};
|
|
7299
|
-
return toObject;
|
|
7300
|
-
}
|
|
7301
|
-
function apiKeyConfigToVertex$1(fromObject) {
|
|
7302
|
-
const toObject = {};
|
|
7303
|
-
const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
|
|
7304
|
-
if (fromApiKeyString != null) {
|
|
7305
|
-
setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
|
|
7306
|
-
}
|
|
7307
|
-
return toObject;
|
|
7308
|
-
}
|
|
7309
|
-
function authConfigToVertex$1(fromObject) {
|
|
7310
|
-
const toObject = {};
|
|
7311
|
-
const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
|
|
7312
|
-
if (fromApiKeyConfig != null) {
|
|
7313
|
-
setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
|
|
7314
|
-
}
|
|
7315
|
-
const fromAuthType = getValueByPath(fromObject, ['authType']);
|
|
7316
|
-
if (fromAuthType != null) {
|
|
7317
|
-
setValueByPath(toObject, ['authType'], fromAuthType);
|
|
7318
|
-
}
|
|
7319
|
-
const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
|
|
7320
|
-
'googleServiceAccountConfig',
|
|
7321
|
-
]);
|
|
7322
|
-
if (fromGoogleServiceAccountConfig != null) {
|
|
7323
|
-
setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
|
|
7324
|
-
}
|
|
7325
|
-
const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
|
|
7326
|
-
'httpBasicAuthConfig',
|
|
7327
|
-
]);
|
|
7328
|
-
if (fromHttpBasicAuthConfig != null) {
|
|
7329
|
-
setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
|
|
7330
|
-
}
|
|
7331
|
-
const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
|
|
7332
|
-
if (fromOauthConfig != null) {
|
|
7333
|
-
setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
|
|
7334
|
-
}
|
|
7335
|
-
const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
|
|
7336
|
-
if (fromOidcConfig != null) {
|
|
7337
|
-
setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
|
|
7338
|
-
}
|
|
7339
|
-
return toObject;
|
|
7340
|
-
}
|
|
7341
|
-
function googleMapsToVertex$1(fromObject) {
|
|
7342
|
-
const toObject = {};
|
|
7343
|
-
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7344
|
-
if (fromAuthConfig != null) {
|
|
7345
|
-
setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
|
|
7346
|
-
}
|
|
7347
|
-
return toObject;
|
|
7348
|
-
}
|
|
7349
|
-
function urlContextToMldev$2() {
|
|
7350
|
-
const toObject = {};
|
|
7351
|
-
return toObject;
|
|
7352
|
-
}
|
|
7353
|
-
function urlContextToVertex$1() {
|
|
7090
|
+
function urlContextToMldev$2() {
|
|
7354
7091
|
const toObject = {};
|
|
7355
7092
|
return toObject;
|
|
7356
7093
|
}
|
|
@@ -7403,60 +7140,6 @@ function toolToMldev$2(fromObject) {
|
|
|
7403
7140
|
}
|
|
7404
7141
|
return toObject;
|
|
7405
7142
|
}
|
|
7406
|
-
function toolToVertex$1(fromObject) {
|
|
7407
|
-
const toObject = {};
|
|
7408
|
-
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
7409
|
-
'functionDeclarations',
|
|
7410
|
-
]);
|
|
7411
|
-
if (fromFunctionDeclarations != null) {
|
|
7412
|
-
let transformedList = fromFunctionDeclarations;
|
|
7413
|
-
if (Array.isArray(transformedList)) {
|
|
7414
|
-
transformedList = transformedList.map((item) => {
|
|
7415
|
-
return functionDeclarationToVertex$1(item);
|
|
7416
|
-
});
|
|
7417
|
-
}
|
|
7418
|
-
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
7419
|
-
}
|
|
7420
|
-
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
7421
|
-
if (fromRetrieval != null) {
|
|
7422
|
-
setValueByPath(toObject, ['retrieval'], fromRetrieval);
|
|
7423
|
-
}
|
|
7424
|
-
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
7425
|
-
if (fromGoogleSearch != null) {
|
|
7426
|
-
setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
|
|
7427
|
-
}
|
|
7428
|
-
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
7429
|
-
'googleSearchRetrieval',
|
|
7430
|
-
]);
|
|
7431
|
-
if (fromGoogleSearchRetrieval != null) {
|
|
7432
|
-
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
|
|
7433
|
-
}
|
|
7434
|
-
const fromEnterpriseWebSearch = getValueByPath(fromObject, [
|
|
7435
|
-
'enterpriseWebSearch',
|
|
7436
|
-
]);
|
|
7437
|
-
if (fromEnterpriseWebSearch != null) {
|
|
7438
|
-
setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
|
|
7439
|
-
}
|
|
7440
|
-
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
7441
|
-
if (fromGoogleMaps != null) {
|
|
7442
|
-
setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
|
|
7443
|
-
}
|
|
7444
|
-
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
7445
|
-
if (fromUrlContext != null) {
|
|
7446
|
-
setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
|
|
7447
|
-
}
|
|
7448
|
-
const fromCodeExecution = getValueByPath(fromObject, [
|
|
7449
|
-
'codeExecution',
|
|
7450
|
-
]);
|
|
7451
|
-
if (fromCodeExecution != null) {
|
|
7452
|
-
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
7453
|
-
}
|
|
7454
|
-
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
7455
|
-
if (fromComputerUse != null) {
|
|
7456
|
-
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
7457
|
-
}
|
|
7458
|
-
return toObject;
|
|
7459
|
-
}
|
|
7460
7143
|
function sessionResumptionConfigToMldev$1(fromObject) {
|
|
7461
7144
|
const toObject = {};
|
|
7462
7145
|
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
@@ -7468,26 +7151,10 @@ function sessionResumptionConfigToMldev$1(fromObject) {
|
|
|
7468
7151
|
}
|
|
7469
7152
|
return toObject;
|
|
7470
7153
|
}
|
|
7471
|
-
function sessionResumptionConfigToVertex(fromObject) {
|
|
7472
|
-
const toObject = {};
|
|
7473
|
-
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
7474
|
-
if (fromHandle != null) {
|
|
7475
|
-
setValueByPath(toObject, ['handle'], fromHandle);
|
|
7476
|
-
}
|
|
7477
|
-
const fromTransparent = getValueByPath(fromObject, ['transparent']);
|
|
7478
|
-
if (fromTransparent != null) {
|
|
7479
|
-
setValueByPath(toObject, ['transparent'], fromTransparent);
|
|
7480
|
-
}
|
|
7481
|
-
return toObject;
|
|
7482
|
-
}
|
|
7483
7154
|
function audioTranscriptionConfigToMldev$1() {
|
|
7484
7155
|
const toObject = {};
|
|
7485
7156
|
return toObject;
|
|
7486
7157
|
}
|
|
7487
|
-
function audioTranscriptionConfigToVertex() {
|
|
7488
|
-
const toObject = {};
|
|
7489
|
-
return toObject;
|
|
7490
|
-
}
|
|
7491
7158
|
function automaticActivityDetectionToMldev$1(fromObject) {
|
|
7492
7159
|
const toObject = {};
|
|
7493
7160
|
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
@@ -7520,38 +7187,6 @@ function automaticActivityDetectionToMldev$1(fromObject) {
|
|
|
7520
7187
|
}
|
|
7521
7188
|
return toObject;
|
|
7522
7189
|
}
|
|
7523
|
-
function automaticActivityDetectionToVertex(fromObject) {
|
|
7524
|
-
const toObject = {};
|
|
7525
|
-
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
7526
|
-
if (fromDisabled != null) {
|
|
7527
|
-
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
7528
|
-
}
|
|
7529
|
-
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7530
|
-
'startOfSpeechSensitivity',
|
|
7531
|
-
]);
|
|
7532
|
-
if (fromStartOfSpeechSensitivity != null) {
|
|
7533
|
-
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
7534
|
-
}
|
|
7535
|
-
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7536
|
-
'endOfSpeechSensitivity',
|
|
7537
|
-
]);
|
|
7538
|
-
if (fromEndOfSpeechSensitivity != null) {
|
|
7539
|
-
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
7540
|
-
}
|
|
7541
|
-
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
7542
|
-
'prefixPaddingMs',
|
|
7543
|
-
]);
|
|
7544
|
-
if (fromPrefixPaddingMs != null) {
|
|
7545
|
-
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
7546
|
-
}
|
|
7547
|
-
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
7548
|
-
'silenceDurationMs',
|
|
7549
|
-
]);
|
|
7550
|
-
if (fromSilenceDurationMs != null) {
|
|
7551
|
-
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
7552
|
-
}
|
|
7553
|
-
return toObject;
|
|
7554
|
-
}
|
|
7555
7190
|
function realtimeInputConfigToMldev$1(fromObject) {
|
|
7556
7191
|
const toObject = {};
|
|
7557
7192
|
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
@@ -7572,26 +7207,6 @@ function realtimeInputConfigToMldev$1(fromObject) {
|
|
|
7572
7207
|
}
|
|
7573
7208
|
return toObject;
|
|
7574
7209
|
}
|
|
7575
|
-
function realtimeInputConfigToVertex(fromObject) {
|
|
7576
|
-
const toObject = {};
|
|
7577
|
-
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
7578
|
-
'automaticActivityDetection',
|
|
7579
|
-
]);
|
|
7580
|
-
if (fromAutomaticActivityDetection != null) {
|
|
7581
|
-
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
|
|
7582
|
-
}
|
|
7583
|
-
const fromActivityHandling = getValueByPath(fromObject, [
|
|
7584
|
-
'activityHandling',
|
|
7585
|
-
]);
|
|
7586
|
-
if (fromActivityHandling != null) {
|
|
7587
|
-
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
7588
|
-
}
|
|
7589
|
-
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
7590
|
-
if (fromTurnCoverage != null) {
|
|
7591
|
-
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
7592
|
-
}
|
|
7593
|
-
return toObject;
|
|
7594
|
-
}
|
|
7595
7210
|
function slidingWindowToMldev$1(fromObject) {
|
|
7596
7211
|
const toObject = {};
|
|
7597
7212
|
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
@@ -7600,14 +7215,6 @@ function slidingWindowToMldev$1(fromObject) {
|
|
|
7600
7215
|
}
|
|
7601
7216
|
return toObject;
|
|
7602
7217
|
}
|
|
7603
|
-
function slidingWindowToVertex(fromObject) {
|
|
7604
|
-
const toObject = {};
|
|
7605
|
-
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
7606
|
-
if (fromTargetTokens != null) {
|
|
7607
|
-
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
7608
|
-
}
|
|
7609
|
-
return toObject;
|
|
7610
|
-
}
|
|
7611
7218
|
function contextWindowCompressionConfigToMldev$1(fromObject) {
|
|
7612
7219
|
const toObject = {};
|
|
7613
7220
|
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
@@ -7624,22 +7231,6 @@ function contextWindowCompressionConfigToMldev$1(fromObject) {
|
|
|
7624
7231
|
}
|
|
7625
7232
|
return toObject;
|
|
7626
7233
|
}
|
|
7627
|
-
function contextWindowCompressionConfigToVertex(fromObject) {
|
|
7628
|
-
const toObject = {};
|
|
7629
|
-
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
7630
|
-
'triggerTokens',
|
|
7631
|
-
]);
|
|
7632
|
-
if (fromTriggerTokens != null) {
|
|
7633
|
-
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
7634
|
-
}
|
|
7635
|
-
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
7636
|
-
'slidingWindow',
|
|
7637
|
-
]);
|
|
7638
|
-
if (fromSlidingWindow != null) {
|
|
7639
|
-
setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
|
|
7640
|
-
}
|
|
7641
|
-
return toObject;
|
|
7642
|
-
}
|
|
7643
7234
|
function proactivityConfigToMldev$1(fromObject) {
|
|
7644
7235
|
const toObject = {};
|
|
7645
7236
|
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
@@ -7650,16 +7241,6 @@ function proactivityConfigToMldev$1(fromObject) {
|
|
|
7650
7241
|
}
|
|
7651
7242
|
return toObject;
|
|
7652
7243
|
}
|
|
7653
|
-
function proactivityConfigToVertex(fromObject) {
|
|
7654
|
-
const toObject = {};
|
|
7655
|
-
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
7656
|
-
'proactiveAudio',
|
|
7657
|
-
]);
|
|
7658
|
-
if (fromProactiveAudio != null) {
|
|
7659
|
-
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
7660
|
-
}
|
|
7661
|
-
return toObject;
|
|
7662
|
-
}
|
|
7663
7244
|
function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
7664
7245
|
const toObject = {};
|
|
7665
7246
|
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
@@ -7764,155 +7345,31 @@ function liveConnectConfigToMldev$1(fromObject, parentObject) {
|
|
|
7764
7345
|
}
|
|
7765
7346
|
return toObject;
|
|
7766
7347
|
}
|
|
7767
|
-
function
|
|
7348
|
+
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
7768
7349
|
const toObject = {};
|
|
7769
|
-
const
|
|
7770
|
-
|
|
7771
|
-
|
|
7772
|
-
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
7773
|
-
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
7350
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7351
|
+
if (fromModel != null) {
|
|
7352
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7774
7353
|
}
|
|
7775
|
-
const
|
|
7776
|
-
|
|
7777
|
-
|
|
7778
|
-
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
7779
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
7354
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7355
|
+
if (fromConfig != null) {
|
|
7356
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
|
|
7780
7357
|
}
|
|
7781
|
-
|
|
7782
|
-
|
|
7783
|
-
|
|
7784
|
-
}
|
|
7785
|
-
|
|
7786
|
-
|
|
7787
|
-
|
|
7788
|
-
}
|
|
7789
|
-
|
|
7790
|
-
|
|
7791
|
-
|
|
7792
|
-
}
|
|
7793
|
-
const
|
|
7794
|
-
|
|
7795
|
-
|
|
7796
|
-
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
7797
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
7798
|
-
}
|
|
7799
|
-
const fromMediaResolution = getValueByPath(fromObject, [
|
|
7800
|
-
'mediaResolution',
|
|
7801
|
-
]);
|
|
7802
|
-
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
7803
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
7804
|
-
}
|
|
7805
|
-
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
7806
|
-
if (parentObject !== undefined && fromSeed != null) {
|
|
7807
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
7808
|
-
}
|
|
7809
|
-
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
7810
|
-
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
7811
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
7812
|
-
}
|
|
7813
|
-
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
7814
|
-
'enableAffectiveDialog',
|
|
7815
|
-
]);
|
|
7816
|
-
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
7817
|
-
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
7818
|
-
}
|
|
7819
|
-
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
7820
|
-
'systemInstruction',
|
|
7821
|
-
]);
|
|
7822
|
-
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
7823
|
-
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
|
|
7824
|
-
}
|
|
7825
|
-
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
7826
|
-
if (parentObject !== undefined && fromTools != null) {
|
|
7827
|
-
let transformedList = tTools(fromTools);
|
|
7828
|
-
if (Array.isArray(transformedList)) {
|
|
7829
|
-
transformedList = transformedList.map((item) => {
|
|
7830
|
-
return toolToVertex$1(tTool(item));
|
|
7831
|
-
});
|
|
7832
|
-
}
|
|
7833
|
-
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
7834
|
-
}
|
|
7835
|
-
const fromSessionResumption = getValueByPath(fromObject, [
|
|
7836
|
-
'sessionResumption',
|
|
7837
|
-
]);
|
|
7838
|
-
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
7839
|
-
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
|
|
7840
|
-
}
|
|
7841
|
-
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
7842
|
-
'inputAudioTranscription',
|
|
7843
|
-
]);
|
|
7844
|
-
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
7845
|
-
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
7846
|
-
}
|
|
7847
|
-
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
7848
|
-
'outputAudioTranscription',
|
|
7849
|
-
]);
|
|
7850
|
-
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
7851
|
-
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
7852
|
-
}
|
|
7853
|
-
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
7854
|
-
'realtimeInputConfig',
|
|
7855
|
-
]);
|
|
7856
|
-
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
7857
|
-
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
|
|
7858
|
-
}
|
|
7859
|
-
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
7860
|
-
'contextWindowCompression',
|
|
7861
|
-
]);
|
|
7862
|
-
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
7863
|
-
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
|
|
7864
|
-
}
|
|
7865
|
-
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
7866
|
-
if (parentObject !== undefined && fromProactivity != null) {
|
|
7867
|
-
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
|
|
7868
|
-
}
|
|
7869
|
-
return toObject;
|
|
7870
|
-
}
|
|
7871
|
-
function liveConnectParametersToMldev(apiClient, fromObject) {
|
|
7872
|
-
const toObject = {};
|
|
7873
|
-
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7874
|
-
if (fromModel != null) {
|
|
7875
|
-
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7876
|
-
}
|
|
7877
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7878
|
-
if (fromConfig != null) {
|
|
7879
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToMldev$1(fromConfig, toObject));
|
|
7880
|
-
}
|
|
7881
|
-
return toObject;
|
|
7882
|
-
}
|
|
7883
|
-
function liveConnectParametersToVertex(apiClient, fromObject) {
|
|
7884
|
-
const toObject = {};
|
|
7885
|
-
const fromModel = getValueByPath(fromObject, ['model']);
|
|
7886
|
-
if (fromModel != null) {
|
|
7887
|
-
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
7888
|
-
}
|
|
7889
|
-
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
7890
|
-
if (fromConfig != null) {
|
|
7891
|
-
setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
|
|
7892
|
-
}
|
|
7893
|
-
return toObject;
|
|
7894
|
-
}
|
|
7895
|
-
function activityStartToMldev() {
|
|
7896
|
-
const toObject = {};
|
|
7897
|
-
return toObject;
|
|
7898
|
-
}
|
|
7899
|
-
function activityStartToVertex() {
|
|
7900
|
-
const toObject = {};
|
|
7901
|
-
return toObject;
|
|
7902
|
-
}
|
|
7903
|
-
function activityEndToMldev() {
|
|
7904
|
-
const toObject = {};
|
|
7905
|
-
return toObject;
|
|
7906
|
-
}
|
|
7907
|
-
function activityEndToVertex() {
|
|
7908
|
-
const toObject = {};
|
|
7909
|
-
return toObject;
|
|
7910
|
-
}
|
|
7911
|
-
function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
7912
|
-
const toObject = {};
|
|
7913
|
-
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7914
|
-
if (fromMedia != null) {
|
|
7915
|
-
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7358
|
+
return toObject;
|
|
7359
|
+
}
|
|
7360
|
+
function activityStartToMldev() {
|
|
7361
|
+
const toObject = {};
|
|
7362
|
+
return toObject;
|
|
7363
|
+
}
|
|
7364
|
+
function activityEndToMldev() {
|
|
7365
|
+
const toObject = {};
|
|
7366
|
+
return toObject;
|
|
7367
|
+
}
|
|
7368
|
+
function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
7369
|
+
const toObject = {};
|
|
7370
|
+
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7371
|
+
if (fromMedia != null) {
|
|
7372
|
+
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7916
7373
|
}
|
|
7917
7374
|
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
7918
7375
|
if (fromAudio != null) {
|
|
@@ -7944,42 +7401,6 @@ function liveSendRealtimeInputParametersToMldev(fromObject) {
|
|
|
7944
7401
|
}
|
|
7945
7402
|
return toObject;
|
|
7946
7403
|
}
|
|
7947
|
-
function liveSendRealtimeInputParametersToVertex(fromObject) {
|
|
7948
|
-
const toObject = {};
|
|
7949
|
-
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
7950
|
-
if (fromMedia != null) {
|
|
7951
|
-
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
7952
|
-
}
|
|
7953
|
-
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
7954
|
-
if (fromAudio != null) {
|
|
7955
|
-
setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
|
|
7956
|
-
}
|
|
7957
|
-
const fromAudioStreamEnd = getValueByPath(fromObject, [
|
|
7958
|
-
'audioStreamEnd',
|
|
7959
|
-
]);
|
|
7960
|
-
if (fromAudioStreamEnd != null) {
|
|
7961
|
-
setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
|
|
7962
|
-
}
|
|
7963
|
-
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
7964
|
-
if (fromVideo != null) {
|
|
7965
|
-
setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
|
|
7966
|
-
}
|
|
7967
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
7968
|
-
if (fromText != null) {
|
|
7969
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
7970
|
-
}
|
|
7971
|
-
const fromActivityStart = getValueByPath(fromObject, [
|
|
7972
|
-
'activityStart',
|
|
7973
|
-
]);
|
|
7974
|
-
if (fromActivityStart != null) {
|
|
7975
|
-
setValueByPath(toObject, ['activityStart'], activityStartToVertex());
|
|
7976
|
-
}
|
|
7977
|
-
const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
|
|
7978
|
-
if (fromActivityEnd != null) {
|
|
7979
|
-
setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
|
|
7980
|
-
}
|
|
7981
|
-
return toObject;
|
|
7982
|
-
}
|
|
7983
7404
|
function weightedPromptToMldev(fromObject) {
|
|
7984
7405
|
const toObject = {};
|
|
7985
7406
|
const fromText = getValueByPath(fromObject, ['text']);
|
|
@@ -8118,35 +7539,40 @@ function liveMusicClientMessageToMldev(fromObject) {
|
|
|
8118
7539
|
}
|
|
8119
7540
|
return toObject;
|
|
8120
7541
|
}
|
|
8121
|
-
function
|
|
7542
|
+
function prebuiltVoiceConfigToVertex$1(fromObject) {
|
|
8122
7543
|
const toObject = {};
|
|
7544
|
+
const fromVoiceName = getValueByPath(fromObject, ['voiceName']);
|
|
7545
|
+
if (fromVoiceName != null) {
|
|
7546
|
+
setValueByPath(toObject, ['voiceName'], fromVoiceName);
|
|
7547
|
+
}
|
|
8123
7548
|
return toObject;
|
|
8124
7549
|
}
|
|
8125
|
-
function
|
|
7550
|
+
function voiceConfigToVertex$1(fromObject) {
|
|
8126
7551
|
const toObject = {};
|
|
8127
|
-
const
|
|
8128
|
-
|
|
8129
|
-
|
|
7552
|
+
const fromPrebuiltVoiceConfig = getValueByPath(fromObject, [
|
|
7553
|
+
'prebuiltVoiceConfig',
|
|
7554
|
+
]);
|
|
7555
|
+
if (fromPrebuiltVoiceConfig != null) {
|
|
7556
|
+
setValueByPath(toObject, ['prebuiltVoiceConfig'], prebuiltVoiceConfigToVertex$1(fromPrebuiltVoiceConfig));
|
|
8130
7557
|
}
|
|
8131
7558
|
return toObject;
|
|
8132
7559
|
}
|
|
8133
|
-
function
|
|
7560
|
+
function speechConfigToVertex$1(fromObject) {
|
|
8134
7561
|
const toObject = {};
|
|
8135
|
-
const
|
|
8136
|
-
if (
|
|
8137
|
-
setValueByPath(toObject, ['
|
|
7562
|
+
const fromVoiceConfig = getValueByPath(fromObject, ['voiceConfig']);
|
|
7563
|
+
if (fromVoiceConfig != null) {
|
|
7564
|
+
setValueByPath(toObject, ['voiceConfig'], voiceConfigToVertex$1(fromVoiceConfig));
|
|
8138
7565
|
}
|
|
8139
|
-
|
|
8140
|
-
|
|
8141
|
-
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
7566
|
+
if (getValueByPath(fromObject, ['multiSpeakerVoiceConfig']) !== undefined) {
|
|
7567
|
+
throw new Error('multiSpeakerVoiceConfig parameter is not supported in Vertex AI.');
|
|
8142
7568
|
}
|
|
8143
|
-
const
|
|
8144
|
-
if (
|
|
8145
|
-
setValueByPath(toObject, ['
|
|
7569
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
7570
|
+
if (fromLanguageCode != null) {
|
|
7571
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8146
7572
|
}
|
|
8147
7573
|
return toObject;
|
|
8148
7574
|
}
|
|
8149
|
-
function
|
|
7575
|
+
function videoMetadataToVertex$1(fromObject) {
|
|
8150
7576
|
const toObject = {};
|
|
8151
7577
|
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8152
7578
|
if (fromFps != null) {
|
|
@@ -8162,19 +7588,7 @@ function videoMetadataFromVertex$1(fromObject) {
|
|
|
8162
7588
|
}
|
|
8163
7589
|
return toObject;
|
|
8164
7590
|
}
|
|
8165
|
-
function
|
|
8166
|
-
const toObject = {};
|
|
8167
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
8168
|
-
if (fromData != null) {
|
|
8169
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
8170
|
-
}
|
|
8171
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8172
|
-
if (fromMimeType != null) {
|
|
8173
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8174
|
-
}
|
|
8175
|
-
return toObject;
|
|
8176
|
-
}
|
|
8177
|
-
function blobFromVertex$1(fromObject) {
|
|
7591
|
+
function blobToVertex$1(fromObject) {
|
|
8178
7592
|
const toObject = {};
|
|
8179
7593
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8180
7594
|
if (fromDisplayName != null) {
|
|
@@ -8190,19 +7604,7 @@ function blobFromVertex$1(fromObject) {
|
|
|
8190
7604
|
}
|
|
8191
7605
|
return toObject;
|
|
8192
7606
|
}
|
|
8193
|
-
function
|
|
8194
|
-
const toObject = {};
|
|
8195
|
-
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8196
|
-
if (fromFileUri != null) {
|
|
8197
|
-
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8198
|
-
}
|
|
8199
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8200
|
-
if (fromMimeType != null) {
|
|
8201
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8202
|
-
}
|
|
8203
|
-
return toObject;
|
|
8204
|
-
}
|
|
8205
|
-
function fileDataFromVertex$1(fromObject) {
|
|
7607
|
+
function fileDataToVertex$1(fromObject) {
|
|
8206
7608
|
const toObject = {};
|
|
8207
7609
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8208
7610
|
if (fromDisplayName != null) {
|
|
@@ -8218,13 +7620,13 @@ function fileDataFromVertex$1(fromObject) {
|
|
|
8218
7620
|
}
|
|
8219
7621
|
return toObject;
|
|
8220
7622
|
}
|
|
8221
|
-
function
|
|
7623
|
+
function partToVertex$1(fromObject) {
|
|
8222
7624
|
const toObject = {};
|
|
8223
7625
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8224
7626
|
'videoMetadata',
|
|
8225
7627
|
]);
|
|
8226
7628
|
if (fromVideoMetadata != null) {
|
|
8227
|
-
setValueByPath(toObject, ['videoMetadata'],
|
|
7629
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataToVertex$1(fromVideoMetadata));
|
|
8228
7630
|
}
|
|
8229
7631
|
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8230
7632
|
if (fromThought != null) {
|
|
@@ -8232,11 +7634,11 @@ function partFromMldev$1(fromObject) {
|
|
|
8232
7634
|
}
|
|
8233
7635
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
8234
7636
|
if (fromInlineData != null) {
|
|
8235
|
-
setValueByPath(toObject, ['inlineData'],
|
|
7637
|
+
setValueByPath(toObject, ['inlineData'], blobToVertex$1(fromInlineData));
|
|
8236
7638
|
}
|
|
8237
7639
|
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8238
7640
|
if (fromFileData != null) {
|
|
8239
|
-
setValueByPath(toObject, ['fileData'],
|
|
7641
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(fromFileData));
|
|
8240
7642
|
}
|
|
8241
7643
|
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8242
7644
|
'thoughtSignature',
|
|
@@ -8272,16 +7674,1119 @@ function partFromMldev$1(fromObject) {
|
|
|
8272
7674
|
}
|
|
8273
7675
|
return toObject;
|
|
8274
7676
|
}
|
|
8275
|
-
function
|
|
7677
|
+
function contentToVertex$1(fromObject) {
|
|
8276
7678
|
const toObject = {};
|
|
8277
|
-
const
|
|
8278
|
-
|
|
8279
|
-
|
|
8280
|
-
|
|
8281
|
-
|
|
7679
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
7680
|
+
if (fromParts != null) {
|
|
7681
|
+
let transformedList = fromParts;
|
|
7682
|
+
if (Array.isArray(transformedList)) {
|
|
7683
|
+
transformedList = transformedList.map((item) => {
|
|
7684
|
+
return partToVertex$1(item);
|
|
7685
|
+
});
|
|
7686
|
+
}
|
|
7687
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
8282
7688
|
}
|
|
8283
|
-
const
|
|
8284
|
-
if (
|
|
7689
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
7690
|
+
if (fromRole != null) {
|
|
7691
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
7692
|
+
}
|
|
7693
|
+
return toObject;
|
|
7694
|
+
}
|
|
7695
|
+
function functionDeclarationToVertex$1(fromObject) {
|
|
7696
|
+
const toObject = {};
|
|
7697
|
+
if (getValueByPath(fromObject, ['behavior']) !== undefined) {
|
|
7698
|
+
throw new Error('behavior parameter is not supported in Vertex AI.');
|
|
7699
|
+
}
|
|
7700
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7701
|
+
if (fromDescription != null) {
|
|
7702
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
7703
|
+
}
|
|
7704
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
7705
|
+
if (fromName != null) {
|
|
7706
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
7707
|
+
}
|
|
7708
|
+
const fromParameters = getValueByPath(fromObject, ['parameters']);
|
|
7709
|
+
if (fromParameters != null) {
|
|
7710
|
+
setValueByPath(toObject, ['parameters'], fromParameters);
|
|
7711
|
+
}
|
|
7712
|
+
const fromParametersJsonSchema = getValueByPath(fromObject, [
|
|
7713
|
+
'parametersJsonSchema',
|
|
7714
|
+
]);
|
|
7715
|
+
if (fromParametersJsonSchema != null) {
|
|
7716
|
+
setValueByPath(toObject, ['parametersJsonSchema'], fromParametersJsonSchema);
|
|
7717
|
+
}
|
|
7718
|
+
const fromResponse = getValueByPath(fromObject, ['response']);
|
|
7719
|
+
if (fromResponse != null) {
|
|
7720
|
+
setValueByPath(toObject, ['response'], fromResponse);
|
|
7721
|
+
}
|
|
7722
|
+
const fromResponseJsonSchema = getValueByPath(fromObject, [
|
|
7723
|
+
'responseJsonSchema',
|
|
7724
|
+
]);
|
|
7725
|
+
if (fromResponseJsonSchema != null) {
|
|
7726
|
+
setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
|
|
7727
|
+
}
|
|
7728
|
+
return toObject;
|
|
7729
|
+
}
|
|
7730
|
+
function intervalToVertex$1(fromObject) {
|
|
7731
|
+
const toObject = {};
|
|
7732
|
+
const fromStartTime = getValueByPath(fromObject, ['startTime']);
|
|
7733
|
+
if (fromStartTime != null) {
|
|
7734
|
+
setValueByPath(toObject, ['startTime'], fromStartTime);
|
|
7735
|
+
}
|
|
7736
|
+
const fromEndTime = getValueByPath(fromObject, ['endTime']);
|
|
7737
|
+
if (fromEndTime != null) {
|
|
7738
|
+
setValueByPath(toObject, ['endTime'], fromEndTime);
|
|
7739
|
+
}
|
|
7740
|
+
return toObject;
|
|
7741
|
+
}
|
|
7742
|
+
function googleSearchToVertex$1(fromObject) {
|
|
7743
|
+
const toObject = {};
|
|
7744
|
+
const fromTimeRangeFilter = getValueByPath(fromObject, [
|
|
7745
|
+
'timeRangeFilter',
|
|
7746
|
+
]);
|
|
7747
|
+
if (fromTimeRangeFilter != null) {
|
|
7748
|
+
setValueByPath(toObject, ['timeRangeFilter'], intervalToVertex$1(fromTimeRangeFilter));
|
|
7749
|
+
}
|
|
7750
|
+
return toObject;
|
|
7751
|
+
}
|
|
7752
|
+
function dynamicRetrievalConfigToVertex$1(fromObject) {
|
|
7753
|
+
const toObject = {};
|
|
7754
|
+
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
7755
|
+
if (fromMode != null) {
|
|
7756
|
+
setValueByPath(toObject, ['mode'], fromMode);
|
|
7757
|
+
}
|
|
7758
|
+
const fromDynamicThreshold = getValueByPath(fromObject, [
|
|
7759
|
+
'dynamicThreshold',
|
|
7760
|
+
]);
|
|
7761
|
+
if (fromDynamicThreshold != null) {
|
|
7762
|
+
setValueByPath(toObject, ['dynamicThreshold'], fromDynamicThreshold);
|
|
7763
|
+
}
|
|
7764
|
+
return toObject;
|
|
7765
|
+
}
|
|
7766
|
+
function googleSearchRetrievalToVertex$1(fromObject) {
|
|
7767
|
+
const toObject = {};
|
|
7768
|
+
const fromDynamicRetrievalConfig = getValueByPath(fromObject, [
|
|
7769
|
+
'dynamicRetrievalConfig',
|
|
7770
|
+
]);
|
|
7771
|
+
if (fromDynamicRetrievalConfig != null) {
|
|
7772
|
+
setValueByPath(toObject, ['dynamicRetrievalConfig'], dynamicRetrievalConfigToVertex$1(fromDynamicRetrievalConfig));
|
|
7773
|
+
}
|
|
7774
|
+
return toObject;
|
|
7775
|
+
}
|
|
7776
|
+
function enterpriseWebSearchToVertex$1() {
|
|
7777
|
+
const toObject = {};
|
|
7778
|
+
return toObject;
|
|
7779
|
+
}
|
|
7780
|
+
function apiKeyConfigToVertex$1(fromObject) {
|
|
7781
|
+
const toObject = {};
|
|
7782
|
+
const fromApiKeyString = getValueByPath(fromObject, ['apiKeyString']);
|
|
7783
|
+
if (fromApiKeyString != null) {
|
|
7784
|
+
setValueByPath(toObject, ['apiKeyString'], fromApiKeyString);
|
|
7785
|
+
}
|
|
7786
|
+
return toObject;
|
|
7787
|
+
}
|
|
7788
|
+
function authConfigToVertex$1(fromObject) {
|
|
7789
|
+
const toObject = {};
|
|
7790
|
+
const fromApiKeyConfig = getValueByPath(fromObject, ['apiKeyConfig']);
|
|
7791
|
+
if (fromApiKeyConfig != null) {
|
|
7792
|
+
setValueByPath(toObject, ['apiKeyConfig'], apiKeyConfigToVertex$1(fromApiKeyConfig));
|
|
7793
|
+
}
|
|
7794
|
+
const fromAuthType = getValueByPath(fromObject, ['authType']);
|
|
7795
|
+
if (fromAuthType != null) {
|
|
7796
|
+
setValueByPath(toObject, ['authType'], fromAuthType);
|
|
7797
|
+
}
|
|
7798
|
+
const fromGoogleServiceAccountConfig = getValueByPath(fromObject, [
|
|
7799
|
+
'googleServiceAccountConfig',
|
|
7800
|
+
]);
|
|
7801
|
+
if (fromGoogleServiceAccountConfig != null) {
|
|
7802
|
+
setValueByPath(toObject, ['googleServiceAccountConfig'], fromGoogleServiceAccountConfig);
|
|
7803
|
+
}
|
|
7804
|
+
const fromHttpBasicAuthConfig = getValueByPath(fromObject, [
|
|
7805
|
+
'httpBasicAuthConfig',
|
|
7806
|
+
]);
|
|
7807
|
+
if (fromHttpBasicAuthConfig != null) {
|
|
7808
|
+
setValueByPath(toObject, ['httpBasicAuthConfig'], fromHttpBasicAuthConfig);
|
|
7809
|
+
}
|
|
7810
|
+
const fromOauthConfig = getValueByPath(fromObject, ['oauthConfig']);
|
|
7811
|
+
if (fromOauthConfig != null) {
|
|
7812
|
+
setValueByPath(toObject, ['oauthConfig'], fromOauthConfig);
|
|
7813
|
+
}
|
|
7814
|
+
const fromOidcConfig = getValueByPath(fromObject, ['oidcConfig']);
|
|
7815
|
+
if (fromOidcConfig != null) {
|
|
7816
|
+
setValueByPath(toObject, ['oidcConfig'], fromOidcConfig);
|
|
7817
|
+
}
|
|
7818
|
+
return toObject;
|
|
7819
|
+
}
|
|
7820
|
+
function googleMapsToVertex$1(fromObject) {
|
|
7821
|
+
const toObject = {};
|
|
7822
|
+
const fromAuthConfig = getValueByPath(fromObject, ['authConfig']);
|
|
7823
|
+
if (fromAuthConfig != null) {
|
|
7824
|
+
setValueByPath(toObject, ['authConfig'], authConfigToVertex$1(fromAuthConfig));
|
|
7825
|
+
}
|
|
7826
|
+
return toObject;
|
|
7827
|
+
}
|
|
7828
|
+
function urlContextToVertex$1() {
|
|
7829
|
+
const toObject = {};
|
|
7830
|
+
return toObject;
|
|
7831
|
+
}
|
|
7832
|
+
function toolToVertex$1(fromObject) {
|
|
7833
|
+
const toObject = {};
|
|
7834
|
+
const fromFunctionDeclarations = getValueByPath(fromObject, [
|
|
7835
|
+
'functionDeclarations',
|
|
7836
|
+
]);
|
|
7837
|
+
if (fromFunctionDeclarations != null) {
|
|
7838
|
+
let transformedList = fromFunctionDeclarations;
|
|
7839
|
+
if (Array.isArray(transformedList)) {
|
|
7840
|
+
transformedList = transformedList.map((item) => {
|
|
7841
|
+
return functionDeclarationToVertex$1(item);
|
|
7842
|
+
});
|
|
7843
|
+
}
|
|
7844
|
+
setValueByPath(toObject, ['functionDeclarations'], transformedList);
|
|
7845
|
+
}
|
|
7846
|
+
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
7847
|
+
if (fromRetrieval != null) {
|
|
7848
|
+
setValueByPath(toObject, ['retrieval'], fromRetrieval);
|
|
7849
|
+
}
|
|
7850
|
+
const fromGoogleSearch = getValueByPath(fromObject, ['googleSearch']);
|
|
7851
|
+
if (fromGoogleSearch != null) {
|
|
7852
|
+
setValueByPath(toObject, ['googleSearch'], googleSearchToVertex$1(fromGoogleSearch));
|
|
7853
|
+
}
|
|
7854
|
+
const fromGoogleSearchRetrieval = getValueByPath(fromObject, [
|
|
7855
|
+
'googleSearchRetrieval',
|
|
7856
|
+
]);
|
|
7857
|
+
if (fromGoogleSearchRetrieval != null) {
|
|
7858
|
+
setValueByPath(toObject, ['googleSearchRetrieval'], googleSearchRetrievalToVertex$1(fromGoogleSearchRetrieval));
|
|
7859
|
+
}
|
|
7860
|
+
const fromEnterpriseWebSearch = getValueByPath(fromObject, [
|
|
7861
|
+
'enterpriseWebSearch',
|
|
7862
|
+
]);
|
|
7863
|
+
if (fromEnterpriseWebSearch != null) {
|
|
7864
|
+
setValueByPath(toObject, ['enterpriseWebSearch'], enterpriseWebSearchToVertex$1());
|
|
7865
|
+
}
|
|
7866
|
+
const fromGoogleMaps = getValueByPath(fromObject, ['googleMaps']);
|
|
7867
|
+
if (fromGoogleMaps != null) {
|
|
7868
|
+
setValueByPath(toObject, ['googleMaps'], googleMapsToVertex$1(fromGoogleMaps));
|
|
7869
|
+
}
|
|
7870
|
+
const fromUrlContext = getValueByPath(fromObject, ['urlContext']);
|
|
7871
|
+
if (fromUrlContext != null) {
|
|
7872
|
+
setValueByPath(toObject, ['urlContext'], urlContextToVertex$1());
|
|
7873
|
+
}
|
|
7874
|
+
const fromCodeExecution = getValueByPath(fromObject, [
|
|
7875
|
+
'codeExecution',
|
|
7876
|
+
]);
|
|
7877
|
+
if (fromCodeExecution != null) {
|
|
7878
|
+
setValueByPath(toObject, ['codeExecution'], fromCodeExecution);
|
|
7879
|
+
}
|
|
7880
|
+
const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
|
|
7881
|
+
if (fromComputerUse != null) {
|
|
7882
|
+
setValueByPath(toObject, ['computerUse'], fromComputerUse);
|
|
7883
|
+
}
|
|
7884
|
+
return toObject;
|
|
7885
|
+
}
|
|
7886
|
+
function sessionResumptionConfigToVertex(fromObject) {
|
|
7887
|
+
const toObject = {};
|
|
7888
|
+
const fromHandle = getValueByPath(fromObject, ['handle']);
|
|
7889
|
+
if (fromHandle != null) {
|
|
7890
|
+
setValueByPath(toObject, ['handle'], fromHandle);
|
|
7891
|
+
}
|
|
7892
|
+
const fromTransparent = getValueByPath(fromObject, ['transparent']);
|
|
7893
|
+
if (fromTransparent != null) {
|
|
7894
|
+
setValueByPath(toObject, ['transparent'], fromTransparent);
|
|
7895
|
+
}
|
|
7896
|
+
return toObject;
|
|
7897
|
+
}
|
|
7898
|
+
function audioTranscriptionConfigToVertex() {
|
|
7899
|
+
const toObject = {};
|
|
7900
|
+
return toObject;
|
|
7901
|
+
}
|
|
7902
|
+
function automaticActivityDetectionToVertex(fromObject) {
|
|
7903
|
+
const toObject = {};
|
|
7904
|
+
const fromDisabled = getValueByPath(fromObject, ['disabled']);
|
|
7905
|
+
if (fromDisabled != null) {
|
|
7906
|
+
setValueByPath(toObject, ['disabled'], fromDisabled);
|
|
7907
|
+
}
|
|
7908
|
+
const fromStartOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7909
|
+
'startOfSpeechSensitivity',
|
|
7910
|
+
]);
|
|
7911
|
+
if (fromStartOfSpeechSensitivity != null) {
|
|
7912
|
+
setValueByPath(toObject, ['startOfSpeechSensitivity'], fromStartOfSpeechSensitivity);
|
|
7913
|
+
}
|
|
7914
|
+
const fromEndOfSpeechSensitivity = getValueByPath(fromObject, [
|
|
7915
|
+
'endOfSpeechSensitivity',
|
|
7916
|
+
]);
|
|
7917
|
+
if (fromEndOfSpeechSensitivity != null) {
|
|
7918
|
+
setValueByPath(toObject, ['endOfSpeechSensitivity'], fromEndOfSpeechSensitivity);
|
|
7919
|
+
}
|
|
7920
|
+
const fromPrefixPaddingMs = getValueByPath(fromObject, [
|
|
7921
|
+
'prefixPaddingMs',
|
|
7922
|
+
]);
|
|
7923
|
+
if (fromPrefixPaddingMs != null) {
|
|
7924
|
+
setValueByPath(toObject, ['prefixPaddingMs'], fromPrefixPaddingMs);
|
|
7925
|
+
}
|
|
7926
|
+
const fromSilenceDurationMs = getValueByPath(fromObject, [
|
|
7927
|
+
'silenceDurationMs',
|
|
7928
|
+
]);
|
|
7929
|
+
if (fromSilenceDurationMs != null) {
|
|
7930
|
+
setValueByPath(toObject, ['silenceDurationMs'], fromSilenceDurationMs);
|
|
7931
|
+
}
|
|
7932
|
+
return toObject;
|
|
7933
|
+
}
|
|
7934
|
+
function realtimeInputConfigToVertex(fromObject) {
|
|
7935
|
+
const toObject = {};
|
|
7936
|
+
const fromAutomaticActivityDetection = getValueByPath(fromObject, [
|
|
7937
|
+
'automaticActivityDetection',
|
|
7938
|
+
]);
|
|
7939
|
+
if (fromAutomaticActivityDetection != null) {
|
|
7940
|
+
setValueByPath(toObject, ['automaticActivityDetection'], automaticActivityDetectionToVertex(fromAutomaticActivityDetection));
|
|
7941
|
+
}
|
|
7942
|
+
const fromActivityHandling = getValueByPath(fromObject, [
|
|
7943
|
+
'activityHandling',
|
|
7944
|
+
]);
|
|
7945
|
+
if (fromActivityHandling != null) {
|
|
7946
|
+
setValueByPath(toObject, ['activityHandling'], fromActivityHandling);
|
|
7947
|
+
}
|
|
7948
|
+
const fromTurnCoverage = getValueByPath(fromObject, ['turnCoverage']);
|
|
7949
|
+
if (fromTurnCoverage != null) {
|
|
7950
|
+
setValueByPath(toObject, ['turnCoverage'], fromTurnCoverage);
|
|
7951
|
+
}
|
|
7952
|
+
return toObject;
|
|
7953
|
+
}
|
|
7954
|
+
function slidingWindowToVertex(fromObject) {
|
|
7955
|
+
const toObject = {};
|
|
7956
|
+
const fromTargetTokens = getValueByPath(fromObject, ['targetTokens']);
|
|
7957
|
+
if (fromTargetTokens != null) {
|
|
7958
|
+
setValueByPath(toObject, ['targetTokens'], fromTargetTokens);
|
|
7959
|
+
}
|
|
7960
|
+
return toObject;
|
|
7961
|
+
}
|
|
7962
|
+
function contextWindowCompressionConfigToVertex(fromObject) {
|
|
7963
|
+
const toObject = {};
|
|
7964
|
+
const fromTriggerTokens = getValueByPath(fromObject, [
|
|
7965
|
+
'triggerTokens',
|
|
7966
|
+
]);
|
|
7967
|
+
if (fromTriggerTokens != null) {
|
|
7968
|
+
setValueByPath(toObject, ['triggerTokens'], fromTriggerTokens);
|
|
7969
|
+
}
|
|
7970
|
+
const fromSlidingWindow = getValueByPath(fromObject, [
|
|
7971
|
+
'slidingWindow',
|
|
7972
|
+
]);
|
|
7973
|
+
if (fromSlidingWindow != null) {
|
|
7974
|
+
setValueByPath(toObject, ['slidingWindow'], slidingWindowToVertex(fromSlidingWindow));
|
|
7975
|
+
}
|
|
7976
|
+
return toObject;
|
|
7977
|
+
}
|
|
7978
|
+
function proactivityConfigToVertex(fromObject) {
|
|
7979
|
+
const toObject = {};
|
|
7980
|
+
const fromProactiveAudio = getValueByPath(fromObject, [
|
|
7981
|
+
'proactiveAudio',
|
|
7982
|
+
]);
|
|
7983
|
+
if (fromProactiveAudio != null) {
|
|
7984
|
+
setValueByPath(toObject, ['proactiveAudio'], fromProactiveAudio);
|
|
7985
|
+
}
|
|
7986
|
+
return toObject;
|
|
7987
|
+
}
|
|
7988
|
+
function liveConnectConfigToVertex(fromObject, parentObject) {
|
|
7989
|
+
const toObject = {};
|
|
7990
|
+
const fromGenerationConfig = getValueByPath(fromObject, [
|
|
7991
|
+
'generationConfig',
|
|
7992
|
+
]);
|
|
7993
|
+
if (parentObject !== undefined && fromGenerationConfig != null) {
|
|
7994
|
+
setValueByPath(parentObject, ['setup', 'generationConfig'], fromGenerationConfig);
|
|
7995
|
+
}
|
|
7996
|
+
const fromResponseModalities = getValueByPath(fromObject, [
|
|
7997
|
+
'responseModalities',
|
|
7998
|
+
]);
|
|
7999
|
+
if (parentObject !== undefined && fromResponseModalities != null) {
|
|
8000
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'responseModalities'], fromResponseModalities);
|
|
8001
|
+
}
|
|
8002
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8003
|
+
if (parentObject !== undefined && fromTemperature != null) {
|
|
8004
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'temperature'], fromTemperature);
|
|
8005
|
+
}
|
|
8006
|
+
const fromTopP = getValueByPath(fromObject, ['topP']);
|
|
8007
|
+
if (parentObject !== undefined && fromTopP != null) {
|
|
8008
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topP'], fromTopP);
|
|
8009
|
+
}
|
|
8010
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8011
|
+
if (parentObject !== undefined && fromTopK != null) {
|
|
8012
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'topK'], fromTopK);
|
|
8013
|
+
}
|
|
8014
|
+
const fromMaxOutputTokens = getValueByPath(fromObject, [
|
|
8015
|
+
'maxOutputTokens',
|
|
8016
|
+
]);
|
|
8017
|
+
if (parentObject !== undefined && fromMaxOutputTokens != null) {
|
|
8018
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'maxOutputTokens'], fromMaxOutputTokens);
|
|
8019
|
+
}
|
|
8020
|
+
const fromMediaResolution = getValueByPath(fromObject, [
|
|
8021
|
+
'mediaResolution',
|
|
8022
|
+
]);
|
|
8023
|
+
if (parentObject !== undefined && fromMediaResolution != null) {
|
|
8024
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'mediaResolution'], fromMediaResolution);
|
|
8025
|
+
}
|
|
8026
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8027
|
+
if (parentObject !== undefined && fromSeed != null) {
|
|
8028
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'seed'], fromSeed);
|
|
8029
|
+
}
|
|
8030
|
+
const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
|
|
8031
|
+
if (parentObject !== undefined && fromSpeechConfig != null) {
|
|
8032
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'speechConfig'], speechConfigToVertex$1(tLiveSpeechConfig(fromSpeechConfig)));
|
|
8033
|
+
}
|
|
8034
|
+
const fromEnableAffectiveDialog = getValueByPath(fromObject, [
|
|
8035
|
+
'enableAffectiveDialog',
|
|
8036
|
+
]);
|
|
8037
|
+
if (parentObject !== undefined && fromEnableAffectiveDialog != null) {
|
|
8038
|
+
setValueByPath(parentObject, ['setup', 'generationConfig', 'enableAffectiveDialog'], fromEnableAffectiveDialog);
|
|
8039
|
+
}
|
|
8040
|
+
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
8041
|
+
'systemInstruction',
|
|
8042
|
+
]);
|
|
8043
|
+
if (parentObject !== undefined && fromSystemInstruction != null) {
|
|
8044
|
+
setValueByPath(parentObject, ['setup', 'systemInstruction'], contentToVertex$1(tContent(fromSystemInstruction)));
|
|
8045
|
+
}
|
|
8046
|
+
const fromTools = getValueByPath(fromObject, ['tools']);
|
|
8047
|
+
if (parentObject !== undefined && fromTools != null) {
|
|
8048
|
+
let transformedList = tTools(fromTools);
|
|
8049
|
+
if (Array.isArray(transformedList)) {
|
|
8050
|
+
transformedList = transformedList.map((item) => {
|
|
8051
|
+
return toolToVertex$1(tTool(item));
|
|
8052
|
+
});
|
|
8053
|
+
}
|
|
8054
|
+
setValueByPath(parentObject, ['setup', 'tools'], transformedList);
|
|
8055
|
+
}
|
|
8056
|
+
const fromSessionResumption = getValueByPath(fromObject, [
|
|
8057
|
+
'sessionResumption',
|
|
8058
|
+
]);
|
|
8059
|
+
if (parentObject !== undefined && fromSessionResumption != null) {
|
|
8060
|
+
setValueByPath(parentObject, ['setup', 'sessionResumption'], sessionResumptionConfigToVertex(fromSessionResumption));
|
|
8061
|
+
}
|
|
8062
|
+
const fromInputAudioTranscription = getValueByPath(fromObject, [
|
|
8063
|
+
'inputAudioTranscription',
|
|
8064
|
+
]);
|
|
8065
|
+
if (parentObject !== undefined && fromInputAudioTranscription != null) {
|
|
8066
|
+
setValueByPath(parentObject, ['setup', 'inputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8067
|
+
}
|
|
8068
|
+
const fromOutputAudioTranscription = getValueByPath(fromObject, [
|
|
8069
|
+
'outputAudioTranscription',
|
|
8070
|
+
]);
|
|
8071
|
+
if (parentObject !== undefined && fromOutputAudioTranscription != null) {
|
|
8072
|
+
setValueByPath(parentObject, ['setup', 'outputAudioTranscription'], audioTranscriptionConfigToVertex());
|
|
8073
|
+
}
|
|
8074
|
+
const fromRealtimeInputConfig = getValueByPath(fromObject, [
|
|
8075
|
+
'realtimeInputConfig',
|
|
8076
|
+
]);
|
|
8077
|
+
if (parentObject !== undefined && fromRealtimeInputConfig != null) {
|
|
8078
|
+
setValueByPath(parentObject, ['setup', 'realtimeInputConfig'], realtimeInputConfigToVertex(fromRealtimeInputConfig));
|
|
8079
|
+
}
|
|
8080
|
+
const fromContextWindowCompression = getValueByPath(fromObject, [
|
|
8081
|
+
'contextWindowCompression',
|
|
8082
|
+
]);
|
|
8083
|
+
if (parentObject !== undefined && fromContextWindowCompression != null) {
|
|
8084
|
+
setValueByPath(parentObject, ['setup', 'contextWindowCompression'], contextWindowCompressionConfigToVertex(fromContextWindowCompression));
|
|
8085
|
+
}
|
|
8086
|
+
const fromProactivity = getValueByPath(fromObject, ['proactivity']);
|
|
8087
|
+
if (parentObject !== undefined && fromProactivity != null) {
|
|
8088
|
+
setValueByPath(parentObject, ['setup', 'proactivity'], proactivityConfigToVertex(fromProactivity));
|
|
8089
|
+
}
|
|
8090
|
+
return toObject;
|
|
8091
|
+
}
|
|
8092
|
+
function liveConnectParametersToVertex(apiClient, fromObject) {
|
|
8093
|
+
const toObject = {};
|
|
8094
|
+
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8095
|
+
if (fromModel != null) {
|
|
8096
|
+
setValueByPath(toObject, ['setup', 'model'], tModel(apiClient, fromModel));
|
|
8097
|
+
}
|
|
8098
|
+
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
8099
|
+
if (fromConfig != null) {
|
|
8100
|
+
setValueByPath(toObject, ['config'], liveConnectConfigToVertex(fromConfig, toObject));
|
|
8101
|
+
}
|
|
8102
|
+
return toObject;
|
|
8103
|
+
}
|
|
8104
|
+
function activityStartToVertex() {
|
|
8105
|
+
const toObject = {};
|
|
8106
|
+
return toObject;
|
|
8107
|
+
}
|
|
8108
|
+
function activityEndToVertex() {
|
|
8109
|
+
const toObject = {};
|
|
8110
|
+
return toObject;
|
|
8111
|
+
}
|
|
8112
|
+
function liveSendRealtimeInputParametersToVertex(fromObject) {
|
|
8113
|
+
const toObject = {};
|
|
8114
|
+
const fromMedia = getValueByPath(fromObject, ['media']);
|
|
8115
|
+
if (fromMedia != null) {
|
|
8116
|
+
setValueByPath(toObject, ['mediaChunks'], tBlobs(fromMedia));
|
|
8117
|
+
}
|
|
8118
|
+
const fromAudio = getValueByPath(fromObject, ['audio']);
|
|
8119
|
+
if (fromAudio != null) {
|
|
8120
|
+
setValueByPath(toObject, ['audio'], tAudioBlob(fromAudio));
|
|
8121
|
+
}
|
|
8122
|
+
const fromAudioStreamEnd = getValueByPath(fromObject, [
|
|
8123
|
+
'audioStreamEnd',
|
|
8124
|
+
]);
|
|
8125
|
+
if (fromAudioStreamEnd != null) {
|
|
8126
|
+
setValueByPath(toObject, ['audioStreamEnd'], fromAudioStreamEnd);
|
|
8127
|
+
}
|
|
8128
|
+
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
8129
|
+
if (fromVideo != null) {
|
|
8130
|
+
setValueByPath(toObject, ['video'], tImageBlob(fromVideo));
|
|
8131
|
+
}
|
|
8132
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8133
|
+
if (fromText != null) {
|
|
8134
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8135
|
+
}
|
|
8136
|
+
const fromActivityStart = getValueByPath(fromObject, [
|
|
8137
|
+
'activityStart',
|
|
8138
|
+
]);
|
|
8139
|
+
if (fromActivityStart != null) {
|
|
8140
|
+
setValueByPath(toObject, ['activityStart'], activityStartToVertex());
|
|
8141
|
+
}
|
|
8142
|
+
const fromActivityEnd = getValueByPath(fromObject, ['activityEnd']);
|
|
8143
|
+
if (fromActivityEnd != null) {
|
|
8144
|
+
setValueByPath(toObject, ['activityEnd'], activityEndToVertex());
|
|
8145
|
+
}
|
|
8146
|
+
return toObject;
|
|
8147
|
+
}
|
|
8148
|
+
function liveServerSetupCompleteFromMldev() {
|
|
8149
|
+
const toObject = {};
|
|
8150
|
+
return toObject;
|
|
8151
|
+
}
|
|
8152
|
+
function videoMetadataFromMldev$1(fromObject) {
|
|
8153
|
+
const toObject = {};
|
|
8154
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8155
|
+
if (fromFps != null) {
|
|
8156
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
8157
|
+
}
|
|
8158
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
8159
|
+
if (fromEndOffset != null) {
|
|
8160
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
8161
|
+
}
|
|
8162
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
8163
|
+
if (fromStartOffset != null) {
|
|
8164
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
8165
|
+
}
|
|
8166
|
+
return toObject;
|
|
8167
|
+
}
|
|
8168
|
+
function blobFromMldev$1(fromObject) {
|
|
8169
|
+
const toObject = {};
|
|
8170
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8171
|
+
if (fromData != null) {
|
|
8172
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8173
|
+
}
|
|
8174
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8175
|
+
if (fromMimeType != null) {
|
|
8176
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8177
|
+
}
|
|
8178
|
+
return toObject;
|
|
8179
|
+
}
|
|
8180
|
+
function fileDataFromMldev$1(fromObject) {
|
|
8181
|
+
const toObject = {};
|
|
8182
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8183
|
+
if (fromFileUri != null) {
|
|
8184
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8185
|
+
}
|
|
8186
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8187
|
+
if (fromMimeType != null) {
|
|
8188
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8189
|
+
}
|
|
8190
|
+
return toObject;
|
|
8191
|
+
}
|
|
8192
|
+
function partFromMldev$1(fromObject) {
|
|
8193
|
+
const toObject = {};
|
|
8194
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8195
|
+
'videoMetadata',
|
|
8196
|
+
]);
|
|
8197
|
+
if (fromVideoMetadata != null) {
|
|
8198
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataFromMldev$1(fromVideoMetadata));
|
|
8199
|
+
}
|
|
8200
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8201
|
+
if (fromThought != null) {
|
|
8202
|
+
setValueByPath(toObject, ['thought'], fromThought);
|
|
8203
|
+
}
|
|
8204
|
+
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
8205
|
+
if (fromInlineData != null) {
|
|
8206
|
+
setValueByPath(toObject, ['inlineData'], blobFromMldev$1(fromInlineData));
|
|
8207
|
+
}
|
|
8208
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8209
|
+
if (fromFileData != null) {
|
|
8210
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(fromFileData));
|
|
8211
|
+
}
|
|
8212
|
+
const fromThoughtSignature = getValueByPath(fromObject, [
|
|
8213
|
+
'thoughtSignature',
|
|
8214
|
+
]);
|
|
8215
|
+
if (fromThoughtSignature != null) {
|
|
8216
|
+
setValueByPath(toObject, ['thoughtSignature'], fromThoughtSignature);
|
|
8217
|
+
}
|
|
8218
|
+
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
8219
|
+
'codeExecutionResult',
|
|
8220
|
+
]);
|
|
8221
|
+
if (fromCodeExecutionResult != null) {
|
|
8222
|
+
setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
|
|
8223
|
+
}
|
|
8224
|
+
const fromExecutableCode = getValueByPath(fromObject, [
|
|
8225
|
+
'executableCode',
|
|
8226
|
+
]);
|
|
8227
|
+
if (fromExecutableCode != null) {
|
|
8228
|
+
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
8229
|
+
}
|
|
8230
|
+
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
8231
|
+
if (fromFunctionCall != null) {
|
|
8232
|
+
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
8233
|
+
}
|
|
8234
|
+
const fromFunctionResponse = getValueByPath(fromObject, [
|
|
8235
|
+
'functionResponse',
|
|
8236
|
+
]);
|
|
8237
|
+
if (fromFunctionResponse != null) {
|
|
8238
|
+
setValueByPath(toObject, ['functionResponse'], fromFunctionResponse);
|
|
8239
|
+
}
|
|
8240
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8241
|
+
if (fromText != null) {
|
|
8242
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8243
|
+
}
|
|
8244
|
+
return toObject;
|
|
8245
|
+
}
|
|
8246
|
+
function contentFromMldev$1(fromObject) {
|
|
8247
|
+
const toObject = {};
|
|
8248
|
+
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8249
|
+
if (fromParts != null) {
|
|
8250
|
+
let transformedList = fromParts;
|
|
8251
|
+
if (Array.isArray(transformedList)) {
|
|
8252
|
+
transformedList = transformedList.map((item) => {
|
|
8253
|
+
return partFromMldev$1(item);
|
|
8254
|
+
});
|
|
8255
|
+
}
|
|
8256
|
+
setValueByPath(toObject, ['parts'], transformedList);
|
|
8257
|
+
}
|
|
8258
|
+
const fromRole = getValueByPath(fromObject, ['role']);
|
|
8259
|
+
if (fromRole != null) {
|
|
8260
|
+
setValueByPath(toObject, ['role'], fromRole);
|
|
8261
|
+
}
|
|
8262
|
+
return toObject;
|
|
8263
|
+
}
|
|
8264
|
+
function transcriptionFromMldev(fromObject) {
|
|
8265
|
+
const toObject = {};
|
|
8266
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8267
|
+
if (fromText != null) {
|
|
8268
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8269
|
+
}
|
|
8270
|
+
const fromFinished = getValueByPath(fromObject, ['finished']);
|
|
8271
|
+
if (fromFinished != null) {
|
|
8272
|
+
setValueByPath(toObject, ['finished'], fromFinished);
|
|
8273
|
+
}
|
|
8274
|
+
return toObject;
|
|
8275
|
+
}
|
|
8276
|
+
function urlMetadataFromMldev$1(fromObject) {
|
|
8277
|
+
const toObject = {};
|
|
8278
|
+
const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
|
|
8279
|
+
if (fromRetrievedUrl != null) {
|
|
8280
|
+
setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
|
|
8281
|
+
}
|
|
8282
|
+
const fromUrlRetrievalStatus = getValueByPath(fromObject, [
|
|
8283
|
+
'urlRetrievalStatus',
|
|
8284
|
+
]);
|
|
8285
|
+
if (fromUrlRetrievalStatus != null) {
|
|
8286
|
+
setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
|
|
8287
|
+
}
|
|
8288
|
+
return toObject;
|
|
8289
|
+
}
|
|
8290
|
+
function urlContextMetadataFromMldev$1(fromObject) {
|
|
8291
|
+
const toObject = {};
|
|
8292
|
+
const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
|
|
8293
|
+
if (fromUrlMetadata != null) {
|
|
8294
|
+
let transformedList = fromUrlMetadata;
|
|
8295
|
+
if (Array.isArray(transformedList)) {
|
|
8296
|
+
transformedList = transformedList.map((item) => {
|
|
8297
|
+
return urlMetadataFromMldev$1(item);
|
|
8298
|
+
});
|
|
8299
|
+
}
|
|
8300
|
+
setValueByPath(toObject, ['urlMetadata'], transformedList);
|
|
8301
|
+
}
|
|
8302
|
+
return toObject;
|
|
8303
|
+
}
|
|
8304
|
+
function liveServerContentFromMldev(fromObject) {
|
|
8305
|
+
const toObject = {};
|
|
8306
|
+
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
8307
|
+
if (fromModelTurn != null) {
|
|
8308
|
+
setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
|
|
8309
|
+
}
|
|
8310
|
+
const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
|
|
8311
|
+
if (fromTurnComplete != null) {
|
|
8312
|
+
setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
|
|
8313
|
+
}
|
|
8314
|
+
const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
|
|
8315
|
+
if (fromInterrupted != null) {
|
|
8316
|
+
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
8317
|
+
}
|
|
8318
|
+
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
8319
|
+
'groundingMetadata',
|
|
8320
|
+
]);
|
|
8321
|
+
if (fromGroundingMetadata != null) {
|
|
8322
|
+
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
8323
|
+
}
|
|
8324
|
+
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
8325
|
+
'generationComplete',
|
|
8326
|
+
]);
|
|
8327
|
+
if (fromGenerationComplete != null) {
|
|
8328
|
+
setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
|
|
8329
|
+
}
|
|
8330
|
+
const fromInputTranscription = getValueByPath(fromObject, [
|
|
8331
|
+
'inputTranscription',
|
|
8332
|
+
]);
|
|
8333
|
+
if (fromInputTranscription != null) {
|
|
8334
|
+
setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
|
|
8335
|
+
}
|
|
8336
|
+
const fromOutputTranscription = getValueByPath(fromObject, [
|
|
8337
|
+
'outputTranscription',
|
|
8338
|
+
]);
|
|
8339
|
+
if (fromOutputTranscription != null) {
|
|
8340
|
+
setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
|
|
8341
|
+
}
|
|
8342
|
+
const fromUrlContextMetadata = getValueByPath(fromObject, [
|
|
8343
|
+
'urlContextMetadata',
|
|
8344
|
+
]);
|
|
8345
|
+
if (fromUrlContextMetadata != null) {
|
|
8346
|
+
setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
|
|
8347
|
+
}
|
|
8348
|
+
return toObject;
|
|
8349
|
+
}
|
|
8350
|
+
function functionCallFromMldev(fromObject) {
|
|
8351
|
+
const toObject = {};
|
|
8352
|
+
const fromId = getValueByPath(fromObject, ['id']);
|
|
8353
|
+
if (fromId != null) {
|
|
8354
|
+
setValueByPath(toObject, ['id'], fromId);
|
|
8355
|
+
}
|
|
8356
|
+
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
8357
|
+
if (fromArgs != null) {
|
|
8358
|
+
setValueByPath(toObject, ['args'], fromArgs);
|
|
8359
|
+
}
|
|
8360
|
+
const fromName = getValueByPath(fromObject, ['name']);
|
|
8361
|
+
if (fromName != null) {
|
|
8362
|
+
setValueByPath(toObject, ['name'], fromName);
|
|
8363
|
+
}
|
|
8364
|
+
return toObject;
|
|
8365
|
+
}
|
|
8366
|
+
function liveServerToolCallFromMldev(fromObject) {
|
|
8367
|
+
const toObject = {};
|
|
8368
|
+
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
8369
|
+
'functionCalls',
|
|
8370
|
+
]);
|
|
8371
|
+
if (fromFunctionCalls != null) {
|
|
8372
|
+
let transformedList = fromFunctionCalls;
|
|
8373
|
+
if (Array.isArray(transformedList)) {
|
|
8374
|
+
transformedList = transformedList.map((item) => {
|
|
8375
|
+
return functionCallFromMldev(item);
|
|
8376
|
+
});
|
|
8377
|
+
}
|
|
8378
|
+
setValueByPath(toObject, ['functionCalls'], transformedList);
|
|
8379
|
+
}
|
|
8380
|
+
return toObject;
|
|
8381
|
+
}
|
|
8382
|
+
function liveServerToolCallCancellationFromMldev(fromObject) {
|
|
8383
|
+
const toObject = {};
|
|
8384
|
+
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
8385
|
+
if (fromIds != null) {
|
|
8386
|
+
setValueByPath(toObject, ['ids'], fromIds);
|
|
8387
|
+
}
|
|
8388
|
+
return toObject;
|
|
8389
|
+
}
|
|
8390
|
+
function modalityTokenCountFromMldev(fromObject) {
|
|
8391
|
+
const toObject = {};
|
|
8392
|
+
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8393
|
+
if (fromModality != null) {
|
|
8394
|
+
setValueByPath(toObject, ['modality'], fromModality);
|
|
8395
|
+
}
|
|
8396
|
+
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8397
|
+
if (fromTokenCount != null) {
|
|
8398
|
+
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8399
|
+
}
|
|
8400
|
+
return toObject;
|
|
8401
|
+
}
|
|
8402
|
+
function usageMetadataFromMldev(fromObject) {
|
|
8403
|
+
const toObject = {};
|
|
8404
|
+
const fromPromptTokenCount = getValueByPath(fromObject, [
|
|
8405
|
+
'promptTokenCount',
|
|
8406
|
+
]);
|
|
8407
|
+
if (fromPromptTokenCount != null) {
|
|
8408
|
+
setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
|
|
8409
|
+
}
|
|
8410
|
+
const fromCachedContentTokenCount = getValueByPath(fromObject, [
|
|
8411
|
+
'cachedContentTokenCount',
|
|
8412
|
+
]);
|
|
8413
|
+
if (fromCachedContentTokenCount != null) {
|
|
8414
|
+
setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
|
|
8415
|
+
}
|
|
8416
|
+
const fromResponseTokenCount = getValueByPath(fromObject, [
|
|
8417
|
+
'responseTokenCount',
|
|
8418
|
+
]);
|
|
8419
|
+
if (fromResponseTokenCount != null) {
|
|
8420
|
+
setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
|
|
8421
|
+
}
|
|
8422
|
+
const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
|
|
8423
|
+
'toolUsePromptTokenCount',
|
|
8424
|
+
]);
|
|
8425
|
+
if (fromToolUsePromptTokenCount != null) {
|
|
8426
|
+
setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
|
|
8427
|
+
}
|
|
8428
|
+
const fromThoughtsTokenCount = getValueByPath(fromObject, [
|
|
8429
|
+
'thoughtsTokenCount',
|
|
8430
|
+
]);
|
|
8431
|
+
if (fromThoughtsTokenCount != null) {
|
|
8432
|
+
setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
|
|
8433
|
+
}
|
|
8434
|
+
const fromTotalTokenCount = getValueByPath(fromObject, [
|
|
8435
|
+
'totalTokenCount',
|
|
8436
|
+
]);
|
|
8437
|
+
if (fromTotalTokenCount != null) {
|
|
8438
|
+
setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
|
|
8439
|
+
}
|
|
8440
|
+
const fromPromptTokensDetails = getValueByPath(fromObject, [
|
|
8441
|
+
'promptTokensDetails',
|
|
8442
|
+
]);
|
|
8443
|
+
if (fromPromptTokensDetails != null) {
|
|
8444
|
+
let transformedList = fromPromptTokensDetails;
|
|
8445
|
+
if (Array.isArray(transformedList)) {
|
|
8446
|
+
transformedList = transformedList.map((item) => {
|
|
8447
|
+
return modalityTokenCountFromMldev(item);
|
|
8448
|
+
});
|
|
8449
|
+
}
|
|
8450
|
+
setValueByPath(toObject, ['promptTokensDetails'], transformedList);
|
|
8451
|
+
}
|
|
8452
|
+
const fromCacheTokensDetails = getValueByPath(fromObject, [
|
|
8453
|
+
'cacheTokensDetails',
|
|
8454
|
+
]);
|
|
8455
|
+
if (fromCacheTokensDetails != null) {
|
|
8456
|
+
let transformedList = fromCacheTokensDetails;
|
|
8457
|
+
if (Array.isArray(transformedList)) {
|
|
8458
|
+
transformedList = transformedList.map((item) => {
|
|
8459
|
+
return modalityTokenCountFromMldev(item);
|
|
8460
|
+
});
|
|
8461
|
+
}
|
|
8462
|
+
setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
|
|
8463
|
+
}
|
|
8464
|
+
const fromResponseTokensDetails = getValueByPath(fromObject, [
|
|
8465
|
+
'responseTokensDetails',
|
|
8466
|
+
]);
|
|
8467
|
+
if (fromResponseTokensDetails != null) {
|
|
8468
|
+
let transformedList = fromResponseTokensDetails;
|
|
8469
|
+
if (Array.isArray(transformedList)) {
|
|
8470
|
+
transformedList = transformedList.map((item) => {
|
|
8471
|
+
return modalityTokenCountFromMldev(item);
|
|
8472
|
+
});
|
|
8473
|
+
}
|
|
8474
|
+
setValueByPath(toObject, ['responseTokensDetails'], transformedList);
|
|
8475
|
+
}
|
|
8476
|
+
const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
|
|
8477
|
+
'toolUsePromptTokensDetails',
|
|
8478
|
+
]);
|
|
8479
|
+
if (fromToolUsePromptTokensDetails != null) {
|
|
8480
|
+
let transformedList = fromToolUsePromptTokensDetails;
|
|
8481
|
+
if (Array.isArray(transformedList)) {
|
|
8482
|
+
transformedList = transformedList.map((item) => {
|
|
8483
|
+
return modalityTokenCountFromMldev(item);
|
|
8484
|
+
});
|
|
8485
|
+
}
|
|
8486
|
+
setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
|
|
8487
|
+
}
|
|
8488
|
+
return toObject;
|
|
8489
|
+
}
|
|
8490
|
+
function liveServerGoAwayFromMldev(fromObject) {
|
|
8491
|
+
const toObject = {};
|
|
8492
|
+
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
8493
|
+
if (fromTimeLeft != null) {
|
|
8494
|
+
setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
|
|
8495
|
+
}
|
|
8496
|
+
return toObject;
|
|
8497
|
+
}
|
|
8498
|
+
function liveServerSessionResumptionUpdateFromMldev(fromObject) {
|
|
8499
|
+
const toObject = {};
|
|
8500
|
+
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
8501
|
+
if (fromNewHandle != null) {
|
|
8502
|
+
setValueByPath(toObject, ['newHandle'], fromNewHandle);
|
|
8503
|
+
}
|
|
8504
|
+
const fromResumable = getValueByPath(fromObject, ['resumable']);
|
|
8505
|
+
if (fromResumable != null) {
|
|
8506
|
+
setValueByPath(toObject, ['resumable'], fromResumable);
|
|
8507
|
+
}
|
|
8508
|
+
const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
|
|
8509
|
+
'lastConsumedClientMessageIndex',
|
|
8510
|
+
]);
|
|
8511
|
+
if (fromLastConsumedClientMessageIndex != null) {
|
|
8512
|
+
setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
|
|
8513
|
+
}
|
|
8514
|
+
return toObject;
|
|
8515
|
+
}
|
|
8516
|
+
function liveServerMessageFromMldev(fromObject) {
|
|
8517
|
+
const toObject = {};
|
|
8518
|
+
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8519
|
+
'setupComplete',
|
|
8520
|
+
]);
|
|
8521
|
+
if (fromSetupComplete != null) {
|
|
8522
|
+
setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
|
|
8523
|
+
}
|
|
8524
|
+
const fromServerContent = getValueByPath(fromObject, [
|
|
8525
|
+
'serverContent',
|
|
8526
|
+
]);
|
|
8527
|
+
if (fromServerContent != null) {
|
|
8528
|
+
setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
|
|
8529
|
+
}
|
|
8530
|
+
const fromToolCall = getValueByPath(fromObject, ['toolCall']);
|
|
8531
|
+
if (fromToolCall != null) {
|
|
8532
|
+
setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
|
|
8533
|
+
}
|
|
8534
|
+
const fromToolCallCancellation = getValueByPath(fromObject, [
|
|
8535
|
+
'toolCallCancellation',
|
|
8536
|
+
]);
|
|
8537
|
+
if (fromToolCallCancellation != null) {
|
|
8538
|
+
setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
|
|
8539
|
+
}
|
|
8540
|
+
const fromUsageMetadata = getValueByPath(fromObject, [
|
|
8541
|
+
'usageMetadata',
|
|
8542
|
+
]);
|
|
8543
|
+
if (fromUsageMetadata != null) {
|
|
8544
|
+
setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
|
|
8545
|
+
}
|
|
8546
|
+
const fromGoAway = getValueByPath(fromObject, ['goAway']);
|
|
8547
|
+
if (fromGoAway != null) {
|
|
8548
|
+
setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
|
|
8549
|
+
}
|
|
8550
|
+
const fromSessionResumptionUpdate = getValueByPath(fromObject, [
|
|
8551
|
+
'sessionResumptionUpdate',
|
|
8552
|
+
]);
|
|
8553
|
+
if (fromSessionResumptionUpdate != null) {
|
|
8554
|
+
setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
|
|
8555
|
+
}
|
|
8556
|
+
return toObject;
|
|
8557
|
+
}
|
|
8558
|
+
function liveMusicServerSetupCompleteFromMldev() {
|
|
8559
|
+
const toObject = {};
|
|
8560
|
+
return toObject;
|
|
8561
|
+
}
|
|
8562
|
+
function weightedPromptFromMldev(fromObject) {
|
|
8563
|
+
const toObject = {};
|
|
8564
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8565
|
+
if (fromText != null) {
|
|
8566
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8567
|
+
}
|
|
8568
|
+
const fromWeight = getValueByPath(fromObject, ['weight']);
|
|
8569
|
+
if (fromWeight != null) {
|
|
8570
|
+
setValueByPath(toObject, ['weight'], fromWeight);
|
|
8571
|
+
}
|
|
8572
|
+
return toObject;
|
|
8573
|
+
}
|
|
8574
|
+
function liveMusicClientContentFromMldev(fromObject) {
|
|
8575
|
+
const toObject = {};
|
|
8576
|
+
const fromWeightedPrompts = getValueByPath(fromObject, [
|
|
8577
|
+
'weightedPrompts',
|
|
8578
|
+
]);
|
|
8579
|
+
if (fromWeightedPrompts != null) {
|
|
8580
|
+
let transformedList = fromWeightedPrompts;
|
|
8581
|
+
if (Array.isArray(transformedList)) {
|
|
8582
|
+
transformedList = transformedList.map((item) => {
|
|
8583
|
+
return weightedPromptFromMldev(item);
|
|
8584
|
+
});
|
|
8585
|
+
}
|
|
8586
|
+
setValueByPath(toObject, ['weightedPrompts'], transformedList);
|
|
8587
|
+
}
|
|
8588
|
+
return toObject;
|
|
8589
|
+
}
|
|
8590
|
+
function liveMusicGenerationConfigFromMldev(fromObject) {
|
|
8591
|
+
const toObject = {};
|
|
8592
|
+
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8593
|
+
if (fromTemperature != null) {
|
|
8594
|
+
setValueByPath(toObject, ['temperature'], fromTemperature);
|
|
8595
|
+
}
|
|
8596
|
+
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8597
|
+
if (fromTopK != null) {
|
|
8598
|
+
setValueByPath(toObject, ['topK'], fromTopK);
|
|
8599
|
+
}
|
|
8600
|
+
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8601
|
+
if (fromSeed != null) {
|
|
8602
|
+
setValueByPath(toObject, ['seed'], fromSeed);
|
|
8603
|
+
}
|
|
8604
|
+
const fromGuidance = getValueByPath(fromObject, ['guidance']);
|
|
8605
|
+
if (fromGuidance != null) {
|
|
8606
|
+
setValueByPath(toObject, ['guidance'], fromGuidance);
|
|
8607
|
+
}
|
|
8608
|
+
const fromBpm = getValueByPath(fromObject, ['bpm']);
|
|
8609
|
+
if (fromBpm != null) {
|
|
8610
|
+
setValueByPath(toObject, ['bpm'], fromBpm);
|
|
8611
|
+
}
|
|
8612
|
+
const fromDensity = getValueByPath(fromObject, ['density']);
|
|
8613
|
+
if (fromDensity != null) {
|
|
8614
|
+
setValueByPath(toObject, ['density'], fromDensity);
|
|
8615
|
+
}
|
|
8616
|
+
const fromBrightness = getValueByPath(fromObject, ['brightness']);
|
|
8617
|
+
if (fromBrightness != null) {
|
|
8618
|
+
setValueByPath(toObject, ['brightness'], fromBrightness);
|
|
8619
|
+
}
|
|
8620
|
+
const fromScale = getValueByPath(fromObject, ['scale']);
|
|
8621
|
+
if (fromScale != null) {
|
|
8622
|
+
setValueByPath(toObject, ['scale'], fromScale);
|
|
8623
|
+
}
|
|
8624
|
+
const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
|
|
8625
|
+
if (fromMuteBass != null) {
|
|
8626
|
+
setValueByPath(toObject, ['muteBass'], fromMuteBass);
|
|
8627
|
+
}
|
|
8628
|
+
const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
|
|
8629
|
+
if (fromMuteDrums != null) {
|
|
8630
|
+
setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
|
|
8631
|
+
}
|
|
8632
|
+
const fromOnlyBassAndDrums = getValueByPath(fromObject, [
|
|
8633
|
+
'onlyBassAndDrums',
|
|
8634
|
+
]);
|
|
8635
|
+
if (fromOnlyBassAndDrums != null) {
|
|
8636
|
+
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
8637
|
+
}
|
|
8638
|
+
return toObject;
|
|
8639
|
+
}
|
|
8640
|
+
function liveMusicSourceMetadataFromMldev(fromObject) {
|
|
8641
|
+
const toObject = {};
|
|
8642
|
+
const fromClientContent = getValueByPath(fromObject, [
|
|
8643
|
+
'clientContent',
|
|
8644
|
+
]);
|
|
8645
|
+
if (fromClientContent != null) {
|
|
8646
|
+
setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
|
|
8647
|
+
}
|
|
8648
|
+
const fromMusicGenerationConfig = getValueByPath(fromObject, [
|
|
8649
|
+
'musicGenerationConfig',
|
|
8650
|
+
]);
|
|
8651
|
+
if (fromMusicGenerationConfig != null) {
|
|
8652
|
+
setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
|
|
8653
|
+
}
|
|
8654
|
+
return toObject;
|
|
8655
|
+
}
|
|
8656
|
+
function audioChunkFromMldev(fromObject) {
|
|
8657
|
+
const toObject = {};
|
|
8658
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8659
|
+
if (fromData != null) {
|
|
8660
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8661
|
+
}
|
|
8662
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8663
|
+
if (fromMimeType != null) {
|
|
8664
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8665
|
+
}
|
|
8666
|
+
const fromSourceMetadata = getValueByPath(fromObject, [
|
|
8667
|
+
'sourceMetadata',
|
|
8668
|
+
]);
|
|
8669
|
+
if (fromSourceMetadata != null) {
|
|
8670
|
+
setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
|
|
8671
|
+
}
|
|
8672
|
+
return toObject;
|
|
8673
|
+
}
|
|
8674
|
+
function liveMusicServerContentFromMldev(fromObject) {
|
|
8675
|
+
const toObject = {};
|
|
8676
|
+
const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
|
|
8677
|
+
if (fromAudioChunks != null) {
|
|
8678
|
+
let transformedList = fromAudioChunks;
|
|
8679
|
+
if (Array.isArray(transformedList)) {
|
|
8680
|
+
transformedList = transformedList.map((item) => {
|
|
8681
|
+
return audioChunkFromMldev(item);
|
|
8682
|
+
});
|
|
8683
|
+
}
|
|
8684
|
+
setValueByPath(toObject, ['audioChunks'], transformedList);
|
|
8685
|
+
}
|
|
8686
|
+
return toObject;
|
|
8687
|
+
}
|
|
8688
|
+
function liveMusicFilteredPromptFromMldev(fromObject) {
|
|
8689
|
+
const toObject = {};
|
|
8690
|
+
const fromText = getValueByPath(fromObject, ['text']);
|
|
8691
|
+
if (fromText != null) {
|
|
8692
|
+
setValueByPath(toObject, ['text'], fromText);
|
|
8693
|
+
}
|
|
8694
|
+
const fromFilteredReason = getValueByPath(fromObject, [
|
|
8695
|
+
'filteredReason',
|
|
8696
|
+
]);
|
|
8697
|
+
if (fromFilteredReason != null) {
|
|
8698
|
+
setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
|
|
8699
|
+
}
|
|
8700
|
+
return toObject;
|
|
8701
|
+
}
|
|
8702
|
+
function liveMusicServerMessageFromMldev(fromObject) {
|
|
8703
|
+
const toObject = {};
|
|
8704
|
+
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8705
|
+
'setupComplete',
|
|
8706
|
+
]);
|
|
8707
|
+
if (fromSetupComplete != null) {
|
|
8708
|
+
setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
|
|
8709
|
+
}
|
|
8710
|
+
const fromServerContent = getValueByPath(fromObject, [
|
|
8711
|
+
'serverContent',
|
|
8712
|
+
]);
|
|
8713
|
+
if (fromServerContent != null) {
|
|
8714
|
+
setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
|
|
8715
|
+
}
|
|
8716
|
+
const fromFilteredPrompt = getValueByPath(fromObject, [
|
|
8717
|
+
'filteredPrompt',
|
|
8718
|
+
]);
|
|
8719
|
+
if (fromFilteredPrompt != null) {
|
|
8720
|
+
setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
|
|
8721
|
+
}
|
|
8722
|
+
return toObject;
|
|
8723
|
+
}
|
|
8724
|
+
function liveServerSetupCompleteFromVertex(fromObject) {
|
|
8725
|
+
const toObject = {};
|
|
8726
|
+
const fromSessionId = getValueByPath(fromObject, ['sessionId']);
|
|
8727
|
+
if (fromSessionId != null) {
|
|
8728
|
+
setValueByPath(toObject, ['sessionId'], fromSessionId);
|
|
8729
|
+
}
|
|
8730
|
+
return toObject;
|
|
8731
|
+
}
|
|
8732
|
+
function videoMetadataFromVertex$1(fromObject) {
|
|
8733
|
+
const toObject = {};
|
|
8734
|
+
const fromFps = getValueByPath(fromObject, ['fps']);
|
|
8735
|
+
if (fromFps != null) {
|
|
8736
|
+
setValueByPath(toObject, ['fps'], fromFps);
|
|
8737
|
+
}
|
|
8738
|
+
const fromEndOffset = getValueByPath(fromObject, ['endOffset']);
|
|
8739
|
+
if (fromEndOffset != null) {
|
|
8740
|
+
setValueByPath(toObject, ['endOffset'], fromEndOffset);
|
|
8741
|
+
}
|
|
8742
|
+
const fromStartOffset = getValueByPath(fromObject, ['startOffset']);
|
|
8743
|
+
if (fromStartOffset != null) {
|
|
8744
|
+
setValueByPath(toObject, ['startOffset'], fromStartOffset);
|
|
8745
|
+
}
|
|
8746
|
+
return toObject;
|
|
8747
|
+
}
|
|
8748
|
+
function blobFromVertex$1(fromObject) {
|
|
8749
|
+
const toObject = {};
|
|
8750
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8751
|
+
if (fromDisplayName != null) {
|
|
8752
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8753
|
+
}
|
|
8754
|
+
const fromData = getValueByPath(fromObject, ['data']);
|
|
8755
|
+
if (fromData != null) {
|
|
8756
|
+
setValueByPath(toObject, ['data'], fromData);
|
|
8757
|
+
}
|
|
8758
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8759
|
+
if (fromMimeType != null) {
|
|
8760
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8761
|
+
}
|
|
8762
|
+
return toObject;
|
|
8763
|
+
}
|
|
8764
|
+
function fileDataFromVertex$1(fromObject) {
|
|
8765
|
+
const toObject = {};
|
|
8766
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8767
|
+
if (fromDisplayName != null) {
|
|
8768
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8769
|
+
}
|
|
8770
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8771
|
+
if (fromFileUri != null) {
|
|
8772
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8773
|
+
}
|
|
8774
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8775
|
+
if (fromMimeType != null) {
|
|
8776
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8777
|
+
}
|
|
8778
|
+
return toObject;
|
|
8779
|
+
}
|
|
8780
|
+
function partFromVertex$1(fromObject) {
|
|
8781
|
+
const toObject = {};
|
|
8782
|
+
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
8783
|
+
'videoMetadata',
|
|
8784
|
+
]);
|
|
8785
|
+
if (fromVideoMetadata != null) {
|
|
8786
|
+
setValueByPath(toObject, ['videoMetadata'], videoMetadataFromVertex$1(fromVideoMetadata));
|
|
8787
|
+
}
|
|
8788
|
+
const fromThought = getValueByPath(fromObject, ['thought']);
|
|
8789
|
+
if (fromThought != null) {
|
|
8285
8790
|
setValueByPath(toObject, ['thought'], fromThought);
|
|
8286
8791
|
}
|
|
8287
8792
|
const fromInlineData = getValueByPath(fromObject, ['inlineData']);
|
|
@@ -8326,24 +8831,6 @@ function partFromVertex$1(fromObject) {
|
|
|
8326
8831
|
}
|
|
8327
8832
|
return toObject;
|
|
8328
8833
|
}
|
|
8329
|
-
function contentFromMldev$1(fromObject) {
|
|
8330
|
-
const toObject = {};
|
|
8331
|
-
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8332
|
-
if (fromParts != null) {
|
|
8333
|
-
let transformedList = fromParts;
|
|
8334
|
-
if (Array.isArray(transformedList)) {
|
|
8335
|
-
transformedList = transformedList.map((item) => {
|
|
8336
|
-
return partFromMldev$1(item);
|
|
8337
|
-
});
|
|
8338
|
-
}
|
|
8339
|
-
setValueByPath(toObject, ['parts'], transformedList);
|
|
8340
|
-
}
|
|
8341
|
-
const fromRole = getValueByPath(fromObject, ['role']);
|
|
8342
|
-
if (fromRole != null) {
|
|
8343
|
-
setValueByPath(toObject, ['role'], fromRole);
|
|
8344
|
-
}
|
|
8345
|
-
return toObject;
|
|
8346
|
-
}
|
|
8347
8834
|
function contentFromVertex$1(fromObject) {
|
|
8348
8835
|
const toObject = {};
|
|
8349
8836
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
@@ -8362,18 +8849,6 @@ function contentFromVertex$1(fromObject) {
|
|
|
8362
8849
|
}
|
|
8363
8850
|
return toObject;
|
|
8364
8851
|
}
|
|
8365
|
-
function transcriptionFromMldev(fromObject) {
|
|
8366
|
-
const toObject = {};
|
|
8367
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
8368
|
-
if (fromText != null) {
|
|
8369
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
8370
|
-
}
|
|
8371
|
-
const fromFinished = getValueByPath(fromObject, ['finished']);
|
|
8372
|
-
if (fromFinished != null) {
|
|
8373
|
-
setValueByPath(toObject, ['finished'], fromFinished);
|
|
8374
|
-
}
|
|
8375
|
-
return toObject;
|
|
8376
|
-
}
|
|
8377
8852
|
function transcriptionFromVertex(fromObject) {
|
|
8378
8853
|
const toObject = {};
|
|
8379
8854
|
const fromText = getValueByPath(fromObject, ['text']);
|
|
@@ -8386,80 +8861,6 @@ function transcriptionFromVertex(fromObject) {
|
|
|
8386
8861
|
}
|
|
8387
8862
|
return toObject;
|
|
8388
8863
|
}
|
|
8389
|
-
function urlMetadataFromMldev$1(fromObject) {
|
|
8390
|
-
const toObject = {};
|
|
8391
|
-
const fromRetrievedUrl = getValueByPath(fromObject, ['retrievedUrl']);
|
|
8392
|
-
if (fromRetrievedUrl != null) {
|
|
8393
|
-
setValueByPath(toObject, ['retrievedUrl'], fromRetrievedUrl);
|
|
8394
|
-
}
|
|
8395
|
-
const fromUrlRetrievalStatus = getValueByPath(fromObject, [
|
|
8396
|
-
'urlRetrievalStatus',
|
|
8397
|
-
]);
|
|
8398
|
-
if (fromUrlRetrievalStatus != null) {
|
|
8399
|
-
setValueByPath(toObject, ['urlRetrievalStatus'], fromUrlRetrievalStatus);
|
|
8400
|
-
}
|
|
8401
|
-
return toObject;
|
|
8402
|
-
}
|
|
8403
|
-
function urlContextMetadataFromMldev$1(fromObject) {
|
|
8404
|
-
const toObject = {};
|
|
8405
|
-
const fromUrlMetadata = getValueByPath(fromObject, ['urlMetadata']);
|
|
8406
|
-
if (fromUrlMetadata != null) {
|
|
8407
|
-
let transformedList = fromUrlMetadata;
|
|
8408
|
-
if (Array.isArray(transformedList)) {
|
|
8409
|
-
transformedList = transformedList.map((item) => {
|
|
8410
|
-
return urlMetadataFromMldev$1(item);
|
|
8411
|
-
});
|
|
8412
|
-
}
|
|
8413
|
-
setValueByPath(toObject, ['urlMetadata'], transformedList);
|
|
8414
|
-
}
|
|
8415
|
-
return toObject;
|
|
8416
|
-
}
|
|
8417
|
-
function liveServerContentFromMldev(fromObject) {
|
|
8418
|
-
const toObject = {};
|
|
8419
|
-
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
8420
|
-
if (fromModelTurn != null) {
|
|
8421
|
-
setValueByPath(toObject, ['modelTurn'], contentFromMldev$1(fromModelTurn));
|
|
8422
|
-
}
|
|
8423
|
-
const fromTurnComplete = getValueByPath(fromObject, ['turnComplete']);
|
|
8424
|
-
if (fromTurnComplete != null) {
|
|
8425
|
-
setValueByPath(toObject, ['turnComplete'], fromTurnComplete);
|
|
8426
|
-
}
|
|
8427
|
-
const fromInterrupted = getValueByPath(fromObject, ['interrupted']);
|
|
8428
|
-
if (fromInterrupted != null) {
|
|
8429
|
-
setValueByPath(toObject, ['interrupted'], fromInterrupted);
|
|
8430
|
-
}
|
|
8431
|
-
const fromGroundingMetadata = getValueByPath(fromObject, [
|
|
8432
|
-
'groundingMetadata',
|
|
8433
|
-
]);
|
|
8434
|
-
if (fromGroundingMetadata != null) {
|
|
8435
|
-
setValueByPath(toObject, ['groundingMetadata'], fromGroundingMetadata);
|
|
8436
|
-
}
|
|
8437
|
-
const fromGenerationComplete = getValueByPath(fromObject, [
|
|
8438
|
-
'generationComplete',
|
|
8439
|
-
]);
|
|
8440
|
-
if (fromGenerationComplete != null) {
|
|
8441
|
-
setValueByPath(toObject, ['generationComplete'], fromGenerationComplete);
|
|
8442
|
-
}
|
|
8443
|
-
const fromInputTranscription = getValueByPath(fromObject, [
|
|
8444
|
-
'inputTranscription',
|
|
8445
|
-
]);
|
|
8446
|
-
if (fromInputTranscription != null) {
|
|
8447
|
-
setValueByPath(toObject, ['inputTranscription'], transcriptionFromMldev(fromInputTranscription));
|
|
8448
|
-
}
|
|
8449
|
-
const fromOutputTranscription = getValueByPath(fromObject, [
|
|
8450
|
-
'outputTranscription',
|
|
8451
|
-
]);
|
|
8452
|
-
if (fromOutputTranscription != null) {
|
|
8453
|
-
setValueByPath(toObject, ['outputTranscription'], transcriptionFromMldev(fromOutputTranscription));
|
|
8454
|
-
}
|
|
8455
|
-
const fromUrlContextMetadata = getValueByPath(fromObject, [
|
|
8456
|
-
'urlContextMetadata',
|
|
8457
|
-
]);
|
|
8458
|
-
if (fromUrlContextMetadata != null) {
|
|
8459
|
-
setValueByPath(toObject, ['urlContextMetadata'], urlContextMetadataFromMldev$1(fromUrlContextMetadata));
|
|
8460
|
-
}
|
|
8461
|
-
return toObject;
|
|
8462
|
-
}
|
|
8463
8864
|
function liveServerContentFromVertex(fromObject) {
|
|
8464
8865
|
const toObject = {};
|
|
8465
8866
|
const fromModelTurn = getValueByPath(fromObject, ['modelTurn']);
|
|
@@ -8500,22 +8901,6 @@ function liveServerContentFromVertex(fromObject) {
|
|
|
8500
8901
|
}
|
|
8501
8902
|
return toObject;
|
|
8502
8903
|
}
|
|
8503
|
-
function functionCallFromMldev(fromObject) {
|
|
8504
|
-
const toObject = {};
|
|
8505
|
-
const fromId = getValueByPath(fromObject, ['id']);
|
|
8506
|
-
if (fromId != null) {
|
|
8507
|
-
setValueByPath(toObject, ['id'], fromId);
|
|
8508
|
-
}
|
|
8509
|
-
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
8510
|
-
if (fromArgs != null) {
|
|
8511
|
-
setValueByPath(toObject, ['args'], fromArgs);
|
|
8512
|
-
}
|
|
8513
|
-
const fromName = getValueByPath(fromObject, ['name']);
|
|
8514
|
-
if (fromName != null) {
|
|
8515
|
-
setValueByPath(toObject, ['name'], fromName);
|
|
8516
|
-
}
|
|
8517
|
-
return toObject;
|
|
8518
|
-
}
|
|
8519
8904
|
function functionCallFromVertex(fromObject) {
|
|
8520
8905
|
const toObject = {};
|
|
8521
8906
|
const fromArgs = getValueByPath(fromObject, ['args']);
|
|
@@ -8528,22 +8913,6 @@ function functionCallFromVertex(fromObject) {
|
|
|
8528
8913
|
}
|
|
8529
8914
|
return toObject;
|
|
8530
8915
|
}
|
|
8531
|
-
function liveServerToolCallFromMldev(fromObject) {
|
|
8532
|
-
const toObject = {};
|
|
8533
|
-
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
8534
|
-
'functionCalls',
|
|
8535
|
-
]);
|
|
8536
|
-
if (fromFunctionCalls != null) {
|
|
8537
|
-
let transformedList = fromFunctionCalls;
|
|
8538
|
-
if (Array.isArray(transformedList)) {
|
|
8539
|
-
transformedList = transformedList.map((item) => {
|
|
8540
|
-
return functionCallFromMldev(item);
|
|
8541
|
-
});
|
|
8542
|
-
}
|
|
8543
|
-
setValueByPath(toObject, ['functionCalls'], transformedList);
|
|
8544
|
-
}
|
|
8545
|
-
return toObject;
|
|
8546
|
-
}
|
|
8547
8916
|
function liveServerToolCallFromVertex(fromObject) {
|
|
8548
8917
|
const toObject = {};
|
|
8549
8918
|
const fromFunctionCalls = getValueByPath(fromObject, [
|
|
@@ -8560,14 +8929,6 @@ function liveServerToolCallFromVertex(fromObject) {
|
|
|
8560
8929
|
}
|
|
8561
8930
|
return toObject;
|
|
8562
8931
|
}
|
|
8563
|
-
function liveServerToolCallCancellationFromMldev(fromObject) {
|
|
8564
|
-
const toObject = {};
|
|
8565
|
-
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
8566
|
-
if (fromIds != null) {
|
|
8567
|
-
setValueByPath(toObject, ['ids'], fromIds);
|
|
8568
|
-
}
|
|
8569
|
-
return toObject;
|
|
8570
|
-
}
|
|
8571
8932
|
function liveServerToolCallCancellationFromVertex(fromObject) {
|
|
8572
8933
|
const toObject = {};
|
|
8573
8934
|
const fromIds = getValueByPath(fromObject, ['ids']);
|
|
@@ -8576,115 +8937,15 @@ function liveServerToolCallCancellationFromVertex(fromObject) {
|
|
|
8576
8937
|
}
|
|
8577
8938
|
return toObject;
|
|
8578
8939
|
}
|
|
8579
|
-
function modalityTokenCountFromMldev(fromObject) {
|
|
8580
|
-
const toObject = {};
|
|
8581
|
-
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8582
|
-
if (fromModality != null) {
|
|
8583
|
-
setValueByPath(toObject, ['modality'], fromModality);
|
|
8584
|
-
}
|
|
8585
|
-
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8586
|
-
if (fromTokenCount != null) {
|
|
8587
|
-
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8588
|
-
}
|
|
8589
|
-
return toObject;
|
|
8590
|
-
}
|
|
8591
8940
|
function modalityTokenCountFromVertex(fromObject) {
|
|
8592
8941
|
const toObject = {};
|
|
8593
8942
|
const fromModality = getValueByPath(fromObject, ['modality']);
|
|
8594
|
-
if (fromModality != null) {
|
|
8595
|
-
setValueByPath(toObject, ['modality'], fromModality);
|
|
8596
|
-
}
|
|
8597
|
-
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8598
|
-
if (fromTokenCount != null) {
|
|
8599
|
-
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8600
|
-
}
|
|
8601
|
-
return toObject;
|
|
8602
|
-
}
|
|
8603
|
-
function usageMetadataFromMldev(fromObject) {
|
|
8604
|
-
const toObject = {};
|
|
8605
|
-
const fromPromptTokenCount = getValueByPath(fromObject, [
|
|
8606
|
-
'promptTokenCount',
|
|
8607
|
-
]);
|
|
8608
|
-
if (fromPromptTokenCount != null) {
|
|
8609
|
-
setValueByPath(toObject, ['promptTokenCount'], fromPromptTokenCount);
|
|
8610
|
-
}
|
|
8611
|
-
const fromCachedContentTokenCount = getValueByPath(fromObject, [
|
|
8612
|
-
'cachedContentTokenCount',
|
|
8613
|
-
]);
|
|
8614
|
-
if (fromCachedContentTokenCount != null) {
|
|
8615
|
-
setValueByPath(toObject, ['cachedContentTokenCount'], fromCachedContentTokenCount);
|
|
8616
|
-
}
|
|
8617
|
-
const fromResponseTokenCount = getValueByPath(fromObject, [
|
|
8618
|
-
'responseTokenCount',
|
|
8619
|
-
]);
|
|
8620
|
-
if (fromResponseTokenCount != null) {
|
|
8621
|
-
setValueByPath(toObject, ['responseTokenCount'], fromResponseTokenCount);
|
|
8622
|
-
}
|
|
8623
|
-
const fromToolUsePromptTokenCount = getValueByPath(fromObject, [
|
|
8624
|
-
'toolUsePromptTokenCount',
|
|
8625
|
-
]);
|
|
8626
|
-
if (fromToolUsePromptTokenCount != null) {
|
|
8627
|
-
setValueByPath(toObject, ['toolUsePromptTokenCount'], fromToolUsePromptTokenCount);
|
|
8628
|
-
}
|
|
8629
|
-
const fromThoughtsTokenCount = getValueByPath(fromObject, [
|
|
8630
|
-
'thoughtsTokenCount',
|
|
8631
|
-
]);
|
|
8632
|
-
if (fromThoughtsTokenCount != null) {
|
|
8633
|
-
setValueByPath(toObject, ['thoughtsTokenCount'], fromThoughtsTokenCount);
|
|
8634
|
-
}
|
|
8635
|
-
const fromTotalTokenCount = getValueByPath(fromObject, [
|
|
8636
|
-
'totalTokenCount',
|
|
8637
|
-
]);
|
|
8638
|
-
if (fromTotalTokenCount != null) {
|
|
8639
|
-
setValueByPath(toObject, ['totalTokenCount'], fromTotalTokenCount);
|
|
8640
|
-
}
|
|
8641
|
-
const fromPromptTokensDetails = getValueByPath(fromObject, [
|
|
8642
|
-
'promptTokensDetails',
|
|
8643
|
-
]);
|
|
8644
|
-
if (fromPromptTokensDetails != null) {
|
|
8645
|
-
let transformedList = fromPromptTokensDetails;
|
|
8646
|
-
if (Array.isArray(transformedList)) {
|
|
8647
|
-
transformedList = transformedList.map((item) => {
|
|
8648
|
-
return modalityTokenCountFromMldev(item);
|
|
8649
|
-
});
|
|
8650
|
-
}
|
|
8651
|
-
setValueByPath(toObject, ['promptTokensDetails'], transformedList);
|
|
8652
|
-
}
|
|
8653
|
-
const fromCacheTokensDetails = getValueByPath(fromObject, [
|
|
8654
|
-
'cacheTokensDetails',
|
|
8655
|
-
]);
|
|
8656
|
-
if (fromCacheTokensDetails != null) {
|
|
8657
|
-
let transformedList = fromCacheTokensDetails;
|
|
8658
|
-
if (Array.isArray(transformedList)) {
|
|
8659
|
-
transformedList = transformedList.map((item) => {
|
|
8660
|
-
return modalityTokenCountFromMldev(item);
|
|
8661
|
-
});
|
|
8662
|
-
}
|
|
8663
|
-
setValueByPath(toObject, ['cacheTokensDetails'], transformedList);
|
|
8664
|
-
}
|
|
8665
|
-
const fromResponseTokensDetails = getValueByPath(fromObject, [
|
|
8666
|
-
'responseTokensDetails',
|
|
8667
|
-
]);
|
|
8668
|
-
if (fromResponseTokensDetails != null) {
|
|
8669
|
-
let transformedList = fromResponseTokensDetails;
|
|
8670
|
-
if (Array.isArray(transformedList)) {
|
|
8671
|
-
transformedList = transformedList.map((item) => {
|
|
8672
|
-
return modalityTokenCountFromMldev(item);
|
|
8673
|
-
});
|
|
8674
|
-
}
|
|
8675
|
-
setValueByPath(toObject, ['responseTokensDetails'], transformedList);
|
|
8676
|
-
}
|
|
8677
|
-
const fromToolUsePromptTokensDetails = getValueByPath(fromObject, [
|
|
8678
|
-
'toolUsePromptTokensDetails',
|
|
8679
|
-
]);
|
|
8680
|
-
if (fromToolUsePromptTokensDetails != null) {
|
|
8681
|
-
let transformedList = fromToolUsePromptTokensDetails;
|
|
8682
|
-
if (Array.isArray(transformedList)) {
|
|
8683
|
-
transformedList = transformedList.map((item) => {
|
|
8684
|
-
return modalityTokenCountFromMldev(item);
|
|
8685
|
-
});
|
|
8686
|
-
}
|
|
8687
|
-
setValueByPath(toObject, ['toolUsePromptTokensDetails'], transformedList);
|
|
8943
|
+
if (fromModality != null) {
|
|
8944
|
+
setValueByPath(toObject, ['modality'], fromModality);
|
|
8945
|
+
}
|
|
8946
|
+
const fromTokenCount = getValueByPath(fromObject, ['tokenCount']);
|
|
8947
|
+
if (fromTokenCount != null) {
|
|
8948
|
+
setValueByPath(toObject, ['tokenCount'], fromTokenCount);
|
|
8688
8949
|
}
|
|
8689
8950
|
return toObject;
|
|
8690
8951
|
}
|
|
@@ -8780,14 +9041,6 @@ function usageMetadataFromVertex(fromObject) {
|
|
|
8780
9041
|
}
|
|
8781
9042
|
return toObject;
|
|
8782
9043
|
}
|
|
8783
|
-
function liveServerGoAwayFromMldev(fromObject) {
|
|
8784
|
-
const toObject = {};
|
|
8785
|
-
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
8786
|
-
if (fromTimeLeft != null) {
|
|
8787
|
-
setValueByPath(toObject, ['timeLeft'], fromTimeLeft);
|
|
8788
|
-
}
|
|
8789
|
-
return toObject;
|
|
8790
|
-
}
|
|
8791
9044
|
function liveServerGoAwayFromVertex(fromObject) {
|
|
8792
9045
|
const toObject = {};
|
|
8793
9046
|
const fromTimeLeft = getValueByPath(fromObject, ['timeLeft']);
|
|
@@ -8796,24 +9049,6 @@ function liveServerGoAwayFromVertex(fromObject) {
|
|
|
8796
9049
|
}
|
|
8797
9050
|
return toObject;
|
|
8798
9051
|
}
|
|
8799
|
-
function liveServerSessionResumptionUpdateFromMldev(fromObject) {
|
|
8800
|
-
const toObject = {};
|
|
8801
|
-
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
8802
|
-
if (fromNewHandle != null) {
|
|
8803
|
-
setValueByPath(toObject, ['newHandle'], fromNewHandle);
|
|
8804
|
-
}
|
|
8805
|
-
const fromResumable = getValueByPath(fromObject, ['resumable']);
|
|
8806
|
-
if (fromResumable != null) {
|
|
8807
|
-
setValueByPath(toObject, ['resumable'], fromResumable);
|
|
8808
|
-
}
|
|
8809
|
-
const fromLastConsumedClientMessageIndex = getValueByPath(fromObject, [
|
|
8810
|
-
'lastConsumedClientMessageIndex',
|
|
8811
|
-
]);
|
|
8812
|
-
if (fromLastConsumedClientMessageIndex != null) {
|
|
8813
|
-
setValueByPath(toObject, ['lastConsumedClientMessageIndex'], fromLastConsumedClientMessageIndex);
|
|
8814
|
-
}
|
|
8815
|
-
return toObject;
|
|
8816
|
-
}
|
|
8817
9052
|
function liveServerSessionResumptionUpdateFromVertex(fromObject) {
|
|
8818
9053
|
const toObject = {};
|
|
8819
9054
|
const fromNewHandle = getValueByPath(fromObject, ['newHandle']);
|
|
@@ -8832,48 +9067,6 @@ function liveServerSessionResumptionUpdateFromVertex(fromObject) {
|
|
|
8832
9067
|
}
|
|
8833
9068
|
return toObject;
|
|
8834
9069
|
}
|
|
8835
|
-
function liveServerMessageFromMldev(fromObject) {
|
|
8836
|
-
const toObject = {};
|
|
8837
|
-
const fromSetupComplete = getValueByPath(fromObject, [
|
|
8838
|
-
'setupComplete',
|
|
8839
|
-
]);
|
|
8840
|
-
if (fromSetupComplete != null) {
|
|
8841
|
-
setValueByPath(toObject, ['setupComplete'], liveServerSetupCompleteFromMldev());
|
|
8842
|
-
}
|
|
8843
|
-
const fromServerContent = getValueByPath(fromObject, [
|
|
8844
|
-
'serverContent',
|
|
8845
|
-
]);
|
|
8846
|
-
if (fromServerContent != null) {
|
|
8847
|
-
setValueByPath(toObject, ['serverContent'], liveServerContentFromMldev(fromServerContent));
|
|
8848
|
-
}
|
|
8849
|
-
const fromToolCall = getValueByPath(fromObject, ['toolCall']);
|
|
8850
|
-
if (fromToolCall != null) {
|
|
8851
|
-
setValueByPath(toObject, ['toolCall'], liveServerToolCallFromMldev(fromToolCall));
|
|
8852
|
-
}
|
|
8853
|
-
const fromToolCallCancellation = getValueByPath(fromObject, [
|
|
8854
|
-
'toolCallCancellation',
|
|
8855
|
-
]);
|
|
8856
|
-
if (fromToolCallCancellation != null) {
|
|
8857
|
-
setValueByPath(toObject, ['toolCallCancellation'], liveServerToolCallCancellationFromMldev(fromToolCallCancellation));
|
|
8858
|
-
}
|
|
8859
|
-
const fromUsageMetadata = getValueByPath(fromObject, [
|
|
8860
|
-
'usageMetadata',
|
|
8861
|
-
]);
|
|
8862
|
-
if (fromUsageMetadata != null) {
|
|
8863
|
-
setValueByPath(toObject, ['usageMetadata'], usageMetadataFromMldev(fromUsageMetadata));
|
|
8864
|
-
}
|
|
8865
|
-
const fromGoAway = getValueByPath(fromObject, ['goAway']);
|
|
8866
|
-
if (fromGoAway != null) {
|
|
8867
|
-
setValueByPath(toObject, ['goAway'], liveServerGoAwayFromMldev(fromGoAway));
|
|
8868
|
-
}
|
|
8869
|
-
const fromSessionResumptionUpdate = getValueByPath(fromObject, [
|
|
8870
|
-
'sessionResumptionUpdate',
|
|
8871
|
-
]);
|
|
8872
|
-
if (fromSessionResumptionUpdate != null) {
|
|
8873
|
-
setValueByPath(toObject, ['sessionResumptionUpdate'], liveServerSessionResumptionUpdateFromMldev(fromSessionResumptionUpdate));
|
|
8874
|
-
}
|
|
8875
|
-
return toObject;
|
|
8876
|
-
}
|
|
8877
9070
|
function liveServerMessageFromVertex(fromObject) {
|
|
8878
9071
|
const toObject = {};
|
|
8879
9072
|
const fromSetupComplete = getValueByPath(fromObject, [
|
|
@@ -8916,172 +9109,6 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
8916
9109
|
}
|
|
8917
9110
|
return toObject;
|
|
8918
9111
|
}
|
|
8919
|
-
function liveMusicServerSetupCompleteFromMldev() {
|
|
8920
|
-
const toObject = {};
|
|
8921
|
-
return toObject;
|
|
8922
|
-
}
|
|
8923
|
-
function weightedPromptFromMldev(fromObject) {
|
|
8924
|
-
const toObject = {};
|
|
8925
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
8926
|
-
if (fromText != null) {
|
|
8927
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
8928
|
-
}
|
|
8929
|
-
const fromWeight = getValueByPath(fromObject, ['weight']);
|
|
8930
|
-
if (fromWeight != null) {
|
|
8931
|
-
setValueByPath(toObject, ['weight'], fromWeight);
|
|
8932
|
-
}
|
|
8933
|
-
return toObject;
|
|
8934
|
-
}
|
|
8935
|
-
function liveMusicClientContentFromMldev(fromObject) {
|
|
8936
|
-
const toObject = {};
|
|
8937
|
-
const fromWeightedPrompts = getValueByPath(fromObject, [
|
|
8938
|
-
'weightedPrompts',
|
|
8939
|
-
]);
|
|
8940
|
-
if (fromWeightedPrompts != null) {
|
|
8941
|
-
let transformedList = fromWeightedPrompts;
|
|
8942
|
-
if (Array.isArray(transformedList)) {
|
|
8943
|
-
transformedList = transformedList.map((item) => {
|
|
8944
|
-
return weightedPromptFromMldev(item);
|
|
8945
|
-
});
|
|
8946
|
-
}
|
|
8947
|
-
setValueByPath(toObject, ['weightedPrompts'], transformedList);
|
|
8948
|
-
}
|
|
8949
|
-
return toObject;
|
|
8950
|
-
}
|
|
8951
|
-
function liveMusicGenerationConfigFromMldev(fromObject) {
|
|
8952
|
-
const toObject = {};
|
|
8953
|
-
const fromTemperature = getValueByPath(fromObject, ['temperature']);
|
|
8954
|
-
if (fromTemperature != null) {
|
|
8955
|
-
setValueByPath(toObject, ['temperature'], fromTemperature);
|
|
8956
|
-
}
|
|
8957
|
-
const fromTopK = getValueByPath(fromObject, ['topK']);
|
|
8958
|
-
if (fromTopK != null) {
|
|
8959
|
-
setValueByPath(toObject, ['topK'], fromTopK);
|
|
8960
|
-
}
|
|
8961
|
-
const fromSeed = getValueByPath(fromObject, ['seed']);
|
|
8962
|
-
if (fromSeed != null) {
|
|
8963
|
-
setValueByPath(toObject, ['seed'], fromSeed);
|
|
8964
|
-
}
|
|
8965
|
-
const fromGuidance = getValueByPath(fromObject, ['guidance']);
|
|
8966
|
-
if (fromGuidance != null) {
|
|
8967
|
-
setValueByPath(toObject, ['guidance'], fromGuidance);
|
|
8968
|
-
}
|
|
8969
|
-
const fromBpm = getValueByPath(fromObject, ['bpm']);
|
|
8970
|
-
if (fromBpm != null) {
|
|
8971
|
-
setValueByPath(toObject, ['bpm'], fromBpm);
|
|
8972
|
-
}
|
|
8973
|
-
const fromDensity = getValueByPath(fromObject, ['density']);
|
|
8974
|
-
if (fromDensity != null) {
|
|
8975
|
-
setValueByPath(toObject, ['density'], fromDensity);
|
|
8976
|
-
}
|
|
8977
|
-
const fromBrightness = getValueByPath(fromObject, ['brightness']);
|
|
8978
|
-
if (fromBrightness != null) {
|
|
8979
|
-
setValueByPath(toObject, ['brightness'], fromBrightness);
|
|
8980
|
-
}
|
|
8981
|
-
const fromScale = getValueByPath(fromObject, ['scale']);
|
|
8982
|
-
if (fromScale != null) {
|
|
8983
|
-
setValueByPath(toObject, ['scale'], fromScale);
|
|
8984
|
-
}
|
|
8985
|
-
const fromMuteBass = getValueByPath(fromObject, ['muteBass']);
|
|
8986
|
-
if (fromMuteBass != null) {
|
|
8987
|
-
setValueByPath(toObject, ['muteBass'], fromMuteBass);
|
|
8988
|
-
}
|
|
8989
|
-
const fromMuteDrums = getValueByPath(fromObject, ['muteDrums']);
|
|
8990
|
-
if (fromMuteDrums != null) {
|
|
8991
|
-
setValueByPath(toObject, ['muteDrums'], fromMuteDrums);
|
|
8992
|
-
}
|
|
8993
|
-
const fromOnlyBassAndDrums = getValueByPath(fromObject, [
|
|
8994
|
-
'onlyBassAndDrums',
|
|
8995
|
-
]);
|
|
8996
|
-
if (fromOnlyBassAndDrums != null) {
|
|
8997
|
-
setValueByPath(toObject, ['onlyBassAndDrums'], fromOnlyBassAndDrums);
|
|
8998
|
-
}
|
|
8999
|
-
return toObject;
|
|
9000
|
-
}
|
|
9001
|
-
function liveMusicSourceMetadataFromMldev(fromObject) {
|
|
9002
|
-
const toObject = {};
|
|
9003
|
-
const fromClientContent = getValueByPath(fromObject, [
|
|
9004
|
-
'clientContent',
|
|
9005
|
-
]);
|
|
9006
|
-
if (fromClientContent != null) {
|
|
9007
|
-
setValueByPath(toObject, ['clientContent'], liveMusicClientContentFromMldev(fromClientContent));
|
|
9008
|
-
}
|
|
9009
|
-
const fromMusicGenerationConfig = getValueByPath(fromObject, [
|
|
9010
|
-
'musicGenerationConfig',
|
|
9011
|
-
]);
|
|
9012
|
-
if (fromMusicGenerationConfig != null) {
|
|
9013
|
-
setValueByPath(toObject, ['musicGenerationConfig'], liveMusicGenerationConfigFromMldev(fromMusicGenerationConfig));
|
|
9014
|
-
}
|
|
9015
|
-
return toObject;
|
|
9016
|
-
}
|
|
9017
|
-
function audioChunkFromMldev(fromObject) {
|
|
9018
|
-
const toObject = {};
|
|
9019
|
-
const fromData = getValueByPath(fromObject, ['data']);
|
|
9020
|
-
if (fromData != null) {
|
|
9021
|
-
setValueByPath(toObject, ['data'], fromData);
|
|
9022
|
-
}
|
|
9023
|
-
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9024
|
-
if (fromMimeType != null) {
|
|
9025
|
-
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9026
|
-
}
|
|
9027
|
-
const fromSourceMetadata = getValueByPath(fromObject, [
|
|
9028
|
-
'sourceMetadata',
|
|
9029
|
-
]);
|
|
9030
|
-
if (fromSourceMetadata != null) {
|
|
9031
|
-
setValueByPath(toObject, ['sourceMetadata'], liveMusicSourceMetadataFromMldev(fromSourceMetadata));
|
|
9032
|
-
}
|
|
9033
|
-
return toObject;
|
|
9034
|
-
}
|
|
9035
|
-
function liveMusicServerContentFromMldev(fromObject) {
|
|
9036
|
-
const toObject = {};
|
|
9037
|
-
const fromAudioChunks = getValueByPath(fromObject, ['audioChunks']);
|
|
9038
|
-
if (fromAudioChunks != null) {
|
|
9039
|
-
let transformedList = fromAudioChunks;
|
|
9040
|
-
if (Array.isArray(transformedList)) {
|
|
9041
|
-
transformedList = transformedList.map((item) => {
|
|
9042
|
-
return audioChunkFromMldev(item);
|
|
9043
|
-
});
|
|
9044
|
-
}
|
|
9045
|
-
setValueByPath(toObject, ['audioChunks'], transformedList);
|
|
9046
|
-
}
|
|
9047
|
-
return toObject;
|
|
9048
|
-
}
|
|
9049
|
-
function liveMusicFilteredPromptFromMldev(fromObject) {
|
|
9050
|
-
const toObject = {};
|
|
9051
|
-
const fromText = getValueByPath(fromObject, ['text']);
|
|
9052
|
-
if (fromText != null) {
|
|
9053
|
-
setValueByPath(toObject, ['text'], fromText);
|
|
9054
|
-
}
|
|
9055
|
-
const fromFilteredReason = getValueByPath(fromObject, [
|
|
9056
|
-
'filteredReason',
|
|
9057
|
-
]);
|
|
9058
|
-
if (fromFilteredReason != null) {
|
|
9059
|
-
setValueByPath(toObject, ['filteredReason'], fromFilteredReason);
|
|
9060
|
-
}
|
|
9061
|
-
return toObject;
|
|
9062
|
-
}
|
|
9063
|
-
function liveMusicServerMessageFromMldev(fromObject) {
|
|
9064
|
-
const toObject = {};
|
|
9065
|
-
const fromSetupComplete = getValueByPath(fromObject, [
|
|
9066
|
-
'setupComplete',
|
|
9067
|
-
]);
|
|
9068
|
-
if (fromSetupComplete != null) {
|
|
9069
|
-
setValueByPath(toObject, ['setupComplete'], liveMusicServerSetupCompleteFromMldev());
|
|
9070
|
-
}
|
|
9071
|
-
const fromServerContent = getValueByPath(fromObject, [
|
|
9072
|
-
'serverContent',
|
|
9073
|
-
]);
|
|
9074
|
-
if (fromServerContent != null) {
|
|
9075
|
-
setValueByPath(toObject, ['serverContent'], liveMusicServerContentFromMldev(fromServerContent));
|
|
9076
|
-
}
|
|
9077
|
-
const fromFilteredPrompt = getValueByPath(fromObject, [
|
|
9078
|
-
'filteredPrompt',
|
|
9079
|
-
]);
|
|
9080
|
-
if (fromFilteredPrompt != null) {
|
|
9081
|
-
setValueByPath(toObject, ['filteredPrompt'], liveMusicFilteredPromptFromMldev(fromFilteredPrompt));
|
|
9082
|
-
}
|
|
9083
|
-
return toObject;
|
|
9084
|
-
}
|
|
9085
9112
|
|
|
9086
9113
|
/**
|
|
9087
9114
|
* @license
|
|
@@ -11162,6 +11189,10 @@ function editImageConfigToVertex(fromObject, parentObject) {
|
|
|
11162
11189
|
if (parentObject !== undefined && fromOutputCompressionQuality != null) {
|
|
11163
11190
|
setValueByPath(parentObject, ['parameters', 'outputOptions', 'compressionQuality'], fromOutputCompressionQuality);
|
|
11164
11191
|
}
|
|
11192
|
+
const fromAddWatermark = getValueByPath(fromObject, ['addWatermark']);
|
|
11193
|
+
if (parentObject !== undefined && fromAddWatermark != null) {
|
|
11194
|
+
setValueByPath(parentObject, ['parameters', 'addWatermark'], fromAddWatermark);
|
|
11195
|
+
}
|
|
11165
11196
|
const fromEditMode = getValueByPath(fromObject, ['editMode']);
|
|
11166
11197
|
if (parentObject !== undefined && fromEditMode != null) {
|
|
11167
11198
|
setValueByPath(parentObject, ['parameters', 'editMode'], fromEditMode);
|
|
@@ -11736,6 +11767,12 @@ function candidateFromMldev(fromObject) {
|
|
|
11736
11767
|
}
|
|
11737
11768
|
function generateContentResponseFromMldev(fromObject) {
|
|
11738
11769
|
const toObject = {};
|
|
11770
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11771
|
+
'sdkHttpResponse',
|
|
11772
|
+
]);
|
|
11773
|
+
if (fromSdkHttpResponse != null) {
|
|
11774
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
11775
|
+
}
|
|
11739
11776
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
11740
11777
|
if (fromCandidates != null) {
|
|
11741
11778
|
let transformedList = fromCandidates;
|
|
@@ -12262,6 +12299,12 @@ function candidateFromVertex(fromObject) {
|
|
|
12262
12299
|
}
|
|
12263
12300
|
function generateContentResponseFromVertex(fromObject) {
|
|
12264
12301
|
const toObject = {};
|
|
12302
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12303
|
+
'sdkHttpResponse',
|
|
12304
|
+
]);
|
|
12305
|
+
if (fromSdkHttpResponse != null) {
|
|
12306
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
12307
|
+
}
|
|
12265
12308
|
const fromCandidates = getValueByPath(fromObject, ['candidates']);
|
|
12266
12309
|
if (fromCandidates != null) {
|
|
12267
12310
|
let transformedList = fromCandidates;
|
|
@@ -12698,7 +12741,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
12698
12741
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
12699
12742
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
12700
12743
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
12701
|
-
const SDK_VERSION = '1.
|
|
12744
|
+
const SDK_VERSION = '1.10.0'; // x-release-please-version
|
|
12702
12745
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
12703
12746
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
12704
12747
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -13270,6 +13313,9 @@ function includeExtraBodyToRequestInit(requestInit, extraBody) {
|
|
|
13270
13313
|
*/
|
|
13271
13314
|
// TODO: b/416041229 - Determine how to retrieve the MCP package version.
|
|
13272
13315
|
const MCP_LABEL = 'mcp_used/unknown';
|
|
13316
|
+
// Whether MCP tool usage is detected from mcpToTool. This is used for
|
|
13317
|
+
// telemetry.
|
|
13318
|
+
let hasMcpToolUsageFromMcpToTool = false;
|
|
13273
13319
|
// Checks whether the list of tools contains any MCP tools.
|
|
13274
13320
|
function hasMcpToolUsage(tools) {
|
|
13275
13321
|
for (const tool of tools) {
|
|
@@ -13280,7 +13326,7 @@ function hasMcpToolUsage(tools) {
|
|
|
13280
13326
|
return true;
|
|
13281
13327
|
}
|
|
13282
13328
|
}
|
|
13283
|
-
return
|
|
13329
|
+
return hasMcpToolUsageFromMcpToTool;
|
|
13284
13330
|
}
|
|
13285
13331
|
// Sets the MCP version label in the Google API client header.
|
|
13286
13332
|
function setMcpUsageHeader(headers) {
|
|
@@ -13437,6 +13483,8 @@ function isMcpClient(client) {
|
|
|
13437
13483
|
* versions.
|
|
13438
13484
|
*/
|
|
13439
13485
|
function mcpToTool(...args) {
|
|
13486
|
+
// Set MCP usage for telemetry.
|
|
13487
|
+
hasMcpToolUsageFromMcpToTool = true;
|
|
13440
13488
|
if (args.length === 0) {
|
|
13441
13489
|
throw new Error('No MCP clients provided');
|
|
13442
13490
|
}
|
|
@@ -13782,6 +13830,12 @@ class Live {
|
|
|
13782
13830
|
*/
|
|
13783
13831
|
async connect(params) {
|
|
13784
13832
|
var _a, _b, _c, _d, _e, _f;
|
|
13833
|
+
// TODO: b/404946746 - Support per request HTTP options.
|
|
13834
|
+
if (params.config && params.config.httpOptions) {
|
|
13835
|
+
throw new Error('The Live module does not support httpOptions at request-level in' +
|
|
13836
|
+
' LiveConnectConfig yet. Please use the client-level httpOptions' +
|
|
13837
|
+
' configuration instead.');
|
|
13838
|
+
}
|
|
13785
13839
|
const websocketBaseUrl = this.apiClient.getWebsocketBaseUrl();
|
|
13786
13840
|
const apiVersion = this.apiClient.getApiVersion();
|
|
13787
13841
|
let url;
|
|
@@ -14627,7 +14681,13 @@ class Models extends BaseModule {
|
|
|
14627
14681
|
abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
|
|
14628
14682
|
})
|
|
14629
14683
|
.then((httpResponse) => {
|
|
14630
|
-
return httpResponse.json()
|
|
14684
|
+
return httpResponse.json().then((jsonResponse) => {
|
|
14685
|
+
const response = jsonResponse;
|
|
14686
|
+
response.sdkHttpResponse = {
|
|
14687
|
+
headers: httpResponse.headers,
|
|
14688
|
+
};
|
|
14689
|
+
return response;
|
|
14690
|
+
});
|
|
14631
14691
|
});
|
|
14632
14692
|
return response.then((apiResponse) => {
|
|
14633
14693
|
const resp = generateContentResponseFromVertex(apiResponse);
|
|
@@ -14653,7 +14713,13 @@ class Models extends BaseModule {
|
|
|
14653
14713
|
abortSignal: (_d = params.config) === null || _d === void 0 ? void 0 : _d.abortSignal,
|
|
14654
14714
|
})
|
|
14655
14715
|
.then((httpResponse) => {
|
|
14656
|
-
return httpResponse.json()
|
|
14716
|
+
return httpResponse.json().then((jsonResponse) => {
|
|
14717
|
+
const response = jsonResponse;
|
|
14718
|
+
response.sdkHttpResponse = {
|
|
14719
|
+
headers: httpResponse.headers,
|
|
14720
|
+
};
|
|
14721
|
+
return response;
|
|
14722
|
+
});
|
|
14657
14723
|
});
|
|
14658
14724
|
return response.then((apiResponse) => {
|
|
14659
14725
|
const resp = generateContentResponseFromMldev(apiResponse);
|
|
@@ -14693,6 +14759,9 @@ class Models extends BaseModule {
|
|
|
14693
14759
|
_d = false;
|
|
14694
14760
|
const chunk = _c;
|
|
14695
14761
|
const resp = generateContentResponseFromVertex((yield __await(chunk.json())));
|
|
14762
|
+
resp['sdkHttpResponse'] = {
|
|
14763
|
+
headers: chunk.headers,
|
|
14764
|
+
};
|
|
14696
14765
|
const typedResp = new GenerateContentResponse();
|
|
14697
14766
|
Object.assign(typedResp, resp);
|
|
14698
14767
|
yield yield __await(typedResp);
|
|
@@ -14733,6 +14802,9 @@ class Models extends BaseModule {
|
|
|
14733
14802
|
_d = false;
|
|
14734
14803
|
const chunk = _c;
|
|
14735
14804
|
const resp = generateContentResponseFromMldev((yield __await(chunk.json())));
|
|
14805
|
+
resp['sdkHttpResponse'] = {
|
|
14806
|
+
headers: chunk.headers,
|
|
14807
|
+
};
|
|
14736
14808
|
const typedResp = new GenerateContentResponse();
|
|
14737
14809
|
Object.assign(typedResp, resp);
|
|
14738
14810
|
yield yield __await(typedResp);
|
|
@@ -17019,7 +17091,7 @@ function listTuningJobsResponseFromMldev(fromObject) {
|
|
|
17019
17091
|
}
|
|
17020
17092
|
return toObject;
|
|
17021
17093
|
}
|
|
17022
|
-
function
|
|
17094
|
+
function tuningOperationFromMldev(fromObject) {
|
|
17023
17095
|
const toObject = {};
|
|
17024
17096
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
17025
17097
|
if (fromName != null) {
|
|
@@ -17446,7 +17518,7 @@ class Tunings extends BaseModule {
|
|
|
17446
17518
|
return httpResponse.json();
|
|
17447
17519
|
});
|
|
17448
17520
|
return response.then((apiResponse) => {
|
|
17449
|
-
const resp =
|
|
17521
|
+
const resp = tuningOperationFromMldev(apiResponse);
|
|
17450
17522
|
return resp;
|
|
17451
17523
|
});
|
|
17452
17524
|
}
|