@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/web/index.mjs
CHANGED
|
@@ -225,6 +225,42 @@ var Language;
|
|
|
225
225
|
*/
|
|
226
226
|
Language["PYTHON"] = "PYTHON";
|
|
227
227
|
})(Language || (Language = {}));
|
|
228
|
+
/** Optional. The type of the data. */
|
|
229
|
+
var Type;
|
|
230
|
+
(function (Type) {
|
|
231
|
+
/**
|
|
232
|
+
* Not specified, should not be used.
|
|
233
|
+
*/
|
|
234
|
+
Type["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
235
|
+
/**
|
|
236
|
+
* OpenAPI string type
|
|
237
|
+
*/
|
|
238
|
+
Type["STRING"] = "STRING";
|
|
239
|
+
/**
|
|
240
|
+
* OpenAPI number type
|
|
241
|
+
*/
|
|
242
|
+
Type["NUMBER"] = "NUMBER";
|
|
243
|
+
/**
|
|
244
|
+
* OpenAPI integer type
|
|
245
|
+
*/
|
|
246
|
+
Type["INTEGER"] = "INTEGER";
|
|
247
|
+
/**
|
|
248
|
+
* OpenAPI boolean type
|
|
249
|
+
*/
|
|
250
|
+
Type["BOOLEAN"] = "BOOLEAN";
|
|
251
|
+
/**
|
|
252
|
+
* OpenAPI array type
|
|
253
|
+
*/
|
|
254
|
+
Type["ARRAY"] = "ARRAY";
|
|
255
|
+
/**
|
|
256
|
+
* OpenAPI object type
|
|
257
|
+
*/
|
|
258
|
+
Type["OBJECT"] = "OBJECT";
|
|
259
|
+
/**
|
|
260
|
+
* Null type
|
|
261
|
+
*/
|
|
262
|
+
Type["NULL"] = "NULL";
|
|
263
|
+
})(Type || (Type = {}));
|
|
228
264
|
/** Required. Harm category. */
|
|
229
265
|
var HarmCategory;
|
|
230
266
|
(function (HarmCategory) {
|
|
@@ -249,7 +285,7 @@ var HarmCategory;
|
|
|
249
285
|
*/
|
|
250
286
|
HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
251
287
|
/**
|
|
252
|
-
* The harm category is civic integrity.
|
|
288
|
+
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
253
289
|
*/
|
|
254
290
|
HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
|
|
255
291
|
})(HarmCategory || (HarmCategory = {}));
|
|
@@ -297,38 +333,6 @@ var HarmBlockThreshold;
|
|
|
297
333
|
*/
|
|
298
334
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
299
335
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
300
|
-
/** Optional. The type of the data. */
|
|
301
|
-
var Type;
|
|
302
|
-
(function (Type) {
|
|
303
|
-
/**
|
|
304
|
-
* Not specified, should not be used.
|
|
305
|
-
*/
|
|
306
|
-
Type["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
307
|
-
/**
|
|
308
|
-
* OpenAPI string type
|
|
309
|
-
*/
|
|
310
|
-
Type["STRING"] = "STRING";
|
|
311
|
-
/**
|
|
312
|
-
* OpenAPI number type
|
|
313
|
-
*/
|
|
314
|
-
Type["NUMBER"] = "NUMBER";
|
|
315
|
-
/**
|
|
316
|
-
* OpenAPI integer type
|
|
317
|
-
*/
|
|
318
|
-
Type["INTEGER"] = "INTEGER";
|
|
319
|
-
/**
|
|
320
|
-
* OpenAPI boolean type
|
|
321
|
-
*/
|
|
322
|
-
Type["BOOLEAN"] = "BOOLEAN";
|
|
323
|
-
/**
|
|
324
|
-
* OpenAPI array type
|
|
325
|
-
*/
|
|
326
|
-
Type["ARRAY"] = "ARRAY";
|
|
327
|
-
/**
|
|
328
|
-
* OpenAPI object type
|
|
329
|
-
*/
|
|
330
|
-
Type["OBJECT"] = "OBJECT";
|
|
331
|
-
})(Type || (Type = {}));
|
|
332
336
|
/** The mode of the predictor to be used in dynamic retrieval. */
|
|
333
337
|
var Mode;
|
|
334
338
|
(function (Mode) {
|
|
@@ -2468,6 +2472,21 @@ function blobToMldev$2(apiClient, fromObject) {
|
|
|
2468
2472
|
}
|
|
2469
2473
|
return toObject;
|
|
2470
2474
|
}
|
|
2475
|
+
function fileDataToMldev$2(apiClient, fromObject) {
|
|
2476
|
+
const toObject = {};
|
|
2477
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
2478
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
2479
|
+
}
|
|
2480
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
2481
|
+
if (fromFileUri != null) {
|
|
2482
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
2483
|
+
}
|
|
2484
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
2485
|
+
if (fromMimeType != null) {
|
|
2486
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
2487
|
+
}
|
|
2488
|
+
return toObject;
|
|
2489
|
+
}
|
|
2471
2490
|
function partToMldev$2(apiClient, fromObject) {
|
|
2472
2491
|
const toObject = {};
|
|
2473
2492
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -2484,6 +2503,10 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2484
2503
|
if (fromInlineData != null) {
|
|
2485
2504
|
setValueByPath(toObject, ['inlineData'], blobToMldev$2(apiClient, fromInlineData));
|
|
2486
2505
|
}
|
|
2506
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2507
|
+
if (fromFileData != null) {
|
|
2508
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$2(apiClient, fromFileData));
|
|
2509
|
+
}
|
|
2487
2510
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2488
2511
|
'codeExecutionResult',
|
|
2489
2512
|
]);
|
|
@@ -2496,10 +2519,6 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2496
2519
|
if (fromExecutableCode != null) {
|
|
2497
2520
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
2498
2521
|
}
|
|
2499
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2500
|
-
if (fromFileData != null) {
|
|
2501
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
2502
|
-
}
|
|
2503
2522
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
2504
2523
|
if (fromFunctionCall != null) {
|
|
2505
2524
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -2685,6 +2704,10 @@ function retrievalConfigToMldev$1(apiClient, fromObject) {
|
|
|
2685
2704
|
if (fromLatLng != null) {
|
|
2686
2705
|
setValueByPath(toObject, ['latLng'], latLngToMldev$1(apiClient, fromLatLng));
|
|
2687
2706
|
}
|
|
2707
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
2708
|
+
if (fromLanguageCode != null) {
|
|
2709
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
2710
|
+
}
|
|
2688
2711
|
return toObject;
|
|
2689
2712
|
}
|
|
2690
2713
|
function toolConfigToMldev$1(apiClient, fromObject) {
|
|
@@ -2864,6 +2887,22 @@ function blobToVertex$2(apiClient, fromObject) {
|
|
|
2864
2887
|
}
|
|
2865
2888
|
return toObject;
|
|
2866
2889
|
}
|
|
2890
|
+
function fileDataToVertex$2(apiClient, fromObject) {
|
|
2891
|
+
const toObject = {};
|
|
2892
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
2893
|
+
if (fromDisplayName != null) {
|
|
2894
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
2895
|
+
}
|
|
2896
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
2897
|
+
if (fromFileUri != null) {
|
|
2898
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
2899
|
+
}
|
|
2900
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
2901
|
+
if (fromMimeType != null) {
|
|
2902
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
2903
|
+
}
|
|
2904
|
+
return toObject;
|
|
2905
|
+
}
|
|
2867
2906
|
function partToVertex$2(apiClient, fromObject) {
|
|
2868
2907
|
const toObject = {};
|
|
2869
2908
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -2880,6 +2919,10 @@ function partToVertex$2(apiClient, fromObject) {
|
|
|
2880
2919
|
if (fromInlineData != null) {
|
|
2881
2920
|
setValueByPath(toObject, ['inlineData'], blobToVertex$2(apiClient, fromInlineData));
|
|
2882
2921
|
}
|
|
2922
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2923
|
+
if (fromFileData != null) {
|
|
2924
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$2(apiClient, fromFileData));
|
|
2925
|
+
}
|
|
2883
2926
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2884
2927
|
'codeExecutionResult',
|
|
2885
2928
|
]);
|
|
@@ -2892,10 +2935,6 @@ function partToVertex$2(apiClient, fromObject) {
|
|
|
2892
2935
|
if (fromExecutableCode != null) {
|
|
2893
2936
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
2894
2937
|
}
|
|
2895
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2896
|
-
if (fromFileData != null) {
|
|
2897
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
2898
|
-
}
|
|
2899
2938
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
2900
2939
|
if (fromFunctionCall != null) {
|
|
2901
2940
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -3132,6 +3171,10 @@ function retrievalConfigToVertex$1(apiClient, fromObject) {
|
|
|
3132
3171
|
if (fromLatLng != null) {
|
|
3133
3172
|
setValueByPath(toObject, ['latLng'], latLngToVertex$1(apiClient, fromLatLng));
|
|
3134
3173
|
}
|
|
3174
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
3175
|
+
if (fromLanguageCode != null) {
|
|
3176
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
3177
|
+
}
|
|
3135
3178
|
return toObject;
|
|
3136
3179
|
}
|
|
3137
3180
|
function toolConfigToVertex$1(apiClient, fromObject) {
|
|
@@ -5018,6 +5061,37 @@ function blobToVertex$1(apiClient, fromObject) {
|
|
|
5018
5061
|
}
|
|
5019
5062
|
return toObject;
|
|
5020
5063
|
}
|
|
5064
|
+
function fileDataToMldev$1(apiClient, fromObject) {
|
|
5065
|
+
const toObject = {};
|
|
5066
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5067
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
5068
|
+
}
|
|
5069
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
5070
|
+
if (fromFileUri != null) {
|
|
5071
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
5072
|
+
}
|
|
5073
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
5074
|
+
if (fromMimeType != null) {
|
|
5075
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
5076
|
+
}
|
|
5077
|
+
return toObject;
|
|
5078
|
+
}
|
|
5079
|
+
function fileDataToVertex$1(apiClient, fromObject) {
|
|
5080
|
+
const toObject = {};
|
|
5081
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
5082
|
+
if (fromDisplayName != null) {
|
|
5083
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
5084
|
+
}
|
|
5085
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
5086
|
+
if (fromFileUri != null) {
|
|
5087
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
5088
|
+
}
|
|
5089
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
5090
|
+
if (fromMimeType != null) {
|
|
5091
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
5092
|
+
}
|
|
5093
|
+
return toObject;
|
|
5094
|
+
}
|
|
5021
5095
|
function partToMldev$1(apiClient, fromObject) {
|
|
5022
5096
|
const toObject = {};
|
|
5023
5097
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -5034,6 +5108,10 @@ function partToMldev$1(apiClient, fromObject) {
|
|
|
5034
5108
|
if (fromInlineData != null) {
|
|
5035
5109
|
setValueByPath(toObject, ['inlineData'], blobToMldev$1(apiClient, fromInlineData));
|
|
5036
5110
|
}
|
|
5111
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5112
|
+
if (fromFileData != null) {
|
|
5113
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$1(apiClient, fromFileData));
|
|
5114
|
+
}
|
|
5037
5115
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5038
5116
|
'codeExecutionResult',
|
|
5039
5117
|
]);
|
|
@@ -5046,10 +5124,6 @@ function partToMldev$1(apiClient, fromObject) {
|
|
|
5046
5124
|
if (fromExecutableCode != null) {
|
|
5047
5125
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
5048
5126
|
}
|
|
5049
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5050
|
-
if (fromFileData != null) {
|
|
5051
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
5052
|
-
}
|
|
5053
5127
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
5054
5128
|
if (fromFunctionCall != null) {
|
|
5055
5129
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -5082,6 +5156,10 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5082
5156
|
if (fromInlineData != null) {
|
|
5083
5157
|
setValueByPath(toObject, ['inlineData'], blobToVertex$1(apiClient, fromInlineData));
|
|
5084
5158
|
}
|
|
5159
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5160
|
+
if (fromFileData != null) {
|
|
5161
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(apiClient, fromFileData));
|
|
5162
|
+
}
|
|
5085
5163
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5086
5164
|
'codeExecutionResult',
|
|
5087
5165
|
]);
|
|
@@ -5094,10 +5172,6 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5094
5172
|
if (fromExecutableCode != null) {
|
|
5095
5173
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
5096
5174
|
}
|
|
5097
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5098
|
-
if (fromFileData != null) {
|
|
5099
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
5100
|
-
}
|
|
5101
5175
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
5102
5176
|
if (fromFunctionCall != null) {
|
|
5103
5177
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -6171,6 +6245,34 @@ function blobFromVertex$1(apiClient, fromObject) {
|
|
|
6171
6245
|
}
|
|
6172
6246
|
return toObject;
|
|
6173
6247
|
}
|
|
6248
|
+
function fileDataFromMldev$1(apiClient, fromObject) {
|
|
6249
|
+
const toObject = {};
|
|
6250
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6251
|
+
if (fromFileUri != null) {
|
|
6252
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
6253
|
+
}
|
|
6254
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6255
|
+
if (fromMimeType != null) {
|
|
6256
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6257
|
+
}
|
|
6258
|
+
return toObject;
|
|
6259
|
+
}
|
|
6260
|
+
function fileDataFromVertex$1(apiClient, fromObject) {
|
|
6261
|
+
const toObject = {};
|
|
6262
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
6263
|
+
if (fromDisplayName != null) {
|
|
6264
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
6265
|
+
}
|
|
6266
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6267
|
+
if (fromFileUri != null) {
|
|
6268
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
6269
|
+
}
|
|
6270
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6271
|
+
if (fromMimeType != null) {
|
|
6272
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6273
|
+
}
|
|
6274
|
+
return toObject;
|
|
6275
|
+
}
|
|
6174
6276
|
function partFromMldev$1(apiClient, fromObject) {
|
|
6175
6277
|
const toObject = {};
|
|
6176
6278
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -6187,6 +6289,10 @@ function partFromMldev$1(apiClient, fromObject) {
|
|
|
6187
6289
|
if (fromInlineData != null) {
|
|
6188
6290
|
setValueByPath(toObject, ['inlineData'], blobFromMldev$1(apiClient, fromInlineData));
|
|
6189
6291
|
}
|
|
6292
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6293
|
+
if (fromFileData != null) {
|
|
6294
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(apiClient, fromFileData));
|
|
6295
|
+
}
|
|
6190
6296
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6191
6297
|
'codeExecutionResult',
|
|
6192
6298
|
]);
|
|
@@ -6199,10 +6305,6 @@ function partFromMldev$1(apiClient, fromObject) {
|
|
|
6199
6305
|
if (fromExecutableCode != null) {
|
|
6200
6306
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
6201
6307
|
}
|
|
6202
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6203
|
-
if (fromFileData != null) {
|
|
6204
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
6205
|
-
}
|
|
6206
6308
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
6207
6309
|
if (fromFunctionCall != null) {
|
|
6208
6310
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -6235,6 +6337,10 @@ function partFromVertex$1(apiClient, fromObject) {
|
|
|
6235
6337
|
if (fromInlineData != null) {
|
|
6236
6338
|
setValueByPath(toObject, ['inlineData'], blobFromVertex$1(apiClient, fromInlineData));
|
|
6237
6339
|
}
|
|
6340
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6341
|
+
if (fromFileData != null) {
|
|
6342
|
+
setValueByPath(toObject, ['fileData'], fileDataFromVertex$1(apiClient, fromFileData));
|
|
6343
|
+
}
|
|
6238
6344
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6239
6345
|
'codeExecutionResult',
|
|
6240
6346
|
]);
|
|
@@ -6247,10 +6353,6 @@ function partFromVertex$1(apiClient, fromObject) {
|
|
|
6247
6353
|
if (fromExecutableCode != null) {
|
|
6248
6354
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
6249
6355
|
}
|
|
6250
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6251
|
-
if (fromFileData != null) {
|
|
6252
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
6253
|
-
}
|
|
6254
6356
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
6255
6357
|
if (fromFunctionCall != null) {
|
|
6256
6358
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -7066,6 +7168,21 @@ function blobToMldev(apiClient, fromObject) {
|
|
|
7066
7168
|
}
|
|
7067
7169
|
return toObject;
|
|
7068
7170
|
}
|
|
7171
|
+
function fileDataToMldev(apiClient, fromObject) {
|
|
7172
|
+
const toObject = {};
|
|
7173
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
7174
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
7175
|
+
}
|
|
7176
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
7177
|
+
if (fromFileUri != null) {
|
|
7178
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
7179
|
+
}
|
|
7180
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
7181
|
+
if (fromMimeType != null) {
|
|
7182
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
7183
|
+
}
|
|
7184
|
+
return toObject;
|
|
7185
|
+
}
|
|
7069
7186
|
function partToMldev(apiClient, fromObject) {
|
|
7070
7187
|
const toObject = {};
|
|
7071
7188
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7082,6 +7199,10 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7082
7199
|
if (fromInlineData != null) {
|
|
7083
7200
|
setValueByPath(toObject, ['inlineData'], blobToMldev(apiClient, fromInlineData));
|
|
7084
7201
|
}
|
|
7202
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7203
|
+
if (fromFileData != null) {
|
|
7204
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev(apiClient, fromFileData));
|
|
7205
|
+
}
|
|
7085
7206
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7086
7207
|
'codeExecutionResult',
|
|
7087
7208
|
]);
|
|
@@ -7094,10 +7215,6 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7094
7215
|
if (fromExecutableCode != null) {
|
|
7095
7216
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7096
7217
|
}
|
|
7097
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7098
|
-
if (fromFileData != null) {
|
|
7099
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
7100
|
-
}
|
|
7101
7218
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7102
7219
|
if (fromFunctionCall != null) {
|
|
7103
7220
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -7132,6 +7249,104 @@ function contentToMldev(apiClient, fromObject) {
|
|
|
7132
7249
|
}
|
|
7133
7250
|
return toObject;
|
|
7134
7251
|
}
|
|
7252
|
+
function schemaToMldev(apiClient, fromObject) {
|
|
7253
|
+
const toObject = {};
|
|
7254
|
+
const fromAnyOf = getValueByPath(fromObject, ['anyOf']);
|
|
7255
|
+
if (fromAnyOf != null) {
|
|
7256
|
+
setValueByPath(toObject, ['anyOf'], fromAnyOf);
|
|
7257
|
+
}
|
|
7258
|
+
const fromDefault = getValueByPath(fromObject, ['default']);
|
|
7259
|
+
if (fromDefault != null) {
|
|
7260
|
+
setValueByPath(toObject, ['default'], fromDefault);
|
|
7261
|
+
}
|
|
7262
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7263
|
+
if (fromDescription != null) {
|
|
7264
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
7265
|
+
}
|
|
7266
|
+
const fromEnum = getValueByPath(fromObject, ['enum']);
|
|
7267
|
+
if (fromEnum != null) {
|
|
7268
|
+
setValueByPath(toObject, ['enum'], fromEnum);
|
|
7269
|
+
}
|
|
7270
|
+
const fromExample = getValueByPath(fromObject, ['example']);
|
|
7271
|
+
if (fromExample != null) {
|
|
7272
|
+
setValueByPath(toObject, ['example'], fromExample);
|
|
7273
|
+
}
|
|
7274
|
+
const fromFormat = getValueByPath(fromObject, ['format']);
|
|
7275
|
+
if (fromFormat != null) {
|
|
7276
|
+
setValueByPath(toObject, ['format'], fromFormat);
|
|
7277
|
+
}
|
|
7278
|
+
const fromItems = getValueByPath(fromObject, ['items']);
|
|
7279
|
+
if (fromItems != null) {
|
|
7280
|
+
setValueByPath(toObject, ['items'], fromItems);
|
|
7281
|
+
}
|
|
7282
|
+
const fromMaxItems = getValueByPath(fromObject, ['maxItems']);
|
|
7283
|
+
if (fromMaxItems != null) {
|
|
7284
|
+
setValueByPath(toObject, ['maxItems'], fromMaxItems);
|
|
7285
|
+
}
|
|
7286
|
+
const fromMaxLength = getValueByPath(fromObject, ['maxLength']);
|
|
7287
|
+
if (fromMaxLength != null) {
|
|
7288
|
+
setValueByPath(toObject, ['maxLength'], fromMaxLength);
|
|
7289
|
+
}
|
|
7290
|
+
const fromMaxProperties = getValueByPath(fromObject, [
|
|
7291
|
+
'maxProperties',
|
|
7292
|
+
]);
|
|
7293
|
+
if (fromMaxProperties != null) {
|
|
7294
|
+
setValueByPath(toObject, ['maxProperties'], fromMaxProperties);
|
|
7295
|
+
}
|
|
7296
|
+
const fromMaximum = getValueByPath(fromObject, ['maximum']);
|
|
7297
|
+
if (fromMaximum != null) {
|
|
7298
|
+
setValueByPath(toObject, ['maximum'], fromMaximum);
|
|
7299
|
+
}
|
|
7300
|
+
const fromMinItems = getValueByPath(fromObject, ['minItems']);
|
|
7301
|
+
if (fromMinItems != null) {
|
|
7302
|
+
setValueByPath(toObject, ['minItems'], fromMinItems);
|
|
7303
|
+
}
|
|
7304
|
+
const fromMinLength = getValueByPath(fromObject, ['minLength']);
|
|
7305
|
+
if (fromMinLength != null) {
|
|
7306
|
+
setValueByPath(toObject, ['minLength'], fromMinLength);
|
|
7307
|
+
}
|
|
7308
|
+
const fromMinProperties = getValueByPath(fromObject, [
|
|
7309
|
+
'minProperties',
|
|
7310
|
+
]);
|
|
7311
|
+
if (fromMinProperties != null) {
|
|
7312
|
+
setValueByPath(toObject, ['minProperties'], fromMinProperties);
|
|
7313
|
+
}
|
|
7314
|
+
const fromMinimum = getValueByPath(fromObject, ['minimum']);
|
|
7315
|
+
if (fromMinimum != null) {
|
|
7316
|
+
setValueByPath(toObject, ['minimum'], fromMinimum);
|
|
7317
|
+
}
|
|
7318
|
+
const fromNullable = getValueByPath(fromObject, ['nullable']);
|
|
7319
|
+
if (fromNullable != null) {
|
|
7320
|
+
setValueByPath(toObject, ['nullable'], fromNullable);
|
|
7321
|
+
}
|
|
7322
|
+
const fromPattern = getValueByPath(fromObject, ['pattern']);
|
|
7323
|
+
if (fromPattern != null) {
|
|
7324
|
+
setValueByPath(toObject, ['pattern'], fromPattern);
|
|
7325
|
+
}
|
|
7326
|
+
const fromProperties = getValueByPath(fromObject, ['properties']);
|
|
7327
|
+
if (fromProperties != null) {
|
|
7328
|
+
setValueByPath(toObject, ['properties'], fromProperties);
|
|
7329
|
+
}
|
|
7330
|
+
const fromPropertyOrdering = getValueByPath(fromObject, [
|
|
7331
|
+
'propertyOrdering',
|
|
7332
|
+
]);
|
|
7333
|
+
if (fromPropertyOrdering != null) {
|
|
7334
|
+
setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);
|
|
7335
|
+
}
|
|
7336
|
+
const fromRequired = getValueByPath(fromObject, ['required']);
|
|
7337
|
+
if (fromRequired != null) {
|
|
7338
|
+
setValueByPath(toObject, ['required'], fromRequired);
|
|
7339
|
+
}
|
|
7340
|
+
const fromTitle = getValueByPath(fromObject, ['title']);
|
|
7341
|
+
if (fromTitle != null) {
|
|
7342
|
+
setValueByPath(toObject, ['title'], fromTitle);
|
|
7343
|
+
}
|
|
7344
|
+
const fromType = getValueByPath(fromObject, ['type']);
|
|
7345
|
+
if (fromType != null) {
|
|
7346
|
+
setValueByPath(toObject, ['type'], fromType);
|
|
7347
|
+
}
|
|
7348
|
+
return toObject;
|
|
7349
|
+
}
|
|
7135
7350
|
function safetySettingToMldev(apiClient, fromObject) {
|
|
7136
7351
|
const toObject = {};
|
|
7137
7352
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
@@ -7298,6 +7513,10 @@ function retrievalConfigToMldev(apiClient, fromObject) {
|
|
|
7298
7513
|
if (fromLatLng != null) {
|
|
7299
7514
|
setValueByPath(toObject, ['latLng'], latLngToMldev(apiClient, fromLatLng));
|
|
7300
7515
|
}
|
|
7516
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
7517
|
+
if (fromLanguageCode != null) {
|
|
7518
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
7519
|
+
}
|
|
7301
7520
|
return toObject;
|
|
7302
7521
|
}
|
|
7303
7522
|
function toolConfigToMldev(apiClient, fromObject) {
|
|
@@ -7470,7 +7689,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
7470
7689
|
'responseSchema',
|
|
7471
7690
|
]);
|
|
7472
7691
|
if (fromResponseSchema != null) {
|
|
7473
|
-
setValueByPath(toObject, ['responseSchema'], tSchema(apiClient, fromResponseSchema));
|
|
7692
|
+
setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema)));
|
|
7474
7693
|
}
|
|
7475
7694
|
if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
|
|
7476
7695
|
throw new Error('routingConfig parameter is not supported in Gemini API.');
|
|
@@ -7931,6 +8150,22 @@ function blobToVertex(apiClient, fromObject) {
|
|
|
7931
8150
|
}
|
|
7932
8151
|
return toObject;
|
|
7933
8152
|
}
|
|
8153
|
+
function fileDataToVertex(apiClient, fromObject) {
|
|
8154
|
+
const toObject = {};
|
|
8155
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8156
|
+
if (fromDisplayName != null) {
|
|
8157
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8158
|
+
}
|
|
8159
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8160
|
+
if (fromFileUri != null) {
|
|
8161
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8162
|
+
}
|
|
8163
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8164
|
+
if (fromMimeType != null) {
|
|
8165
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8166
|
+
}
|
|
8167
|
+
return toObject;
|
|
8168
|
+
}
|
|
7934
8169
|
function partToVertex(apiClient, fromObject) {
|
|
7935
8170
|
const toObject = {};
|
|
7936
8171
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7947,6 +8182,10 @@ function partToVertex(apiClient, fromObject) {
|
|
|
7947
8182
|
if (fromInlineData != null) {
|
|
7948
8183
|
setValueByPath(toObject, ['inlineData'], blobToVertex(apiClient, fromInlineData));
|
|
7949
8184
|
}
|
|
8185
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8186
|
+
if (fromFileData != null) {
|
|
8187
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex(apiClient, fromFileData));
|
|
8188
|
+
}
|
|
7950
8189
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7951
8190
|
'codeExecutionResult',
|
|
7952
8191
|
]);
|
|
@@ -7959,10 +8198,6 @@ function partToVertex(apiClient, fromObject) {
|
|
|
7959
8198
|
if (fromExecutableCode != null) {
|
|
7960
8199
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7961
8200
|
}
|
|
7962
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7963
|
-
if (fromFileData != null) {
|
|
7964
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
7965
|
-
}
|
|
7966
8201
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7967
8202
|
if (fromFunctionCall != null) {
|
|
7968
8203
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -7997,6 +8232,104 @@ function contentToVertex(apiClient, fromObject) {
|
|
|
7997
8232
|
}
|
|
7998
8233
|
return toObject;
|
|
7999
8234
|
}
|
|
8235
|
+
function schemaToVertex(apiClient, fromObject) {
|
|
8236
|
+
const toObject = {};
|
|
8237
|
+
const fromAnyOf = getValueByPath(fromObject, ['anyOf']);
|
|
8238
|
+
if (fromAnyOf != null) {
|
|
8239
|
+
setValueByPath(toObject, ['anyOf'], fromAnyOf);
|
|
8240
|
+
}
|
|
8241
|
+
const fromDefault = getValueByPath(fromObject, ['default']);
|
|
8242
|
+
if (fromDefault != null) {
|
|
8243
|
+
setValueByPath(toObject, ['default'], fromDefault);
|
|
8244
|
+
}
|
|
8245
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
8246
|
+
if (fromDescription != null) {
|
|
8247
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
8248
|
+
}
|
|
8249
|
+
const fromEnum = getValueByPath(fromObject, ['enum']);
|
|
8250
|
+
if (fromEnum != null) {
|
|
8251
|
+
setValueByPath(toObject, ['enum'], fromEnum);
|
|
8252
|
+
}
|
|
8253
|
+
const fromExample = getValueByPath(fromObject, ['example']);
|
|
8254
|
+
if (fromExample != null) {
|
|
8255
|
+
setValueByPath(toObject, ['example'], fromExample);
|
|
8256
|
+
}
|
|
8257
|
+
const fromFormat = getValueByPath(fromObject, ['format']);
|
|
8258
|
+
if (fromFormat != null) {
|
|
8259
|
+
setValueByPath(toObject, ['format'], fromFormat);
|
|
8260
|
+
}
|
|
8261
|
+
const fromItems = getValueByPath(fromObject, ['items']);
|
|
8262
|
+
if (fromItems != null) {
|
|
8263
|
+
setValueByPath(toObject, ['items'], fromItems);
|
|
8264
|
+
}
|
|
8265
|
+
const fromMaxItems = getValueByPath(fromObject, ['maxItems']);
|
|
8266
|
+
if (fromMaxItems != null) {
|
|
8267
|
+
setValueByPath(toObject, ['maxItems'], fromMaxItems);
|
|
8268
|
+
}
|
|
8269
|
+
const fromMaxLength = getValueByPath(fromObject, ['maxLength']);
|
|
8270
|
+
if (fromMaxLength != null) {
|
|
8271
|
+
setValueByPath(toObject, ['maxLength'], fromMaxLength);
|
|
8272
|
+
}
|
|
8273
|
+
const fromMaxProperties = getValueByPath(fromObject, [
|
|
8274
|
+
'maxProperties',
|
|
8275
|
+
]);
|
|
8276
|
+
if (fromMaxProperties != null) {
|
|
8277
|
+
setValueByPath(toObject, ['maxProperties'], fromMaxProperties);
|
|
8278
|
+
}
|
|
8279
|
+
const fromMaximum = getValueByPath(fromObject, ['maximum']);
|
|
8280
|
+
if (fromMaximum != null) {
|
|
8281
|
+
setValueByPath(toObject, ['maximum'], fromMaximum);
|
|
8282
|
+
}
|
|
8283
|
+
const fromMinItems = getValueByPath(fromObject, ['minItems']);
|
|
8284
|
+
if (fromMinItems != null) {
|
|
8285
|
+
setValueByPath(toObject, ['minItems'], fromMinItems);
|
|
8286
|
+
}
|
|
8287
|
+
const fromMinLength = getValueByPath(fromObject, ['minLength']);
|
|
8288
|
+
if (fromMinLength != null) {
|
|
8289
|
+
setValueByPath(toObject, ['minLength'], fromMinLength);
|
|
8290
|
+
}
|
|
8291
|
+
const fromMinProperties = getValueByPath(fromObject, [
|
|
8292
|
+
'minProperties',
|
|
8293
|
+
]);
|
|
8294
|
+
if (fromMinProperties != null) {
|
|
8295
|
+
setValueByPath(toObject, ['minProperties'], fromMinProperties);
|
|
8296
|
+
}
|
|
8297
|
+
const fromMinimum = getValueByPath(fromObject, ['minimum']);
|
|
8298
|
+
if (fromMinimum != null) {
|
|
8299
|
+
setValueByPath(toObject, ['minimum'], fromMinimum);
|
|
8300
|
+
}
|
|
8301
|
+
const fromNullable = getValueByPath(fromObject, ['nullable']);
|
|
8302
|
+
if (fromNullable != null) {
|
|
8303
|
+
setValueByPath(toObject, ['nullable'], fromNullable);
|
|
8304
|
+
}
|
|
8305
|
+
const fromPattern = getValueByPath(fromObject, ['pattern']);
|
|
8306
|
+
if (fromPattern != null) {
|
|
8307
|
+
setValueByPath(toObject, ['pattern'], fromPattern);
|
|
8308
|
+
}
|
|
8309
|
+
const fromProperties = getValueByPath(fromObject, ['properties']);
|
|
8310
|
+
if (fromProperties != null) {
|
|
8311
|
+
setValueByPath(toObject, ['properties'], fromProperties);
|
|
8312
|
+
}
|
|
8313
|
+
const fromPropertyOrdering = getValueByPath(fromObject, [
|
|
8314
|
+
'propertyOrdering',
|
|
8315
|
+
]);
|
|
8316
|
+
if (fromPropertyOrdering != null) {
|
|
8317
|
+
setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);
|
|
8318
|
+
}
|
|
8319
|
+
const fromRequired = getValueByPath(fromObject, ['required']);
|
|
8320
|
+
if (fromRequired != null) {
|
|
8321
|
+
setValueByPath(toObject, ['required'], fromRequired);
|
|
8322
|
+
}
|
|
8323
|
+
const fromTitle = getValueByPath(fromObject, ['title']);
|
|
8324
|
+
if (fromTitle != null) {
|
|
8325
|
+
setValueByPath(toObject, ['title'], fromTitle);
|
|
8326
|
+
}
|
|
8327
|
+
const fromType = getValueByPath(fromObject, ['type']);
|
|
8328
|
+
if (fromType != null) {
|
|
8329
|
+
setValueByPath(toObject, ['type'], fromType);
|
|
8330
|
+
}
|
|
8331
|
+
return toObject;
|
|
8332
|
+
}
|
|
8000
8333
|
function modelSelectionConfigToVertex(apiClient, fromObject) {
|
|
8001
8334
|
const toObject = {};
|
|
8002
8335
|
const fromFeatureSelectionPreference = getValueByPath(fromObject, [
|
|
@@ -8225,6 +8558,10 @@ function retrievalConfigToVertex(apiClient, fromObject) {
|
|
|
8225
8558
|
if (fromLatLng != null) {
|
|
8226
8559
|
setValueByPath(toObject, ['latLng'], latLngToVertex(apiClient, fromLatLng));
|
|
8227
8560
|
}
|
|
8561
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
8562
|
+
if (fromLanguageCode != null) {
|
|
8563
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8564
|
+
}
|
|
8228
8565
|
return toObject;
|
|
8229
8566
|
}
|
|
8230
8567
|
function toolConfigToVertex(apiClient, fromObject) {
|
|
@@ -8366,7 +8703,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
8366
8703
|
'responseSchema',
|
|
8367
8704
|
]);
|
|
8368
8705
|
if (fromResponseSchema != null) {
|
|
8369
|
-
setValueByPath(toObject, ['responseSchema'], tSchema(apiClient, fromResponseSchema));
|
|
8706
|
+
setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema)));
|
|
8370
8707
|
}
|
|
8371
8708
|
const fromRoutingConfig = getValueByPath(fromObject, [
|
|
8372
8709
|
'routingConfig',
|
|
@@ -9148,6 +9485,18 @@ function blobFromMldev(apiClient, fromObject) {
|
|
|
9148
9485
|
}
|
|
9149
9486
|
return toObject;
|
|
9150
9487
|
}
|
|
9488
|
+
function fileDataFromMldev(apiClient, fromObject) {
|
|
9489
|
+
const toObject = {};
|
|
9490
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
9491
|
+
if (fromFileUri != null) {
|
|
9492
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
9493
|
+
}
|
|
9494
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9495
|
+
if (fromMimeType != null) {
|
|
9496
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9497
|
+
}
|
|
9498
|
+
return toObject;
|
|
9499
|
+
}
|
|
9151
9500
|
function partFromMldev(apiClient, fromObject) {
|
|
9152
9501
|
const toObject = {};
|
|
9153
9502
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -9164,6 +9513,10 @@ function partFromMldev(apiClient, fromObject) {
|
|
|
9164
9513
|
if (fromInlineData != null) {
|
|
9165
9514
|
setValueByPath(toObject, ['inlineData'], blobFromMldev(apiClient, fromInlineData));
|
|
9166
9515
|
}
|
|
9516
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
9517
|
+
if (fromFileData != null) {
|
|
9518
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev(apiClient, fromFileData));
|
|
9519
|
+
}
|
|
9167
9520
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
9168
9521
|
'codeExecutionResult',
|
|
9169
9522
|
]);
|
|
@@ -9176,10 +9529,6 @@ function partFromMldev(apiClient, fromObject) {
|
|
|
9176
9529
|
if (fromExecutableCode != null) {
|
|
9177
9530
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
9178
9531
|
}
|
|
9179
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
9180
|
-
if (fromFileData != null) {
|
|
9181
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
9182
|
-
}
|
|
9183
9532
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
9184
9533
|
if (fromFunctionCall != null) {
|
|
9185
9534
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -9650,6 +9999,22 @@ function blobFromVertex(apiClient, fromObject) {
|
|
|
9650
9999
|
}
|
|
9651
10000
|
return toObject;
|
|
9652
10001
|
}
|
|
10002
|
+
function fileDataFromVertex(apiClient, fromObject) {
|
|
10003
|
+
const toObject = {};
|
|
10004
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
10005
|
+
if (fromDisplayName != null) {
|
|
10006
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
10007
|
+
}
|
|
10008
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
10009
|
+
if (fromFileUri != null) {
|
|
10010
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
10011
|
+
}
|
|
10012
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
10013
|
+
if (fromMimeType != null) {
|
|
10014
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
10015
|
+
}
|
|
10016
|
+
return toObject;
|
|
10017
|
+
}
|
|
9653
10018
|
function partFromVertex(apiClient, fromObject) {
|
|
9654
10019
|
const toObject = {};
|
|
9655
10020
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -9666,6 +10031,10 @@ function partFromVertex(apiClient, fromObject) {
|
|
|
9666
10031
|
if (fromInlineData != null) {
|
|
9667
10032
|
setValueByPath(toObject, ['inlineData'], blobFromVertex(apiClient, fromInlineData));
|
|
9668
10033
|
}
|
|
10034
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
10035
|
+
if (fromFileData != null) {
|
|
10036
|
+
setValueByPath(toObject, ['fileData'], fileDataFromVertex(apiClient, fromFileData));
|
|
10037
|
+
}
|
|
9669
10038
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
9670
10039
|
'codeExecutionResult',
|
|
9671
10040
|
]);
|
|
@@ -9678,10 +10047,6 @@ function partFromVertex(apiClient, fromObject) {
|
|
|
9678
10047
|
if (fromExecutableCode != null) {
|
|
9679
10048
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
9680
10049
|
}
|
|
9681
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
9682
|
-
if (fromFileData != null) {
|
|
9683
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
9684
|
-
}
|
|
9685
10050
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
9686
10051
|
if (fromFunctionCall != null) {
|
|
9687
10052
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -10212,7 +10577,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
10212
10577
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
10213
10578
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
10214
10579
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
10215
|
-
const SDK_VERSION = '1.0
|
|
10580
|
+
const SDK_VERSION = '1.1.0'; // x-release-please-version
|
|
10216
10581
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
10217
10582
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
10218
10583
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -13527,6 +13892,12 @@ function tuningJobFromMldev(apiClient, fromObject) {
|
|
|
13527
13892
|
if (fromPipelineJob != null) {
|
|
13528
13893
|
setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
|
|
13529
13894
|
}
|
|
13895
|
+
const fromServiceAccount = getValueByPath(fromObject, [
|
|
13896
|
+
'serviceAccount',
|
|
13897
|
+
]);
|
|
13898
|
+
if (fromServiceAccount != null) {
|
|
13899
|
+
setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
|
|
13900
|
+
}
|
|
13530
13901
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
13531
13902
|
'tunedModelDisplayName',
|
|
13532
13903
|
]);
|
|
@@ -13701,6 +14072,12 @@ function tuningJobFromVertex(apiClient, fromObject) {
|
|
|
13701
14072
|
if (fromPipelineJob != null) {
|
|
13702
14073
|
setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
|
|
13703
14074
|
}
|
|
14075
|
+
const fromServiceAccount = getValueByPath(fromObject, [
|
|
14076
|
+
'serviceAccount',
|
|
14077
|
+
]);
|
|
14078
|
+
if (fromServiceAccount != null) {
|
|
14079
|
+
setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
|
|
14080
|
+
}
|
|
13704
14081
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
13705
14082
|
'tunedModelDisplayName',
|
|
13706
14083
|
]);
|