@google/genai 1.0.1 → 1.1.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 +5 -5
- package/dist/genai.d.ts +79 -21
- package/dist/index.cjs +14589 -0
- package/dist/index.mjs +453 -76
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +14994 -0
- package/dist/node/index.mjs +453 -76
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +79 -21
- package/dist/web/index.mjs +453 -76
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +79 -21
- package/package.json +5 -1
package/dist/index.mjs
CHANGED
|
@@ -195,6 +195,42 @@ var Language;
|
|
|
195
195
|
*/
|
|
196
196
|
Language["PYTHON"] = "PYTHON";
|
|
197
197
|
})(Language || (Language = {}));
|
|
198
|
+
/** Optional. The type of the data. */
|
|
199
|
+
var Type;
|
|
200
|
+
(function (Type) {
|
|
201
|
+
/**
|
|
202
|
+
* Not specified, should not be used.
|
|
203
|
+
*/
|
|
204
|
+
Type["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
205
|
+
/**
|
|
206
|
+
* OpenAPI string type
|
|
207
|
+
*/
|
|
208
|
+
Type["STRING"] = "STRING";
|
|
209
|
+
/**
|
|
210
|
+
* OpenAPI number type
|
|
211
|
+
*/
|
|
212
|
+
Type["NUMBER"] = "NUMBER";
|
|
213
|
+
/**
|
|
214
|
+
* OpenAPI integer type
|
|
215
|
+
*/
|
|
216
|
+
Type["INTEGER"] = "INTEGER";
|
|
217
|
+
/**
|
|
218
|
+
* OpenAPI boolean type
|
|
219
|
+
*/
|
|
220
|
+
Type["BOOLEAN"] = "BOOLEAN";
|
|
221
|
+
/**
|
|
222
|
+
* OpenAPI array type
|
|
223
|
+
*/
|
|
224
|
+
Type["ARRAY"] = "ARRAY";
|
|
225
|
+
/**
|
|
226
|
+
* OpenAPI object type
|
|
227
|
+
*/
|
|
228
|
+
Type["OBJECT"] = "OBJECT";
|
|
229
|
+
/**
|
|
230
|
+
* Null type
|
|
231
|
+
*/
|
|
232
|
+
Type["NULL"] = "NULL";
|
|
233
|
+
})(Type || (Type = {}));
|
|
198
234
|
/** Required. Harm category. */
|
|
199
235
|
var HarmCategory;
|
|
200
236
|
(function (HarmCategory) {
|
|
@@ -219,7 +255,7 @@ var HarmCategory;
|
|
|
219
255
|
*/
|
|
220
256
|
HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
221
257
|
/**
|
|
222
|
-
* The harm category is civic integrity.
|
|
258
|
+
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
223
259
|
*/
|
|
224
260
|
HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
|
|
225
261
|
})(HarmCategory || (HarmCategory = {}));
|
|
@@ -267,38 +303,6 @@ var HarmBlockThreshold;
|
|
|
267
303
|
*/
|
|
268
304
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
269
305
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
270
|
-
/** Optional. The type of the data. */
|
|
271
|
-
var Type;
|
|
272
|
-
(function (Type) {
|
|
273
|
-
/**
|
|
274
|
-
* Not specified, should not be used.
|
|
275
|
-
*/
|
|
276
|
-
Type["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
277
|
-
/**
|
|
278
|
-
* OpenAPI string type
|
|
279
|
-
*/
|
|
280
|
-
Type["STRING"] = "STRING";
|
|
281
|
-
/**
|
|
282
|
-
* OpenAPI number type
|
|
283
|
-
*/
|
|
284
|
-
Type["NUMBER"] = "NUMBER";
|
|
285
|
-
/**
|
|
286
|
-
* OpenAPI integer type
|
|
287
|
-
*/
|
|
288
|
-
Type["INTEGER"] = "INTEGER";
|
|
289
|
-
/**
|
|
290
|
-
* OpenAPI boolean type
|
|
291
|
-
*/
|
|
292
|
-
Type["BOOLEAN"] = "BOOLEAN";
|
|
293
|
-
/**
|
|
294
|
-
* OpenAPI array type
|
|
295
|
-
*/
|
|
296
|
-
Type["ARRAY"] = "ARRAY";
|
|
297
|
-
/**
|
|
298
|
-
* OpenAPI object type
|
|
299
|
-
*/
|
|
300
|
-
Type["OBJECT"] = "OBJECT";
|
|
301
|
-
})(Type || (Type = {}));
|
|
302
306
|
/** The mode of the predictor to be used in dynamic retrieval. */
|
|
303
307
|
var Mode;
|
|
304
308
|
(function (Mode) {
|
|
@@ -2438,6 +2442,21 @@ function blobToMldev$2(apiClient, fromObject) {
|
|
|
2438
2442
|
}
|
|
2439
2443
|
return toObject;
|
|
2440
2444
|
}
|
|
2445
|
+
function fileDataToMldev$2(apiClient, fromObject) {
|
|
2446
|
+
const toObject = {};
|
|
2447
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
2448
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
2449
|
+
}
|
|
2450
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
2451
|
+
if (fromFileUri != null) {
|
|
2452
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
2453
|
+
}
|
|
2454
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
2455
|
+
if (fromMimeType != null) {
|
|
2456
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
2457
|
+
}
|
|
2458
|
+
return toObject;
|
|
2459
|
+
}
|
|
2441
2460
|
function partToMldev$2(apiClient, fromObject) {
|
|
2442
2461
|
const toObject = {};
|
|
2443
2462
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -2454,6 +2473,10 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2454
2473
|
if (fromInlineData != null) {
|
|
2455
2474
|
setValueByPath(toObject, ['inlineData'], blobToMldev$2(apiClient, fromInlineData));
|
|
2456
2475
|
}
|
|
2476
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2477
|
+
if (fromFileData != null) {
|
|
2478
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$2(apiClient, fromFileData));
|
|
2479
|
+
}
|
|
2457
2480
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2458
2481
|
'codeExecutionResult',
|
|
2459
2482
|
]);
|
|
@@ -2466,10 +2489,6 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2466
2489
|
if (fromExecutableCode != null) {
|
|
2467
2490
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
2468
2491
|
}
|
|
2469
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2470
|
-
if (fromFileData != null) {
|
|
2471
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
2472
|
-
}
|
|
2473
2492
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
2474
2493
|
if (fromFunctionCall != null) {
|
|
2475
2494
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -2655,6 +2674,10 @@ function retrievalConfigToMldev$1(apiClient, fromObject) {
|
|
|
2655
2674
|
if (fromLatLng != null) {
|
|
2656
2675
|
setValueByPath(toObject, ['latLng'], latLngToMldev$1(apiClient, fromLatLng));
|
|
2657
2676
|
}
|
|
2677
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
2678
|
+
if (fromLanguageCode != null) {
|
|
2679
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
2680
|
+
}
|
|
2658
2681
|
return toObject;
|
|
2659
2682
|
}
|
|
2660
2683
|
function toolConfigToMldev$1(apiClient, fromObject) {
|
|
@@ -2834,6 +2857,22 @@ function blobToVertex$2(apiClient, fromObject) {
|
|
|
2834
2857
|
}
|
|
2835
2858
|
return toObject;
|
|
2836
2859
|
}
|
|
2860
|
+
function fileDataToVertex$2(apiClient, fromObject) {
|
|
2861
|
+
const toObject = {};
|
|
2862
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
2863
|
+
if (fromDisplayName != null) {
|
|
2864
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
2865
|
+
}
|
|
2866
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
2867
|
+
if (fromFileUri != null) {
|
|
2868
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
2869
|
+
}
|
|
2870
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
2871
|
+
if (fromMimeType != null) {
|
|
2872
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
2873
|
+
}
|
|
2874
|
+
return toObject;
|
|
2875
|
+
}
|
|
2837
2876
|
function partToVertex$2(apiClient, fromObject) {
|
|
2838
2877
|
const toObject = {};
|
|
2839
2878
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -2850,6 +2889,10 @@ function partToVertex$2(apiClient, fromObject) {
|
|
|
2850
2889
|
if (fromInlineData != null) {
|
|
2851
2890
|
setValueByPath(toObject, ['inlineData'], blobToVertex$2(apiClient, fromInlineData));
|
|
2852
2891
|
}
|
|
2892
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2893
|
+
if (fromFileData != null) {
|
|
2894
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$2(apiClient, fromFileData));
|
|
2895
|
+
}
|
|
2853
2896
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2854
2897
|
'codeExecutionResult',
|
|
2855
2898
|
]);
|
|
@@ -2862,10 +2905,6 @@ function partToVertex$2(apiClient, fromObject) {
|
|
|
2862
2905
|
if (fromExecutableCode != null) {
|
|
2863
2906
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
2864
2907
|
}
|
|
2865
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2866
|
-
if (fromFileData != null) {
|
|
2867
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
2868
|
-
}
|
|
2869
2908
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
2870
2909
|
if (fromFunctionCall != null) {
|
|
2871
2910
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -3102,6 +3141,10 @@ function retrievalConfigToVertex$1(apiClient, fromObject) {
|
|
|
3102
3141
|
if (fromLatLng != null) {
|
|
3103
3142
|
setValueByPath(toObject, ['latLng'], latLngToVertex$1(apiClient, fromLatLng));
|
|
3104
3143
|
}
|
|
3144
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
3145
|
+
if (fromLanguageCode != null) {
|
|
3146
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
3147
|
+
}
|
|
3105
3148
|
return toObject;
|
|
3106
3149
|
}
|
|
3107
3150
|
function toolConfigToVertex$1(apiClient, fromObject) {
|
|
@@ -4311,7 +4354,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
4311
4354
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
4312
4355
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
4313
4356
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
4314
|
-
const SDK_VERSION = '1.0
|
|
4357
|
+
const SDK_VERSION = '1.1.0'; // x-release-please-version
|
|
4315
4358
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
4316
4359
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
4317
4360
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -5635,6 +5678,37 @@ function blobToVertex$1(apiClient, fromObject) {
|
|
|
5635
5678
|
}
|
|
5636
5679
|
return toObject;
|
|
5637
5680
|
}
|
|
5681
|
+
function fileDataToMldev$1(apiClient, fromObject) {
|
|
5682
|
+
const toObject = {};
|
|
5683
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5684
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
5685
|
+
}
|
|
5686
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
5687
|
+
if (fromFileUri != null) {
|
|
5688
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
5689
|
+
}
|
|
5690
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
5691
|
+
if (fromMimeType != null) {
|
|
5692
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
5693
|
+
}
|
|
5694
|
+
return toObject;
|
|
5695
|
+
}
|
|
5696
|
+
function fileDataToVertex$1(apiClient, fromObject) {
|
|
5697
|
+
const toObject = {};
|
|
5698
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
5699
|
+
if (fromDisplayName != null) {
|
|
5700
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
5701
|
+
}
|
|
5702
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
5703
|
+
if (fromFileUri != null) {
|
|
5704
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
5705
|
+
}
|
|
5706
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
5707
|
+
if (fromMimeType != null) {
|
|
5708
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
5709
|
+
}
|
|
5710
|
+
return toObject;
|
|
5711
|
+
}
|
|
5638
5712
|
function partToMldev$1(apiClient, fromObject) {
|
|
5639
5713
|
const toObject = {};
|
|
5640
5714
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -5651,6 +5725,10 @@ function partToMldev$1(apiClient, fromObject) {
|
|
|
5651
5725
|
if (fromInlineData != null) {
|
|
5652
5726
|
setValueByPath(toObject, ['inlineData'], blobToMldev$1(apiClient, fromInlineData));
|
|
5653
5727
|
}
|
|
5728
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5729
|
+
if (fromFileData != null) {
|
|
5730
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$1(apiClient, fromFileData));
|
|
5731
|
+
}
|
|
5654
5732
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5655
5733
|
'codeExecutionResult',
|
|
5656
5734
|
]);
|
|
@@ -5663,10 +5741,6 @@ function partToMldev$1(apiClient, fromObject) {
|
|
|
5663
5741
|
if (fromExecutableCode != null) {
|
|
5664
5742
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
5665
5743
|
}
|
|
5666
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5667
|
-
if (fromFileData != null) {
|
|
5668
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
5669
|
-
}
|
|
5670
5744
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
5671
5745
|
if (fromFunctionCall != null) {
|
|
5672
5746
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -5699,6 +5773,10 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5699
5773
|
if (fromInlineData != null) {
|
|
5700
5774
|
setValueByPath(toObject, ['inlineData'], blobToVertex$1(apiClient, fromInlineData));
|
|
5701
5775
|
}
|
|
5776
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5777
|
+
if (fromFileData != null) {
|
|
5778
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(apiClient, fromFileData));
|
|
5779
|
+
}
|
|
5702
5780
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5703
5781
|
'codeExecutionResult',
|
|
5704
5782
|
]);
|
|
@@ -5711,10 +5789,6 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5711
5789
|
if (fromExecutableCode != null) {
|
|
5712
5790
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
5713
5791
|
}
|
|
5714
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5715
|
-
if (fromFileData != null) {
|
|
5716
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
5717
|
-
}
|
|
5718
5792
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
5719
5793
|
if (fromFunctionCall != null) {
|
|
5720
5794
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -6788,6 +6862,34 @@ function blobFromVertex$1(apiClient, fromObject) {
|
|
|
6788
6862
|
}
|
|
6789
6863
|
return toObject;
|
|
6790
6864
|
}
|
|
6865
|
+
function fileDataFromMldev$1(apiClient, fromObject) {
|
|
6866
|
+
const toObject = {};
|
|
6867
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6868
|
+
if (fromFileUri != null) {
|
|
6869
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
6870
|
+
}
|
|
6871
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6872
|
+
if (fromMimeType != null) {
|
|
6873
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6874
|
+
}
|
|
6875
|
+
return toObject;
|
|
6876
|
+
}
|
|
6877
|
+
function fileDataFromVertex$1(apiClient, fromObject) {
|
|
6878
|
+
const toObject = {};
|
|
6879
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
6880
|
+
if (fromDisplayName != null) {
|
|
6881
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
6882
|
+
}
|
|
6883
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6884
|
+
if (fromFileUri != null) {
|
|
6885
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
6886
|
+
}
|
|
6887
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6888
|
+
if (fromMimeType != null) {
|
|
6889
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6890
|
+
}
|
|
6891
|
+
return toObject;
|
|
6892
|
+
}
|
|
6791
6893
|
function partFromMldev$1(apiClient, fromObject) {
|
|
6792
6894
|
const toObject = {};
|
|
6793
6895
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -6804,6 +6906,10 @@ function partFromMldev$1(apiClient, fromObject) {
|
|
|
6804
6906
|
if (fromInlineData != null) {
|
|
6805
6907
|
setValueByPath(toObject, ['inlineData'], blobFromMldev$1(apiClient, fromInlineData));
|
|
6806
6908
|
}
|
|
6909
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6910
|
+
if (fromFileData != null) {
|
|
6911
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(apiClient, fromFileData));
|
|
6912
|
+
}
|
|
6807
6913
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6808
6914
|
'codeExecutionResult',
|
|
6809
6915
|
]);
|
|
@@ -6816,10 +6922,6 @@ function partFromMldev$1(apiClient, fromObject) {
|
|
|
6816
6922
|
if (fromExecutableCode != null) {
|
|
6817
6923
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
6818
6924
|
}
|
|
6819
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6820
|
-
if (fromFileData != null) {
|
|
6821
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
6822
|
-
}
|
|
6823
6925
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
6824
6926
|
if (fromFunctionCall != null) {
|
|
6825
6927
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -6852,6 +6954,10 @@ function partFromVertex$1(apiClient, fromObject) {
|
|
|
6852
6954
|
if (fromInlineData != null) {
|
|
6853
6955
|
setValueByPath(toObject, ['inlineData'], blobFromVertex$1(apiClient, fromInlineData));
|
|
6854
6956
|
}
|
|
6957
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6958
|
+
if (fromFileData != null) {
|
|
6959
|
+
setValueByPath(toObject, ['fileData'], fileDataFromVertex$1(apiClient, fromFileData));
|
|
6960
|
+
}
|
|
6855
6961
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6856
6962
|
'codeExecutionResult',
|
|
6857
6963
|
]);
|
|
@@ -6864,10 +6970,6 @@ function partFromVertex$1(apiClient, fromObject) {
|
|
|
6864
6970
|
if (fromExecutableCode != null) {
|
|
6865
6971
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
6866
6972
|
}
|
|
6867
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6868
|
-
if (fromFileData != null) {
|
|
6869
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
6870
|
-
}
|
|
6871
6973
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
6872
6974
|
if (fromFunctionCall != null) {
|
|
6873
6975
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -7683,6 +7785,21 @@ function blobToMldev(apiClient, fromObject) {
|
|
|
7683
7785
|
}
|
|
7684
7786
|
return toObject;
|
|
7685
7787
|
}
|
|
7788
|
+
function fileDataToMldev(apiClient, fromObject) {
|
|
7789
|
+
const toObject = {};
|
|
7790
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
7791
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
7792
|
+
}
|
|
7793
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
7794
|
+
if (fromFileUri != null) {
|
|
7795
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
7796
|
+
}
|
|
7797
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
7798
|
+
if (fromMimeType != null) {
|
|
7799
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
7800
|
+
}
|
|
7801
|
+
return toObject;
|
|
7802
|
+
}
|
|
7686
7803
|
function partToMldev(apiClient, fromObject) {
|
|
7687
7804
|
const toObject = {};
|
|
7688
7805
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7699,6 +7816,10 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7699
7816
|
if (fromInlineData != null) {
|
|
7700
7817
|
setValueByPath(toObject, ['inlineData'], blobToMldev(apiClient, fromInlineData));
|
|
7701
7818
|
}
|
|
7819
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7820
|
+
if (fromFileData != null) {
|
|
7821
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev(apiClient, fromFileData));
|
|
7822
|
+
}
|
|
7702
7823
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7703
7824
|
'codeExecutionResult',
|
|
7704
7825
|
]);
|
|
@@ -7711,10 +7832,6 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7711
7832
|
if (fromExecutableCode != null) {
|
|
7712
7833
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7713
7834
|
}
|
|
7714
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7715
|
-
if (fromFileData != null) {
|
|
7716
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
7717
|
-
}
|
|
7718
7835
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7719
7836
|
if (fromFunctionCall != null) {
|
|
7720
7837
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -7749,6 +7866,104 @@ function contentToMldev(apiClient, fromObject) {
|
|
|
7749
7866
|
}
|
|
7750
7867
|
return toObject;
|
|
7751
7868
|
}
|
|
7869
|
+
function schemaToMldev(apiClient, fromObject) {
|
|
7870
|
+
const toObject = {};
|
|
7871
|
+
const fromAnyOf = getValueByPath(fromObject, ['anyOf']);
|
|
7872
|
+
if (fromAnyOf != null) {
|
|
7873
|
+
setValueByPath(toObject, ['anyOf'], fromAnyOf);
|
|
7874
|
+
}
|
|
7875
|
+
const fromDefault = getValueByPath(fromObject, ['default']);
|
|
7876
|
+
if (fromDefault != null) {
|
|
7877
|
+
setValueByPath(toObject, ['default'], fromDefault);
|
|
7878
|
+
}
|
|
7879
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7880
|
+
if (fromDescription != null) {
|
|
7881
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
7882
|
+
}
|
|
7883
|
+
const fromEnum = getValueByPath(fromObject, ['enum']);
|
|
7884
|
+
if (fromEnum != null) {
|
|
7885
|
+
setValueByPath(toObject, ['enum'], fromEnum);
|
|
7886
|
+
}
|
|
7887
|
+
const fromExample = getValueByPath(fromObject, ['example']);
|
|
7888
|
+
if (fromExample != null) {
|
|
7889
|
+
setValueByPath(toObject, ['example'], fromExample);
|
|
7890
|
+
}
|
|
7891
|
+
const fromFormat = getValueByPath(fromObject, ['format']);
|
|
7892
|
+
if (fromFormat != null) {
|
|
7893
|
+
setValueByPath(toObject, ['format'], fromFormat);
|
|
7894
|
+
}
|
|
7895
|
+
const fromItems = getValueByPath(fromObject, ['items']);
|
|
7896
|
+
if (fromItems != null) {
|
|
7897
|
+
setValueByPath(toObject, ['items'], fromItems);
|
|
7898
|
+
}
|
|
7899
|
+
const fromMaxItems = getValueByPath(fromObject, ['maxItems']);
|
|
7900
|
+
if (fromMaxItems != null) {
|
|
7901
|
+
setValueByPath(toObject, ['maxItems'], fromMaxItems);
|
|
7902
|
+
}
|
|
7903
|
+
const fromMaxLength = getValueByPath(fromObject, ['maxLength']);
|
|
7904
|
+
if (fromMaxLength != null) {
|
|
7905
|
+
setValueByPath(toObject, ['maxLength'], fromMaxLength);
|
|
7906
|
+
}
|
|
7907
|
+
const fromMaxProperties = getValueByPath(fromObject, [
|
|
7908
|
+
'maxProperties',
|
|
7909
|
+
]);
|
|
7910
|
+
if (fromMaxProperties != null) {
|
|
7911
|
+
setValueByPath(toObject, ['maxProperties'], fromMaxProperties);
|
|
7912
|
+
}
|
|
7913
|
+
const fromMaximum = getValueByPath(fromObject, ['maximum']);
|
|
7914
|
+
if (fromMaximum != null) {
|
|
7915
|
+
setValueByPath(toObject, ['maximum'], fromMaximum);
|
|
7916
|
+
}
|
|
7917
|
+
const fromMinItems = getValueByPath(fromObject, ['minItems']);
|
|
7918
|
+
if (fromMinItems != null) {
|
|
7919
|
+
setValueByPath(toObject, ['minItems'], fromMinItems);
|
|
7920
|
+
}
|
|
7921
|
+
const fromMinLength = getValueByPath(fromObject, ['minLength']);
|
|
7922
|
+
if (fromMinLength != null) {
|
|
7923
|
+
setValueByPath(toObject, ['minLength'], fromMinLength);
|
|
7924
|
+
}
|
|
7925
|
+
const fromMinProperties = getValueByPath(fromObject, [
|
|
7926
|
+
'minProperties',
|
|
7927
|
+
]);
|
|
7928
|
+
if (fromMinProperties != null) {
|
|
7929
|
+
setValueByPath(toObject, ['minProperties'], fromMinProperties);
|
|
7930
|
+
}
|
|
7931
|
+
const fromMinimum = getValueByPath(fromObject, ['minimum']);
|
|
7932
|
+
if (fromMinimum != null) {
|
|
7933
|
+
setValueByPath(toObject, ['minimum'], fromMinimum);
|
|
7934
|
+
}
|
|
7935
|
+
const fromNullable = getValueByPath(fromObject, ['nullable']);
|
|
7936
|
+
if (fromNullable != null) {
|
|
7937
|
+
setValueByPath(toObject, ['nullable'], fromNullable);
|
|
7938
|
+
}
|
|
7939
|
+
const fromPattern = getValueByPath(fromObject, ['pattern']);
|
|
7940
|
+
if (fromPattern != null) {
|
|
7941
|
+
setValueByPath(toObject, ['pattern'], fromPattern);
|
|
7942
|
+
}
|
|
7943
|
+
const fromProperties = getValueByPath(fromObject, ['properties']);
|
|
7944
|
+
if (fromProperties != null) {
|
|
7945
|
+
setValueByPath(toObject, ['properties'], fromProperties);
|
|
7946
|
+
}
|
|
7947
|
+
const fromPropertyOrdering = getValueByPath(fromObject, [
|
|
7948
|
+
'propertyOrdering',
|
|
7949
|
+
]);
|
|
7950
|
+
if (fromPropertyOrdering != null) {
|
|
7951
|
+
setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);
|
|
7952
|
+
}
|
|
7953
|
+
const fromRequired = getValueByPath(fromObject, ['required']);
|
|
7954
|
+
if (fromRequired != null) {
|
|
7955
|
+
setValueByPath(toObject, ['required'], fromRequired);
|
|
7956
|
+
}
|
|
7957
|
+
const fromTitle = getValueByPath(fromObject, ['title']);
|
|
7958
|
+
if (fromTitle != null) {
|
|
7959
|
+
setValueByPath(toObject, ['title'], fromTitle);
|
|
7960
|
+
}
|
|
7961
|
+
const fromType = getValueByPath(fromObject, ['type']);
|
|
7962
|
+
if (fromType != null) {
|
|
7963
|
+
setValueByPath(toObject, ['type'], fromType);
|
|
7964
|
+
}
|
|
7965
|
+
return toObject;
|
|
7966
|
+
}
|
|
7752
7967
|
function safetySettingToMldev(apiClient, fromObject) {
|
|
7753
7968
|
const toObject = {};
|
|
7754
7969
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
@@ -7915,6 +8130,10 @@ function retrievalConfigToMldev(apiClient, fromObject) {
|
|
|
7915
8130
|
if (fromLatLng != null) {
|
|
7916
8131
|
setValueByPath(toObject, ['latLng'], latLngToMldev(apiClient, fromLatLng));
|
|
7917
8132
|
}
|
|
8133
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
8134
|
+
if (fromLanguageCode != null) {
|
|
8135
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8136
|
+
}
|
|
7918
8137
|
return toObject;
|
|
7919
8138
|
}
|
|
7920
8139
|
function toolConfigToMldev(apiClient, fromObject) {
|
|
@@ -8087,7 +8306,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
8087
8306
|
'responseSchema',
|
|
8088
8307
|
]);
|
|
8089
8308
|
if (fromResponseSchema != null) {
|
|
8090
|
-
setValueByPath(toObject, ['responseSchema'], tSchema(apiClient, fromResponseSchema));
|
|
8309
|
+
setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema)));
|
|
8091
8310
|
}
|
|
8092
8311
|
if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
|
|
8093
8312
|
throw new Error('routingConfig parameter is not supported in Gemini API.');
|
|
@@ -8548,6 +8767,22 @@ function blobToVertex(apiClient, fromObject) {
|
|
|
8548
8767
|
}
|
|
8549
8768
|
return toObject;
|
|
8550
8769
|
}
|
|
8770
|
+
function fileDataToVertex(apiClient, fromObject) {
|
|
8771
|
+
const toObject = {};
|
|
8772
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8773
|
+
if (fromDisplayName != null) {
|
|
8774
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8775
|
+
}
|
|
8776
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8777
|
+
if (fromFileUri != null) {
|
|
8778
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8779
|
+
}
|
|
8780
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8781
|
+
if (fromMimeType != null) {
|
|
8782
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8783
|
+
}
|
|
8784
|
+
return toObject;
|
|
8785
|
+
}
|
|
8551
8786
|
function partToVertex(apiClient, fromObject) {
|
|
8552
8787
|
const toObject = {};
|
|
8553
8788
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -8564,6 +8799,10 @@ function partToVertex(apiClient, fromObject) {
|
|
|
8564
8799
|
if (fromInlineData != null) {
|
|
8565
8800
|
setValueByPath(toObject, ['inlineData'], blobToVertex(apiClient, fromInlineData));
|
|
8566
8801
|
}
|
|
8802
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8803
|
+
if (fromFileData != null) {
|
|
8804
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex(apiClient, fromFileData));
|
|
8805
|
+
}
|
|
8567
8806
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
8568
8807
|
'codeExecutionResult',
|
|
8569
8808
|
]);
|
|
@@ -8576,10 +8815,6 @@ function partToVertex(apiClient, fromObject) {
|
|
|
8576
8815
|
if (fromExecutableCode != null) {
|
|
8577
8816
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
8578
8817
|
}
|
|
8579
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8580
|
-
if (fromFileData != null) {
|
|
8581
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
8582
|
-
}
|
|
8583
8818
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
8584
8819
|
if (fromFunctionCall != null) {
|
|
8585
8820
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -8614,6 +8849,104 @@ function contentToVertex(apiClient, fromObject) {
|
|
|
8614
8849
|
}
|
|
8615
8850
|
return toObject;
|
|
8616
8851
|
}
|
|
8852
|
+
function schemaToVertex(apiClient, fromObject) {
|
|
8853
|
+
const toObject = {};
|
|
8854
|
+
const fromAnyOf = getValueByPath(fromObject, ['anyOf']);
|
|
8855
|
+
if (fromAnyOf != null) {
|
|
8856
|
+
setValueByPath(toObject, ['anyOf'], fromAnyOf);
|
|
8857
|
+
}
|
|
8858
|
+
const fromDefault = getValueByPath(fromObject, ['default']);
|
|
8859
|
+
if (fromDefault != null) {
|
|
8860
|
+
setValueByPath(toObject, ['default'], fromDefault);
|
|
8861
|
+
}
|
|
8862
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
8863
|
+
if (fromDescription != null) {
|
|
8864
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
8865
|
+
}
|
|
8866
|
+
const fromEnum = getValueByPath(fromObject, ['enum']);
|
|
8867
|
+
if (fromEnum != null) {
|
|
8868
|
+
setValueByPath(toObject, ['enum'], fromEnum);
|
|
8869
|
+
}
|
|
8870
|
+
const fromExample = getValueByPath(fromObject, ['example']);
|
|
8871
|
+
if (fromExample != null) {
|
|
8872
|
+
setValueByPath(toObject, ['example'], fromExample);
|
|
8873
|
+
}
|
|
8874
|
+
const fromFormat = getValueByPath(fromObject, ['format']);
|
|
8875
|
+
if (fromFormat != null) {
|
|
8876
|
+
setValueByPath(toObject, ['format'], fromFormat);
|
|
8877
|
+
}
|
|
8878
|
+
const fromItems = getValueByPath(fromObject, ['items']);
|
|
8879
|
+
if (fromItems != null) {
|
|
8880
|
+
setValueByPath(toObject, ['items'], fromItems);
|
|
8881
|
+
}
|
|
8882
|
+
const fromMaxItems = getValueByPath(fromObject, ['maxItems']);
|
|
8883
|
+
if (fromMaxItems != null) {
|
|
8884
|
+
setValueByPath(toObject, ['maxItems'], fromMaxItems);
|
|
8885
|
+
}
|
|
8886
|
+
const fromMaxLength = getValueByPath(fromObject, ['maxLength']);
|
|
8887
|
+
if (fromMaxLength != null) {
|
|
8888
|
+
setValueByPath(toObject, ['maxLength'], fromMaxLength);
|
|
8889
|
+
}
|
|
8890
|
+
const fromMaxProperties = getValueByPath(fromObject, [
|
|
8891
|
+
'maxProperties',
|
|
8892
|
+
]);
|
|
8893
|
+
if (fromMaxProperties != null) {
|
|
8894
|
+
setValueByPath(toObject, ['maxProperties'], fromMaxProperties);
|
|
8895
|
+
}
|
|
8896
|
+
const fromMaximum = getValueByPath(fromObject, ['maximum']);
|
|
8897
|
+
if (fromMaximum != null) {
|
|
8898
|
+
setValueByPath(toObject, ['maximum'], fromMaximum);
|
|
8899
|
+
}
|
|
8900
|
+
const fromMinItems = getValueByPath(fromObject, ['minItems']);
|
|
8901
|
+
if (fromMinItems != null) {
|
|
8902
|
+
setValueByPath(toObject, ['minItems'], fromMinItems);
|
|
8903
|
+
}
|
|
8904
|
+
const fromMinLength = getValueByPath(fromObject, ['minLength']);
|
|
8905
|
+
if (fromMinLength != null) {
|
|
8906
|
+
setValueByPath(toObject, ['minLength'], fromMinLength);
|
|
8907
|
+
}
|
|
8908
|
+
const fromMinProperties = getValueByPath(fromObject, [
|
|
8909
|
+
'minProperties',
|
|
8910
|
+
]);
|
|
8911
|
+
if (fromMinProperties != null) {
|
|
8912
|
+
setValueByPath(toObject, ['minProperties'], fromMinProperties);
|
|
8913
|
+
}
|
|
8914
|
+
const fromMinimum = getValueByPath(fromObject, ['minimum']);
|
|
8915
|
+
if (fromMinimum != null) {
|
|
8916
|
+
setValueByPath(toObject, ['minimum'], fromMinimum);
|
|
8917
|
+
}
|
|
8918
|
+
const fromNullable = getValueByPath(fromObject, ['nullable']);
|
|
8919
|
+
if (fromNullable != null) {
|
|
8920
|
+
setValueByPath(toObject, ['nullable'], fromNullable);
|
|
8921
|
+
}
|
|
8922
|
+
const fromPattern = getValueByPath(fromObject, ['pattern']);
|
|
8923
|
+
if (fromPattern != null) {
|
|
8924
|
+
setValueByPath(toObject, ['pattern'], fromPattern);
|
|
8925
|
+
}
|
|
8926
|
+
const fromProperties = getValueByPath(fromObject, ['properties']);
|
|
8927
|
+
if (fromProperties != null) {
|
|
8928
|
+
setValueByPath(toObject, ['properties'], fromProperties);
|
|
8929
|
+
}
|
|
8930
|
+
const fromPropertyOrdering = getValueByPath(fromObject, [
|
|
8931
|
+
'propertyOrdering',
|
|
8932
|
+
]);
|
|
8933
|
+
if (fromPropertyOrdering != null) {
|
|
8934
|
+
setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);
|
|
8935
|
+
}
|
|
8936
|
+
const fromRequired = getValueByPath(fromObject, ['required']);
|
|
8937
|
+
if (fromRequired != null) {
|
|
8938
|
+
setValueByPath(toObject, ['required'], fromRequired);
|
|
8939
|
+
}
|
|
8940
|
+
const fromTitle = getValueByPath(fromObject, ['title']);
|
|
8941
|
+
if (fromTitle != null) {
|
|
8942
|
+
setValueByPath(toObject, ['title'], fromTitle);
|
|
8943
|
+
}
|
|
8944
|
+
const fromType = getValueByPath(fromObject, ['type']);
|
|
8945
|
+
if (fromType != null) {
|
|
8946
|
+
setValueByPath(toObject, ['type'], fromType);
|
|
8947
|
+
}
|
|
8948
|
+
return toObject;
|
|
8949
|
+
}
|
|
8617
8950
|
function modelSelectionConfigToVertex(apiClient, fromObject) {
|
|
8618
8951
|
const toObject = {};
|
|
8619
8952
|
const fromFeatureSelectionPreference = getValueByPath(fromObject, [
|
|
@@ -8842,6 +9175,10 @@ function retrievalConfigToVertex(apiClient, fromObject) {
|
|
|
8842
9175
|
if (fromLatLng != null) {
|
|
8843
9176
|
setValueByPath(toObject, ['latLng'], latLngToVertex(apiClient, fromLatLng));
|
|
8844
9177
|
}
|
|
9178
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
9179
|
+
if (fromLanguageCode != null) {
|
|
9180
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
9181
|
+
}
|
|
8845
9182
|
return toObject;
|
|
8846
9183
|
}
|
|
8847
9184
|
function toolConfigToVertex(apiClient, fromObject) {
|
|
@@ -8983,7 +9320,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
8983
9320
|
'responseSchema',
|
|
8984
9321
|
]);
|
|
8985
9322
|
if (fromResponseSchema != null) {
|
|
8986
|
-
setValueByPath(toObject, ['responseSchema'], tSchema(apiClient, fromResponseSchema));
|
|
9323
|
+
setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema)));
|
|
8987
9324
|
}
|
|
8988
9325
|
const fromRoutingConfig = getValueByPath(fromObject, [
|
|
8989
9326
|
'routingConfig',
|
|
@@ -9765,6 +10102,18 @@ function blobFromMldev(apiClient, fromObject) {
|
|
|
9765
10102
|
}
|
|
9766
10103
|
return toObject;
|
|
9767
10104
|
}
|
|
10105
|
+
function fileDataFromMldev(apiClient, fromObject) {
|
|
10106
|
+
const toObject = {};
|
|
10107
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
10108
|
+
if (fromFileUri != null) {
|
|
10109
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
10110
|
+
}
|
|
10111
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
10112
|
+
if (fromMimeType != null) {
|
|
10113
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
10114
|
+
}
|
|
10115
|
+
return toObject;
|
|
10116
|
+
}
|
|
9768
10117
|
function partFromMldev(apiClient, fromObject) {
|
|
9769
10118
|
const toObject = {};
|
|
9770
10119
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -9781,6 +10130,10 @@ function partFromMldev(apiClient, fromObject) {
|
|
|
9781
10130
|
if (fromInlineData != null) {
|
|
9782
10131
|
setValueByPath(toObject, ['inlineData'], blobFromMldev(apiClient, fromInlineData));
|
|
9783
10132
|
}
|
|
10133
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
10134
|
+
if (fromFileData != null) {
|
|
10135
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev(apiClient, fromFileData));
|
|
10136
|
+
}
|
|
9784
10137
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
9785
10138
|
'codeExecutionResult',
|
|
9786
10139
|
]);
|
|
@@ -9793,10 +10146,6 @@ function partFromMldev(apiClient, fromObject) {
|
|
|
9793
10146
|
if (fromExecutableCode != null) {
|
|
9794
10147
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
9795
10148
|
}
|
|
9796
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
9797
|
-
if (fromFileData != null) {
|
|
9798
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
9799
|
-
}
|
|
9800
10149
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
9801
10150
|
if (fromFunctionCall != null) {
|
|
9802
10151
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -10267,6 +10616,22 @@ function blobFromVertex(apiClient, fromObject) {
|
|
|
10267
10616
|
}
|
|
10268
10617
|
return toObject;
|
|
10269
10618
|
}
|
|
10619
|
+
function fileDataFromVertex(apiClient, fromObject) {
|
|
10620
|
+
const toObject = {};
|
|
10621
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
10622
|
+
if (fromDisplayName != null) {
|
|
10623
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
10624
|
+
}
|
|
10625
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
10626
|
+
if (fromFileUri != null) {
|
|
10627
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
10628
|
+
}
|
|
10629
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
10630
|
+
if (fromMimeType != null) {
|
|
10631
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
10632
|
+
}
|
|
10633
|
+
return toObject;
|
|
10634
|
+
}
|
|
10270
10635
|
function partFromVertex(apiClient, fromObject) {
|
|
10271
10636
|
const toObject = {};
|
|
10272
10637
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -10283,6 +10648,10 @@ function partFromVertex(apiClient, fromObject) {
|
|
|
10283
10648
|
if (fromInlineData != null) {
|
|
10284
10649
|
setValueByPath(toObject, ['inlineData'], blobFromVertex(apiClient, fromInlineData));
|
|
10285
10650
|
}
|
|
10651
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
10652
|
+
if (fromFileData != null) {
|
|
10653
|
+
setValueByPath(toObject, ['fileData'], fileDataFromVertex(apiClient, fromFileData));
|
|
10654
|
+
}
|
|
10286
10655
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
10287
10656
|
'codeExecutionResult',
|
|
10288
10657
|
]);
|
|
@@ -10295,10 +10664,6 @@ function partFromVertex(apiClient, fromObject) {
|
|
|
10295
10664
|
if (fromExecutableCode != null) {
|
|
10296
10665
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
10297
10666
|
}
|
|
10298
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
10299
|
-
if (fromFileData != null) {
|
|
10300
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
10301
|
-
}
|
|
10302
10667
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
10303
10668
|
if (fromFunctionCall != null) {
|
|
10304
10669
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -13622,6 +13987,12 @@ function tuningJobFromMldev(apiClient, fromObject) {
|
|
|
13622
13987
|
if (fromPipelineJob != null) {
|
|
13623
13988
|
setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
|
|
13624
13989
|
}
|
|
13990
|
+
const fromServiceAccount = getValueByPath(fromObject, [
|
|
13991
|
+
'serviceAccount',
|
|
13992
|
+
]);
|
|
13993
|
+
if (fromServiceAccount != null) {
|
|
13994
|
+
setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
|
|
13995
|
+
}
|
|
13625
13996
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
13626
13997
|
'tunedModelDisplayName',
|
|
13627
13998
|
]);
|
|
@@ -13796,6 +14167,12 @@ function tuningJobFromVertex(apiClient, fromObject) {
|
|
|
13796
14167
|
if (fromPipelineJob != null) {
|
|
13797
14168
|
setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
|
|
13798
14169
|
}
|
|
14170
|
+
const fromServiceAccount = getValueByPath(fromObject, [
|
|
14171
|
+
'serviceAccount',
|
|
14172
|
+
]);
|
|
14173
|
+
if (fromServiceAccount != null) {
|
|
14174
|
+
setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
|
|
14175
|
+
}
|
|
13799
14176
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
13800
14177
|
'tunedModelDisplayName',
|
|
13801
14178
|
]);
|