@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/node/index.mjs
CHANGED
|
@@ -230,6 +230,42 @@ var Language;
|
|
|
230
230
|
*/
|
|
231
231
|
Language["PYTHON"] = "PYTHON";
|
|
232
232
|
})(Language || (Language = {}));
|
|
233
|
+
/** Optional. The type of the data. */
|
|
234
|
+
var Type;
|
|
235
|
+
(function (Type) {
|
|
236
|
+
/**
|
|
237
|
+
* Not specified, should not be used.
|
|
238
|
+
*/
|
|
239
|
+
Type["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
240
|
+
/**
|
|
241
|
+
* OpenAPI string type
|
|
242
|
+
*/
|
|
243
|
+
Type["STRING"] = "STRING";
|
|
244
|
+
/**
|
|
245
|
+
* OpenAPI number type
|
|
246
|
+
*/
|
|
247
|
+
Type["NUMBER"] = "NUMBER";
|
|
248
|
+
/**
|
|
249
|
+
* OpenAPI integer type
|
|
250
|
+
*/
|
|
251
|
+
Type["INTEGER"] = "INTEGER";
|
|
252
|
+
/**
|
|
253
|
+
* OpenAPI boolean type
|
|
254
|
+
*/
|
|
255
|
+
Type["BOOLEAN"] = "BOOLEAN";
|
|
256
|
+
/**
|
|
257
|
+
* OpenAPI array type
|
|
258
|
+
*/
|
|
259
|
+
Type["ARRAY"] = "ARRAY";
|
|
260
|
+
/**
|
|
261
|
+
* OpenAPI object type
|
|
262
|
+
*/
|
|
263
|
+
Type["OBJECT"] = "OBJECT";
|
|
264
|
+
/**
|
|
265
|
+
* Null type
|
|
266
|
+
*/
|
|
267
|
+
Type["NULL"] = "NULL";
|
|
268
|
+
})(Type || (Type = {}));
|
|
233
269
|
/** Required. Harm category. */
|
|
234
270
|
var HarmCategory;
|
|
235
271
|
(function (HarmCategory) {
|
|
@@ -254,7 +290,7 @@ var HarmCategory;
|
|
|
254
290
|
*/
|
|
255
291
|
HarmCategory["HARM_CATEGORY_SEXUALLY_EXPLICIT"] = "HARM_CATEGORY_SEXUALLY_EXPLICIT";
|
|
256
292
|
/**
|
|
257
|
-
* The harm category is civic integrity.
|
|
293
|
+
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
258
294
|
*/
|
|
259
295
|
HarmCategory["HARM_CATEGORY_CIVIC_INTEGRITY"] = "HARM_CATEGORY_CIVIC_INTEGRITY";
|
|
260
296
|
})(HarmCategory || (HarmCategory = {}));
|
|
@@ -302,38 +338,6 @@ var HarmBlockThreshold;
|
|
|
302
338
|
*/
|
|
303
339
|
HarmBlockThreshold["OFF"] = "OFF";
|
|
304
340
|
})(HarmBlockThreshold || (HarmBlockThreshold = {}));
|
|
305
|
-
/** Optional. The type of the data. */
|
|
306
|
-
var Type;
|
|
307
|
-
(function (Type) {
|
|
308
|
-
/**
|
|
309
|
-
* Not specified, should not be used.
|
|
310
|
-
*/
|
|
311
|
-
Type["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
312
|
-
/**
|
|
313
|
-
* OpenAPI string type
|
|
314
|
-
*/
|
|
315
|
-
Type["STRING"] = "STRING";
|
|
316
|
-
/**
|
|
317
|
-
* OpenAPI number type
|
|
318
|
-
*/
|
|
319
|
-
Type["NUMBER"] = "NUMBER";
|
|
320
|
-
/**
|
|
321
|
-
* OpenAPI integer type
|
|
322
|
-
*/
|
|
323
|
-
Type["INTEGER"] = "INTEGER";
|
|
324
|
-
/**
|
|
325
|
-
* OpenAPI boolean type
|
|
326
|
-
*/
|
|
327
|
-
Type["BOOLEAN"] = "BOOLEAN";
|
|
328
|
-
/**
|
|
329
|
-
* OpenAPI array type
|
|
330
|
-
*/
|
|
331
|
-
Type["ARRAY"] = "ARRAY";
|
|
332
|
-
/**
|
|
333
|
-
* OpenAPI object type
|
|
334
|
-
*/
|
|
335
|
-
Type["OBJECT"] = "OBJECT";
|
|
336
|
-
})(Type || (Type = {}));
|
|
337
341
|
/** The mode of the predictor to be used in dynamic retrieval. */
|
|
338
342
|
var Mode;
|
|
339
343
|
(function (Mode) {
|
|
@@ -2473,6 +2477,21 @@ function blobToMldev$2(apiClient, fromObject) {
|
|
|
2473
2477
|
}
|
|
2474
2478
|
return toObject;
|
|
2475
2479
|
}
|
|
2480
|
+
function fileDataToMldev$2(apiClient, fromObject) {
|
|
2481
|
+
const toObject = {};
|
|
2482
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
2483
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
2484
|
+
}
|
|
2485
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
2486
|
+
if (fromFileUri != null) {
|
|
2487
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
2488
|
+
}
|
|
2489
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
2490
|
+
if (fromMimeType != null) {
|
|
2491
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
2492
|
+
}
|
|
2493
|
+
return toObject;
|
|
2494
|
+
}
|
|
2476
2495
|
function partToMldev$2(apiClient, fromObject) {
|
|
2477
2496
|
const toObject = {};
|
|
2478
2497
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -2489,6 +2508,10 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2489
2508
|
if (fromInlineData != null) {
|
|
2490
2509
|
setValueByPath(toObject, ['inlineData'], blobToMldev$2(apiClient, fromInlineData));
|
|
2491
2510
|
}
|
|
2511
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2512
|
+
if (fromFileData != null) {
|
|
2513
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$2(apiClient, fromFileData));
|
|
2514
|
+
}
|
|
2492
2515
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2493
2516
|
'codeExecutionResult',
|
|
2494
2517
|
]);
|
|
@@ -2501,10 +2524,6 @@ function partToMldev$2(apiClient, fromObject) {
|
|
|
2501
2524
|
if (fromExecutableCode != null) {
|
|
2502
2525
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
2503
2526
|
}
|
|
2504
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2505
|
-
if (fromFileData != null) {
|
|
2506
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
2507
|
-
}
|
|
2508
2527
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
2509
2528
|
if (fromFunctionCall != null) {
|
|
2510
2529
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -2690,6 +2709,10 @@ function retrievalConfigToMldev$1(apiClient, fromObject) {
|
|
|
2690
2709
|
if (fromLatLng != null) {
|
|
2691
2710
|
setValueByPath(toObject, ['latLng'], latLngToMldev$1(apiClient, fromLatLng));
|
|
2692
2711
|
}
|
|
2712
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
2713
|
+
if (fromLanguageCode != null) {
|
|
2714
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
2715
|
+
}
|
|
2693
2716
|
return toObject;
|
|
2694
2717
|
}
|
|
2695
2718
|
function toolConfigToMldev$1(apiClient, fromObject) {
|
|
@@ -2869,6 +2892,22 @@ function blobToVertex$2(apiClient, fromObject) {
|
|
|
2869
2892
|
}
|
|
2870
2893
|
return toObject;
|
|
2871
2894
|
}
|
|
2895
|
+
function fileDataToVertex$2(apiClient, fromObject) {
|
|
2896
|
+
const toObject = {};
|
|
2897
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
2898
|
+
if (fromDisplayName != null) {
|
|
2899
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
2900
|
+
}
|
|
2901
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
2902
|
+
if (fromFileUri != null) {
|
|
2903
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
2904
|
+
}
|
|
2905
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
2906
|
+
if (fromMimeType != null) {
|
|
2907
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
2908
|
+
}
|
|
2909
|
+
return toObject;
|
|
2910
|
+
}
|
|
2872
2911
|
function partToVertex$2(apiClient, fromObject) {
|
|
2873
2912
|
const toObject = {};
|
|
2874
2913
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -2885,6 +2924,10 @@ function partToVertex$2(apiClient, fromObject) {
|
|
|
2885
2924
|
if (fromInlineData != null) {
|
|
2886
2925
|
setValueByPath(toObject, ['inlineData'], blobToVertex$2(apiClient, fromInlineData));
|
|
2887
2926
|
}
|
|
2927
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2928
|
+
if (fromFileData != null) {
|
|
2929
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$2(apiClient, fromFileData));
|
|
2930
|
+
}
|
|
2888
2931
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
2889
2932
|
'codeExecutionResult',
|
|
2890
2933
|
]);
|
|
@@ -2897,10 +2940,6 @@ function partToVertex$2(apiClient, fromObject) {
|
|
|
2897
2940
|
if (fromExecutableCode != null) {
|
|
2898
2941
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
2899
2942
|
}
|
|
2900
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
2901
|
-
if (fromFileData != null) {
|
|
2902
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
2903
|
-
}
|
|
2904
2943
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
2905
2944
|
if (fromFunctionCall != null) {
|
|
2906
2945
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -3137,6 +3176,10 @@ function retrievalConfigToVertex$1(apiClient, fromObject) {
|
|
|
3137
3176
|
if (fromLatLng != null) {
|
|
3138
3177
|
setValueByPath(toObject, ['latLng'], latLngToVertex$1(apiClient, fromLatLng));
|
|
3139
3178
|
}
|
|
3179
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
3180
|
+
if (fromLanguageCode != null) {
|
|
3181
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
3182
|
+
}
|
|
3140
3183
|
return toObject;
|
|
3141
3184
|
}
|
|
3142
3185
|
function toolConfigToVertex$1(apiClient, fromObject) {
|
|
@@ -5023,6 +5066,37 @@ function blobToVertex$1(apiClient, fromObject) {
|
|
|
5023
5066
|
}
|
|
5024
5067
|
return toObject;
|
|
5025
5068
|
}
|
|
5069
|
+
function fileDataToMldev$1(apiClient, fromObject) {
|
|
5070
|
+
const toObject = {};
|
|
5071
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
5072
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
5073
|
+
}
|
|
5074
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
5075
|
+
if (fromFileUri != null) {
|
|
5076
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
5077
|
+
}
|
|
5078
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
5079
|
+
if (fromMimeType != null) {
|
|
5080
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
5081
|
+
}
|
|
5082
|
+
return toObject;
|
|
5083
|
+
}
|
|
5084
|
+
function fileDataToVertex$1(apiClient, fromObject) {
|
|
5085
|
+
const toObject = {};
|
|
5086
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
5087
|
+
if (fromDisplayName != null) {
|
|
5088
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
5089
|
+
}
|
|
5090
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
5091
|
+
if (fromFileUri != null) {
|
|
5092
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
5093
|
+
}
|
|
5094
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
5095
|
+
if (fromMimeType != null) {
|
|
5096
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
5097
|
+
}
|
|
5098
|
+
return toObject;
|
|
5099
|
+
}
|
|
5026
5100
|
function partToMldev$1(apiClient, fromObject) {
|
|
5027
5101
|
const toObject = {};
|
|
5028
5102
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -5039,6 +5113,10 @@ function partToMldev$1(apiClient, fromObject) {
|
|
|
5039
5113
|
if (fromInlineData != null) {
|
|
5040
5114
|
setValueByPath(toObject, ['inlineData'], blobToMldev$1(apiClient, fromInlineData));
|
|
5041
5115
|
}
|
|
5116
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5117
|
+
if (fromFileData != null) {
|
|
5118
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev$1(apiClient, fromFileData));
|
|
5119
|
+
}
|
|
5042
5120
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5043
5121
|
'codeExecutionResult',
|
|
5044
5122
|
]);
|
|
@@ -5051,10 +5129,6 @@ function partToMldev$1(apiClient, fromObject) {
|
|
|
5051
5129
|
if (fromExecutableCode != null) {
|
|
5052
5130
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
5053
5131
|
}
|
|
5054
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5055
|
-
if (fromFileData != null) {
|
|
5056
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
5057
|
-
}
|
|
5058
5132
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
5059
5133
|
if (fromFunctionCall != null) {
|
|
5060
5134
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -5087,6 +5161,10 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5087
5161
|
if (fromInlineData != null) {
|
|
5088
5162
|
setValueByPath(toObject, ['inlineData'], blobToVertex$1(apiClient, fromInlineData));
|
|
5089
5163
|
}
|
|
5164
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5165
|
+
if (fromFileData != null) {
|
|
5166
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex$1(apiClient, fromFileData));
|
|
5167
|
+
}
|
|
5090
5168
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
5091
5169
|
'codeExecutionResult',
|
|
5092
5170
|
]);
|
|
@@ -5099,10 +5177,6 @@ function partToVertex$1(apiClient, fromObject) {
|
|
|
5099
5177
|
if (fromExecutableCode != null) {
|
|
5100
5178
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
5101
5179
|
}
|
|
5102
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
5103
|
-
if (fromFileData != null) {
|
|
5104
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
5105
|
-
}
|
|
5106
5180
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
5107
5181
|
if (fromFunctionCall != null) {
|
|
5108
5182
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -6176,6 +6250,34 @@ function blobFromVertex$1(apiClient, fromObject) {
|
|
|
6176
6250
|
}
|
|
6177
6251
|
return toObject;
|
|
6178
6252
|
}
|
|
6253
|
+
function fileDataFromMldev$1(apiClient, fromObject) {
|
|
6254
|
+
const toObject = {};
|
|
6255
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6256
|
+
if (fromFileUri != null) {
|
|
6257
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
6258
|
+
}
|
|
6259
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6260
|
+
if (fromMimeType != null) {
|
|
6261
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6262
|
+
}
|
|
6263
|
+
return toObject;
|
|
6264
|
+
}
|
|
6265
|
+
function fileDataFromVertex$1(apiClient, fromObject) {
|
|
6266
|
+
const toObject = {};
|
|
6267
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
6268
|
+
if (fromDisplayName != null) {
|
|
6269
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
6270
|
+
}
|
|
6271
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
6272
|
+
if (fromFileUri != null) {
|
|
6273
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
6274
|
+
}
|
|
6275
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
6276
|
+
if (fromMimeType != null) {
|
|
6277
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
6278
|
+
}
|
|
6279
|
+
return toObject;
|
|
6280
|
+
}
|
|
6179
6281
|
function partFromMldev$1(apiClient, fromObject) {
|
|
6180
6282
|
const toObject = {};
|
|
6181
6283
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -6192,6 +6294,10 @@ function partFromMldev$1(apiClient, fromObject) {
|
|
|
6192
6294
|
if (fromInlineData != null) {
|
|
6193
6295
|
setValueByPath(toObject, ['inlineData'], blobFromMldev$1(apiClient, fromInlineData));
|
|
6194
6296
|
}
|
|
6297
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6298
|
+
if (fromFileData != null) {
|
|
6299
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev$1(apiClient, fromFileData));
|
|
6300
|
+
}
|
|
6195
6301
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6196
6302
|
'codeExecutionResult',
|
|
6197
6303
|
]);
|
|
@@ -6204,10 +6310,6 @@ function partFromMldev$1(apiClient, fromObject) {
|
|
|
6204
6310
|
if (fromExecutableCode != null) {
|
|
6205
6311
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
6206
6312
|
}
|
|
6207
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6208
|
-
if (fromFileData != null) {
|
|
6209
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
6210
|
-
}
|
|
6211
6313
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
6212
6314
|
if (fromFunctionCall != null) {
|
|
6213
6315
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -6240,6 +6342,10 @@ function partFromVertex$1(apiClient, fromObject) {
|
|
|
6240
6342
|
if (fromInlineData != null) {
|
|
6241
6343
|
setValueByPath(toObject, ['inlineData'], blobFromVertex$1(apiClient, fromInlineData));
|
|
6242
6344
|
}
|
|
6345
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6346
|
+
if (fromFileData != null) {
|
|
6347
|
+
setValueByPath(toObject, ['fileData'], fileDataFromVertex$1(apiClient, fromFileData));
|
|
6348
|
+
}
|
|
6243
6349
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
6244
6350
|
'codeExecutionResult',
|
|
6245
6351
|
]);
|
|
@@ -6252,10 +6358,6 @@ function partFromVertex$1(apiClient, fromObject) {
|
|
|
6252
6358
|
if (fromExecutableCode != null) {
|
|
6253
6359
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
6254
6360
|
}
|
|
6255
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
6256
|
-
if (fromFileData != null) {
|
|
6257
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
6258
|
-
}
|
|
6259
6361
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
6260
6362
|
if (fromFunctionCall != null) {
|
|
6261
6363
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -7071,6 +7173,21 @@ function blobToMldev(apiClient, fromObject) {
|
|
|
7071
7173
|
}
|
|
7072
7174
|
return toObject;
|
|
7073
7175
|
}
|
|
7176
|
+
function fileDataToMldev(apiClient, fromObject) {
|
|
7177
|
+
const toObject = {};
|
|
7178
|
+
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
7179
|
+
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
7180
|
+
}
|
|
7181
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
7182
|
+
if (fromFileUri != null) {
|
|
7183
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
7184
|
+
}
|
|
7185
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
7186
|
+
if (fromMimeType != null) {
|
|
7187
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
7188
|
+
}
|
|
7189
|
+
return toObject;
|
|
7190
|
+
}
|
|
7074
7191
|
function partToMldev(apiClient, fromObject) {
|
|
7075
7192
|
const toObject = {};
|
|
7076
7193
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7087,6 +7204,10 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7087
7204
|
if (fromInlineData != null) {
|
|
7088
7205
|
setValueByPath(toObject, ['inlineData'], blobToMldev(apiClient, fromInlineData));
|
|
7089
7206
|
}
|
|
7207
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7208
|
+
if (fromFileData != null) {
|
|
7209
|
+
setValueByPath(toObject, ['fileData'], fileDataToMldev(apiClient, fromFileData));
|
|
7210
|
+
}
|
|
7090
7211
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7091
7212
|
'codeExecutionResult',
|
|
7092
7213
|
]);
|
|
@@ -7099,10 +7220,6 @@ function partToMldev(apiClient, fromObject) {
|
|
|
7099
7220
|
if (fromExecutableCode != null) {
|
|
7100
7221
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7101
7222
|
}
|
|
7102
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7103
|
-
if (fromFileData != null) {
|
|
7104
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
7105
|
-
}
|
|
7106
7223
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7107
7224
|
if (fromFunctionCall != null) {
|
|
7108
7225
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -7137,6 +7254,104 @@ function contentToMldev(apiClient, fromObject) {
|
|
|
7137
7254
|
}
|
|
7138
7255
|
return toObject;
|
|
7139
7256
|
}
|
|
7257
|
+
function schemaToMldev(apiClient, fromObject) {
|
|
7258
|
+
const toObject = {};
|
|
7259
|
+
const fromAnyOf = getValueByPath(fromObject, ['anyOf']);
|
|
7260
|
+
if (fromAnyOf != null) {
|
|
7261
|
+
setValueByPath(toObject, ['anyOf'], fromAnyOf);
|
|
7262
|
+
}
|
|
7263
|
+
const fromDefault = getValueByPath(fromObject, ['default']);
|
|
7264
|
+
if (fromDefault != null) {
|
|
7265
|
+
setValueByPath(toObject, ['default'], fromDefault);
|
|
7266
|
+
}
|
|
7267
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
7268
|
+
if (fromDescription != null) {
|
|
7269
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
7270
|
+
}
|
|
7271
|
+
const fromEnum = getValueByPath(fromObject, ['enum']);
|
|
7272
|
+
if (fromEnum != null) {
|
|
7273
|
+
setValueByPath(toObject, ['enum'], fromEnum);
|
|
7274
|
+
}
|
|
7275
|
+
const fromExample = getValueByPath(fromObject, ['example']);
|
|
7276
|
+
if (fromExample != null) {
|
|
7277
|
+
setValueByPath(toObject, ['example'], fromExample);
|
|
7278
|
+
}
|
|
7279
|
+
const fromFormat = getValueByPath(fromObject, ['format']);
|
|
7280
|
+
if (fromFormat != null) {
|
|
7281
|
+
setValueByPath(toObject, ['format'], fromFormat);
|
|
7282
|
+
}
|
|
7283
|
+
const fromItems = getValueByPath(fromObject, ['items']);
|
|
7284
|
+
if (fromItems != null) {
|
|
7285
|
+
setValueByPath(toObject, ['items'], fromItems);
|
|
7286
|
+
}
|
|
7287
|
+
const fromMaxItems = getValueByPath(fromObject, ['maxItems']);
|
|
7288
|
+
if (fromMaxItems != null) {
|
|
7289
|
+
setValueByPath(toObject, ['maxItems'], fromMaxItems);
|
|
7290
|
+
}
|
|
7291
|
+
const fromMaxLength = getValueByPath(fromObject, ['maxLength']);
|
|
7292
|
+
if (fromMaxLength != null) {
|
|
7293
|
+
setValueByPath(toObject, ['maxLength'], fromMaxLength);
|
|
7294
|
+
}
|
|
7295
|
+
const fromMaxProperties = getValueByPath(fromObject, [
|
|
7296
|
+
'maxProperties',
|
|
7297
|
+
]);
|
|
7298
|
+
if (fromMaxProperties != null) {
|
|
7299
|
+
setValueByPath(toObject, ['maxProperties'], fromMaxProperties);
|
|
7300
|
+
}
|
|
7301
|
+
const fromMaximum = getValueByPath(fromObject, ['maximum']);
|
|
7302
|
+
if (fromMaximum != null) {
|
|
7303
|
+
setValueByPath(toObject, ['maximum'], fromMaximum);
|
|
7304
|
+
}
|
|
7305
|
+
const fromMinItems = getValueByPath(fromObject, ['minItems']);
|
|
7306
|
+
if (fromMinItems != null) {
|
|
7307
|
+
setValueByPath(toObject, ['minItems'], fromMinItems);
|
|
7308
|
+
}
|
|
7309
|
+
const fromMinLength = getValueByPath(fromObject, ['minLength']);
|
|
7310
|
+
if (fromMinLength != null) {
|
|
7311
|
+
setValueByPath(toObject, ['minLength'], fromMinLength);
|
|
7312
|
+
}
|
|
7313
|
+
const fromMinProperties = getValueByPath(fromObject, [
|
|
7314
|
+
'minProperties',
|
|
7315
|
+
]);
|
|
7316
|
+
if (fromMinProperties != null) {
|
|
7317
|
+
setValueByPath(toObject, ['minProperties'], fromMinProperties);
|
|
7318
|
+
}
|
|
7319
|
+
const fromMinimum = getValueByPath(fromObject, ['minimum']);
|
|
7320
|
+
if (fromMinimum != null) {
|
|
7321
|
+
setValueByPath(toObject, ['minimum'], fromMinimum);
|
|
7322
|
+
}
|
|
7323
|
+
const fromNullable = getValueByPath(fromObject, ['nullable']);
|
|
7324
|
+
if (fromNullable != null) {
|
|
7325
|
+
setValueByPath(toObject, ['nullable'], fromNullable);
|
|
7326
|
+
}
|
|
7327
|
+
const fromPattern = getValueByPath(fromObject, ['pattern']);
|
|
7328
|
+
if (fromPattern != null) {
|
|
7329
|
+
setValueByPath(toObject, ['pattern'], fromPattern);
|
|
7330
|
+
}
|
|
7331
|
+
const fromProperties = getValueByPath(fromObject, ['properties']);
|
|
7332
|
+
if (fromProperties != null) {
|
|
7333
|
+
setValueByPath(toObject, ['properties'], fromProperties);
|
|
7334
|
+
}
|
|
7335
|
+
const fromPropertyOrdering = getValueByPath(fromObject, [
|
|
7336
|
+
'propertyOrdering',
|
|
7337
|
+
]);
|
|
7338
|
+
if (fromPropertyOrdering != null) {
|
|
7339
|
+
setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);
|
|
7340
|
+
}
|
|
7341
|
+
const fromRequired = getValueByPath(fromObject, ['required']);
|
|
7342
|
+
if (fromRequired != null) {
|
|
7343
|
+
setValueByPath(toObject, ['required'], fromRequired);
|
|
7344
|
+
}
|
|
7345
|
+
const fromTitle = getValueByPath(fromObject, ['title']);
|
|
7346
|
+
if (fromTitle != null) {
|
|
7347
|
+
setValueByPath(toObject, ['title'], fromTitle);
|
|
7348
|
+
}
|
|
7349
|
+
const fromType = getValueByPath(fromObject, ['type']);
|
|
7350
|
+
if (fromType != null) {
|
|
7351
|
+
setValueByPath(toObject, ['type'], fromType);
|
|
7352
|
+
}
|
|
7353
|
+
return toObject;
|
|
7354
|
+
}
|
|
7140
7355
|
function safetySettingToMldev(apiClient, fromObject) {
|
|
7141
7356
|
const toObject = {};
|
|
7142
7357
|
if (getValueByPath(fromObject, ['method']) !== undefined) {
|
|
@@ -7303,6 +7518,10 @@ function retrievalConfigToMldev(apiClient, fromObject) {
|
|
|
7303
7518
|
if (fromLatLng != null) {
|
|
7304
7519
|
setValueByPath(toObject, ['latLng'], latLngToMldev(apiClient, fromLatLng));
|
|
7305
7520
|
}
|
|
7521
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
7522
|
+
if (fromLanguageCode != null) {
|
|
7523
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
7524
|
+
}
|
|
7306
7525
|
return toObject;
|
|
7307
7526
|
}
|
|
7308
7527
|
function toolConfigToMldev(apiClient, fromObject) {
|
|
@@ -7475,7 +7694,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
7475
7694
|
'responseSchema',
|
|
7476
7695
|
]);
|
|
7477
7696
|
if (fromResponseSchema != null) {
|
|
7478
|
-
setValueByPath(toObject, ['responseSchema'], tSchema(apiClient, fromResponseSchema));
|
|
7697
|
+
setValueByPath(toObject, ['responseSchema'], schemaToMldev(apiClient, tSchema(apiClient, fromResponseSchema)));
|
|
7479
7698
|
}
|
|
7480
7699
|
if (getValueByPath(fromObject, ['routingConfig']) !== undefined) {
|
|
7481
7700
|
throw new Error('routingConfig parameter is not supported in Gemini API.');
|
|
@@ -7936,6 +8155,22 @@ function blobToVertex(apiClient, fromObject) {
|
|
|
7936
8155
|
}
|
|
7937
8156
|
return toObject;
|
|
7938
8157
|
}
|
|
8158
|
+
function fileDataToVertex(apiClient, fromObject) {
|
|
8159
|
+
const toObject = {};
|
|
8160
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
8161
|
+
if (fromDisplayName != null) {
|
|
8162
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
8163
|
+
}
|
|
8164
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
8165
|
+
if (fromFileUri != null) {
|
|
8166
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
8167
|
+
}
|
|
8168
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
8169
|
+
if (fromMimeType != null) {
|
|
8170
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
8171
|
+
}
|
|
8172
|
+
return toObject;
|
|
8173
|
+
}
|
|
7939
8174
|
function partToVertex(apiClient, fromObject) {
|
|
7940
8175
|
const toObject = {};
|
|
7941
8176
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -7952,6 +8187,10 @@ function partToVertex(apiClient, fromObject) {
|
|
|
7952
8187
|
if (fromInlineData != null) {
|
|
7953
8188
|
setValueByPath(toObject, ['inlineData'], blobToVertex(apiClient, fromInlineData));
|
|
7954
8189
|
}
|
|
8190
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
8191
|
+
if (fromFileData != null) {
|
|
8192
|
+
setValueByPath(toObject, ['fileData'], fileDataToVertex(apiClient, fromFileData));
|
|
8193
|
+
}
|
|
7955
8194
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
7956
8195
|
'codeExecutionResult',
|
|
7957
8196
|
]);
|
|
@@ -7964,10 +8203,6 @@ function partToVertex(apiClient, fromObject) {
|
|
|
7964
8203
|
if (fromExecutableCode != null) {
|
|
7965
8204
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
7966
8205
|
}
|
|
7967
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
7968
|
-
if (fromFileData != null) {
|
|
7969
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
7970
|
-
}
|
|
7971
8206
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
7972
8207
|
if (fromFunctionCall != null) {
|
|
7973
8208
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -8002,6 +8237,104 @@ function contentToVertex(apiClient, fromObject) {
|
|
|
8002
8237
|
}
|
|
8003
8238
|
return toObject;
|
|
8004
8239
|
}
|
|
8240
|
+
function schemaToVertex(apiClient, fromObject) {
|
|
8241
|
+
const toObject = {};
|
|
8242
|
+
const fromAnyOf = getValueByPath(fromObject, ['anyOf']);
|
|
8243
|
+
if (fromAnyOf != null) {
|
|
8244
|
+
setValueByPath(toObject, ['anyOf'], fromAnyOf);
|
|
8245
|
+
}
|
|
8246
|
+
const fromDefault = getValueByPath(fromObject, ['default']);
|
|
8247
|
+
if (fromDefault != null) {
|
|
8248
|
+
setValueByPath(toObject, ['default'], fromDefault);
|
|
8249
|
+
}
|
|
8250
|
+
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
8251
|
+
if (fromDescription != null) {
|
|
8252
|
+
setValueByPath(toObject, ['description'], fromDescription);
|
|
8253
|
+
}
|
|
8254
|
+
const fromEnum = getValueByPath(fromObject, ['enum']);
|
|
8255
|
+
if (fromEnum != null) {
|
|
8256
|
+
setValueByPath(toObject, ['enum'], fromEnum);
|
|
8257
|
+
}
|
|
8258
|
+
const fromExample = getValueByPath(fromObject, ['example']);
|
|
8259
|
+
if (fromExample != null) {
|
|
8260
|
+
setValueByPath(toObject, ['example'], fromExample);
|
|
8261
|
+
}
|
|
8262
|
+
const fromFormat = getValueByPath(fromObject, ['format']);
|
|
8263
|
+
if (fromFormat != null) {
|
|
8264
|
+
setValueByPath(toObject, ['format'], fromFormat);
|
|
8265
|
+
}
|
|
8266
|
+
const fromItems = getValueByPath(fromObject, ['items']);
|
|
8267
|
+
if (fromItems != null) {
|
|
8268
|
+
setValueByPath(toObject, ['items'], fromItems);
|
|
8269
|
+
}
|
|
8270
|
+
const fromMaxItems = getValueByPath(fromObject, ['maxItems']);
|
|
8271
|
+
if (fromMaxItems != null) {
|
|
8272
|
+
setValueByPath(toObject, ['maxItems'], fromMaxItems);
|
|
8273
|
+
}
|
|
8274
|
+
const fromMaxLength = getValueByPath(fromObject, ['maxLength']);
|
|
8275
|
+
if (fromMaxLength != null) {
|
|
8276
|
+
setValueByPath(toObject, ['maxLength'], fromMaxLength);
|
|
8277
|
+
}
|
|
8278
|
+
const fromMaxProperties = getValueByPath(fromObject, [
|
|
8279
|
+
'maxProperties',
|
|
8280
|
+
]);
|
|
8281
|
+
if (fromMaxProperties != null) {
|
|
8282
|
+
setValueByPath(toObject, ['maxProperties'], fromMaxProperties);
|
|
8283
|
+
}
|
|
8284
|
+
const fromMaximum = getValueByPath(fromObject, ['maximum']);
|
|
8285
|
+
if (fromMaximum != null) {
|
|
8286
|
+
setValueByPath(toObject, ['maximum'], fromMaximum);
|
|
8287
|
+
}
|
|
8288
|
+
const fromMinItems = getValueByPath(fromObject, ['minItems']);
|
|
8289
|
+
if (fromMinItems != null) {
|
|
8290
|
+
setValueByPath(toObject, ['minItems'], fromMinItems);
|
|
8291
|
+
}
|
|
8292
|
+
const fromMinLength = getValueByPath(fromObject, ['minLength']);
|
|
8293
|
+
if (fromMinLength != null) {
|
|
8294
|
+
setValueByPath(toObject, ['minLength'], fromMinLength);
|
|
8295
|
+
}
|
|
8296
|
+
const fromMinProperties = getValueByPath(fromObject, [
|
|
8297
|
+
'minProperties',
|
|
8298
|
+
]);
|
|
8299
|
+
if (fromMinProperties != null) {
|
|
8300
|
+
setValueByPath(toObject, ['minProperties'], fromMinProperties);
|
|
8301
|
+
}
|
|
8302
|
+
const fromMinimum = getValueByPath(fromObject, ['minimum']);
|
|
8303
|
+
if (fromMinimum != null) {
|
|
8304
|
+
setValueByPath(toObject, ['minimum'], fromMinimum);
|
|
8305
|
+
}
|
|
8306
|
+
const fromNullable = getValueByPath(fromObject, ['nullable']);
|
|
8307
|
+
if (fromNullable != null) {
|
|
8308
|
+
setValueByPath(toObject, ['nullable'], fromNullable);
|
|
8309
|
+
}
|
|
8310
|
+
const fromPattern = getValueByPath(fromObject, ['pattern']);
|
|
8311
|
+
if (fromPattern != null) {
|
|
8312
|
+
setValueByPath(toObject, ['pattern'], fromPattern);
|
|
8313
|
+
}
|
|
8314
|
+
const fromProperties = getValueByPath(fromObject, ['properties']);
|
|
8315
|
+
if (fromProperties != null) {
|
|
8316
|
+
setValueByPath(toObject, ['properties'], fromProperties);
|
|
8317
|
+
}
|
|
8318
|
+
const fromPropertyOrdering = getValueByPath(fromObject, [
|
|
8319
|
+
'propertyOrdering',
|
|
8320
|
+
]);
|
|
8321
|
+
if (fromPropertyOrdering != null) {
|
|
8322
|
+
setValueByPath(toObject, ['propertyOrdering'], fromPropertyOrdering);
|
|
8323
|
+
}
|
|
8324
|
+
const fromRequired = getValueByPath(fromObject, ['required']);
|
|
8325
|
+
if (fromRequired != null) {
|
|
8326
|
+
setValueByPath(toObject, ['required'], fromRequired);
|
|
8327
|
+
}
|
|
8328
|
+
const fromTitle = getValueByPath(fromObject, ['title']);
|
|
8329
|
+
if (fromTitle != null) {
|
|
8330
|
+
setValueByPath(toObject, ['title'], fromTitle);
|
|
8331
|
+
}
|
|
8332
|
+
const fromType = getValueByPath(fromObject, ['type']);
|
|
8333
|
+
if (fromType != null) {
|
|
8334
|
+
setValueByPath(toObject, ['type'], fromType);
|
|
8335
|
+
}
|
|
8336
|
+
return toObject;
|
|
8337
|
+
}
|
|
8005
8338
|
function modelSelectionConfigToVertex(apiClient, fromObject) {
|
|
8006
8339
|
const toObject = {};
|
|
8007
8340
|
const fromFeatureSelectionPreference = getValueByPath(fromObject, [
|
|
@@ -8230,6 +8563,10 @@ function retrievalConfigToVertex(apiClient, fromObject) {
|
|
|
8230
8563
|
if (fromLatLng != null) {
|
|
8231
8564
|
setValueByPath(toObject, ['latLng'], latLngToVertex(apiClient, fromLatLng));
|
|
8232
8565
|
}
|
|
8566
|
+
const fromLanguageCode = getValueByPath(fromObject, ['languageCode']);
|
|
8567
|
+
if (fromLanguageCode != null) {
|
|
8568
|
+
setValueByPath(toObject, ['languageCode'], fromLanguageCode);
|
|
8569
|
+
}
|
|
8233
8570
|
return toObject;
|
|
8234
8571
|
}
|
|
8235
8572
|
function toolConfigToVertex(apiClient, fromObject) {
|
|
@@ -8371,7 +8708,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
8371
8708
|
'responseSchema',
|
|
8372
8709
|
]);
|
|
8373
8710
|
if (fromResponseSchema != null) {
|
|
8374
|
-
setValueByPath(toObject, ['responseSchema'], tSchema(apiClient, fromResponseSchema));
|
|
8711
|
+
setValueByPath(toObject, ['responseSchema'], schemaToVertex(apiClient, tSchema(apiClient, fromResponseSchema)));
|
|
8375
8712
|
}
|
|
8376
8713
|
const fromRoutingConfig = getValueByPath(fromObject, [
|
|
8377
8714
|
'routingConfig',
|
|
@@ -9153,6 +9490,18 @@ function blobFromMldev(apiClient, fromObject) {
|
|
|
9153
9490
|
}
|
|
9154
9491
|
return toObject;
|
|
9155
9492
|
}
|
|
9493
|
+
function fileDataFromMldev(apiClient, fromObject) {
|
|
9494
|
+
const toObject = {};
|
|
9495
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
9496
|
+
if (fromFileUri != null) {
|
|
9497
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
9498
|
+
}
|
|
9499
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
9500
|
+
if (fromMimeType != null) {
|
|
9501
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
9502
|
+
}
|
|
9503
|
+
return toObject;
|
|
9504
|
+
}
|
|
9156
9505
|
function partFromMldev(apiClient, fromObject) {
|
|
9157
9506
|
const toObject = {};
|
|
9158
9507
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -9169,6 +9518,10 @@ function partFromMldev(apiClient, fromObject) {
|
|
|
9169
9518
|
if (fromInlineData != null) {
|
|
9170
9519
|
setValueByPath(toObject, ['inlineData'], blobFromMldev(apiClient, fromInlineData));
|
|
9171
9520
|
}
|
|
9521
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
9522
|
+
if (fromFileData != null) {
|
|
9523
|
+
setValueByPath(toObject, ['fileData'], fileDataFromMldev(apiClient, fromFileData));
|
|
9524
|
+
}
|
|
9172
9525
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
9173
9526
|
'codeExecutionResult',
|
|
9174
9527
|
]);
|
|
@@ -9181,10 +9534,6 @@ function partFromMldev(apiClient, fromObject) {
|
|
|
9181
9534
|
if (fromExecutableCode != null) {
|
|
9182
9535
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
9183
9536
|
}
|
|
9184
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
9185
|
-
if (fromFileData != null) {
|
|
9186
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
9187
|
-
}
|
|
9188
9537
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
9189
9538
|
if (fromFunctionCall != null) {
|
|
9190
9539
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -9655,6 +10004,22 @@ function blobFromVertex(apiClient, fromObject) {
|
|
|
9655
10004
|
}
|
|
9656
10005
|
return toObject;
|
|
9657
10006
|
}
|
|
10007
|
+
function fileDataFromVertex(apiClient, fromObject) {
|
|
10008
|
+
const toObject = {};
|
|
10009
|
+
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
10010
|
+
if (fromDisplayName != null) {
|
|
10011
|
+
setValueByPath(toObject, ['displayName'], fromDisplayName);
|
|
10012
|
+
}
|
|
10013
|
+
const fromFileUri = getValueByPath(fromObject, ['fileUri']);
|
|
10014
|
+
if (fromFileUri != null) {
|
|
10015
|
+
setValueByPath(toObject, ['fileUri'], fromFileUri);
|
|
10016
|
+
}
|
|
10017
|
+
const fromMimeType = getValueByPath(fromObject, ['mimeType']);
|
|
10018
|
+
if (fromMimeType != null) {
|
|
10019
|
+
setValueByPath(toObject, ['mimeType'], fromMimeType);
|
|
10020
|
+
}
|
|
10021
|
+
return toObject;
|
|
10022
|
+
}
|
|
9658
10023
|
function partFromVertex(apiClient, fromObject) {
|
|
9659
10024
|
const toObject = {};
|
|
9660
10025
|
const fromVideoMetadata = getValueByPath(fromObject, [
|
|
@@ -9671,6 +10036,10 @@ function partFromVertex(apiClient, fromObject) {
|
|
|
9671
10036
|
if (fromInlineData != null) {
|
|
9672
10037
|
setValueByPath(toObject, ['inlineData'], blobFromVertex(apiClient, fromInlineData));
|
|
9673
10038
|
}
|
|
10039
|
+
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
10040
|
+
if (fromFileData != null) {
|
|
10041
|
+
setValueByPath(toObject, ['fileData'], fileDataFromVertex(apiClient, fromFileData));
|
|
10042
|
+
}
|
|
9674
10043
|
const fromCodeExecutionResult = getValueByPath(fromObject, [
|
|
9675
10044
|
'codeExecutionResult',
|
|
9676
10045
|
]);
|
|
@@ -9683,10 +10052,6 @@ function partFromVertex(apiClient, fromObject) {
|
|
|
9683
10052
|
if (fromExecutableCode != null) {
|
|
9684
10053
|
setValueByPath(toObject, ['executableCode'], fromExecutableCode);
|
|
9685
10054
|
}
|
|
9686
|
-
const fromFileData = getValueByPath(fromObject, ['fileData']);
|
|
9687
|
-
if (fromFileData != null) {
|
|
9688
|
-
setValueByPath(toObject, ['fileData'], fromFileData);
|
|
9689
|
-
}
|
|
9690
10055
|
const fromFunctionCall = getValueByPath(fromObject, ['functionCall']);
|
|
9691
10056
|
if (fromFunctionCall != null) {
|
|
9692
10057
|
setValueByPath(toObject, ['functionCall'], fromFunctionCall);
|
|
@@ -10217,7 +10582,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
10217
10582
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
10218
10583
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
10219
10584
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
10220
|
-
const SDK_VERSION = '1.0
|
|
10585
|
+
const SDK_VERSION = '1.1.0'; // x-release-please-version
|
|
10221
10586
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
10222
10587
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
10223
10588
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -13703,6 +14068,12 @@ function tuningJobFromMldev(apiClient, fromObject) {
|
|
|
13703
14068
|
if (fromPipelineJob != null) {
|
|
13704
14069
|
setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
|
|
13705
14070
|
}
|
|
14071
|
+
const fromServiceAccount = getValueByPath(fromObject, [
|
|
14072
|
+
'serviceAccount',
|
|
14073
|
+
]);
|
|
14074
|
+
if (fromServiceAccount != null) {
|
|
14075
|
+
setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
|
|
14076
|
+
}
|
|
13706
14077
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
13707
14078
|
'tunedModelDisplayName',
|
|
13708
14079
|
]);
|
|
@@ -13877,6 +14248,12 @@ function tuningJobFromVertex(apiClient, fromObject) {
|
|
|
13877
14248
|
if (fromPipelineJob != null) {
|
|
13878
14249
|
setValueByPath(toObject, ['pipelineJob'], fromPipelineJob);
|
|
13879
14250
|
}
|
|
14251
|
+
const fromServiceAccount = getValueByPath(fromObject, [
|
|
14252
|
+
'serviceAccount',
|
|
14253
|
+
]);
|
|
14254
|
+
if (fromServiceAccount != null) {
|
|
14255
|
+
setValueByPath(toObject, ['serviceAccount'], fromServiceAccount);
|
|
14256
|
+
}
|
|
13880
14257
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
13881
14258
|
'tunedModelDisplayName',
|
|
13882
14259
|
]);
|