@google/genai 1.38.0 → 1.39.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/dist/genai.d.ts +163 -33
- package/dist/index.cjs +348 -123
- package/dist/index.mjs +348 -124
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +391 -124
- package/dist/node/index.mjs +391 -125
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +163 -33
- package/dist/tokenizer/node.cjs +4 -0
- package/dist/tokenizer/node.mjs +4 -0
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/web/index.mjs +348 -124
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +163 -33
- package/package.json +1 -1
package/dist/node/index.mjs
CHANGED
|
@@ -1538,6 +1538,10 @@ var TuningMethod;
|
|
|
1538
1538
|
* Preference optimization tuning.
|
|
1539
1539
|
*/
|
|
1540
1540
|
TuningMethod["PREFERENCE_TUNING"] = "PREFERENCE_TUNING";
|
|
1541
|
+
/**
|
|
1542
|
+
* Distillation tuning.
|
|
1543
|
+
*/
|
|
1544
|
+
TuningMethod["DISTILLATION"] = "DISTILLATION";
|
|
1541
1545
|
})(TuningMethod || (TuningMethod = {}));
|
|
1542
1546
|
/** State for the lifecycle of a Document. */
|
|
1543
1547
|
var DocumentState;
|
|
@@ -2329,6 +2333,9 @@ class CreateFileResponse {
|
|
|
2329
2333
|
/** Response for the delete file method. */
|
|
2330
2334
|
class DeleteFileResponse {
|
|
2331
2335
|
}
|
|
2336
|
+
/** Response for the _register file method. */
|
|
2337
|
+
class RegisterFilesResponse {
|
|
2338
|
+
}
|
|
2332
2339
|
/** Config for `inlined_responses` parameter. */
|
|
2333
2340
|
class InlinedResponse {
|
|
2334
2341
|
}
|
|
@@ -4323,6 +4330,10 @@ function inlinedResponseFromMldev(fromObject) {
|
|
|
4323
4330
|
if (fromResponse != null) {
|
|
4324
4331
|
setValueByPath(toObject, ['response'], generateContentResponseFromMldev$1(fromResponse));
|
|
4325
4332
|
}
|
|
4333
|
+
const fromMetadata = getValueByPath(fromObject, ['metadata']);
|
|
4334
|
+
if (fromMetadata != null) {
|
|
4335
|
+
setValueByPath(toObject, ['metadata'], fromMetadata);
|
|
4336
|
+
}
|
|
4326
4337
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
4327
4338
|
if (fromError != null) {
|
|
4328
4339
|
setValueByPath(toObject, ['error'], fromError);
|
|
@@ -6763,6 +6774,14 @@ function getFileParametersToMldev(fromObject) {
|
|
|
6763
6774
|
}
|
|
6764
6775
|
return toObject;
|
|
6765
6776
|
}
|
|
6777
|
+
function internalRegisterFilesParametersToMldev(fromObject) {
|
|
6778
|
+
const toObject = {};
|
|
6779
|
+
const fromUris = getValueByPath(fromObject, ['uris']);
|
|
6780
|
+
if (fromUris != null) {
|
|
6781
|
+
setValueByPath(toObject, ['uris'], fromUris);
|
|
6782
|
+
}
|
|
6783
|
+
return toObject;
|
|
6784
|
+
}
|
|
6766
6785
|
function listFilesConfigToMldev(fromObject, parentObject) {
|
|
6767
6786
|
const toObject = {};
|
|
6768
6787
|
const fromPageSize = getValueByPath(fromObject, ['pageSize']);
|
|
@@ -6809,6 +6828,26 @@ function listFilesResponseFromMldev(fromObject) {
|
|
|
6809
6828
|
}
|
|
6810
6829
|
return toObject;
|
|
6811
6830
|
}
|
|
6831
|
+
function registerFilesResponseFromMldev(fromObject) {
|
|
6832
|
+
const toObject = {};
|
|
6833
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
6834
|
+
'sdkHttpResponse',
|
|
6835
|
+
]);
|
|
6836
|
+
if (fromSdkHttpResponse != null) {
|
|
6837
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
6838
|
+
}
|
|
6839
|
+
const fromFiles = getValueByPath(fromObject, ['files']);
|
|
6840
|
+
if (fromFiles != null) {
|
|
6841
|
+
let transformedList = fromFiles;
|
|
6842
|
+
if (Array.isArray(transformedList)) {
|
|
6843
|
+
transformedList = transformedList.map((item) => {
|
|
6844
|
+
return item;
|
|
6845
|
+
});
|
|
6846
|
+
}
|
|
6847
|
+
setValueByPath(toObject, ['files'], transformedList);
|
|
6848
|
+
}
|
|
6849
|
+
return toObject;
|
|
6850
|
+
}
|
|
6812
6851
|
|
|
6813
6852
|
/**
|
|
6814
6853
|
* @license
|
|
@@ -6909,6 +6948,16 @@ class Files extends BaseModule {
|
|
|
6909
6948
|
async download(params) {
|
|
6910
6949
|
await this.apiClient.downloadFile(params);
|
|
6911
6950
|
}
|
|
6951
|
+
/**
|
|
6952
|
+
* Registers Google Cloud Storage files for use with the API.
|
|
6953
|
+
* This method is only available in Node.js environments.
|
|
6954
|
+
*/
|
|
6955
|
+
async registerFiles(params) {
|
|
6956
|
+
throw new Error('registerFiles is only supported in Node.js environments.');
|
|
6957
|
+
}
|
|
6958
|
+
async _registerFiles(params) {
|
|
6959
|
+
return this.registerFilesInternal(params);
|
|
6960
|
+
}
|
|
6912
6961
|
async listInternal(params) {
|
|
6913
6962
|
var _a, _b;
|
|
6914
6963
|
let response;
|
|
@@ -7082,6 +7131,40 @@ class Files extends BaseModule {
|
|
|
7082
7131
|
});
|
|
7083
7132
|
}
|
|
7084
7133
|
}
|
|
7134
|
+
async registerFilesInternal(params) {
|
|
7135
|
+
var _a, _b;
|
|
7136
|
+
let response;
|
|
7137
|
+
let path = '';
|
|
7138
|
+
let queryParams = {};
|
|
7139
|
+
if (this.apiClient.isVertexAI()) {
|
|
7140
|
+
throw new Error('This method is only supported by the Gemini Developer API.');
|
|
7141
|
+
}
|
|
7142
|
+
else {
|
|
7143
|
+
const body = internalRegisterFilesParametersToMldev(params);
|
|
7144
|
+
path = formatMap('files:register', body['_url']);
|
|
7145
|
+
queryParams = body['_query'];
|
|
7146
|
+
delete body['_url'];
|
|
7147
|
+
delete body['_query'];
|
|
7148
|
+
response = this.apiClient
|
|
7149
|
+
.request({
|
|
7150
|
+
path: path,
|
|
7151
|
+
queryParams: queryParams,
|
|
7152
|
+
body: JSON.stringify(body),
|
|
7153
|
+
httpMethod: 'POST',
|
|
7154
|
+
httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
|
|
7155
|
+
abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
|
|
7156
|
+
})
|
|
7157
|
+
.then((httpResponse) => {
|
|
7158
|
+
return httpResponse.json();
|
|
7159
|
+
});
|
|
7160
|
+
return response.then((apiResponse) => {
|
|
7161
|
+
const resp = registerFilesResponseFromMldev(apiResponse);
|
|
7162
|
+
const typedResp = new RegisterFilesResponse();
|
|
7163
|
+
Object.assign(typedResp, resp);
|
|
7164
|
+
return typedResp;
|
|
7165
|
+
});
|
|
7166
|
+
}
|
|
7167
|
+
}
|
|
7085
7168
|
}
|
|
7086
7169
|
|
|
7087
7170
|
/**
|
|
@@ -8054,7 +8137,7 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
8054
8137
|
* Copyright 2025 Google LLC
|
|
8055
8138
|
* SPDX-License-Identifier: Apache-2.0
|
|
8056
8139
|
*/
|
|
8057
|
-
function blobToMldev$1(fromObject) {
|
|
8140
|
+
function blobToMldev$1(fromObject, _rootObject) {
|
|
8058
8141
|
const toObject = {};
|
|
8059
8142
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
8060
8143
|
if (fromData != null) {
|
|
@@ -8069,7 +8152,7 @@ function blobToMldev$1(fromObject) {
|
|
|
8069
8152
|
}
|
|
8070
8153
|
return toObject;
|
|
8071
8154
|
}
|
|
8072
|
-
function candidateFromMldev(fromObject) {
|
|
8155
|
+
function candidateFromMldev(fromObject, rootObject) {
|
|
8073
8156
|
const toObject = {};
|
|
8074
8157
|
const fromContent = getValueByPath(fromObject, ['content']);
|
|
8075
8158
|
if (fromContent != null) {
|
|
@@ -8129,7 +8212,7 @@ function candidateFromMldev(fromObject) {
|
|
|
8129
8212
|
}
|
|
8130
8213
|
return toObject;
|
|
8131
8214
|
}
|
|
8132
|
-
function citationMetadataFromMldev(fromObject) {
|
|
8215
|
+
function citationMetadataFromMldev(fromObject, _rootObject) {
|
|
8133
8216
|
const toObject = {};
|
|
8134
8217
|
const fromCitations = getValueByPath(fromObject, ['citationSources']);
|
|
8135
8218
|
if (fromCitations != null) {
|
|
@@ -8143,7 +8226,7 @@ function citationMetadataFromMldev(fromObject) {
|
|
|
8143
8226
|
}
|
|
8144
8227
|
return toObject;
|
|
8145
8228
|
}
|
|
8146
|
-
function computeTokensParametersToVertex(apiClient, fromObject) {
|
|
8229
|
+
function computeTokensParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
8147
8230
|
const toObject = {};
|
|
8148
8231
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8149
8232
|
if (fromModel != null) {
|
|
@@ -8161,7 +8244,7 @@ function computeTokensParametersToVertex(apiClient, fromObject) {
|
|
|
8161
8244
|
}
|
|
8162
8245
|
return toObject;
|
|
8163
8246
|
}
|
|
8164
|
-
function computeTokensResponseFromVertex(fromObject) {
|
|
8247
|
+
function computeTokensResponseFromVertex(fromObject, _rootObject) {
|
|
8165
8248
|
const toObject = {};
|
|
8166
8249
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
8167
8250
|
'sdkHttpResponse',
|
|
@@ -8181,7 +8264,7 @@ function computeTokensResponseFromVertex(fromObject) {
|
|
|
8181
8264
|
}
|
|
8182
8265
|
return toObject;
|
|
8183
8266
|
}
|
|
8184
|
-
function contentEmbeddingFromVertex(fromObject) {
|
|
8267
|
+
function contentEmbeddingFromVertex(fromObject, rootObject) {
|
|
8185
8268
|
const toObject = {};
|
|
8186
8269
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
8187
8270
|
if (fromValues != null) {
|
|
@@ -8193,7 +8276,7 @@ function contentEmbeddingFromVertex(fromObject) {
|
|
|
8193
8276
|
}
|
|
8194
8277
|
return toObject;
|
|
8195
8278
|
}
|
|
8196
|
-
function contentEmbeddingStatisticsFromVertex(fromObject) {
|
|
8279
|
+
function contentEmbeddingStatisticsFromVertex(fromObject, _rootObject) {
|
|
8197
8280
|
const toObject = {};
|
|
8198
8281
|
const fromTruncated = getValueByPath(fromObject, ['truncated']);
|
|
8199
8282
|
if (fromTruncated != null) {
|
|
@@ -8205,7 +8288,7 @@ function contentEmbeddingStatisticsFromVertex(fromObject) {
|
|
|
8205
8288
|
}
|
|
8206
8289
|
return toObject;
|
|
8207
8290
|
}
|
|
8208
|
-
function contentToMldev$1(fromObject) {
|
|
8291
|
+
function contentToMldev$1(fromObject, rootObject) {
|
|
8209
8292
|
const toObject = {};
|
|
8210
8293
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
8211
8294
|
if (fromParts != null) {
|
|
@@ -8223,7 +8306,7 @@ function contentToMldev$1(fromObject) {
|
|
|
8223
8306
|
}
|
|
8224
8307
|
return toObject;
|
|
8225
8308
|
}
|
|
8226
|
-
function controlReferenceConfigToVertex(fromObject) {
|
|
8309
|
+
function controlReferenceConfigToVertex(fromObject, _rootObject) {
|
|
8227
8310
|
const toObject = {};
|
|
8228
8311
|
const fromControlType = getValueByPath(fromObject, ['controlType']);
|
|
8229
8312
|
if (fromControlType != null) {
|
|
@@ -8237,7 +8320,7 @@ function controlReferenceConfigToVertex(fromObject) {
|
|
|
8237
8320
|
}
|
|
8238
8321
|
return toObject;
|
|
8239
8322
|
}
|
|
8240
|
-
function countTokensConfigToMldev(fromObject) {
|
|
8323
|
+
function countTokensConfigToMldev(fromObject, _rootObject) {
|
|
8241
8324
|
const toObject = {};
|
|
8242
8325
|
if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
|
|
8243
8326
|
throw new Error('systemInstruction parameter is not supported in Gemini API.');
|
|
@@ -8250,7 +8333,7 @@ function countTokensConfigToMldev(fromObject) {
|
|
|
8250
8333
|
}
|
|
8251
8334
|
return toObject;
|
|
8252
8335
|
}
|
|
8253
|
-
function countTokensConfigToVertex(fromObject, parentObject) {
|
|
8336
|
+
function countTokensConfigToVertex(fromObject, parentObject, rootObject) {
|
|
8254
8337
|
const toObject = {};
|
|
8255
8338
|
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
8256
8339
|
'systemInstruction',
|
|
@@ -8276,7 +8359,7 @@ function countTokensConfigToVertex(fromObject, parentObject) {
|
|
|
8276
8359
|
}
|
|
8277
8360
|
return toObject;
|
|
8278
8361
|
}
|
|
8279
|
-
function countTokensParametersToMldev(apiClient, fromObject) {
|
|
8362
|
+
function countTokensParametersToMldev(apiClient, fromObject, rootObject) {
|
|
8280
8363
|
const toObject = {};
|
|
8281
8364
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8282
8365
|
if (fromModel != null) {
|
|
@@ -8298,7 +8381,7 @@ function countTokensParametersToMldev(apiClient, fromObject) {
|
|
|
8298
8381
|
}
|
|
8299
8382
|
return toObject;
|
|
8300
8383
|
}
|
|
8301
|
-
function countTokensParametersToVertex(apiClient, fromObject) {
|
|
8384
|
+
function countTokensParametersToVertex(apiClient, fromObject, rootObject) {
|
|
8302
8385
|
const toObject = {};
|
|
8303
8386
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8304
8387
|
if (fromModel != null) {
|
|
@@ -8320,7 +8403,7 @@ function countTokensParametersToVertex(apiClient, fromObject) {
|
|
|
8320
8403
|
}
|
|
8321
8404
|
return toObject;
|
|
8322
8405
|
}
|
|
8323
|
-
function countTokensResponseFromMldev(fromObject) {
|
|
8406
|
+
function countTokensResponseFromMldev(fromObject, _rootObject) {
|
|
8324
8407
|
const toObject = {};
|
|
8325
8408
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
8326
8409
|
'sdkHttpResponse',
|
|
@@ -8340,7 +8423,7 @@ function countTokensResponseFromMldev(fromObject) {
|
|
|
8340
8423
|
}
|
|
8341
8424
|
return toObject;
|
|
8342
8425
|
}
|
|
8343
|
-
function countTokensResponseFromVertex(fromObject) {
|
|
8426
|
+
function countTokensResponseFromVertex(fromObject, _rootObject) {
|
|
8344
8427
|
const toObject = {};
|
|
8345
8428
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
8346
8429
|
'sdkHttpResponse',
|
|
@@ -8354,7 +8437,7 @@ function countTokensResponseFromVertex(fromObject) {
|
|
|
8354
8437
|
}
|
|
8355
8438
|
return toObject;
|
|
8356
8439
|
}
|
|
8357
|
-
function deleteModelParametersToMldev(apiClient, fromObject) {
|
|
8440
|
+
function deleteModelParametersToMldev(apiClient, fromObject, _rootObject) {
|
|
8358
8441
|
const toObject = {};
|
|
8359
8442
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8360
8443
|
if (fromModel != null) {
|
|
@@ -8362,7 +8445,7 @@ function deleteModelParametersToMldev(apiClient, fromObject) {
|
|
|
8362
8445
|
}
|
|
8363
8446
|
return toObject;
|
|
8364
8447
|
}
|
|
8365
|
-
function deleteModelParametersToVertex(apiClient, fromObject) {
|
|
8448
|
+
function deleteModelParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
8366
8449
|
const toObject = {};
|
|
8367
8450
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8368
8451
|
if (fromModel != null) {
|
|
@@ -8370,7 +8453,7 @@ function deleteModelParametersToVertex(apiClient, fromObject) {
|
|
|
8370
8453
|
}
|
|
8371
8454
|
return toObject;
|
|
8372
8455
|
}
|
|
8373
|
-
function deleteModelResponseFromMldev(fromObject) {
|
|
8456
|
+
function deleteModelResponseFromMldev(fromObject, _rootObject) {
|
|
8374
8457
|
const toObject = {};
|
|
8375
8458
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
8376
8459
|
'sdkHttpResponse',
|
|
@@ -8380,7 +8463,7 @@ function deleteModelResponseFromMldev(fromObject) {
|
|
|
8380
8463
|
}
|
|
8381
8464
|
return toObject;
|
|
8382
8465
|
}
|
|
8383
|
-
function deleteModelResponseFromVertex(fromObject) {
|
|
8466
|
+
function deleteModelResponseFromVertex(fromObject, _rootObject) {
|
|
8384
8467
|
const toObject = {};
|
|
8385
8468
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
8386
8469
|
'sdkHttpResponse',
|
|
@@ -8390,7 +8473,7 @@ function deleteModelResponseFromVertex(fromObject) {
|
|
|
8390
8473
|
}
|
|
8391
8474
|
return toObject;
|
|
8392
8475
|
}
|
|
8393
|
-
function editImageConfigToVertex(fromObject, parentObject) {
|
|
8476
|
+
function editImageConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
8394
8477
|
const toObject = {};
|
|
8395
8478
|
const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
|
|
8396
8479
|
if (parentObject !== undefined && fromOutputGcsUri != null) {
|
|
@@ -8480,7 +8563,7 @@ function editImageConfigToVertex(fromObject, parentObject) {
|
|
|
8480
8563
|
}
|
|
8481
8564
|
return toObject;
|
|
8482
8565
|
}
|
|
8483
|
-
function editImageParametersInternalToVertex(apiClient, fromObject) {
|
|
8566
|
+
function editImageParametersInternalToVertex(apiClient, fromObject, rootObject) {
|
|
8484
8567
|
const toObject = {};
|
|
8485
8568
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8486
8569
|
if (fromModel != null) {
|
|
@@ -8508,7 +8591,7 @@ function editImageParametersInternalToVertex(apiClient, fromObject) {
|
|
|
8508
8591
|
}
|
|
8509
8592
|
return toObject;
|
|
8510
8593
|
}
|
|
8511
|
-
function editImageResponseFromVertex(fromObject) {
|
|
8594
|
+
function editImageResponseFromVertex(fromObject, rootObject) {
|
|
8512
8595
|
const toObject = {};
|
|
8513
8596
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
8514
8597
|
'sdkHttpResponse',
|
|
@@ -8530,7 +8613,7 @@ function editImageResponseFromVertex(fromObject) {
|
|
|
8530
8613
|
}
|
|
8531
8614
|
return toObject;
|
|
8532
8615
|
}
|
|
8533
|
-
function embedContentConfigToMldev(fromObject, parentObject) {
|
|
8616
|
+
function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
8534
8617
|
const toObject = {};
|
|
8535
8618
|
const fromTaskType = getValueByPath(fromObject, ['taskType']);
|
|
8536
8619
|
if (parentObject !== undefined && fromTaskType != null) {
|
|
@@ -8554,7 +8637,7 @@ function embedContentConfigToMldev(fromObject, parentObject) {
|
|
|
8554
8637
|
}
|
|
8555
8638
|
return toObject;
|
|
8556
8639
|
}
|
|
8557
|
-
function embedContentConfigToVertex(fromObject, parentObject) {
|
|
8640
|
+
function embedContentConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
8558
8641
|
const toObject = {};
|
|
8559
8642
|
const fromTaskType = getValueByPath(fromObject, ['taskType']);
|
|
8560
8643
|
if (parentObject !== undefined && fromTaskType != null) {
|
|
@@ -8580,7 +8663,7 @@ function embedContentConfigToVertex(fromObject, parentObject) {
|
|
|
8580
8663
|
}
|
|
8581
8664
|
return toObject;
|
|
8582
8665
|
}
|
|
8583
|
-
function embedContentParametersToMldev(apiClient, fromObject) {
|
|
8666
|
+
function embedContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
8584
8667
|
const toObject = {};
|
|
8585
8668
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8586
8669
|
if (fromModel != null) {
|
|
@@ -8606,7 +8689,7 @@ function embedContentParametersToMldev(apiClient, fromObject) {
|
|
|
8606
8689
|
}
|
|
8607
8690
|
return toObject;
|
|
8608
8691
|
}
|
|
8609
|
-
function embedContentParametersToVertex(apiClient, fromObject) {
|
|
8692
|
+
function embedContentParametersToVertex(apiClient, fromObject, rootObject) {
|
|
8610
8693
|
const toObject = {};
|
|
8611
8694
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
8612
8695
|
if (fromModel != null) {
|
|
@@ -8628,7 +8711,7 @@ function embedContentParametersToVertex(apiClient, fromObject) {
|
|
|
8628
8711
|
}
|
|
8629
8712
|
return toObject;
|
|
8630
8713
|
}
|
|
8631
|
-
function embedContentResponseFromMldev(fromObject) {
|
|
8714
|
+
function embedContentResponseFromMldev(fromObject, _rootObject) {
|
|
8632
8715
|
const toObject = {};
|
|
8633
8716
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
8634
8717
|
'sdkHttpResponse',
|
|
@@ -8652,7 +8735,7 @@ function embedContentResponseFromMldev(fromObject) {
|
|
|
8652
8735
|
}
|
|
8653
8736
|
return toObject;
|
|
8654
8737
|
}
|
|
8655
|
-
function embedContentResponseFromVertex(fromObject) {
|
|
8738
|
+
function embedContentResponseFromVertex(fromObject, rootObject) {
|
|
8656
8739
|
const toObject = {};
|
|
8657
8740
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
8658
8741
|
'sdkHttpResponse',
|
|
@@ -8679,7 +8762,7 @@ function embedContentResponseFromVertex(fromObject) {
|
|
|
8679
8762
|
}
|
|
8680
8763
|
return toObject;
|
|
8681
8764
|
}
|
|
8682
|
-
function endpointFromVertex(fromObject) {
|
|
8765
|
+
function endpointFromVertex(fromObject, _rootObject) {
|
|
8683
8766
|
const toObject = {};
|
|
8684
8767
|
const fromName = getValueByPath(fromObject, ['endpoint']);
|
|
8685
8768
|
if (fromName != null) {
|
|
@@ -8693,7 +8776,7 @@ function endpointFromVertex(fromObject) {
|
|
|
8693
8776
|
}
|
|
8694
8777
|
return toObject;
|
|
8695
8778
|
}
|
|
8696
|
-
function fileDataToMldev$1(fromObject) {
|
|
8779
|
+
function fileDataToMldev$1(fromObject, _rootObject) {
|
|
8697
8780
|
const toObject = {};
|
|
8698
8781
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
8699
8782
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -8708,7 +8791,7 @@ function fileDataToMldev$1(fromObject) {
|
|
|
8708
8791
|
}
|
|
8709
8792
|
return toObject;
|
|
8710
8793
|
}
|
|
8711
|
-
function functionCallToMldev$1(fromObject) {
|
|
8794
|
+
function functionCallToMldev$1(fromObject, _rootObject) {
|
|
8712
8795
|
const toObject = {};
|
|
8713
8796
|
const fromId = getValueByPath(fromObject, ['id']);
|
|
8714
8797
|
if (fromId != null) {
|
|
@@ -8730,7 +8813,7 @@ function functionCallToMldev$1(fromObject) {
|
|
|
8730
8813
|
}
|
|
8731
8814
|
return toObject;
|
|
8732
8815
|
}
|
|
8733
|
-
function functionCallingConfigToMldev(fromObject) {
|
|
8816
|
+
function functionCallingConfigToMldev(fromObject, _rootObject) {
|
|
8734
8817
|
const toObject = {};
|
|
8735
8818
|
const fromAllowedFunctionNames = getValueByPath(fromObject, [
|
|
8736
8819
|
'allowedFunctionNames',
|
|
@@ -8748,7 +8831,7 @@ function functionCallingConfigToMldev(fromObject) {
|
|
|
8748
8831
|
}
|
|
8749
8832
|
return toObject;
|
|
8750
8833
|
}
|
|
8751
|
-
function functionDeclarationToVertex(fromObject) {
|
|
8834
|
+
function functionDeclarationToVertex(fromObject, _rootObject) {
|
|
8752
8835
|
const toObject = {};
|
|
8753
8836
|
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
8754
8837
|
if (fromDescription != null) {
|
|
@@ -8783,7 +8866,7 @@ function functionDeclarationToVertex(fromObject) {
|
|
|
8783
8866
|
}
|
|
8784
8867
|
return toObject;
|
|
8785
8868
|
}
|
|
8786
|
-
function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
8869
|
+
function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootObject) {
|
|
8787
8870
|
const toObject = {};
|
|
8788
8871
|
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
8789
8872
|
'systemInstruction',
|
|
@@ -8946,7 +9029,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
8946
9029
|
}
|
|
8947
9030
|
return toObject;
|
|
8948
9031
|
}
|
|
8949
|
-
function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
9032
|
+
function generateContentConfigToVertex(apiClient, fromObject, parentObject, rootObject) {
|
|
8950
9033
|
const toObject = {};
|
|
8951
9034
|
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
8952
9035
|
'systemInstruction',
|
|
@@ -9120,7 +9203,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
9120
9203
|
}
|
|
9121
9204
|
return toObject;
|
|
9122
9205
|
}
|
|
9123
|
-
function generateContentParametersToMldev(apiClient, fromObject) {
|
|
9206
|
+
function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
9124
9207
|
const toObject = {};
|
|
9125
9208
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
9126
9209
|
if (fromModel != null) {
|
|
@@ -9142,7 +9225,7 @@ function generateContentParametersToMldev(apiClient, fromObject) {
|
|
|
9142
9225
|
}
|
|
9143
9226
|
return toObject;
|
|
9144
9227
|
}
|
|
9145
|
-
function generateContentParametersToVertex(apiClient, fromObject) {
|
|
9228
|
+
function generateContentParametersToVertex(apiClient, fromObject, rootObject) {
|
|
9146
9229
|
const toObject = {};
|
|
9147
9230
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
9148
9231
|
if (fromModel != null) {
|
|
@@ -9164,7 +9247,7 @@ function generateContentParametersToVertex(apiClient, fromObject) {
|
|
|
9164
9247
|
}
|
|
9165
9248
|
return toObject;
|
|
9166
9249
|
}
|
|
9167
|
-
function generateContentResponseFromMldev(fromObject) {
|
|
9250
|
+
function generateContentResponseFromMldev(fromObject, rootObject) {
|
|
9168
9251
|
const toObject = {};
|
|
9169
9252
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
9170
9253
|
'sdkHttpResponse',
|
|
@@ -9204,7 +9287,7 @@ function generateContentResponseFromMldev(fromObject) {
|
|
|
9204
9287
|
}
|
|
9205
9288
|
return toObject;
|
|
9206
9289
|
}
|
|
9207
|
-
function generateContentResponseFromVertex(fromObject) {
|
|
9290
|
+
function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
9208
9291
|
const toObject = {};
|
|
9209
9292
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
9210
9293
|
'sdkHttpResponse',
|
|
@@ -9248,7 +9331,7 @@ function generateContentResponseFromVertex(fromObject) {
|
|
|
9248
9331
|
}
|
|
9249
9332
|
return toObject;
|
|
9250
9333
|
}
|
|
9251
|
-
function generateImagesConfigToMldev(fromObject, parentObject) {
|
|
9334
|
+
function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
9252
9335
|
const toObject = {};
|
|
9253
9336
|
if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
|
|
9254
9337
|
throw new Error('outputGcsUri parameter is not supported in Gemini API.');
|
|
@@ -9330,7 +9413,7 @@ function generateImagesConfigToMldev(fromObject, parentObject) {
|
|
|
9330
9413
|
}
|
|
9331
9414
|
return toObject;
|
|
9332
9415
|
}
|
|
9333
|
-
function generateImagesConfigToVertex(fromObject, parentObject) {
|
|
9416
|
+
function generateImagesConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
9334
9417
|
const toObject = {};
|
|
9335
9418
|
const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
|
|
9336
9419
|
if (parentObject !== undefined && fromOutputGcsUri != null) {
|
|
@@ -9422,7 +9505,7 @@ function generateImagesConfigToVertex(fromObject, parentObject) {
|
|
|
9422
9505
|
}
|
|
9423
9506
|
return toObject;
|
|
9424
9507
|
}
|
|
9425
|
-
function generateImagesParametersToMldev(apiClient, fromObject) {
|
|
9508
|
+
function generateImagesParametersToMldev(apiClient, fromObject, rootObject) {
|
|
9426
9509
|
const toObject = {};
|
|
9427
9510
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
9428
9511
|
if (fromModel != null) {
|
|
@@ -9438,7 +9521,7 @@ function generateImagesParametersToMldev(apiClient, fromObject) {
|
|
|
9438
9521
|
}
|
|
9439
9522
|
return toObject;
|
|
9440
9523
|
}
|
|
9441
|
-
function generateImagesParametersToVertex(apiClient, fromObject) {
|
|
9524
|
+
function generateImagesParametersToVertex(apiClient, fromObject, rootObject) {
|
|
9442
9525
|
const toObject = {};
|
|
9443
9526
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
9444
9527
|
if (fromModel != null) {
|
|
@@ -9454,7 +9537,7 @@ function generateImagesParametersToVertex(apiClient, fromObject) {
|
|
|
9454
9537
|
}
|
|
9455
9538
|
return toObject;
|
|
9456
9539
|
}
|
|
9457
|
-
function generateImagesResponseFromMldev(fromObject) {
|
|
9540
|
+
function generateImagesResponseFromMldev(fromObject, rootObject) {
|
|
9458
9541
|
const toObject = {};
|
|
9459
9542
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
9460
9543
|
'sdkHttpResponse',
|
|
@@ -9482,7 +9565,7 @@ function generateImagesResponseFromMldev(fromObject) {
|
|
|
9482
9565
|
}
|
|
9483
9566
|
return toObject;
|
|
9484
9567
|
}
|
|
9485
|
-
function generateImagesResponseFromVertex(fromObject) {
|
|
9568
|
+
function generateImagesResponseFromVertex(fromObject, rootObject) {
|
|
9486
9569
|
const toObject = {};
|
|
9487
9570
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
9488
9571
|
'sdkHttpResponse',
|
|
@@ -9510,7 +9593,7 @@ function generateImagesResponseFromVertex(fromObject) {
|
|
|
9510
9593
|
}
|
|
9511
9594
|
return toObject;
|
|
9512
9595
|
}
|
|
9513
|
-
function generateVideosConfigToMldev(fromObject, parentObject) {
|
|
9596
|
+
function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
9514
9597
|
const toObject = {};
|
|
9515
9598
|
const fromNumberOfVideos = getValueByPath(fromObject, [
|
|
9516
9599
|
'numberOfVideos',
|
|
@@ -9589,7 +9672,7 @@ function generateVideosConfigToMldev(fromObject, parentObject) {
|
|
|
9589
9672
|
}
|
|
9590
9673
|
return toObject;
|
|
9591
9674
|
}
|
|
9592
|
-
function generateVideosConfigToVertex(fromObject, parentObject) {
|
|
9675
|
+
function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
9593
9676
|
const toObject = {};
|
|
9594
9677
|
const fromNumberOfVideos = getValueByPath(fromObject, [
|
|
9595
9678
|
'numberOfVideos',
|
|
@@ -9679,7 +9762,7 @@ function generateVideosConfigToVertex(fromObject, parentObject) {
|
|
|
9679
9762
|
}
|
|
9680
9763
|
return toObject;
|
|
9681
9764
|
}
|
|
9682
|
-
function generateVideosOperationFromMldev(fromObject) {
|
|
9765
|
+
function generateVideosOperationFromMldev(fromObject, rootObject) {
|
|
9683
9766
|
const toObject = {};
|
|
9684
9767
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
9685
9768
|
if (fromName != null) {
|
|
@@ -9706,7 +9789,7 @@ function generateVideosOperationFromMldev(fromObject) {
|
|
|
9706
9789
|
}
|
|
9707
9790
|
return toObject;
|
|
9708
9791
|
}
|
|
9709
|
-
function generateVideosOperationFromVertex(fromObject) {
|
|
9792
|
+
function generateVideosOperationFromVertex(fromObject, rootObject) {
|
|
9710
9793
|
const toObject = {};
|
|
9711
9794
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
9712
9795
|
if (fromName != null) {
|
|
@@ -9730,7 +9813,7 @@ function generateVideosOperationFromVertex(fromObject) {
|
|
|
9730
9813
|
}
|
|
9731
9814
|
return toObject;
|
|
9732
9815
|
}
|
|
9733
|
-
function generateVideosParametersToMldev(apiClient, fromObject) {
|
|
9816
|
+
function generateVideosParametersToMldev(apiClient, fromObject, rootObject) {
|
|
9734
9817
|
const toObject = {};
|
|
9735
9818
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
9736
9819
|
if (fromModel != null) {
|
|
@@ -9758,7 +9841,7 @@ function generateVideosParametersToMldev(apiClient, fromObject) {
|
|
|
9758
9841
|
}
|
|
9759
9842
|
return toObject;
|
|
9760
9843
|
}
|
|
9761
|
-
function generateVideosParametersToVertex(apiClient, fromObject) {
|
|
9844
|
+
function generateVideosParametersToVertex(apiClient, fromObject, rootObject) {
|
|
9762
9845
|
const toObject = {};
|
|
9763
9846
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
9764
9847
|
if (fromModel != null) {
|
|
@@ -9786,7 +9869,7 @@ function generateVideosParametersToVertex(apiClient, fromObject) {
|
|
|
9786
9869
|
}
|
|
9787
9870
|
return toObject;
|
|
9788
9871
|
}
|
|
9789
|
-
function generateVideosResponseFromMldev(fromObject) {
|
|
9872
|
+
function generateVideosResponseFromMldev(fromObject, rootObject) {
|
|
9790
9873
|
const toObject = {};
|
|
9791
9874
|
const fromGeneratedVideos = getValueByPath(fromObject, [
|
|
9792
9875
|
'generatedSamples',
|
|
@@ -9814,7 +9897,7 @@ function generateVideosResponseFromMldev(fromObject) {
|
|
|
9814
9897
|
}
|
|
9815
9898
|
return toObject;
|
|
9816
9899
|
}
|
|
9817
|
-
function generateVideosResponseFromVertex(fromObject) {
|
|
9900
|
+
function generateVideosResponseFromVertex(fromObject, rootObject) {
|
|
9818
9901
|
const toObject = {};
|
|
9819
9902
|
const fromGeneratedVideos = getValueByPath(fromObject, ['videos']);
|
|
9820
9903
|
if (fromGeneratedVideos != null) {
|
|
@@ -9840,7 +9923,7 @@ function generateVideosResponseFromVertex(fromObject) {
|
|
|
9840
9923
|
}
|
|
9841
9924
|
return toObject;
|
|
9842
9925
|
}
|
|
9843
|
-
function generateVideosSourceToMldev(fromObject, parentObject) {
|
|
9926
|
+
function generateVideosSourceToMldev(fromObject, parentObject, rootObject) {
|
|
9844
9927
|
const toObject = {};
|
|
9845
9928
|
const fromPrompt = getValueByPath(fromObject, ['prompt']);
|
|
9846
9929
|
if (parentObject !== undefined && fromPrompt != null) {
|
|
@@ -9856,7 +9939,7 @@ function generateVideosSourceToMldev(fromObject, parentObject) {
|
|
|
9856
9939
|
}
|
|
9857
9940
|
return toObject;
|
|
9858
9941
|
}
|
|
9859
|
-
function generateVideosSourceToVertex(fromObject, parentObject) {
|
|
9942
|
+
function generateVideosSourceToVertex(fromObject, parentObject, rootObject) {
|
|
9860
9943
|
const toObject = {};
|
|
9861
9944
|
const fromPrompt = getValueByPath(fromObject, ['prompt']);
|
|
9862
9945
|
if (parentObject !== undefined && fromPrompt != null) {
|
|
@@ -9872,7 +9955,7 @@ function generateVideosSourceToVertex(fromObject, parentObject) {
|
|
|
9872
9955
|
}
|
|
9873
9956
|
return toObject;
|
|
9874
9957
|
}
|
|
9875
|
-
function generatedImageFromMldev(fromObject) {
|
|
9958
|
+
function generatedImageFromMldev(fromObject, rootObject) {
|
|
9876
9959
|
const toObject = {};
|
|
9877
9960
|
const fromImage = getValueByPath(fromObject, ['_self']);
|
|
9878
9961
|
if (fromImage != null) {
|
|
@@ -9890,7 +9973,7 @@ function generatedImageFromMldev(fromObject) {
|
|
|
9890
9973
|
}
|
|
9891
9974
|
return toObject;
|
|
9892
9975
|
}
|
|
9893
|
-
function generatedImageFromVertex(fromObject) {
|
|
9976
|
+
function generatedImageFromVertex(fromObject, rootObject) {
|
|
9894
9977
|
const toObject = {};
|
|
9895
9978
|
const fromImage = getValueByPath(fromObject, ['_self']);
|
|
9896
9979
|
if (fromImage != null) {
|
|
@@ -9912,7 +9995,7 @@ function generatedImageFromVertex(fromObject) {
|
|
|
9912
9995
|
}
|
|
9913
9996
|
return toObject;
|
|
9914
9997
|
}
|
|
9915
|
-
function generatedImageMaskFromVertex(fromObject) {
|
|
9998
|
+
function generatedImageMaskFromVertex(fromObject, rootObject) {
|
|
9916
9999
|
const toObject = {};
|
|
9917
10000
|
const fromMask = getValueByPath(fromObject, ['_self']);
|
|
9918
10001
|
if (fromMask != null) {
|
|
@@ -9930,7 +10013,7 @@ function generatedImageMaskFromVertex(fromObject) {
|
|
|
9930
10013
|
}
|
|
9931
10014
|
return toObject;
|
|
9932
10015
|
}
|
|
9933
|
-
function generatedVideoFromMldev(fromObject) {
|
|
10016
|
+
function generatedVideoFromMldev(fromObject, rootObject) {
|
|
9934
10017
|
const toObject = {};
|
|
9935
10018
|
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
9936
10019
|
if (fromVideo != null) {
|
|
@@ -9938,7 +10021,7 @@ function generatedVideoFromMldev(fromObject) {
|
|
|
9938
10021
|
}
|
|
9939
10022
|
return toObject;
|
|
9940
10023
|
}
|
|
9941
|
-
function generatedVideoFromVertex(fromObject) {
|
|
10024
|
+
function generatedVideoFromVertex(fromObject, rootObject) {
|
|
9942
10025
|
const toObject = {};
|
|
9943
10026
|
const fromVideo = getValueByPath(fromObject, ['_self']);
|
|
9944
10027
|
if (fromVideo != null) {
|
|
@@ -9946,7 +10029,7 @@ function generatedVideoFromVertex(fromObject) {
|
|
|
9946
10029
|
}
|
|
9947
10030
|
return toObject;
|
|
9948
10031
|
}
|
|
9949
|
-
function generationConfigToVertex(fromObject) {
|
|
10032
|
+
function generationConfigToVertex(fromObject, _rootObject) {
|
|
9950
10033
|
const toObject = {};
|
|
9951
10034
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
9952
10035
|
'modelSelectionConfig',
|
|
@@ -10074,7 +10157,7 @@ function generationConfigToVertex(fromObject) {
|
|
|
10074
10157
|
}
|
|
10075
10158
|
return toObject;
|
|
10076
10159
|
}
|
|
10077
|
-
function getModelParametersToMldev(apiClient, fromObject) {
|
|
10160
|
+
function getModelParametersToMldev(apiClient, fromObject, _rootObject) {
|
|
10078
10161
|
const toObject = {};
|
|
10079
10162
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
10080
10163
|
if (fromModel != null) {
|
|
@@ -10082,7 +10165,7 @@ function getModelParametersToMldev(apiClient, fromObject) {
|
|
|
10082
10165
|
}
|
|
10083
10166
|
return toObject;
|
|
10084
10167
|
}
|
|
10085
|
-
function getModelParametersToVertex(apiClient, fromObject) {
|
|
10168
|
+
function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
10086
10169
|
const toObject = {};
|
|
10087
10170
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
10088
10171
|
if (fromModel != null) {
|
|
@@ -10090,7 +10173,7 @@ function getModelParametersToVertex(apiClient, fromObject) {
|
|
|
10090
10173
|
}
|
|
10091
10174
|
return toObject;
|
|
10092
10175
|
}
|
|
10093
|
-
function googleMapsToMldev$1(fromObject) {
|
|
10176
|
+
function googleMapsToMldev$1(fromObject, _rootObject) {
|
|
10094
10177
|
const toObject = {};
|
|
10095
10178
|
if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
|
|
10096
10179
|
throw new Error('authConfig parameter is not supported in Gemini API.');
|
|
@@ -10101,7 +10184,7 @@ function googleMapsToMldev$1(fromObject) {
|
|
|
10101
10184
|
}
|
|
10102
10185
|
return toObject;
|
|
10103
10186
|
}
|
|
10104
|
-
function googleSearchToMldev$1(fromObject) {
|
|
10187
|
+
function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
10105
10188
|
const toObject = {};
|
|
10106
10189
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
10107
10190
|
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
@@ -10117,7 +10200,7 @@ function googleSearchToMldev$1(fromObject) {
|
|
|
10117
10200
|
}
|
|
10118
10201
|
return toObject;
|
|
10119
10202
|
}
|
|
10120
|
-
function imageConfigToMldev(fromObject) {
|
|
10203
|
+
function imageConfigToMldev(fromObject, _rootObject) {
|
|
10121
10204
|
const toObject = {};
|
|
10122
10205
|
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
10123
10206
|
if (fromAspectRatio != null) {
|
|
@@ -10139,7 +10222,7 @@ function imageConfigToMldev(fromObject) {
|
|
|
10139
10222
|
}
|
|
10140
10223
|
return toObject;
|
|
10141
10224
|
}
|
|
10142
|
-
function imageConfigToVertex(fromObject) {
|
|
10225
|
+
function imageConfigToVertex(fromObject, _rootObject) {
|
|
10143
10226
|
const toObject = {};
|
|
10144
10227
|
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
10145
10228
|
if (fromAspectRatio != null) {
|
|
@@ -10169,7 +10252,7 @@ function imageConfigToVertex(fromObject) {
|
|
|
10169
10252
|
}
|
|
10170
10253
|
return toObject;
|
|
10171
10254
|
}
|
|
10172
|
-
function imageFromMldev(fromObject) {
|
|
10255
|
+
function imageFromMldev(fromObject, _rootObject) {
|
|
10173
10256
|
const toObject = {};
|
|
10174
10257
|
const fromImageBytes = getValueByPath(fromObject, [
|
|
10175
10258
|
'bytesBase64Encoded',
|
|
@@ -10183,7 +10266,7 @@ function imageFromMldev(fromObject) {
|
|
|
10183
10266
|
}
|
|
10184
10267
|
return toObject;
|
|
10185
10268
|
}
|
|
10186
|
-
function imageFromVertex(fromObject) {
|
|
10269
|
+
function imageFromVertex(fromObject, _rootObject) {
|
|
10187
10270
|
const toObject = {};
|
|
10188
10271
|
const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
|
|
10189
10272
|
if (fromGcsUri != null) {
|
|
@@ -10201,7 +10284,7 @@ function imageFromVertex(fromObject) {
|
|
|
10201
10284
|
}
|
|
10202
10285
|
return toObject;
|
|
10203
10286
|
}
|
|
10204
|
-
function imageToMldev(fromObject) {
|
|
10287
|
+
function imageToMldev(fromObject, _rootObject) {
|
|
10205
10288
|
const toObject = {};
|
|
10206
10289
|
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
10207
10290
|
throw new Error('gcsUri parameter is not supported in Gemini API.');
|
|
@@ -10216,7 +10299,7 @@ function imageToMldev(fromObject) {
|
|
|
10216
10299
|
}
|
|
10217
10300
|
return toObject;
|
|
10218
10301
|
}
|
|
10219
|
-
function imageToVertex(fromObject) {
|
|
10302
|
+
function imageToVertex(fromObject, _rootObject) {
|
|
10220
10303
|
const toObject = {};
|
|
10221
10304
|
const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
|
|
10222
10305
|
if (fromGcsUri != null) {
|
|
@@ -10232,7 +10315,7 @@ function imageToVertex(fromObject) {
|
|
|
10232
10315
|
}
|
|
10233
10316
|
return toObject;
|
|
10234
10317
|
}
|
|
10235
|
-
function listModelsConfigToMldev(apiClient, fromObject, parentObject) {
|
|
10318
|
+
function listModelsConfigToMldev(apiClient, fromObject, parentObject, _rootObject) {
|
|
10236
10319
|
const toObject = {};
|
|
10237
10320
|
const fromPageSize = getValueByPath(fromObject, ['pageSize']);
|
|
10238
10321
|
if (parentObject !== undefined && fromPageSize != null) {
|
|
@@ -10252,7 +10335,7 @@ function listModelsConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
10252
10335
|
}
|
|
10253
10336
|
return toObject;
|
|
10254
10337
|
}
|
|
10255
|
-
function listModelsConfigToVertex(apiClient, fromObject, parentObject) {
|
|
10338
|
+
function listModelsConfigToVertex(apiClient, fromObject, parentObject, _rootObject) {
|
|
10256
10339
|
const toObject = {};
|
|
10257
10340
|
const fromPageSize = getValueByPath(fromObject, ['pageSize']);
|
|
10258
10341
|
if (parentObject !== undefined && fromPageSize != null) {
|
|
@@ -10272,7 +10355,7 @@ function listModelsConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
10272
10355
|
}
|
|
10273
10356
|
return toObject;
|
|
10274
10357
|
}
|
|
10275
|
-
function listModelsParametersToMldev(apiClient, fromObject) {
|
|
10358
|
+
function listModelsParametersToMldev(apiClient, fromObject, rootObject) {
|
|
10276
10359
|
const toObject = {};
|
|
10277
10360
|
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
10278
10361
|
if (fromConfig != null) {
|
|
@@ -10280,7 +10363,7 @@ function listModelsParametersToMldev(apiClient, fromObject) {
|
|
|
10280
10363
|
}
|
|
10281
10364
|
return toObject;
|
|
10282
10365
|
}
|
|
10283
|
-
function listModelsParametersToVertex(apiClient, fromObject) {
|
|
10366
|
+
function listModelsParametersToVertex(apiClient, fromObject, rootObject) {
|
|
10284
10367
|
const toObject = {};
|
|
10285
10368
|
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
10286
10369
|
if (fromConfig != null) {
|
|
@@ -10288,7 +10371,7 @@ function listModelsParametersToVertex(apiClient, fromObject) {
|
|
|
10288
10371
|
}
|
|
10289
10372
|
return toObject;
|
|
10290
10373
|
}
|
|
10291
|
-
function listModelsResponseFromMldev(fromObject) {
|
|
10374
|
+
function listModelsResponseFromMldev(fromObject, rootObject) {
|
|
10292
10375
|
const toObject = {};
|
|
10293
10376
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
10294
10377
|
'sdkHttpResponse',
|
|
@@ -10314,7 +10397,7 @@ function listModelsResponseFromMldev(fromObject) {
|
|
|
10314
10397
|
}
|
|
10315
10398
|
return toObject;
|
|
10316
10399
|
}
|
|
10317
|
-
function listModelsResponseFromVertex(fromObject) {
|
|
10400
|
+
function listModelsResponseFromVertex(fromObject, rootObject) {
|
|
10318
10401
|
const toObject = {};
|
|
10319
10402
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
10320
10403
|
'sdkHttpResponse',
|
|
@@ -10340,7 +10423,7 @@ function listModelsResponseFromVertex(fromObject) {
|
|
|
10340
10423
|
}
|
|
10341
10424
|
return toObject;
|
|
10342
10425
|
}
|
|
10343
|
-
function maskReferenceConfigToVertex(fromObject) {
|
|
10426
|
+
function maskReferenceConfigToVertex(fromObject, _rootObject) {
|
|
10344
10427
|
const toObject = {};
|
|
10345
10428
|
const fromMaskMode = getValueByPath(fromObject, ['maskMode']);
|
|
10346
10429
|
if (fromMaskMode != null) {
|
|
@@ -10358,7 +10441,7 @@ function maskReferenceConfigToVertex(fromObject) {
|
|
|
10358
10441
|
}
|
|
10359
10442
|
return toObject;
|
|
10360
10443
|
}
|
|
10361
|
-
function modelFromMldev(fromObject) {
|
|
10444
|
+
function modelFromMldev(fromObject, rootObject) {
|
|
10362
10445
|
const toObject = {};
|
|
10363
10446
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
10364
10447
|
if (fromName != null) {
|
|
@@ -10422,7 +10505,7 @@ function modelFromMldev(fromObject) {
|
|
|
10422
10505
|
}
|
|
10423
10506
|
return toObject;
|
|
10424
10507
|
}
|
|
10425
|
-
function modelFromVertex(fromObject) {
|
|
10508
|
+
function modelFromVertex(fromObject, rootObject) {
|
|
10426
10509
|
const toObject = {};
|
|
10427
10510
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
10428
10511
|
if (fromName != null) {
|
|
@@ -10476,7 +10559,7 @@ function modelFromVertex(fromObject) {
|
|
|
10476
10559
|
}
|
|
10477
10560
|
return toObject;
|
|
10478
10561
|
}
|
|
10479
|
-
function partToMldev$1(fromObject) {
|
|
10562
|
+
function partToMldev$1(fromObject, rootObject) {
|
|
10480
10563
|
const toObject = {};
|
|
10481
10564
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
10482
10565
|
'mediaResolution',
|
|
@@ -10536,7 +10619,7 @@ function partToMldev$1(fromObject) {
|
|
|
10536
10619
|
}
|
|
10537
10620
|
return toObject;
|
|
10538
10621
|
}
|
|
10539
|
-
function productImageToVertex(fromObject) {
|
|
10622
|
+
function productImageToVertex(fromObject, rootObject) {
|
|
10540
10623
|
const toObject = {};
|
|
10541
10624
|
const fromProductImage = getValueByPath(fromObject, ['productImage']);
|
|
10542
10625
|
if (fromProductImage != null) {
|
|
@@ -10544,7 +10627,7 @@ function productImageToVertex(fromObject) {
|
|
|
10544
10627
|
}
|
|
10545
10628
|
return toObject;
|
|
10546
10629
|
}
|
|
10547
|
-
function recontextImageConfigToVertex(fromObject, parentObject) {
|
|
10630
|
+
function recontextImageConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
10548
10631
|
const toObject = {};
|
|
10549
10632
|
const fromNumberOfImages = getValueByPath(fromObject, [
|
|
10550
10633
|
'numberOfImages',
|
|
@@ -10604,7 +10687,7 @@ function recontextImageConfigToVertex(fromObject, parentObject) {
|
|
|
10604
10687
|
}
|
|
10605
10688
|
return toObject;
|
|
10606
10689
|
}
|
|
10607
|
-
function recontextImageParametersToVertex(apiClient, fromObject) {
|
|
10690
|
+
function recontextImageParametersToVertex(apiClient, fromObject, rootObject) {
|
|
10608
10691
|
const toObject = {};
|
|
10609
10692
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
10610
10693
|
if (fromModel != null) {
|
|
@@ -10620,7 +10703,7 @@ function recontextImageParametersToVertex(apiClient, fromObject) {
|
|
|
10620
10703
|
}
|
|
10621
10704
|
return toObject;
|
|
10622
10705
|
}
|
|
10623
|
-
function recontextImageResponseFromVertex(fromObject) {
|
|
10706
|
+
function recontextImageResponseFromVertex(fromObject, rootObject) {
|
|
10624
10707
|
const toObject = {};
|
|
10625
10708
|
const fromGeneratedImages = getValueByPath(fromObject, [
|
|
10626
10709
|
'predictions',
|
|
@@ -10636,7 +10719,7 @@ function recontextImageResponseFromVertex(fromObject) {
|
|
|
10636
10719
|
}
|
|
10637
10720
|
return toObject;
|
|
10638
10721
|
}
|
|
10639
|
-
function recontextImageSourceToVertex(fromObject, parentObject) {
|
|
10722
|
+
function recontextImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
10640
10723
|
const toObject = {};
|
|
10641
10724
|
const fromPrompt = getValueByPath(fromObject, ['prompt']);
|
|
10642
10725
|
if (parentObject !== undefined && fromPrompt != null) {
|
|
@@ -10660,7 +10743,7 @@ function recontextImageSourceToVertex(fromObject, parentObject) {
|
|
|
10660
10743
|
}
|
|
10661
10744
|
return toObject;
|
|
10662
10745
|
}
|
|
10663
|
-
function referenceImageAPIInternalToVertex(fromObject) {
|
|
10746
|
+
function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
10664
10747
|
const toObject = {};
|
|
10665
10748
|
const fromReferenceImage = getValueByPath(fromObject, [
|
|
10666
10749
|
'referenceImage',
|
|
@@ -10704,7 +10787,7 @@ function referenceImageAPIInternalToVertex(fromObject) {
|
|
|
10704
10787
|
}
|
|
10705
10788
|
return toObject;
|
|
10706
10789
|
}
|
|
10707
|
-
function safetyAttributesFromMldev(fromObject) {
|
|
10790
|
+
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
10708
10791
|
const toObject = {};
|
|
10709
10792
|
const fromCategories = getValueByPath(fromObject, [
|
|
10710
10793
|
'safetyAttributes',
|
|
@@ -10726,7 +10809,7 @@ function safetyAttributesFromMldev(fromObject) {
|
|
|
10726
10809
|
}
|
|
10727
10810
|
return toObject;
|
|
10728
10811
|
}
|
|
10729
|
-
function safetyAttributesFromVertex(fromObject) {
|
|
10812
|
+
function safetyAttributesFromVertex(fromObject, _rootObject) {
|
|
10730
10813
|
const toObject = {};
|
|
10731
10814
|
const fromCategories = getValueByPath(fromObject, [
|
|
10732
10815
|
'safetyAttributes',
|
|
@@ -10748,7 +10831,7 @@ function safetyAttributesFromVertex(fromObject) {
|
|
|
10748
10831
|
}
|
|
10749
10832
|
return toObject;
|
|
10750
10833
|
}
|
|
10751
|
-
function safetySettingToMldev(fromObject) {
|
|
10834
|
+
function safetySettingToMldev(fromObject, _rootObject) {
|
|
10752
10835
|
const toObject = {};
|
|
10753
10836
|
const fromCategory = getValueByPath(fromObject, ['category']);
|
|
10754
10837
|
if (fromCategory != null) {
|
|
@@ -10763,7 +10846,7 @@ function safetySettingToMldev(fromObject) {
|
|
|
10763
10846
|
}
|
|
10764
10847
|
return toObject;
|
|
10765
10848
|
}
|
|
10766
|
-
function scribbleImageToVertex(fromObject) {
|
|
10849
|
+
function scribbleImageToVertex(fromObject, rootObject) {
|
|
10767
10850
|
const toObject = {};
|
|
10768
10851
|
const fromImage = getValueByPath(fromObject, ['image']);
|
|
10769
10852
|
if (fromImage != null) {
|
|
@@ -10771,7 +10854,7 @@ function scribbleImageToVertex(fromObject) {
|
|
|
10771
10854
|
}
|
|
10772
10855
|
return toObject;
|
|
10773
10856
|
}
|
|
10774
|
-
function segmentImageConfigToVertex(fromObject, parentObject) {
|
|
10857
|
+
function segmentImageConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
10775
10858
|
const toObject = {};
|
|
10776
10859
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
10777
10860
|
if (parentObject !== undefined && fromMode != null) {
|
|
@@ -10805,7 +10888,7 @@ function segmentImageConfigToVertex(fromObject, parentObject) {
|
|
|
10805
10888
|
}
|
|
10806
10889
|
return toObject;
|
|
10807
10890
|
}
|
|
10808
|
-
function segmentImageParametersToVertex(apiClient, fromObject) {
|
|
10891
|
+
function segmentImageParametersToVertex(apiClient, fromObject, rootObject) {
|
|
10809
10892
|
const toObject = {};
|
|
10810
10893
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
10811
10894
|
if (fromModel != null) {
|
|
@@ -10821,7 +10904,7 @@ function segmentImageParametersToVertex(apiClient, fromObject) {
|
|
|
10821
10904
|
}
|
|
10822
10905
|
return toObject;
|
|
10823
10906
|
}
|
|
10824
|
-
function segmentImageResponseFromVertex(fromObject) {
|
|
10907
|
+
function segmentImageResponseFromVertex(fromObject, rootObject) {
|
|
10825
10908
|
const toObject = {};
|
|
10826
10909
|
const fromGeneratedMasks = getValueByPath(fromObject, ['predictions']);
|
|
10827
10910
|
if (fromGeneratedMasks != null) {
|
|
@@ -10835,7 +10918,7 @@ function segmentImageResponseFromVertex(fromObject) {
|
|
|
10835
10918
|
}
|
|
10836
10919
|
return toObject;
|
|
10837
10920
|
}
|
|
10838
|
-
function segmentImageSourceToVertex(fromObject, parentObject) {
|
|
10921
|
+
function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
10839
10922
|
const toObject = {};
|
|
10840
10923
|
const fromPrompt = getValueByPath(fromObject, ['prompt']);
|
|
10841
10924
|
if (parentObject !== undefined && fromPrompt != null) {
|
|
@@ -10853,7 +10936,7 @@ function segmentImageSourceToVertex(fromObject, parentObject) {
|
|
|
10853
10936
|
}
|
|
10854
10937
|
return toObject;
|
|
10855
10938
|
}
|
|
10856
|
-
function toolConfigToMldev(fromObject) {
|
|
10939
|
+
function toolConfigToMldev(fromObject, rootObject) {
|
|
10857
10940
|
const toObject = {};
|
|
10858
10941
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
10859
10942
|
'retrievalConfig',
|
|
@@ -10869,7 +10952,7 @@ function toolConfigToMldev(fromObject) {
|
|
|
10869
10952
|
}
|
|
10870
10953
|
return toObject;
|
|
10871
10954
|
}
|
|
10872
|
-
function toolToMldev$1(fromObject) {
|
|
10955
|
+
function toolToMldev$1(fromObject, rootObject) {
|
|
10873
10956
|
const toObject = {};
|
|
10874
10957
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
10875
10958
|
throw new Error('retrieval parameter is not supported in Gemini API.');
|
|
@@ -10923,7 +11006,7 @@ function toolToMldev$1(fromObject) {
|
|
|
10923
11006
|
}
|
|
10924
11007
|
return toObject;
|
|
10925
11008
|
}
|
|
10926
|
-
function toolToVertex(fromObject) {
|
|
11009
|
+
function toolToVertex(fromObject, rootObject) {
|
|
10927
11010
|
const toObject = {};
|
|
10928
11011
|
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
10929
11012
|
if (fromRetrieval != null) {
|
|
@@ -10980,7 +11063,7 @@ function toolToVertex(fromObject) {
|
|
|
10980
11063
|
}
|
|
10981
11064
|
return toObject;
|
|
10982
11065
|
}
|
|
10983
|
-
function tunedModelInfoFromMldev(fromObject) {
|
|
11066
|
+
function tunedModelInfoFromMldev(fromObject, _rootObject) {
|
|
10984
11067
|
const toObject = {};
|
|
10985
11068
|
const fromBaseModel = getValueByPath(fromObject, ['baseModel']);
|
|
10986
11069
|
if (fromBaseModel != null) {
|
|
@@ -10996,7 +11079,7 @@ function tunedModelInfoFromMldev(fromObject) {
|
|
|
10996
11079
|
}
|
|
10997
11080
|
return toObject;
|
|
10998
11081
|
}
|
|
10999
|
-
function tunedModelInfoFromVertex(fromObject) {
|
|
11082
|
+
function tunedModelInfoFromVertex(fromObject, _rootObject) {
|
|
11000
11083
|
const toObject = {};
|
|
11001
11084
|
const fromBaseModel = getValueByPath(fromObject, [
|
|
11002
11085
|
'labels',
|
|
@@ -11015,7 +11098,7 @@ function tunedModelInfoFromVertex(fromObject) {
|
|
|
11015
11098
|
}
|
|
11016
11099
|
return toObject;
|
|
11017
11100
|
}
|
|
11018
|
-
function updateModelConfigToMldev(fromObject, parentObject) {
|
|
11101
|
+
function updateModelConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
11019
11102
|
const toObject = {};
|
|
11020
11103
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
11021
11104
|
if (parentObject !== undefined && fromDisplayName != null) {
|
|
@@ -11033,7 +11116,7 @@ function updateModelConfigToMldev(fromObject, parentObject) {
|
|
|
11033
11116
|
}
|
|
11034
11117
|
return toObject;
|
|
11035
11118
|
}
|
|
11036
|
-
function updateModelConfigToVertex(fromObject, parentObject) {
|
|
11119
|
+
function updateModelConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
11037
11120
|
const toObject = {};
|
|
11038
11121
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
11039
11122
|
if (parentObject !== undefined && fromDisplayName != null) {
|
|
@@ -11051,7 +11134,7 @@ function updateModelConfigToVertex(fromObject, parentObject) {
|
|
|
11051
11134
|
}
|
|
11052
11135
|
return toObject;
|
|
11053
11136
|
}
|
|
11054
|
-
function updateModelParametersToMldev(apiClient, fromObject) {
|
|
11137
|
+
function updateModelParametersToMldev(apiClient, fromObject, rootObject) {
|
|
11055
11138
|
const toObject = {};
|
|
11056
11139
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11057
11140
|
if (fromModel != null) {
|
|
@@ -11063,7 +11146,7 @@ function updateModelParametersToMldev(apiClient, fromObject) {
|
|
|
11063
11146
|
}
|
|
11064
11147
|
return toObject;
|
|
11065
11148
|
}
|
|
11066
|
-
function updateModelParametersToVertex(apiClient, fromObject) {
|
|
11149
|
+
function updateModelParametersToVertex(apiClient, fromObject, rootObject) {
|
|
11067
11150
|
const toObject = {};
|
|
11068
11151
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11069
11152
|
if (fromModel != null) {
|
|
@@ -11075,7 +11158,7 @@ function updateModelParametersToVertex(apiClient, fromObject) {
|
|
|
11075
11158
|
}
|
|
11076
11159
|
return toObject;
|
|
11077
11160
|
}
|
|
11078
|
-
function upscaleImageAPIConfigInternalToVertex(fromObject, parentObject) {
|
|
11161
|
+
function upscaleImageAPIConfigInternalToVertex(fromObject, parentObject, _rootObject) {
|
|
11079
11162
|
const toObject = {};
|
|
11080
11163
|
const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
|
|
11081
11164
|
if (parentObject !== undefined && fromOutputGcsUri != null) {
|
|
@@ -11139,7 +11222,7 @@ function upscaleImageAPIConfigInternalToVertex(fromObject, parentObject) {
|
|
|
11139
11222
|
}
|
|
11140
11223
|
return toObject;
|
|
11141
11224
|
}
|
|
11142
|
-
function upscaleImageAPIParametersInternalToVertex(apiClient, fromObject) {
|
|
11225
|
+
function upscaleImageAPIParametersInternalToVertex(apiClient, fromObject, rootObject) {
|
|
11143
11226
|
const toObject = {};
|
|
11144
11227
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11145
11228
|
if (fromModel != null) {
|
|
@@ -11161,7 +11244,7 @@ function upscaleImageAPIParametersInternalToVertex(apiClient, fromObject) {
|
|
|
11161
11244
|
}
|
|
11162
11245
|
return toObject;
|
|
11163
11246
|
}
|
|
11164
|
-
function upscaleImageResponseFromVertex(fromObject) {
|
|
11247
|
+
function upscaleImageResponseFromVertex(fromObject, rootObject) {
|
|
11165
11248
|
const toObject = {};
|
|
11166
11249
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11167
11250
|
'sdkHttpResponse',
|
|
@@ -11183,7 +11266,7 @@ function upscaleImageResponseFromVertex(fromObject) {
|
|
|
11183
11266
|
}
|
|
11184
11267
|
return toObject;
|
|
11185
11268
|
}
|
|
11186
|
-
function videoFromMldev(fromObject) {
|
|
11269
|
+
function videoFromMldev(fromObject, _rootObject) {
|
|
11187
11270
|
const toObject = {};
|
|
11188
11271
|
const fromUri = getValueByPath(fromObject, ['uri']);
|
|
11189
11272
|
if (fromUri != null) {
|
|
@@ -11199,7 +11282,7 @@ function videoFromMldev(fromObject) {
|
|
|
11199
11282
|
}
|
|
11200
11283
|
return toObject;
|
|
11201
11284
|
}
|
|
11202
|
-
function videoFromVertex(fromObject) {
|
|
11285
|
+
function videoFromVertex(fromObject, _rootObject) {
|
|
11203
11286
|
const toObject = {};
|
|
11204
11287
|
const fromUri = getValueByPath(fromObject, ['gcsUri']);
|
|
11205
11288
|
if (fromUri != null) {
|
|
@@ -11217,7 +11300,7 @@ function videoFromVertex(fromObject) {
|
|
|
11217
11300
|
}
|
|
11218
11301
|
return toObject;
|
|
11219
11302
|
}
|
|
11220
|
-
function videoGenerationMaskToVertex(fromObject) {
|
|
11303
|
+
function videoGenerationMaskToVertex(fromObject, rootObject) {
|
|
11221
11304
|
const toObject = {};
|
|
11222
11305
|
const fromImage = getValueByPath(fromObject, ['image']);
|
|
11223
11306
|
if (fromImage != null) {
|
|
@@ -11229,7 +11312,7 @@ function videoGenerationMaskToVertex(fromObject) {
|
|
|
11229
11312
|
}
|
|
11230
11313
|
return toObject;
|
|
11231
11314
|
}
|
|
11232
|
-
function videoGenerationReferenceImageToMldev(fromObject) {
|
|
11315
|
+
function videoGenerationReferenceImageToMldev(fromObject, rootObject) {
|
|
11233
11316
|
const toObject = {};
|
|
11234
11317
|
const fromImage = getValueByPath(fromObject, ['image']);
|
|
11235
11318
|
if (fromImage != null) {
|
|
@@ -11243,7 +11326,7 @@ function videoGenerationReferenceImageToMldev(fromObject) {
|
|
|
11243
11326
|
}
|
|
11244
11327
|
return toObject;
|
|
11245
11328
|
}
|
|
11246
|
-
function videoGenerationReferenceImageToVertex(fromObject) {
|
|
11329
|
+
function videoGenerationReferenceImageToVertex(fromObject, rootObject) {
|
|
11247
11330
|
const toObject = {};
|
|
11248
11331
|
const fromImage = getValueByPath(fromObject, ['image']);
|
|
11249
11332
|
if (fromImage != null) {
|
|
@@ -11257,7 +11340,7 @@ function videoGenerationReferenceImageToVertex(fromObject) {
|
|
|
11257
11340
|
}
|
|
11258
11341
|
return toObject;
|
|
11259
11342
|
}
|
|
11260
|
-
function videoToMldev(fromObject) {
|
|
11343
|
+
function videoToMldev(fromObject, _rootObject) {
|
|
11261
11344
|
const toObject = {};
|
|
11262
11345
|
const fromUri = getValueByPath(fromObject, ['uri']);
|
|
11263
11346
|
if (fromUri != null) {
|
|
@@ -11273,7 +11356,7 @@ function videoToMldev(fromObject) {
|
|
|
11273
11356
|
}
|
|
11274
11357
|
return toObject;
|
|
11275
11358
|
}
|
|
11276
|
-
function videoToVertex(fromObject) {
|
|
11359
|
+
function videoToVertex(fromObject, _rootObject) {
|
|
11277
11360
|
const toObject = {};
|
|
11278
11361
|
const fromUri = getValueByPath(fromObject, ['uri']);
|
|
11279
11362
|
if (fromUri != null) {
|
|
@@ -11534,7 +11617,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
11534
11617
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
11535
11618
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
11536
11619
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
11537
|
-
const SDK_VERSION = '1.
|
|
11620
|
+
const SDK_VERSION = '1.39.0'; // x-release-please-version
|
|
11538
11621
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
11539
11622
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
11540
11623
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -13710,7 +13793,7 @@ class Models extends BaseModule {
|
|
|
13710
13793
|
_c = apiResponse_1_1.value;
|
|
13711
13794
|
_d = false;
|
|
13712
13795
|
const chunk = _c;
|
|
13713
|
-
const resp = generateContentResponseFromVertex((yield __await(chunk.json())));
|
|
13796
|
+
const resp = generateContentResponseFromVertex((yield __await(chunk.json())), params);
|
|
13714
13797
|
resp['sdkHttpResponse'] = {
|
|
13715
13798
|
headers: chunk.headers,
|
|
13716
13799
|
};
|
|
@@ -13752,7 +13835,7 @@ class Models extends BaseModule {
|
|
|
13752
13835
|
_c = apiResponse_2_1.value;
|
|
13753
13836
|
_d = false;
|
|
13754
13837
|
const chunk = _c;
|
|
13755
|
-
const resp = generateContentResponseFromMldev((yield __await(chunk.json())));
|
|
13838
|
+
const resp = generateContentResponseFromMldev((yield __await(chunk.json())), params);
|
|
13756
13839
|
resp['sdkHttpResponse'] = {
|
|
13757
13840
|
headers: chunk.headers,
|
|
13758
13841
|
};
|
|
@@ -16685,7 +16768,9 @@ class BaseInteractions extends APIResource {
|
|
|
16685
16768
|
*
|
|
16686
16769
|
* @example
|
|
16687
16770
|
* ```ts
|
|
16688
|
-
* const interaction = await client.interactions.delete('id'
|
|
16771
|
+
* const interaction = await client.interactions.delete('id', {
|
|
16772
|
+
* api_version: 'api_version',
|
|
16773
|
+
* });
|
|
16689
16774
|
* ```
|
|
16690
16775
|
*/
|
|
16691
16776
|
delete(id, params = {}, options) {
|
|
@@ -16697,7 +16782,9 @@ class BaseInteractions extends APIResource {
|
|
|
16697
16782
|
*
|
|
16698
16783
|
* @example
|
|
16699
16784
|
* ```ts
|
|
16700
|
-
* const interaction = await client.interactions.cancel('id'
|
|
16785
|
+
* const interaction = await client.interactions.cancel('id', {
|
|
16786
|
+
* api_version: 'api_version',
|
|
16787
|
+
* });
|
|
16701
16788
|
* ```
|
|
16702
16789
|
*/
|
|
16703
16790
|
cancel(id, params = {}, options) {
|
|
@@ -18194,6 +18281,12 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
18194
18281
|
if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
|
|
18195
18282
|
throw new Error('adapterSize parameter is not supported in Gemini API.');
|
|
18196
18283
|
}
|
|
18284
|
+
if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
|
|
18285
|
+
throw new Error('tuningMode parameter is not supported in Gemini API.');
|
|
18286
|
+
}
|
|
18287
|
+
if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
|
|
18288
|
+
throw new Error('customBaseModel parameter is not supported in Gemini API.');
|
|
18289
|
+
}
|
|
18197
18290
|
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
18198
18291
|
if (parentObject !== undefined && fromBatchSize != null) {
|
|
18199
18292
|
setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'batchSize'], fromBatchSize);
|
|
@@ -18208,6 +18301,18 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
18208
18301
|
if (getValueByPath(fromObject, ['beta']) !== undefined) {
|
|
18209
18302
|
throw new Error('beta parameter is not supported in Gemini API.');
|
|
18210
18303
|
}
|
|
18304
|
+
if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
|
|
18305
|
+
throw new Error('baseTeacherModel parameter is not supported in Gemini API.');
|
|
18306
|
+
}
|
|
18307
|
+
if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
|
|
18308
|
+
throw new Error('tunedTeacherModelSource parameter is not supported in Gemini API.');
|
|
18309
|
+
}
|
|
18310
|
+
if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
|
|
18311
|
+
throw new Error('sftLossWeightMultiplier parameter is not supported in Gemini API.');
|
|
18312
|
+
}
|
|
18313
|
+
if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
|
|
18314
|
+
throw new Error('outputUri parameter is not supported in Gemini API.');
|
|
18315
|
+
}
|
|
18211
18316
|
return toObject;
|
|
18212
18317
|
}
|
|
18213
18318
|
function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
@@ -18235,6 +18340,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18235
18340
|
setValueByPath(parentObject, ['preferenceOptimizationSpec'], tuningValidationDatasetToVertex(fromValidationDataset));
|
|
18236
18341
|
}
|
|
18237
18342
|
}
|
|
18343
|
+
else if (discriminatorValidationDataset === 'DISTILLATION') {
|
|
18344
|
+
const fromValidationDataset = getValueByPath(fromObject, [
|
|
18345
|
+
'validationDataset',
|
|
18346
|
+
]);
|
|
18347
|
+
if (parentObject !== undefined && fromValidationDataset != null) {
|
|
18348
|
+
setValueByPath(parentObject, ['distillationSpec'], tuningValidationDatasetToVertex(fromValidationDataset));
|
|
18349
|
+
}
|
|
18350
|
+
}
|
|
18238
18351
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
18239
18352
|
'tunedModelDisplayName',
|
|
18240
18353
|
]);
|
|
@@ -18264,6 +18377,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18264
18377
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'epochCount'], fromEpochCount);
|
|
18265
18378
|
}
|
|
18266
18379
|
}
|
|
18380
|
+
else if (discriminatorEpochCount === 'DISTILLATION') {
|
|
18381
|
+
const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
|
|
18382
|
+
if (parentObject !== undefined && fromEpochCount != null) {
|
|
18383
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'epochCount'], fromEpochCount);
|
|
18384
|
+
}
|
|
18385
|
+
}
|
|
18267
18386
|
let discriminatorLearningRateMultiplier = getValueByPath(rootObject, [
|
|
18268
18387
|
'config',
|
|
18269
18388
|
'method',
|
|
@@ -18291,6 +18410,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18291
18410
|
], fromLearningRateMultiplier);
|
|
18292
18411
|
}
|
|
18293
18412
|
}
|
|
18413
|
+
else if (discriminatorLearningRateMultiplier === 'DISTILLATION') {
|
|
18414
|
+
const fromLearningRateMultiplier = getValueByPath(fromObject, [
|
|
18415
|
+
'learningRateMultiplier',
|
|
18416
|
+
]);
|
|
18417
|
+
if (parentObject !== undefined && fromLearningRateMultiplier != null) {
|
|
18418
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRateMultiplier'], fromLearningRateMultiplier);
|
|
18419
|
+
}
|
|
18420
|
+
}
|
|
18294
18421
|
let discriminatorExportLastCheckpointOnly = getValueByPath(rootObject, ['config', 'method']);
|
|
18295
18422
|
if (discriminatorExportLastCheckpointOnly === undefined) {
|
|
18296
18423
|
discriminatorExportLastCheckpointOnly = 'SUPERVISED_FINE_TUNING';
|
|
@@ -18311,6 +18438,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18311
18438
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'exportLastCheckpointOnly'], fromExportLastCheckpointOnly);
|
|
18312
18439
|
}
|
|
18313
18440
|
}
|
|
18441
|
+
else if (discriminatorExportLastCheckpointOnly === 'DISTILLATION') {
|
|
18442
|
+
const fromExportLastCheckpointOnly = getValueByPath(fromObject, [
|
|
18443
|
+
'exportLastCheckpointOnly',
|
|
18444
|
+
]);
|
|
18445
|
+
if (parentObject !== undefined && fromExportLastCheckpointOnly != null) {
|
|
18446
|
+
setValueByPath(parentObject, ['distillationSpec', 'exportLastCheckpointOnly'], fromExportLastCheckpointOnly);
|
|
18447
|
+
}
|
|
18448
|
+
}
|
|
18314
18449
|
let discriminatorAdapterSize = getValueByPath(rootObject, [
|
|
18315
18450
|
'config',
|
|
18316
18451
|
'method',
|
|
@@ -18330,11 +18465,58 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18330
18465
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'adapterSize'], fromAdapterSize);
|
|
18331
18466
|
}
|
|
18332
18467
|
}
|
|
18333
|
-
if (
|
|
18334
|
-
|
|
18468
|
+
else if (discriminatorAdapterSize === 'DISTILLATION') {
|
|
18469
|
+
const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
|
|
18470
|
+
if (parentObject !== undefined && fromAdapterSize != null) {
|
|
18471
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'adapterSize'], fromAdapterSize);
|
|
18472
|
+
}
|
|
18473
|
+
}
|
|
18474
|
+
let discriminatorTuningMode = getValueByPath(rootObject, [
|
|
18475
|
+
'config',
|
|
18476
|
+
'method',
|
|
18477
|
+
]);
|
|
18478
|
+
if (discriminatorTuningMode === undefined) {
|
|
18479
|
+
discriminatorTuningMode = 'SUPERVISED_FINE_TUNING';
|
|
18480
|
+
}
|
|
18481
|
+
if (discriminatorTuningMode === 'SUPERVISED_FINE_TUNING') {
|
|
18482
|
+
const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
|
|
18483
|
+
if (parentObject !== undefined && fromTuningMode != null) {
|
|
18484
|
+
setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
|
|
18485
|
+
}
|
|
18486
|
+
}
|
|
18487
|
+
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
18488
|
+
'customBaseModel',
|
|
18489
|
+
]);
|
|
18490
|
+
if (parentObject !== undefined && fromCustomBaseModel != null) {
|
|
18491
|
+
setValueByPath(parentObject, ['customBaseModel'], fromCustomBaseModel);
|
|
18492
|
+
}
|
|
18493
|
+
let discriminatorBatchSize = getValueByPath(rootObject, [
|
|
18494
|
+
'config',
|
|
18495
|
+
'method',
|
|
18496
|
+
]);
|
|
18497
|
+
if (discriminatorBatchSize === undefined) {
|
|
18498
|
+
discriminatorBatchSize = 'SUPERVISED_FINE_TUNING';
|
|
18499
|
+
}
|
|
18500
|
+
if (discriminatorBatchSize === 'SUPERVISED_FINE_TUNING') {
|
|
18501
|
+
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
18502
|
+
if (parentObject !== undefined && fromBatchSize != null) {
|
|
18503
|
+
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
18504
|
+
}
|
|
18505
|
+
}
|
|
18506
|
+
let discriminatorLearningRate = getValueByPath(rootObject, [
|
|
18507
|
+
'config',
|
|
18508
|
+
'method',
|
|
18509
|
+
]);
|
|
18510
|
+
if (discriminatorLearningRate === undefined) {
|
|
18511
|
+
discriminatorLearningRate = 'SUPERVISED_FINE_TUNING';
|
|
18335
18512
|
}
|
|
18336
|
-
if (
|
|
18337
|
-
|
|
18513
|
+
if (discriminatorLearningRate === 'SUPERVISED_FINE_TUNING') {
|
|
18514
|
+
const fromLearningRate = getValueByPath(fromObject, [
|
|
18515
|
+
'learningRate',
|
|
18516
|
+
]);
|
|
18517
|
+
if (parentObject !== undefined && fromLearningRate != null) {
|
|
18518
|
+
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
18519
|
+
}
|
|
18338
18520
|
}
|
|
18339
18521
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
18340
18522
|
if (parentObject !== undefined && fromLabels != null) {
|
|
@@ -18344,6 +18526,28 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18344
18526
|
if (parentObject !== undefined && fromBeta != null) {
|
|
18345
18527
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'beta'], fromBeta);
|
|
18346
18528
|
}
|
|
18529
|
+
const fromBaseTeacherModel = getValueByPath(fromObject, [
|
|
18530
|
+
'baseTeacherModel',
|
|
18531
|
+
]);
|
|
18532
|
+
if (parentObject !== undefined && fromBaseTeacherModel != null) {
|
|
18533
|
+
setValueByPath(parentObject, ['distillationSpec', 'baseTeacherModel'], fromBaseTeacherModel);
|
|
18534
|
+
}
|
|
18535
|
+
const fromTunedTeacherModelSource = getValueByPath(fromObject, [
|
|
18536
|
+
'tunedTeacherModelSource',
|
|
18537
|
+
]);
|
|
18538
|
+
if (parentObject !== undefined && fromTunedTeacherModelSource != null) {
|
|
18539
|
+
setValueByPath(parentObject, ['distillationSpec', 'tunedTeacherModelSource'], fromTunedTeacherModelSource);
|
|
18540
|
+
}
|
|
18541
|
+
const fromSftLossWeightMultiplier = getValueByPath(fromObject, [
|
|
18542
|
+
'sftLossWeightMultiplier',
|
|
18543
|
+
]);
|
|
18544
|
+
if (parentObject !== undefined && fromSftLossWeightMultiplier != null) {
|
|
18545
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'sftLossWeightMultiplier'], fromSftLossWeightMultiplier);
|
|
18546
|
+
}
|
|
18547
|
+
const fromOutputUri = getValueByPath(fromObject, ['outputUri']);
|
|
18548
|
+
if (parentObject !== undefined && fromOutputUri != null) {
|
|
18549
|
+
setValueByPath(parentObject, ['outputUri'], fromOutputUri);
|
|
18550
|
+
}
|
|
18347
18551
|
return toObject;
|
|
18348
18552
|
}
|
|
18349
18553
|
function createTuningJobParametersPrivateToMldev(fromObject, rootObject) {
|
|
@@ -18563,6 +18767,12 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
|
|
|
18563
18767
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'trainingDatasetUri'], fromGcsUri);
|
|
18564
18768
|
}
|
|
18565
18769
|
}
|
|
18770
|
+
else if (discriminatorGcsUri === 'DISTILLATION') {
|
|
18771
|
+
const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
|
|
18772
|
+
if (parentObject !== undefined && fromGcsUri != null) {
|
|
18773
|
+
setValueByPath(parentObject, ['distillationSpec', 'promptDatasetUri'], fromGcsUri);
|
|
18774
|
+
}
|
|
18775
|
+
}
|
|
18566
18776
|
let discriminatorVertexDatasetResource = getValueByPath(rootObject, [
|
|
18567
18777
|
'config',
|
|
18568
18778
|
'method',
|
|
@@ -18586,6 +18796,14 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
|
|
|
18586
18796
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'trainingDatasetUri'], fromVertexDatasetResource);
|
|
18587
18797
|
}
|
|
18588
18798
|
}
|
|
18799
|
+
else if (discriminatorVertexDatasetResource === 'DISTILLATION') {
|
|
18800
|
+
const fromVertexDatasetResource = getValueByPath(fromObject, [
|
|
18801
|
+
'vertexDatasetResource',
|
|
18802
|
+
]);
|
|
18803
|
+
if (parentObject !== undefined && fromVertexDatasetResource != null) {
|
|
18804
|
+
setValueByPath(parentObject, ['distillationSpec', 'promptDatasetUri'], fromVertexDatasetResource);
|
|
18805
|
+
}
|
|
18806
|
+
}
|
|
18589
18807
|
if (getValueByPath(fromObject, ['examples']) !== undefined) {
|
|
18590
18808
|
throw new Error('examples parameter is not supported in Vertex AI.');
|
|
18591
18809
|
}
|
|
@@ -18709,6 +18927,12 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
18709
18927
|
if (fromPreferenceOptimizationSpec != null) {
|
|
18710
18928
|
setValueByPath(toObject, ['preferenceOptimizationSpec'], fromPreferenceOptimizationSpec);
|
|
18711
18929
|
}
|
|
18930
|
+
const fromDistillationSpec = getValueByPath(fromObject, [
|
|
18931
|
+
'distillationSpec',
|
|
18932
|
+
]);
|
|
18933
|
+
if (fromDistillationSpec != null) {
|
|
18934
|
+
setValueByPath(toObject, ['distillationSpec'], fromDistillationSpec);
|
|
18935
|
+
}
|
|
18712
18936
|
const fromTuningDataStats = getValueByPath(fromObject, [
|
|
18713
18937
|
'tuningDataStats',
|
|
18714
18938
|
]);
|
|
@@ -19486,6 +19710,48 @@ class NodeUploader {
|
|
|
19486
19710
|
}
|
|
19487
19711
|
}
|
|
19488
19712
|
|
|
19713
|
+
/**
|
|
19714
|
+
* @license
|
|
19715
|
+
* Copyright 2025 Google LLC
|
|
19716
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
19717
|
+
*/
|
|
19718
|
+
class NodeFiles extends Files {
|
|
19719
|
+
/**
|
|
19720
|
+
* Registers Google Cloud Storage files for use with the API.
|
|
19721
|
+
* This method is only available in Node.js environments.
|
|
19722
|
+
*/
|
|
19723
|
+
async registerFiles(params) {
|
|
19724
|
+
if (typeof process === 'undefined' ||
|
|
19725
|
+
!process.versions ||
|
|
19726
|
+
!process.versions.node) {
|
|
19727
|
+
throw new Error('registerFiles is only supported in Node.js environments.');
|
|
19728
|
+
}
|
|
19729
|
+
const googleAuth = params.auth;
|
|
19730
|
+
const authHeaders = await googleAuth.getRequestHeaders();
|
|
19731
|
+
const config = params.config || {};
|
|
19732
|
+
const httpOptions = config.httpOptions || {};
|
|
19733
|
+
const headers = Object.assign({}, (httpOptions.headers || {}));
|
|
19734
|
+
if (authHeaders) {
|
|
19735
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19736
|
+
if (typeof authHeaders[Symbol.iterator] === 'function') {
|
|
19737
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
19738
|
+
for (const [key, value] of authHeaders) {
|
|
19739
|
+
headers[key] = value;
|
|
19740
|
+
}
|
|
19741
|
+
}
|
|
19742
|
+
else {
|
|
19743
|
+
for (const [key, value] of Object.entries(authHeaders)) {
|
|
19744
|
+
headers[key] = value;
|
|
19745
|
+
}
|
|
19746
|
+
}
|
|
19747
|
+
}
|
|
19748
|
+
return this._registerFiles({
|
|
19749
|
+
uris: params.uris,
|
|
19750
|
+
config: Object.assign(Object.assign({}, config), { httpOptions: Object.assign(Object.assign({}, httpOptions), { headers }) }),
|
|
19751
|
+
});
|
|
19752
|
+
}
|
|
19753
|
+
}
|
|
19754
|
+
|
|
19489
19755
|
/**
|
|
19490
19756
|
* @license
|
|
19491
19757
|
* Copyright 2025 Google LLC
|
|
@@ -19635,7 +19901,7 @@ class GoogleGenAI {
|
|
|
19635
19901
|
this.batches = new Batches(this.apiClient);
|
|
19636
19902
|
this.chats = new Chats(this.models, this.apiClient);
|
|
19637
19903
|
this.caches = new Caches(this.apiClient);
|
|
19638
|
-
this.files = new
|
|
19904
|
+
this.files = new NodeFiles(this.apiClient);
|
|
19639
19905
|
this.operations = new Operations(this.apiClient);
|
|
19640
19906
|
this.authTokens = new Tokens(this.apiClient);
|
|
19641
19907
|
this.tunings = new Tunings(this.apiClient);
|
|
@@ -19664,5 +19930,5 @@ function getApiKeyFromEnv() {
|
|
|
19664
19930
|
return envGoogleApiKey || envGeminiApiKey || undefined;
|
|
19665
19931
|
}
|
|
19666
19932
|
|
|
19667
|
-
export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, RawReferenceImage, RecontextImageResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, TrafficType, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
19933
|
+
export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, TrafficType, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
19668
19934
|
//# sourceMappingURL=index.mjs.map
|