@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/index.cjs
CHANGED
|
@@ -1501,6 +1501,10 @@ exports.TuningMethod = void 0;
|
|
|
1501
1501
|
* Preference optimization tuning.
|
|
1502
1502
|
*/
|
|
1503
1503
|
TuningMethod["PREFERENCE_TUNING"] = "PREFERENCE_TUNING";
|
|
1504
|
+
/**
|
|
1505
|
+
* Distillation tuning.
|
|
1506
|
+
*/
|
|
1507
|
+
TuningMethod["DISTILLATION"] = "DISTILLATION";
|
|
1504
1508
|
})(exports.TuningMethod || (exports.TuningMethod = {}));
|
|
1505
1509
|
/** State for the lifecycle of a Document. */
|
|
1506
1510
|
exports.DocumentState = void 0;
|
|
@@ -2292,6 +2296,9 @@ class CreateFileResponse {
|
|
|
2292
2296
|
/** Response for the delete file method. */
|
|
2293
2297
|
class DeleteFileResponse {
|
|
2294
2298
|
}
|
|
2299
|
+
/** Response for the _register file method. */
|
|
2300
|
+
class RegisterFilesResponse {
|
|
2301
|
+
}
|
|
2295
2302
|
/** Config for `inlined_responses` parameter. */
|
|
2296
2303
|
class InlinedResponse {
|
|
2297
2304
|
}
|
|
@@ -4286,6 +4293,10 @@ function inlinedResponseFromMldev(fromObject) {
|
|
|
4286
4293
|
if (fromResponse != null) {
|
|
4287
4294
|
setValueByPath(toObject, ['response'], generateContentResponseFromMldev$1(fromResponse));
|
|
4288
4295
|
}
|
|
4296
|
+
const fromMetadata = getValueByPath(fromObject, ['metadata']);
|
|
4297
|
+
if (fromMetadata != null) {
|
|
4298
|
+
setValueByPath(toObject, ['metadata'], fromMetadata);
|
|
4299
|
+
}
|
|
4289
4300
|
const fromError = getValueByPath(fromObject, ['error']);
|
|
4290
4301
|
if (fromError != null) {
|
|
4291
4302
|
setValueByPath(toObject, ['error'], fromError);
|
|
@@ -6920,7 +6931,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
6920
6931
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
6921
6932
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
6922
6933
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
6923
|
-
const SDK_VERSION = '1.
|
|
6934
|
+
const SDK_VERSION = '1.39.0'; // x-release-please-version
|
|
6924
6935
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
6925
6936
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
6926
6937
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -7755,6 +7766,14 @@ function getFileParametersToMldev(fromObject) {
|
|
|
7755
7766
|
}
|
|
7756
7767
|
return toObject;
|
|
7757
7768
|
}
|
|
7769
|
+
function internalRegisterFilesParametersToMldev(fromObject) {
|
|
7770
|
+
const toObject = {};
|
|
7771
|
+
const fromUris = getValueByPath(fromObject, ['uris']);
|
|
7772
|
+
if (fromUris != null) {
|
|
7773
|
+
setValueByPath(toObject, ['uris'], fromUris);
|
|
7774
|
+
}
|
|
7775
|
+
return toObject;
|
|
7776
|
+
}
|
|
7758
7777
|
function listFilesConfigToMldev(fromObject, parentObject) {
|
|
7759
7778
|
const toObject = {};
|
|
7760
7779
|
const fromPageSize = getValueByPath(fromObject, ['pageSize']);
|
|
@@ -7801,6 +7820,26 @@ function listFilesResponseFromMldev(fromObject) {
|
|
|
7801
7820
|
}
|
|
7802
7821
|
return toObject;
|
|
7803
7822
|
}
|
|
7823
|
+
function registerFilesResponseFromMldev(fromObject) {
|
|
7824
|
+
const toObject = {};
|
|
7825
|
+
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
7826
|
+
'sdkHttpResponse',
|
|
7827
|
+
]);
|
|
7828
|
+
if (fromSdkHttpResponse != null) {
|
|
7829
|
+
setValueByPath(toObject, ['sdkHttpResponse'], fromSdkHttpResponse);
|
|
7830
|
+
}
|
|
7831
|
+
const fromFiles = getValueByPath(fromObject, ['files']);
|
|
7832
|
+
if (fromFiles != null) {
|
|
7833
|
+
let transformedList = fromFiles;
|
|
7834
|
+
if (Array.isArray(transformedList)) {
|
|
7835
|
+
transformedList = transformedList.map((item) => {
|
|
7836
|
+
return item;
|
|
7837
|
+
});
|
|
7838
|
+
}
|
|
7839
|
+
setValueByPath(toObject, ['files'], transformedList);
|
|
7840
|
+
}
|
|
7841
|
+
return toObject;
|
|
7842
|
+
}
|
|
7804
7843
|
|
|
7805
7844
|
/**
|
|
7806
7845
|
* @license
|
|
@@ -7901,6 +7940,16 @@ class Files extends BaseModule {
|
|
|
7901
7940
|
async download(params) {
|
|
7902
7941
|
await this.apiClient.downloadFile(params);
|
|
7903
7942
|
}
|
|
7943
|
+
/**
|
|
7944
|
+
* Registers Google Cloud Storage files for use with the API.
|
|
7945
|
+
* This method is only available in Node.js environments.
|
|
7946
|
+
*/
|
|
7947
|
+
async registerFiles(params) {
|
|
7948
|
+
throw new Error('registerFiles is only supported in Node.js environments.');
|
|
7949
|
+
}
|
|
7950
|
+
async _registerFiles(params) {
|
|
7951
|
+
return this.registerFilesInternal(params);
|
|
7952
|
+
}
|
|
7904
7953
|
async listInternal(params) {
|
|
7905
7954
|
var _a, _b;
|
|
7906
7955
|
let response;
|
|
@@ -8074,6 +8123,40 @@ class Files extends BaseModule {
|
|
|
8074
8123
|
});
|
|
8075
8124
|
}
|
|
8076
8125
|
}
|
|
8126
|
+
async registerFilesInternal(params) {
|
|
8127
|
+
var _a, _b;
|
|
8128
|
+
let response;
|
|
8129
|
+
let path = '';
|
|
8130
|
+
let queryParams = {};
|
|
8131
|
+
if (this.apiClient.isVertexAI()) {
|
|
8132
|
+
throw new Error('This method is only supported by the Gemini Developer API.');
|
|
8133
|
+
}
|
|
8134
|
+
else {
|
|
8135
|
+
const body = internalRegisterFilesParametersToMldev(params);
|
|
8136
|
+
path = formatMap('files:register', body['_url']);
|
|
8137
|
+
queryParams = body['_query'];
|
|
8138
|
+
delete body['_url'];
|
|
8139
|
+
delete body['_query'];
|
|
8140
|
+
response = this.apiClient
|
|
8141
|
+
.request({
|
|
8142
|
+
path: path,
|
|
8143
|
+
queryParams: queryParams,
|
|
8144
|
+
body: JSON.stringify(body),
|
|
8145
|
+
httpMethod: 'POST',
|
|
8146
|
+
httpOptions: (_a = params.config) === null || _a === void 0 ? void 0 : _a.httpOptions,
|
|
8147
|
+
abortSignal: (_b = params.config) === null || _b === void 0 ? void 0 : _b.abortSignal,
|
|
8148
|
+
})
|
|
8149
|
+
.then((httpResponse) => {
|
|
8150
|
+
return httpResponse.json();
|
|
8151
|
+
});
|
|
8152
|
+
return response.then((apiResponse) => {
|
|
8153
|
+
const resp = registerFilesResponseFromMldev(apiResponse);
|
|
8154
|
+
const typedResp = new RegisterFilesResponse();
|
|
8155
|
+
Object.assign(typedResp, resp);
|
|
8156
|
+
return typedResp;
|
|
8157
|
+
});
|
|
8158
|
+
}
|
|
8159
|
+
}
|
|
8077
8160
|
}
|
|
8078
8161
|
|
|
8079
8162
|
/**
|
|
@@ -9312,7 +9395,9 @@ class BaseInteractions extends APIResource {
|
|
|
9312
9395
|
*
|
|
9313
9396
|
* @example
|
|
9314
9397
|
* ```ts
|
|
9315
|
-
* const interaction = await client.interactions.delete('id'
|
|
9398
|
+
* const interaction = await client.interactions.delete('id', {
|
|
9399
|
+
* api_version: 'api_version',
|
|
9400
|
+
* });
|
|
9316
9401
|
* ```
|
|
9317
9402
|
*/
|
|
9318
9403
|
delete(id, params = {}, options) {
|
|
@@ -9324,7 +9409,9 @@ class BaseInteractions extends APIResource {
|
|
|
9324
9409
|
*
|
|
9325
9410
|
* @example
|
|
9326
9411
|
* ```ts
|
|
9327
|
-
* const interaction = await client.interactions.cancel('id'
|
|
9412
|
+
* const interaction = await client.interactions.cancel('id', {
|
|
9413
|
+
* api_version: 'api_version',
|
|
9414
|
+
* });
|
|
9328
9415
|
* ```
|
|
9329
9416
|
*/
|
|
9330
9417
|
cancel(id, params = {}, options) {
|
|
@@ -11535,7 +11622,7 @@ function voiceActivityFromVertex(fromObject) {
|
|
|
11535
11622
|
* Copyright 2025 Google LLC
|
|
11536
11623
|
* SPDX-License-Identifier: Apache-2.0
|
|
11537
11624
|
*/
|
|
11538
|
-
function blobToMldev$1(fromObject) {
|
|
11625
|
+
function blobToMldev$1(fromObject, _rootObject) {
|
|
11539
11626
|
const toObject = {};
|
|
11540
11627
|
const fromData = getValueByPath(fromObject, ['data']);
|
|
11541
11628
|
if (fromData != null) {
|
|
@@ -11550,7 +11637,7 @@ function blobToMldev$1(fromObject) {
|
|
|
11550
11637
|
}
|
|
11551
11638
|
return toObject;
|
|
11552
11639
|
}
|
|
11553
|
-
function candidateFromMldev(fromObject) {
|
|
11640
|
+
function candidateFromMldev(fromObject, rootObject) {
|
|
11554
11641
|
const toObject = {};
|
|
11555
11642
|
const fromContent = getValueByPath(fromObject, ['content']);
|
|
11556
11643
|
if (fromContent != null) {
|
|
@@ -11610,7 +11697,7 @@ function candidateFromMldev(fromObject) {
|
|
|
11610
11697
|
}
|
|
11611
11698
|
return toObject;
|
|
11612
11699
|
}
|
|
11613
|
-
function citationMetadataFromMldev(fromObject) {
|
|
11700
|
+
function citationMetadataFromMldev(fromObject, _rootObject) {
|
|
11614
11701
|
const toObject = {};
|
|
11615
11702
|
const fromCitations = getValueByPath(fromObject, ['citationSources']);
|
|
11616
11703
|
if (fromCitations != null) {
|
|
@@ -11624,7 +11711,7 @@ function citationMetadataFromMldev(fromObject) {
|
|
|
11624
11711
|
}
|
|
11625
11712
|
return toObject;
|
|
11626
11713
|
}
|
|
11627
|
-
function computeTokensParametersToVertex(apiClient, fromObject) {
|
|
11714
|
+
function computeTokensParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
11628
11715
|
const toObject = {};
|
|
11629
11716
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11630
11717
|
if (fromModel != null) {
|
|
@@ -11642,7 +11729,7 @@ function computeTokensParametersToVertex(apiClient, fromObject) {
|
|
|
11642
11729
|
}
|
|
11643
11730
|
return toObject;
|
|
11644
11731
|
}
|
|
11645
|
-
function computeTokensResponseFromVertex(fromObject) {
|
|
11732
|
+
function computeTokensResponseFromVertex(fromObject, _rootObject) {
|
|
11646
11733
|
const toObject = {};
|
|
11647
11734
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11648
11735
|
'sdkHttpResponse',
|
|
@@ -11662,7 +11749,7 @@ function computeTokensResponseFromVertex(fromObject) {
|
|
|
11662
11749
|
}
|
|
11663
11750
|
return toObject;
|
|
11664
11751
|
}
|
|
11665
|
-
function contentEmbeddingFromVertex(fromObject) {
|
|
11752
|
+
function contentEmbeddingFromVertex(fromObject, rootObject) {
|
|
11666
11753
|
const toObject = {};
|
|
11667
11754
|
const fromValues = getValueByPath(fromObject, ['values']);
|
|
11668
11755
|
if (fromValues != null) {
|
|
@@ -11674,7 +11761,7 @@ function contentEmbeddingFromVertex(fromObject) {
|
|
|
11674
11761
|
}
|
|
11675
11762
|
return toObject;
|
|
11676
11763
|
}
|
|
11677
|
-
function contentEmbeddingStatisticsFromVertex(fromObject) {
|
|
11764
|
+
function contentEmbeddingStatisticsFromVertex(fromObject, _rootObject) {
|
|
11678
11765
|
const toObject = {};
|
|
11679
11766
|
const fromTruncated = getValueByPath(fromObject, ['truncated']);
|
|
11680
11767
|
if (fromTruncated != null) {
|
|
@@ -11686,7 +11773,7 @@ function contentEmbeddingStatisticsFromVertex(fromObject) {
|
|
|
11686
11773
|
}
|
|
11687
11774
|
return toObject;
|
|
11688
11775
|
}
|
|
11689
|
-
function contentToMldev$1(fromObject) {
|
|
11776
|
+
function contentToMldev$1(fromObject, rootObject) {
|
|
11690
11777
|
const toObject = {};
|
|
11691
11778
|
const fromParts = getValueByPath(fromObject, ['parts']);
|
|
11692
11779
|
if (fromParts != null) {
|
|
@@ -11704,7 +11791,7 @@ function contentToMldev$1(fromObject) {
|
|
|
11704
11791
|
}
|
|
11705
11792
|
return toObject;
|
|
11706
11793
|
}
|
|
11707
|
-
function controlReferenceConfigToVertex(fromObject) {
|
|
11794
|
+
function controlReferenceConfigToVertex(fromObject, _rootObject) {
|
|
11708
11795
|
const toObject = {};
|
|
11709
11796
|
const fromControlType = getValueByPath(fromObject, ['controlType']);
|
|
11710
11797
|
if (fromControlType != null) {
|
|
@@ -11718,7 +11805,7 @@ function controlReferenceConfigToVertex(fromObject) {
|
|
|
11718
11805
|
}
|
|
11719
11806
|
return toObject;
|
|
11720
11807
|
}
|
|
11721
|
-
function countTokensConfigToMldev(fromObject) {
|
|
11808
|
+
function countTokensConfigToMldev(fromObject, _rootObject) {
|
|
11722
11809
|
const toObject = {};
|
|
11723
11810
|
if (getValueByPath(fromObject, ['systemInstruction']) !== undefined) {
|
|
11724
11811
|
throw new Error('systemInstruction parameter is not supported in Gemini API.');
|
|
@@ -11731,7 +11818,7 @@ function countTokensConfigToMldev(fromObject) {
|
|
|
11731
11818
|
}
|
|
11732
11819
|
return toObject;
|
|
11733
11820
|
}
|
|
11734
|
-
function countTokensConfigToVertex(fromObject, parentObject) {
|
|
11821
|
+
function countTokensConfigToVertex(fromObject, parentObject, rootObject) {
|
|
11735
11822
|
const toObject = {};
|
|
11736
11823
|
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
11737
11824
|
'systemInstruction',
|
|
@@ -11757,7 +11844,7 @@ function countTokensConfigToVertex(fromObject, parentObject) {
|
|
|
11757
11844
|
}
|
|
11758
11845
|
return toObject;
|
|
11759
11846
|
}
|
|
11760
|
-
function countTokensParametersToMldev(apiClient, fromObject) {
|
|
11847
|
+
function countTokensParametersToMldev(apiClient, fromObject, rootObject) {
|
|
11761
11848
|
const toObject = {};
|
|
11762
11849
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11763
11850
|
if (fromModel != null) {
|
|
@@ -11779,7 +11866,7 @@ function countTokensParametersToMldev(apiClient, fromObject) {
|
|
|
11779
11866
|
}
|
|
11780
11867
|
return toObject;
|
|
11781
11868
|
}
|
|
11782
|
-
function countTokensParametersToVertex(apiClient, fromObject) {
|
|
11869
|
+
function countTokensParametersToVertex(apiClient, fromObject, rootObject) {
|
|
11783
11870
|
const toObject = {};
|
|
11784
11871
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11785
11872
|
if (fromModel != null) {
|
|
@@ -11801,7 +11888,7 @@ function countTokensParametersToVertex(apiClient, fromObject) {
|
|
|
11801
11888
|
}
|
|
11802
11889
|
return toObject;
|
|
11803
11890
|
}
|
|
11804
|
-
function countTokensResponseFromMldev(fromObject) {
|
|
11891
|
+
function countTokensResponseFromMldev(fromObject, _rootObject) {
|
|
11805
11892
|
const toObject = {};
|
|
11806
11893
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11807
11894
|
'sdkHttpResponse',
|
|
@@ -11821,7 +11908,7 @@ function countTokensResponseFromMldev(fromObject) {
|
|
|
11821
11908
|
}
|
|
11822
11909
|
return toObject;
|
|
11823
11910
|
}
|
|
11824
|
-
function countTokensResponseFromVertex(fromObject) {
|
|
11911
|
+
function countTokensResponseFromVertex(fromObject, _rootObject) {
|
|
11825
11912
|
const toObject = {};
|
|
11826
11913
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11827
11914
|
'sdkHttpResponse',
|
|
@@ -11835,7 +11922,7 @@ function countTokensResponseFromVertex(fromObject) {
|
|
|
11835
11922
|
}
|
|
11836
11923
|
return toObject;
|
|
11837
11924
|
}
|
|
11838
|
-
function deleteModelParametersToMldev(apiClient, fromObject) {
|
|
11925
|
+
function deleteModelParametersToMldev(apiClient, fromObject, _rootObject) {
|
|
11839
11926
|
const toObject = {};
|
|
11840
11927
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11841
11928
|
if (fromModel != null) {
|
|
@@ -11843,7 +11930,7 @@ function deleteModelParametersToMldev(apiClient, fromObject) {
|
|
|
11843
11930
|
}
|
|
11844
11931
|
return toObject;
|
|
11845
11932
|
}
|
|
11846
|
-
function deleteModelParametersToVertex(apiClient, fromObject) {
|
|
11933
|
+
function deleteModelParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
11847
11934
|
const toObject = {};
|
|
11848
11935
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11849
11936
|
if (fromModel != null) {
|
|
@@ -11851,7 +11938,7 @@ function deleteModelParametersToVertex(apiClient, fromObject) {
|
|
|
11851
11938
|
}
|
|
11852
11939
|
return toObject;
|
|
11853
11940
|
}
|
|
11854
|
-
function deleteModelResponseFromMldev(fromObject) {
|
|
11941
|
+
function deleteModelResponseFromMldev(fromObject, _rootObject) {
|
|
11855
11942
|
const toObject = {};
|
|
11856
11943
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11857
11944
|
'sdkHttpResponse',
|
|
@@ -11861,7 +11948,7 @@ function deleteModelResponseFromMldev(fromObject) {
|
|
|
11861
11948
|
}
|
|
11862
11949
|
return toObject;
|
|
11863
11950
|
}
|
|
11864
|
-
function deleteModelResponseFromVertex(fromObject) {
|
|
11951
|
+
function deleteModelResponseFromVertex(fromObject, _rootObject) {
|
|
11865
11952
|
const toObject = {};
|
|
11866
11953
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11867
11954
|
'sdkHttpResponse',
|
|
@@ -11871,7 +11958,7 @@ function deleteModelResponseFromVertex(fromObject) {
|
|
|
11871
11958
|
}
|
|
11872
11959
|
return toObject;
|
|
11873
11960
|
}
|
|
11874
|
-
function editImageConfigToVertex(fromObject, parentObject) {
|
|
11961
|
+
function editImageConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
11875
11962
|
const toObject = {};
|
|
11876
11963
|
const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
|
|
11877
11964
|
if (parentObject !== undefined && fromOutputGcsUri != null) {
|
|
@@ -11961,7 +12048,7 @@ function editImageConfigToVertex(fromObject, parentObject) {
|
|
|
11961
12048
|
}
|
|
11962
12049
|
return toObject;
|
|
11963
12050
|
}
|
|
11964
|
-
function editImageParametersInternalToVertex(apiClient, fromObject) {
|
|
12051
|
+
function editImageParametersInternalToVertex(apiClient, fromObject, rootObject) {
|
|
11965
12052
|
const toObject = {};
|
|
11966
12053
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
11967
12054
|
if (fromModel != null) {
|
|
@@ -11989,7 +12076,7 @@ function editImageParametersInternalToVertex(apiClient, fromObject) {
|
|
|
11989
12076
|
}
|
|
11990
12077
|
return toObject;
|
|
11991
12078
|
}
|
|
11992
|
-
function editImageResponseFromVertex(fromObject) {
|
|
12079
|
+
function editImageResponseFromVertex(fromObject, rootObject) {
|
|
11993
12080
|
const toObject = {};
|
|
11994
12081
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
11995
12082
|
'sdkHttpResponse',
|
|
@@ -12011,7 +12098,7 @@ function editImageResponseFromVertex(fromObject) {
|
|
|
12011
12098
|
}
|
|
12012
12099
|
return toObject;
|
|
12013
12100
|
}
|
|
12014
|
-
function embedContentConfigToMldev(fromObject, parentObject) {
|
|
12101
|
+
function embedContentConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
12015
12102
|
const toObject = {};
|
|
12016
12103
|
const fromTaskType = getValueByPath(fromObject, ['taskType']);
|
|
12017
12104
|
if (parentObject !== undefined && fromTaskType != null) {
|
|
@@ -12035,7 +12122,7 @@ function embedContentConfigToMldev(fromObject, parentObject) {
|
|
|
12035
12122
|
}
|
|
12036
12123
|
return toObject;
|
|
12037
12124
|
}
|
|
12038
|
-
function embedContentConfigToVertex(fromObject, parentObject) {
|
|
12125
|
+
function embedContentConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
12039
12126
|
const toObject = {};
|
|
12040
12127
|
const fromTaskType = getValueByPath(fromObject, ['taskType']);
|
|
12041
12128
|
if (parentObject !== undefined && fromTaskType != null) {
|
|
@@ -12061,7 +12148,7 @@ function embedContentConfigToVertex(fromObject, parentObject) {
|
|
|
12061
12148
|
}
|
|
12062
12149
|
return toObject;
|
|
12063
12150
|
}
|
|
12064
|
-
function embedContentParametersToMldev(apiClient, fromObject) {
|
|
12151
|
+
function embedContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
12065
12152
|
const toObject = {};
|
|
12066
12153
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
12067
12154
|
if (fromModel != null) {
|
|
@@ -12087,7 +12174,7 @@ function embedContentParametersToMldev(apiClient, fromObject) {
|
|
|
12087
12174
|
}
|
|
12088
12175
|
return toObject;
|
|
12089
12176
|
}
|
|
12090
|
-
function embedContentParametersToVertex(apiClient, fromObject) {
|
|
12177
|
+
function embedContentParametersToVertex(apiClient, fromObject, rootObject) {
|
|
12091
12178
|
const toObject = {};
|
|
12092
12179
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
12093
12180
|
if (fromModel != null) {
|
|
@@ -12109,7 +12196,7 @@ function embedContentParametersToVertex(apiClient, fromObject) {
|
|
|
12109
12196
|
}
|
|
12110
12197
|
return toObject;
|
|
12111
12198
|
}
|
|
12112
|
-
function embedContentResponseFromMldev(fromObject) {
|
|
12199
|
+
function embedContentResponseFromMldev(fromObject, _rootObject) {
|
|
12113
12200
|
const toObject = {};
|
|
12114
12201
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12115
12202
|
'sdkHttpResponse',
|
|
@@ -12133,7 +12220,7 @@ function embedContentResponseFromMldev(fromObject) {
|
|
|
12133
12220
|
}
|
|
12134
12221
|
return toObject;
|
|
12135
12222
|
}
|
|
12136
|
-
function embedContentResponseFromVertex(fromObject) {
|
|
12223
|
+
function embedContentResponseFromVertex(fromObject, rootObject) {
|
|
12137
12224
|
const toObject = {};
|
|
12138
12225
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12139
12226
|
'sdkHttpResponse',
|
|
@@ -12160,7 +12247,7 @@ function embedContentResponseFromVertex(fromObject) {
|
|
|
12160
12247
|
}
|
|
12161
12248
|
return toObject;
|
|
12162
12249
|
}
|
|
12163
|
-
function endpointFromVertex(fromObject) {
|
|
12250
|
+
function endpointFromVertex(fromObject, _rootObject) {
|
|
12164
12251
|
const toObject = {};
|
|
12165
12252
|
const fromName = getValueByPath(fromObject, ['endpoint']);
|
|
12166
12253
|
if (fromName != null) {
|
|
@@ -12174,7 +12261,7 @@ function endpointFromVertex(fromObject) {
|
|
|
12174
12261
|
}
|
|
12175
12262
|
return toObject;
|
|
12176
12263
|
}
|
|
12177
|
-
function fileDataToMldev$1(fromObject) {
|
|
12264
|
+
function fileDataToMldev$1(fromObject, _rootObject) {
|
|
12178
12265
|
const toObject = {};
|
|
12179
12266
|
if (getValueByPath(fromObject, ['displayName']) !== undefined) {
|
|
12180
12267
|
throw new Error('displayName parameter is not supported in Gemini API.');
|
|
@@ -12189,7 +12276,7 @@ function fileDataToMldev$1(fromObject) {
|
|
|
12189
12276
|
}
|
|
12190
12277
|
return toObject;
|
|
12191
12278
|
}
|
|
12192
|
-
function functionCallToMldev$1(fromObject) {
|
|
12279
|
+
function functionCallToMldev$1(fromObject, _rootObject) {
|
|
12193
12280
|
const toObject = {};
|
|
12194
12281
|
const fromId = getValueByPath(fromObject, ['id']);
|
|
12195
12282
|
if (fromId != null) {
|
|
@@ -12211,7 +12298,7 @@ function functionCallToMldev$1(fromObject) {
|
|
|
12211
12298
|
}
|
|
12212
12299
|
return toObject;
|
|
12213
12300
|
}
|
|
12214
|
-
function functionCallingConfigToMldev(fromObject) {
|
|
12301
|
+
function functionCallingConfigToMldev(fromObject, _rootObject) {
|
|
12215
12302
|
const toObject = {};
|
|
12216
12303
|
const fromAllowedFunctionNames = getValueByPath(fromObject, [
|
|
12217
12304
|
'allowedFunctionNames',
|
|
@@ -12229,7 +12316,7 @@ function functionCallingConfigToMldev(fromObject) {
|
|
|
12229
12316
|
}
|
|
12230
12317
|
return toObject;
|
|
12231
12318
|
}
|
|
12232
|
-
function functionDeclarationToVertex(fromObject) {
|
|
12319
|
+
function functionDeclarationToVertex(fromObject, _rootObject) {
|
|
12233
12320
|
const toObject = {};
|
|
12234
12321
|
const fromDescription = getValueByPath(fromObject, ['description']);
|
|
12235
12322
|
if (fromDescription != null) {
|
|
@@ -12264,7 +12351,7 @@ function functionDeclarationToVertex(fromObject) {
|
|
|
12264
12351
|
}
|
|
12265
12352
|
return toObject;
|
|
12266
12353
|
}
|
|
12267
|
-
function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
12354
|
+
function generateContentConfigToMldev(apiClient, fromObject, parentObject, rootObject) {
|
|
12268
12355
|
const toObject = {};
|
|
12269
12356
|
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
12270
12357
|
'systemInstruction',
|
|
@@ -12427,7 +12514,7 @@ function generateContentConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
12427
12514
|
}
|
|
12428
12515
|
return toObject;
|
|
12429
12516
|
}
|
|
12430
|
-
function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
12517
|
+
function generateContentConfigToVertex(apiClient, fromObject, parentObject, rootObject) {
|
|
12431
12518
|
const toObject = {};
|
|
12432
12519
|
const fromSystemInstruction = getValueByPath(fromObject, [
|
|
12433
12520
|
'systemInstruction',
|
|
@@ -12601,7 +12688,7 @@ function generateContentConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
12601
12688
|
}
|
|
12602
12689
|
return toObject;
|
|
12603
12690
|
}
|
|
12604
|
-
function generateContentParametersToMldev(apiClient, fromObject) {
|
|
12691
|
+
function generateContentParametersToMldev(apiClient, fromObject, rootObject) {
|
|
12605
12692
|
const toObject = {};
|
|
12606
12693
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
12607
12694
|
if (fromModel != null) {
|
|
@@ -12623,7 +12710,7 @@ function generateContentParametersToMldev(apiClient, fromObject) {
|
|
|
12623
12710
|
}
|
|
12624
12711
|
return toObject;
|
|
12625
12712
|
}
|
|
12626
|
-
function generateContentParametersToVertex(apiClient, fromObject) {
|
|
12713
|
+
function generateContentParametersToVertex(apiClient, fromObject, rootObject) {
|
|
12627
12714
|
const toObject = {};
|
|
12628
12715
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
12629
12716
|
if (fromModel != null) {
|
|
@@ -12645,7 +12732,7 @@ function generateContentParametersToVertex(apiClient, fromObject) {
|
|
|
12645
12732
|
}
|
|
12646
12733
|
return toObject;
|
|
12647
12734
|
}
|
|
12648
|
-
function generateContentResponseFromMldev(fromObject) {
|
|
12735
|
+
function generateContentResponseFromMldev(fromObject, rootObject) {
|
|
12649
12736
|
const toObject = {};
|
|
12650
12737
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12651
12738
|
'sdkHttpResponse',
|
|
@@ -12685,7 +12772,7 @@ function generateContentResponseFromMldev(fromObject) {
|
|
|
12685
12772
|
}
|
|
12686
12773
|
return toObject;
|
|
12687
12774
|
}
|
|
12688
|
-
function generateContentResponseFromVertex(fromObject) {
|
|
12775
|
+
function generateContentResponseFromVertex(fromObject, _rootObject) {
|
|
12689
12776
|
const toObject = {};
|
|
12690
12777
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12691
12778
|
'sdkHttpResponse',
|
|
@@ -12729,7 +12816,7 @@ function generateContentResponseFromVertex(fromObject) {
|
|
|
12729
12816
|
}
|
|
12730
12817
|
return toObject;
|
|
12731
12818
|
}
|
|
12732
|
-
function generateImagesConfigToMldev(fromObject, parentObject) {
|
|
12819
|
+
function generateImagesConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
12733
12820
|
const toObject = {};
|
|
12734
12821
|
if (getValueByPath(fromObject, ['outputGcsUri']) !== undefined) {
|
|
12735
12822
|
throw new Error('outputGcsUri parameter is not supported in Gemini API.');
|
|
@@ -12811,7 +12898,7 @@ function generateImagesConfigToMldev(fromObject, parentObject) {
|
|
|
12811
12898
|
}
|
|
12812
12899
|
return toObject;
|
|
12813
12900
|
}
|
|
12814
|
-
function generateImagesConfigToVertex(fromObject, parentObject) {
|
|
12901
|
+
function generateImagesConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
12815
12902
|
const toObject = {};
|
|
12816
12903
|
const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
|
|
12817
12904
|
if (parentObject !== undefined && fromOutputGcsUri != null) {
|
|
@@ -12903,7 +12990,7 @@ function generateImagesConfigToVertex(fromObject, parentObject) {
|
|
|
12903
12990
|
}
|
|
12904
12991
|
return toObject;
|
|
12905
12992
|
}
|
|
12906
|
-
function generateImagesParametersToMldev(apiClient, fromObject) {
|
|
12993
|
+
function generateImagesParametersToMldev(apiClient, fromObject, rootObject) {
|
|
12907
12994
|
const toObject = {};
|
|
12908
12995
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
12909
12996
|
if (fromModel != null) {
|
|
@@ -12919,7 +13006,7 @@ function generateImagesParametersToMldev(apiClient, fromObject) {
|
|
|
12919
13006
|
}
|
|
12920
13007
|
return toObject;
|
|
12921
13008
|
}
|
|
12922
|
-
function generateImagesParametersToVertex(apiClient, fromObject) {
|
|
13009
|
+
function generateImagesParametersToVertex(apiClient, fromObject, rootObject) {
|
|
12923
13010
|
const toObject = {};
|
|
12924
13011
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
12925
13012
|
if (fromModel != null) {
|
|
@@ -12935,7 +13022,7 @@ function generateImagesParametersToVertex(apiClient, fromObject) {
|
|
|
12935
13022
|
}
|
|
12936
13023
|
return toObject;
|
|
12937
13024
|
}
|
|
12938
|
-
function generateImagesResponseFromMldev(fromObject) {
|
|
13025
|
+
function generateImagesResponseFromMldev(fromObject, rootObject) {
|
|
12939
13026
|
const toObject = {};
|
|
12940
13027
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12941
13028
|
'sdkHttpResponse',
|
|
@@ -12963,7 +13050,7 @@ function generateImagesResponseFromMldev(fromObject) {
|
|
|
12963
13050
|
}
|
|
12964
13051
|
return toObject;
|
|
12965
13052
|
}
|
|
12966
|
-
function generateImagesResponseFromVertex(fromObject) {
|
|
13053
|
+
function generateImagesResponseFromVertex(fromObject, rootObject) {
|
|
12967
13054
|
const toObject = {};
|
|
12968
13055
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
12969
13056
|
'sdkHttpResponse',
|
|
@@ -12991,7 +13078,7 @@ function generateImagesResponseFromVertex(fromObject) {
|
|
|
12991
13078
|
}
|
|
12992
13079
|
return toObject;
|
|
12993
13080
|
}
|
|
12994
|
-
function generateVideosConfigToMldev(fromObject, parentObject) {
|
|
13081
|
+
function generateVideosConfigToMldev(fromObject, parentObject, rootObject) {
|
|
12995
13082
|
const toObject = {};
|
|
12996
13083
|
const fromNumberOfVideos = getValueByPath(fromObject, [
|
|
12997
13084
|
'numberOfVideos',
|
|
@@ -13070,7 +13157,7 @@ function generateVideosConfigToMldev(fromObject, parentObject) {
|
|
|
13070
13157
|
}
|
|
13071
13158
|
return toObject;
|
|
13072
13159
|
}
|
|
13073
|
-
function generateVideosConfigToVertex(fromObject, parentObject) {
|
|
13160
|
+
function generateVideosConfigToVertex(fromObject, parentObject, rootObject) {
|
|
13074
13161
|
const toObject = {};
|
|
13075
13162
|
const fromNumberOfVideos = getValueByPath(fromObject, [
|
|
13076
13163
|
'numberOfVideos',
|
|
@@ -13160,7 +13247,7 @@ function generateVideosConfigToVertex(fromObject, parentObject) {
|
|
|
13160
13247
|
}
|
|
13161
13248
|
return toObject;
|
|
13162
13249
|
}
|
|
13163
|
-
function generateVideosOperationFromMldev(fromObject) {
|
|
13250
|
+
function generateVideosOperationFromMldev(fromObject, rootObject) {
|
|
13164
13251
|
const toObject = {};
|
|
13165
13252
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
13166
13253
|
if (fromName != null) {
|
|
@@ -13187,7 +13274,7 @@ function generateVideosOperationFromMldev(fromObject) {
|
|
|
13187
13274
|
}
|
|
13188
13275
|
return toObject;
|
|
13189
13276
|
}
|
|
13190
|
-
function generateVideosOperationFromVertex(fromObject) {
|
|
13277
|
+
function generateVideosOperationFromVertex(fromObject, rootObject) {
|
|
13191
13278
|
const toObject = {};
|
|
13192
13279
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
13193
13280
|
if (fromName != null) {
|
|
@@ -13211,7 +13298,7 @@ function generateVideosOperationFromVertex(fromObject) {
|
|
|
13211
13298
|
}
|
|
13212
13299
|
return toObject;
|
|
13213
13300
|
}
|
|
13214
|
-
function generateVideosParametersToMldev(apiClient, fromObject) {
|
|
13301
|
+
function generateVideosParametersToMldev(apiClient, fromObject, rootObject) {
|
|
13215
13302
|
const toObject = {};
|
|
13216
13303
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
13217
13304
|
if (fromModel != null) {
|
|
@@ -13239,7 +13326,7 @@ function generateVideosParametersToMldev(apiClient, fromObject) {
|
|
|
13239
13326
|
}
|
|
13240
13327
|
return toObject;
|
|
13241
13328
|
}
|
|
13242
|
-
function generateVideosParametersToVertex(apiClient, fromObject) {
|
|
13329
|
+
function generateVideosParametersToVertex(apiClient, fromObject, rootObject) {
|
|
13243
13330
|
const toObject = {};
|
|
13244
13331
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
13245
13332
|
if (fromModel != null) {
|
|
@@ -13267,7 +13354,7 @@ function generateVideosParametersToVertex(apiClient, fromObject) {
|
|
|
13267
13354
|
}
|
|
13268
13355
|
return toObject;
|
|
13269
13356
|
}
|
|
13270
|
-
function generateVideosResponseFromMldev(fromObject) {
|
|
13357
|
+
function generateVideosResponseFromMldev(fromObject, rootObject) {
|
|
13271
13358
|
const toObject = {};
|
|
13272
13359
|
const fromGeneratedVideos = getValueByPath(fromObject, [
|
|
13273
13360
|
'generatedSamples',
|
|
@@ -13295,7 +13382,7 @@ function generateVideosResponseFromMldev(fromObject) {
|
|
|
13295
13382
|
}
|
|
13296
13383
|
return toObject;
|
|
13297
13384
|
}
|
|
13298
|
-
function generateVideosResponseFromVertex(fromObject) {
|
|
13385
|
+
function generateVideosResponseFromVertex(fromObject, rootObject) {
|
|
13299
13386
|
const toObject = {};
|
|
13300
13387
|
const fromGeneratedVideos = getValueByPath(fromObject, ['videos']);
|
|
13301
13388
|
if (fromGeneratedVideos != null) {
|
|
@@ -13321,7 +13408,7 @@ function generateVideosResponseFromVertex(fromObject) {
|
|
|
13321
13408
|
}
|
|
13322
13409
|
return toObject;
|
|
13323
13410
|
}
|
|
13324
|
-
function generateVideosSourceToMldev(fromObject, parentObject) {
|
|
13411
|
+
function generateVideosSourceToMldev(fromObject, parentObject, rootObject) {
|
|
13325
13412
|
const toObject = {};
|
|
13326
13413
|
const fromPrompt = getValueByPath(fromObject, ['prompt']);
|
|
13327
13414
|
if (parentObject !== undefined && fromPrompt != null) {
|
|
@@ -13337,7 +13424,7 @@ function generateVideosSourceToMldev(fromObject, parentObject) {
|
|
|
13337
13424
|
}
|
|
13338
13425
|
return toObject;
|
|
13339
13426
|
}
|
|
13340
|
-
function generateVideosSourceToVertex(fromObject, parentObject) {
|
|
13427
|
+
function generateVideosSourceToVertex(fromObject, parentObject, rootObject) {
|
|
13341
13428
|
const toObject = {};
|
|
13342
13429
|
const fromPrompt = getValueByPath(fromObject, ['prompt']);
|
|
13343
13430
|
if (parentObject !== undefined && fromPrompt != null) {
|
|
@@ -13353,7 +13440,7 @@ function generateVideosSourceToVertex(fromObject, parentObject) {
|
|
|
13353
13440
|
}
|
|
13354
13441
|
return toObject;
|
|
13355
13442
|
}
|
|
13356
|
-
function generatedImageFromMldev(fromObject) {
|
|
13443
|
+
function generatedImageFromMldev(fromObject, rootObject) {
|
|
13357
13444
|
const toObject = {};
|
|
13358
13445
|
const fromImage = getValueByPath(fromObject, ['_self']);
|
|
13359
13446
|
if (fromImage != null) {
|
|
@@ -13371,7 +13458,7 @@ function generatedImageFromMldev(fromObject) {
|
|
|
13371
13458
|
}
|
|
13372
13459
|
return toObject;
|
|
13373
13460
|
}
|
|
13374
|
-
function generatedImageFromVertex(fromObject) {
|
|
13461
|
+
function generatedImageFromVertex(fromObject, rootObject) {
|
|
13375
13462
|
const toObject = {};
|
|
13376
13463
|
const fromImage = getValueByPath(fromObject, ['_self']);
|
|
13377
13464
|
if (fromImage != null) {
|
|
@@ -13393,7 +13480,7 @@ function generatedImageFromVertex(fromObject) {
|
|
|
13393
13480
|
}
|
|
13394
13481
|
return toObject;
|
|
13395
13482
|
}
|
|
13396
|
-
function generatedImageMaskFromVertex(fromObject) {
|
|
13483
|
+
function generatedImageMaskFromVertex(fromObject, rootObject) {
|
|
13397
13484
|
const toObject = {};
|
|
13398
13485
|
const fromMask = getValueByPath(fromObject, ['_self']);
|
|
13399
13486
|
if (fromMask != null) {
|
|
@@ -13411,7 +13498,7 @@ function generatedImageMaskFromVertex(fromObject) {
|
|
|
13411
13498
|
}
|
|
13412
13499
|
return toObject;
|
|
13413
13500
|
}
|
|
13414
|
-
function generatedVideoFromMldev(fromObject) {
|
|
13501
|
+
function generatedVideoFromMldev(fromObject, rootObject) {
|
|
13415
13502
|
const toObject = {};
|
|
13416
13503
|
const fromVideo = getValueByPath(fromObject, ['video']);
|
|
13417
13504
|
if (fromVideo != null) {
|
|
@@ -13419,7 +13506,7 @@ function generatedVideoFromMldev(fromObject) {
|
|
|
13419
13506
|
}
|
|
13420
13507
|
return toObject;
|
|
13421
13508
|
}
|
|
13422
|
-
function generatedVideoFromVertex(fromObject) {
|
|
13509
|
+
function generatedVideoFromVertex(fromObject, rootObject) {
|
|
13423
13510
|
const toObject = {};
|
|
13424
13511
|
const fromVideo = getValueByPath(fromObject, ['_self']);
|
|
13425
13512
|
if (fromVideo != null) {
|
|
@@ -13427,7 +13514,7 @@ function generatedVideoFromVertex(fromObject) {
|
|
|
13427
13514
|
}
|
|
13428
13515
|
return toObject;
|
|
13429
13516
|
}
|
|
13430
|
-
function generationConfigToVertex(fromObject) {
|
|
13517
|
+
function generationConfigToVertex(fromObject, _rootObject) {
|
|
13431
13518
|
const toObject = {};
|
|
13432
13519
|
const fromModelSelectionConfig = getValueByPath(fromObject, [
|
|
13433
13520
|
'modelSelectionConfig',
|
|
@@ -13555,7 +13642,7 @@ function generationConfigToVertex(fromObject) {
|
|
|
13555
13642
|
}
|
|
13556
13643
|
return toObject;
|
|
13557
13644
|
}
|
|
13558
|
-
function getModelParametersToMldev(apiClient, fromObject) {
|
|
13645
|
+
function getModelParametersToMldev(apiClient, fromObject, _rootObject) {
|
|
13559
13646
|
const toObject = {};
|
|
13560
13647
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
13561
13648
|
if (fromModel != null) {
|
|
@@ -13563,7 +13650,7 @@ function getModelParametersToMldev(apiClient, fromObject) {
|
|
|
13563
13650
|
}
|
|
13564
13651
|
return toObject;
|
|
13565
13652
|
}
|
|
13566
|
-
function getModelParametersToVertex(apiClient, fromObject) {
|
|
13653
|
+
function getModelParametersToVertex(apiClient, fromObject, _rootObject) {
|
|
13567
13654
|
const toObject = {};
|
|
13568
13655
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
13569
13656
|
if (fromModel != null) {
|
|
@@ -13571,7 +13658,7 @@ function getModelParametersToVertex(apiClient, fromObject) {
|
|
|
13571
13658
|
}
|
|
13572
13659
|
return toObject;
|
|
13573
13660
|
}
|
|
13574
|
-
function googleMapsToMldev$1(fromObject) {
|
|
13661
|
+
function googleMapsToMldev$1(fromObject, _rootObject) {
|
|
13575
13662
|
const toObject = {};
|
|
13576
13663
|
if (getValueByPath(fromObject, ['authConfig']) !== undefined) {
|
|
13577
13664
|
throw new Error('authConfig parameter is not supported in Gemini API.');
|
|
@@ -13582,7 +13669,7 @@ function googleMapsToMldev$1(fromObject) {
|
|
|
13582
13669
|
}
|
|
13583
13670
|
return toObject;
|
|
13584
13671
|
}
|
|
13585
|
-
function googleSearchToMldev$1(fromObject) {
|
|
13672
|
+
function googleSearchToMldev$1(fromObject, _rootObject) {
|
|
13586
13673
|
const toObject = {};
|
|
13587
13674
|
if (getValueByPath(fromObject, ['excludeDomains']) !== undefined) {
|
|
13588
13675
|
throw new Error('excludeDomains parameter is not supported in Gemini API.');
|
|
@@ -13598,7 +13685,7 @@ function googleSearchToMldev$1(fromObject) {
|
|
|
13598
13685
|
}
|
|
13599
13686
|
return toObject;
|
|
13600
13687
|
}
|
|
13601
|
-
function imageConfigToMldev(fromObject) {
|
|
13688
|
+
function imageConfigToMldev(fromObject, _rootObject) {
|
|
13602
13689
|
const toObject = {};
|
|
13603
13690
|
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
13604
13691
|
if (fromAspectRatio != null) {
|
|
@@ -13620,7 +13707,7 @@ function imageConfigToMldev(fromObject) {
|
|
|
13620
13707
|
}
|
|
13621
13708
|
return toObject;
|
|
13622
13709
|
}
|
|
13623
|
-
function imageConfigToVertex(fromObject) {
|
|
13710
|
+
function imageConfigToVertex(fromObject, _rootObject) {
|
|
13624
13711
|
const toObject = {};
|
|
13625
13712
|
const fromAspectRatio = getValueByPath(fromObject, ['aspectRatio']);
|
|
13626
13713
|
if (fromAspectRatio != null) {
|
|
@@ -13650,7 +13737,7 @@ function imageConfigToVertex(fromObject) {
|
|
|
13650
13737
|
}
|
|
13651
13738
|
return toObject;
|
|
13652
13739
|
}
|
|
13653
|
-
function imageFromMldev(fromObject) {
|
|
13740
|
+
function imageFromMldev(fromObject, _rootObject) {
|
|
13654
13741
|
const toObject = {};
|
|
13655
13742
|
const fromImageBytes = getValueByPath(fromObject, [
|
|
13656
13743
|
'bytesBase64Encoded',
|
|
@@ -13664,7 +13751,7 @@ function imageFromMldev(fromObject) {
|
|
|
13664
13751
|
}
|
|
13665
13752
|
return toObject;
|
|
13666
13753
|
}
|
|
13667
|
-
function imageFromVertex(fromObject) {
|
|
13754
|
+
function imageFromVertex(fromObject, _rootObject) {
|
|
13668
13755
|
const toObject = {};
|
|
13669
13756
|
const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
|
|
13670
13757
|
if (fromGcsUri != null) {
|
|
@@ -13682,7 +13769,7 @@ function imageFromVertex(fromObject) {
|
|
|
13682
13769
|
}
|
|
13683
13770
|
return toObject;
|
|
13684
13771
|
}
|
|
13685
|
-
function imageToMldev(fromObject) {
|
|
13772
|
+
function imageToMldev(fromObject, _rootObject) {
|
|
13686
13773
|
const toObject = {};
|
|
13687
13774
|
if (getValueByPath(fromObject, ['gcsUri']) !== undefined) {
|
|
13688
13775
|
throw new Error('gcsUri parameter is not supported in Gemini API.');
|
|
@@ -13697,7 +13784,7 @@ function imageToMldev(fromObject) {
|
|
|
13697
13784
|
}
|
|
13698
13785
|
return toObject;
|
|
13699
13786
|
}
|
|
13700
|
-
function imageToVertex(fromObject) {
|
|
13787
|
+
function imageToVertex(fromObject, _rootObject) {
|
|
13701
13788
|
const toObject = {};
|
|
13702
13789
|
const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
|
|
13703
13790
|
if (fromGcsUri != null) {
|
|
@@ -13713,7 +13800,7 @@ function imageToVertex(fromObject) {
|
|
|
13713
13800
|
}
|
|
13714
13801
|
return toObject;
|
|
13715
13802
|
}
|
|
13716
|
-
function listModelsConfigToMldev(apiClient, fromObject, parentObject) {
|
|
13803
|
+
function listModelsConfigToMldev(apiClient, fromObject, parentObject, _rootObject) {
|
|
13717
13804
|
const toObject = {};
|
|
13718
13805
|
const fromPageSize = getValueByPath(fromObject, ['pageSize']);
|
|
13719
13806
|
if (parentObject !== undefined && fromPageSize != null) {
|
|
@@ -13733,7 +13820,7 @@ function listModelsConfigToMldev(apiClient, fromObject, parentObject) {
|
|
|
13733
13820
|
}
|
|
13734
13821
|
return toObject;
|
|
13735
13822
|
}
|
|
13736
|
-
function listModelsConfigToVertex(apiClient, fromObject, parentObject) {
|
|
13823
|
+
function listModelsConfigToVertex(apiClient, fromObject, parentObject, _rootObject) {
|
|
13737
13824
|
const toObject = {};
|
|
13738
13825
|
const fromPageSize = getValueByPath(fromObject, ['pageSize']);
|
|
13739
13826
|
if (parentObject !== undefined && fromPageSize != null) {
|
|
@@ -13753,7 +13840,7 @@ function listModelsConfigToVertex(apiClient, fromObject, parentObject) {
|
|
|
13753
13840
|
}
|
|
13754
13841
|
return toObject;
|
|
13755
13842
|
}
|
|
13756
|
-
function listModelsParametersToMldev(apiClient, fromObject) {
|
|
13843
|
+
function listModelsParametersToMldev(apiClient, fromObject, rootObject) {
|
|
13757
13844
|
const toObject = {};
|
|
13758
13845
|
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
13759
13846
|
if (fromConfig != null) {
|
|
@@ -13761,7 +13848,7 @@ function listModelsParametersToMldev(apiClient, fromObject) {
|
|
|
13761
13848
|
}
|
|
13762
13849
|
return toObject;
|
|
13763
13850
|
}
|
|
13764
|
-
function listModelsParametersToVertex(apiClient, fromObject) {
|
|
13851
|
+
function listModelsParametersToVertex(apiClient, fromObject, rootObject) {
|
|
13765
13852
|
const toObject = {};
|
|
13766
13853
|
const fromConfig = getValueByPath(fromObject, ['config']);
|
|
13767
13854
|
if (fromConfig != null) {
|
|
@@ -13769,7 +13856,7 @@ function listModelsParametersToVertex(apiClient, fromObject) {
|
|
|
13769
13856
|
}
|
|
13770
13857
|
return toObject;
|
|
13771
13858
|
}
|
|
13772
|
-
function listModelsResponseFromMldev(fromObject) {
|
|
13859
|
+
function listModelsResponseFromMldev(fromObject, rootObject) {
|
|
13773
13860
|
const toObject = {};
|
|
13774
13861
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
13775
13862
|
'sdkHttpResponse',
|
|
@@ -13795,7 +13882,7 @@ function listModelsResponseFromMldev(fromObject) {
|
|
|
13795
13882
|
}
|
|
13796
13883
|
return toObject;
|
|
13797
13884
|
}
|
|
13798
|
-
function listModelsResponseFromVertex(fromObject) {
|
|
13885
|
+
function listModelsResponseFromVertex(fromObject, rootObject) {
|
|
13799
13886
|
const toObject = {};
|
|
13800
13887
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
13801
13888
|
'sdkHttpResponse',
|
|
@@ -13821,7 +13908,7 @@ function listModelsResponseFromVertex(fromObject) {
|
|
|
13821
13908
|
}
|
|
13822
13909
|
return toObject;
|
|
13823
13910
|
}
|
|
13824
|
-
function maskReferenceConfigToVertex(fromObject) {
|
|
13911
|
+
function maskReferenceConfigToVertex(fromObject, _rootObject) {
|
|
13825
13912
|
const toObject = {};
|
|
13826
13913
|
const fromMaskMode = getValueByPath(fromObject, ['maskMode']);
|
|
13827
13914
|
if (fromMaskMode != null) {
|
|
@@ -13839,7 +13926,7 @@ function maskReferenceConfigToVertex(fromObject) {
|
|
|
13839
13926
|
}
|
|
13840
13927
|
return toObject;
|
|
13841
13928
|
}
|
|
13842
|
-
function modelFromMldev(fromObject) {
|
|
13929
|
+
function modelFromMldev(fromObject, rootObject) {
|
|
13843
13930
|
const toObject = {};
|
|
13844
13931
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
13845
13932
|
if (fromName != null) {
|
|
@@ -13903,7 +13990,7 @@ function modelFromMldev(fromObject) {
|
|
|
13903
13990
|
}
|
|
13904
13991
|
return toObject;
|
|
13905
13992
|
}
|
|
13906
|
-
function modelFromVertex(fromObject) {
|
|
13993
|
+
function modelFromVertex(fromObject, rootObject) {
|
|
13907
13994
|
const toObject = {};
|
|
13908
13995
|
const fromName = getValueByPath(fromObject, ['name']);
|
|
13909
13996
|
if (fromName != null) {
|
|
@@ -13957,7 +14044,7 @@ function modelFromVertex(fromObject) {
|
|
|
13957
14044
|
}
|
|
13958
14045
|
return toObject;
|
|
13959
14046
|
}
|
|
13960
|
-
function partToMldev$1(fromObject) {
|
|
14047
|
+
function partToMldev$1(fromObject, rootObject) {
|
|
13961
14048
|
const toObject = {};
|
|
13962
14049
|
const fromMediaResolution = getValueByPath(fromObject, [
|
|
13963
14050
|
'mediaResolution',
|
|
@@ -14017,7 +14104,7 @@ function partToMldev$1(fromObject) {
|
|
|
14017
14104
|
}
|
|
14018
14105
|
return toObject;
|
|
14019
14106
|
}
|
|
14020
|
-
function productImageToVertex(fromObject) {
|
|
14107
|
+
function productImageToVertex(fromObject, rootObject) {
|
|
14021
14108
|
const toObject = {};
|
|
14022
14109
|
const fromProductImage = getValueByPath(fromObject, ['productImage']);
|
|
14023
14110
|
if (fromProductImage != null) {
|
|
@@ -14025,7 +14112,7 @@ function productImageToVertex(fromObject) {
|
|
|
14025
14112
|
}
|
|
14026
14113
|
return toObject;
|
|
14027
14114
|
}
|
|
14028
|
-
function recontextImageConfigToVertex(fromObject, parentObject) {
|
|
14115
|
+
function recontextImageConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
14029
14116
|
const toObject = {};
|
|
14030
14117
|
const fromNumberOfImages = getValueByPath(fromObject, [
|
|
14031
14118
|
'numberOfImages',
|
|
@@ -14085,7 +14172,7 @@ function recontextImageConfigToVertex(fromObject, parentObject) {
|
|
|
14085
14172
|
}
|
|
14086
14173
|
return toObject;
|
|
14087
14174
|
}
|
|
14088
|
-
function recontextImageParametersToVertex(apiClient, fromObject) {
|
|
14175
|
+
function recontextImageParametersToVertex(apiClient, fromObject, rootObject) {
|
|
14089
14176
|
const toObject = {};
|
|
14090
14177
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
14091
14178
|
if (fromModel != null) {
|
|
@@ -14101,7 +14188,7 @@ function recontextImageParametersToVertex(apiClient, fromObject) {
|
|
|
14101
14188
|
}
|
|
14102
14189
|
return toObject;
|
|
14103
14190
|
}
|
|
14104
|
-
function recontextImageResponseFromVertex(fromObject) {
|
|
14191
|
+
function recontextImageResponseFromVertex(fromObject, rootObject) {
|
|
14105
14192
|
const toObject = {};
|
|
14106
14193
|
const fromGeneratedImages = getValueByPath(fromObject, [
|
|
14107
14194
|
'predictions',
|
|
@@ -14117,7 +14204,7 @@ function recontextImageResponseFromVertex(fromObject) {
|
|
|
14117
14204
|
}
|
|
14118
14205
|
return toObject;
|
|
14119
14206
|
}
|
|
14120
|
-
function recontextImageSourceToVertex(fromObject, parentObject) {
|
|
14207
|
+
function recontextImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
14121
14208
|
const toObject = {};
|
|
14122
14209
|
const fromPrompt = getValueByPath(fromObject, ['prompt']);
|
|
14123
14210
|
if (parentObject !== undefined && fromPrompt != null) {
|
|
@@ -14141,7 +14228,7 @@ function recontextImageSourceToVertex(fromObject, parentObject) {
|
|
|
14141
14228
|
}
|
|
14142
14229
|
return toObject;
|
|
14143
14230
|
}
|
|
14144
|
-
function referenceImageAPIInternalToVertex(fromObject) {
|
|
14231
|
+
function referenceImageAPIInternalToVertex(fromObject, rootObject) {
|
|
14145
14232
|
const toObject = {};
|
|
14146
14233
|
const fromReferenceImage = getValueByPath(fromObject, [
|
|
14147
14234
|
'referenceImage',
|
|
@@ -14185,7 +14272,7 @@ function referenceImageAPIInternalToVertex(fromObject) {
|
|
|
14185
14272
|
}
|
|
14186
14273
|
return toObject;
|
|
14187
14274
|
}
|
|
14188
|
-
function safetyAttributesFromMldev(fromObject) {
|
|
14275
|
+
function safetyAttributesFromMldev(fromObject, _rootObject) {
|
|
14189
14276
|
const toObject = {};
|
|
14190
14277
|
const fromCategories = getValueByPath(fromObject, [
|
|
14191
14278
|
'safetyAttributes',
|
|
@@ -14207,7 +14294,7 @@ function safetyAttributesFromMldev(fromObject) {
|
|
|
14207
14294
|
}
|
|
14208
14295
|
return toObject;
|
|
14209
14296
|
}
|
|
14210
|
-
function safetyAttributesFromVertex(fromObject) {
|
|
14297
|
+
function safetyAttributesFromVertex(fromObject, _rootObject) {
|
|
14211
14298
|
const toObject = {};
|
|
14212
14299
|
const fromCategories = getValueByPath(fromObject, [
|
|
14213
14300
|
'safetyAttributes',
|
|
@@ -14229,7 +14316,7 @@ function safetyAttributesFromVertex(fromObject) {
|
|
|
14229
14316
|
}
|
|
14230
14317
|
return toObject;
|
|
14231
14318
|
}
|
|
14232
|
-
function safetySettingToMldev(fromObject) {
|
|
14319
|
+
function safetySettingToMldev(fromObject, _rootObject) {
|
|
14233
14320
|
const toObject = {};
|
|
14234
14321
|
const fromCategory = getValueByPath(fromObject, ['category']);
|
|
14235
14322
|
if (fromCategory != null) {
|
|
@@ -14244,7 +14331,7 @@ function safetySettingToMldev(fromObject) {
|
|
|
14244
14331
|
}
|
|
14245
14332
|
return toObject;
|
|
14246
14333
|
}
|
|
14247
|
-
function scribbleImageToVertex(fromObject) {
|
|
14334
|
+
function scribbleImageToVertex(fromObject, rootObject) {
|
|
14248
14335
|
const toObject = {};
|
|
14249
14336
|
const fromImage = getValueByPath(fromObject, ['image']);
|
|
14250
14337
|
if (fromImage != null) {
|
|
@@ -14252,7 +14339,7 @@ function scribbleImageToVertex(fromObject) {
|
|
|
14252
14339
|
}
|
|
14253
14340
|
return toObject;
|
|
14254
14341
|
}
|
|
14255
|
-
function segmentImageConfigToVertex(fromObject, parentObject) {
|
|
14342
|
+
function segmentImageConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
14256
14343
|
const toObject = {};
|
|
14257
14344
|
const fromMode = getValueByPath(fromObject, ['mode']);
|
|
14258
14345
|
if (parentObject !== undefined && fromMode != null) {
|
|
@@ -14286,7 +14373,7 @@ function segmentImageConfigToVertex(fromObject, parentObject) {
|
|
|
14286
14373
|
}
|
|
14287
14374
|
return toObject;
|
|
14288
14375
|
}
|
|
14289
|
-
function segmentImageParametersToVertex(apiClient, fromObject) {
|
|
14376
|
+
function segmentImageParametersToVertex(apiClient, fromObject, rootObject) {
|
|
14290
14377
|
const toObject = {};
|
|
14291
14378
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
14292
14379
|
if (fromModel != null) {
|
|
@@ -14302,7 +14389,7 @@ function segmentImageParametersToVertex(apiClient, fromObject) {
|
|
|
14302
14389
|
}
|
|
14303
14390
|
return toObject;
|
|
14304
14391
|
}
|
|
14305
|
-
function segmentImageResponseFromVertex(fromObject) {
|
|
14392
|
+
function segmentImageResponseFromVertex(fromObject, rootObject) {
|
|
14306
14393
|
const toObject = {};
|
|
14307
14394
|
const fromGeneratedMasks = getValueByPath(fromObject, ['predictions']);
|
|
14308
14395
|
if (fromGeneratedMasks != null) {
|
|
@@ -14316,7 +14403,7 @@ function segmentImageResponseFromVertex(fromObject) {
|
|
|
14316
14403
|
}
|
|
14317
14404
|
return toObject;
|
|
14318
14405
|
}
|
|
14319
|
-
function segmentImageSourceToVertex(fromObject, parentObject) {
|
|
14406
|
+
function segmentImageSourceToVertex(fromObject, parentObject, rootObject) {
|
|
14320
14407
|
const toObject = {};
|
|
14321
14408
|
const fromPrompt = getValueByPath(fromObject, ['prompt']);
|
|
14322
14409
|
if (parentObject !== undefined && fromPrompt != null) {
|
|
@@ -14334,7 +14421,7 @@ function segmentImageSourceToVertex(fromObject, parentObject) {
|
|
|
14334
14421
|
}
|
|
14335
14422
|
return toObject;
|
|
14336
14423
|
}
|
|
14337
|
-
function toolConfigToMldev(fromObject) {
|
|
14424
|
+
function toolConfigToMldev(fromObject, rootObject) {
|
|
14338
14425
|
const toObject = {};
|
|
14339
14426
|
const fromRetrievalConfig = getValueByPath(fromObject, [
|
|
14340
14427
|
'retrievalConfig',
|
|
@@ -14350,7 +14437,7 @@ function toolConfigToMldev(fromObject) {
|
|
|
14350
14437
|
}
|
|
14351
14438
|
return toObject;
|
|
14352
14439
|
}
|
|
14353
|
-
function toolToMldev$1(fromObject) {
|
|
14440
|
+
function toolToMldev$1(fromObject, rootObject) {
|
|
14354
14441
|
const toObject = {};
|
|
14355
14442
|
if (getValueByPath(fromObject, ['retrieval']) !== undefined) {
|
|
14356
14443
|
throw new Error('retrieval parameter is not supported in Gemini API.');
|
|
@@ -14404,7 +14491,7 @@ function toolToMldev$1(fromObject) {
|
|
|
14404
14491
|
}
|
|
14405
14492
|
return toObject;
|
|
14406
14493
|
}
|
|
14407
|
-
function toolToVertex(fromObject) {
|
|
14494
|
+
function toolToVertex(fromObject, rootObject) {
|
|
14408
14495
|
const toObject = {};
|
|
14409
14496
|
const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
|
|
14410
14497
|
if (fromRetrieval != null) {
|
|
@@ -14461,7 +14548,7 @@ function toolToVertex(fromObject) {
|
|
|
14461
14548
|
}
|
|
14462
14549
|
return toObject;
|
|
14463
14550
|
}
|
|
14464
|
-
function tunedModelInfoFromMldev(fromObject) {
|
|
14551
|
+
function tunedModelInfoFromMldev(fromObject, _rootObject) {
|
|
14465
14552
|
const toObject = {};
|
|
14466
14553
|
const fromBaseModel = getValueByPath(fromObject, ['baseModel']);
|
|
14467
14554
|
if (fromBaseModel != null) {
|
|
@@ -14477,7 +14564,7 @@ function tunedModelInfoFromMldev(fromObject) {
|
|
|
14477
14564
|
}
|
|
14478
14565
|
return toObject;
|
|
14479
14566
|
}
|
|
14480
|
-
function tunedModelInfoFromVertex(fromObject) {
|
|
14567
|
+
function tunedModelInfoFromVertex(fromObject, _rootObject) {
|
|
14481
14568
|
const toObject = {};
|
|
14482
14569
|
const fromBaseModel = getValueByPath(fromObject, [
|
|
14483
14570
|
'labels',
|
|
@@ -14496,7 +14583,7 @@ function tunedModelInfoFromVertex(fromObject) {
|
|
|
14496
14583
|
}
|
|
14497
14584
|
return toObject;
|
|
14498
14585
|
}
|
|
14499
|
-
function updateModelConfigToMldev(fromObject, parentObject) {
|
|
14586
|
+
function updateModelConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
14500
14587
|
const toObject = {};
|
|
14501
14588
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
14502
14589
|
if (parentObject !== undefined && fromDisplayName != null) {
|
|
@@ -14514,7 +14601,7 @@ function updateModelConfigToMldev(fromObject, parentObject) {
|
|
|
14514
14601
|
}
|
|
14515
14602
|
return toObject;
|
|
14516
14603
|
}
|
|
14517
|
-
function updateModelConfigToVertex(fromObject, parentObject) {
|
|
14604
|
+
function updateModelConfigToVertex(fromObject, parentObject, _rootObject) {
|
|
14518
14605
|
const toObject = {};
|
|
14519
14606
|
const fromDisplayName = getValueByPath(fromObject, ['displayName']);
|
|
14520
14607
|
if (parentObject !== undefined && fromDisplayName != null) {
|
|
@@ -14532,7 +14619,7 @@ function updateModelConfigToVertex(fromObject, parentObject) {
|
|
|
14532
14619
|
}
|
|
14533
14620
|
return toObject;
|
|
14534
14621
|
}
|
|
14535
|
-
function updateModelParametersToMldev(apiClient, fromObject) {
|
|
14622
|
+
function updateModelParametersToMldev(apiClient, fromObject, rootObject) {
|
|
14536
14623
|
const toObject = {};
|
|
14537
14624
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
14538
14625
|
if (fromModel != null) {
|
|
@@ -14544,7 +14631,7 @@ function updateModelParametersToMldev(apiClient, fromObject) {
|
|
|
14544
14631
|
}
|
|
14545
14632
|
return toObject;
|
|
14546
14633
|
}
|
|
14547
|
-
function updateModelParametersToVertex(apiClient, fromObject) {
|
|
14634
|
+
function updateModelParametersToVertex(apiClient, fromObject, rootObject) {
|
|
14548
14635
|
const toObject = {};
|
|
14549
14636
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
14550
14637
|
if (fromModel != null) {
|
|
@@ -14556,7 +14643,7 @@ function updateModelParametersToVertex(apiClient, fromObject) {
|
|
|
14556
14643
|
}
|
|
14557
14644
|
return toObject;
|
|
14558
14645
|
}
|
|
14559
|
-
function upscaleImageAPIConfigInternalToVertex(fromObject, parentObject) {
|
|
14646
|
+
function upscaleImageAPIConfigInternalToVertex(fromObject, parentObject, _rootObject) {
|
|
14560
14647
|
const toObject = {};
|
|
14561
14648
|
const fromOutputGcsUri = getValueByPath(fromObject, ['outputGcsUri']);
|
|
14562
14649
|
if (parentObject !== undefined && fromOutputGcsUri != null) {
|
|
@@ -14620,7 +14707,7 @@ function upscaleImageAPIConfigInternalToVertex(fromObject, parentObject) {
|
|
|
14620
14707
|
}
|
|
14621
14708
|
return toObject;
|
|
14622
14709
|
}
|
|
14623
|
-
function upscaleImageAPIParametersInternalToVertex(apiClient, fromObject) {
|
|
14710
|
+
function upscaleImageAPIParametersInternalToVertex(apiClient, fromObject, rootObject) {
|
|
14624
14711
|
const toObject = {};
|
|
14625
14712
|
const fromModel = getValueByPath(fromObject, ['model']);
|
|
14626
14713
|
if (fromModel != null) {
|
|
@@ -14642,7 +14729,7 @@ function upscaleImageAPIParametersInternalToVertex(apiClient, fromObject) {
|
|
|
14642
14729
|
}
|
|
14643
14730
|
return toObject;
|
|
14644
14731
|
}
|
|
14645
|
-
function upscaleImageResponseFromVertex(fromObject) {
|
|
14732
|
+
function upscaleImageResponseFromVertex(fromObject, rootObject) {
|
|
14646
14733
|
const toObject = {};
|
|
14647
14734
|
const fromSdkHttpResponse = getValueByPath(fromObject, [
|
|
14648
14735
|
'sdkHttpResponse',
|
|
@@ -14664,7 +14751,7 @@ function upscaleImageResponseFromVertex(fromObject) {
|
|
|
14664
14751
|
}
|
|
14665
14752
|
return toObject;
|
|
14666
14753
|
}
|
|
14667
|
-
function videoFromMldev(fromObject) {
|
|
14754
|
+
function videoFromMldev(fromObject, _rootObject) {
|
|
14668
14755
|
const toObject = {};
|
|
14669
14756
|
const fromUri = getValueByPath(fromObject, ['uri']);
|
|
14670
14757
|
if (fromUri != null) {
|
|
@@ -14680,7 +14767,7 @@ function videoFromMldev(fromObject) {
|
|
|
14680
14767
|
}
|
|
14681
14768
|
return toObject;
|
|
14682
14769
|
}
|
|
14683
|
-
function videoFromVertex(fromObject) {
|
|
14770
|
+
function videoFromVertex(fromObject, _rootObject) {
|
|
14684
14771
|
const toObject = {};
|
|
14685
14772
|
const fromUri = getValueByPath(fromObject, ['gcsUri']);
|
|
14686
14773
|
if (fromUri != null) {
|
|
@@ -14698,7 +14785,7 @@ function videoFromVertex(fromObject) {
|
|
|
14698
14785
|
}
|
|
14699
14786
|
return toObject;
|
|
14700
14787
|
}
|
|
14701
|
-
function videoGenerationMaskToVertex(fromObject) {
|
|
14788
|
+
function videoGenerationMaskToVertex(fromObject, rootObject) {
|
|
14702
14789
|
const toObject = {};
|
|
14703
14790
|
const fromImage = getValueByPath(fromObject, ['image']);
|
|
14704
14791
|
if (fromImage != null) {
|
|
@@ -14710,7 +14797,7 @@ function videoGenerationMaskToVertex(fromObject) {
|
|
|
14710
14797
|
}
|
|
14711
14798
|
return toObject;
|
|
14712
14799
|
}
|
|
14713
|
-
function videoGenerationReferenceImageToMldev(fromObject) {
|
|
14800
|
+
function videoGenerationReferenceImageToMldev(fromObject, rootObject) {
|
|
14714
14801
|
const toObject = {};
|
|
14715
14802
|
const fromImage = getValueByPath(fromObject, ['image']);
|
|
14716
14803
|
if (fromImage != null) {
|
|
@@ -14724,7 +14811,7 @@ function videoGenerationReferenceImageToMldev(fromObject) {
|
|
|
14724
14811
|
}
|
|
14725
14812
|
return toObject;
|
|
14726
14813
|
}
|
|
14727
|
-
function videoGenerationReferenceImageToVertex(fromObject) {
|
|
14814
|
+
function videoGenerationReferenceImageToVertex(fromObject, rootObject) {
|
|
14728
14815
|
const toObject = {};
|
|
14729
14816
|
const fromImage = getValueByPath(fromObject, ['image']);
|
|
14730
14817
|
if (fromImage != null) {
|
|
@@ -14738,7 +14825,7 @@ function videoGenerationReferenceImageToVertex(fromObject) {
|
|
|
14738
14825
|
}
|
|
14739
14826
|
return toObject;
|
|
14740
14827
|
}
|
|
14741
|
-
function videoToMldev(fromObject) {
|
|
14828
|
+
function videoToMldev(fromObject, _rootObject) {
|
|
14742
14829
|
const toObject = {};
|
|
14743
14830
|
const fromUri = getValueByPath(fromObject, ['uri']);
|
|
14744
14831
|
if (fromUri != null) {
|
|
@@ -14754,7 +14841,7 @@ function videoToMldev(fromObject) {
|
|
|
14754
14841
|
}
|
|
14755
14842
|
return toObject;
|
|
14756
14843
|
}
|
|
14757
|
-
function videoToVertex(fromObject) {
|
|
14844
|
+
function videoToVertex(fromObject, _rootObject) {
|
|
14758
14845
|
const toObject = {};
|
|
14759
14846
|
const fromUri = getValueByPath(fromObject, ['uri']);
|
|
14760
14847
|
if (fromUri != null) {
|
|
@@ -16310,7 +16397,7 @@ class Models extends BaseModule {
|
|
|
16310
16397
|
_c = apiResponse_1_1.value;
|
|
16311
16398
|
_d = false;
|
|
16312
16399
|
const chunk = _c;
|
|
16313
|
-
const resp = generateContentResponseFromVertex((yield __await(chunk.json())));
|
|
16400
|
+
const resp = generateContentResponseFromVertex((yield __await(chunk.json())), params);
|
|
16314
16401
|
resp['sdkHttpResponse'] = {
|
|
16315
16402
|
headers: chunk.headers,
|
|
16316
16403
|
};
|
|
@@ -16352,7 +16439,7 @@ class Models extends BaseModule {
|
|
|
16352
16439
|
_c = apiResponse_2_1.value;
|
|
16353
16440
|
_d = false;
|
|
16354
16441
|
const chunk = _c;
|
|
16355
|
-
const resp = generateContentResponseFromMldev((yield __await(chunk.json())));
|
|
16442
|
+
const resp = generateContentResponseFromMldev((yield __await(chunk.json())), params);
|
|
16356
16443
|
resp['sdkHttpResponse'] = {
|
|
16357
16444
|
headers: chunk.headers,
|
|
16358
16445
|
};
|
|
@@ -18126,6 +18213,12 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
18126
18213
|
if (getValueByPath(fromObject, ['adapterSize']) !== undefined) {
|
|
18127
18214
|
throw new Error('adapterSize parameter is not supported in Gemini API.');
|
|
18128
18215
|
}
|
|
18216
|
+
if (getValueByPath(fromObject, ['tuningMode']) !== undefined) {
|
|
18217
|
+
throw new Error('tuningMode parameter is not supported in Gemini API.');
|
|
18218
|
+
}
|
|
18219
|
+
if (getValueByPath(fromObject, ['customBaseModel']) !== undefined) {
|
|
18220
|
+
throw new Error('customBaseModel parameter is not supported in Gemini API.');
|
|
18221
|
+
}
|
|
18129
18222
|
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
18130
18223
|
if (parentObject !== undefined && fromBatchSize != null) {
|
|
18131
18224
|
setValueByPath(parentObject, ['tuningTask', 'hyperparameters', 'batchSize'], fromBatchSize);
|
|
@@ -18140,6 +18233,18 @@ function createTuningJobConfigToMldev(fromObject, parentObject, _rootObject) {
|
|
|
18140
18233
|
if (getValueByPath(fromObject, ['beta']) !== undefined) {
|
|
18141
18234
|
throw new Error('beta parameter is not supported in Gemini API.');
|
|
18142
18235
|
}
|
|
18236
|
+
if (getValueByPath(fromObject, ['baseTeacherModel']) !== undefined) {
|
|
18237
|
+
throw new Error('baseTeacherModel parameter is not supported in Gemini API.');
|
|
18238
|
+
}
|
|
18239
|
+
if (getValueByPath(fromObject, ['tunedTeacherModelSource']) !== undefined) {
|
|
18240
|
+
throw new Error('tunedTeacherModelSource parameter is not supported in Gemini API.');
|
|
18241
|
+
}
|
|
18242
|
+
if (getValueByPath(fromObject, ['sftLossWeightMultiplier']) !== undefined) {
|
|
18243
|
+
throw new Error('sftLossWeightMultiplier parameter is not supported in Gemini API.');
|
|
18244
|
+
}
|
|
18245
|
+
if (getValueByPath(fromObject, ['outputUri']) !== undefined) {
|
|
18246
|
+
throw new Error('outputUri parameter is not supported in Gemini API.');
|
|
18247
|
+
}
|
|
18143
18248
|
return toObject;
|
|
18144
18249
|
}
|
|
18145
18250
|
function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
@@ -18167,6 +18272,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18167
18272
|
setValueByPath(parentObject, ['preferenceOptimizationSpec'], tuningValidationDatasetToVertex(fromValidationDataset));
|
|
18168
18273
|
}
|
|
18169
18274
|
}
|
|
18275
|
+
else if (discriminatorValidationDataset === 'DISTILLATION') {
|
|
18276
|
+
const fromValidationDataset = getValueByPath(fromObject, [
|
|
18277
|
+
'validationDataset',
|
|
18278
|
+
]);
|
|
18279
|
+
if (parentObject !== undefined && fromValidationDataset != null) {
|
|
18280
|
+
setValueByPath(parentObject, ['distillationSpec'], tuningValidationDatasetToVertex(fromValidationDataset));
|
|
18281
|
+
}
|
|
18282
|
+
}
|
|
18170
18283
|
const fromTunedModelDisplayName = getValueByPath(fromObject, [
|
|
18171
18284
|
'tunedModelDisplayName',
|
|
18172
18285
|
]);
|
|
@@ -18196,6 +18309,12 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18196
18309
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'epochCount'], fromEpochCount);
|
|
18197
18310
|
}
|
|
18198
18311
|
}
|
|
18312
|
+
else if (discriminatorEpochCount === 'DISTILLATION') {
|
|
18313
|
+
const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
|
|
18314
|
+
if (parentObject !== undefined && fromEpochCount != null) {
|
|
18315
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'epochCount'], fromEpochCount);
|
|
18316
|
+
}
|
|
18317
|
+
}
|
|
18199
18318
|
let discriminatorLearningRateMultiplier = getValueByPath(rootObject, [
|
|
18200
18319
|
'config',
|
|
18201
18320
|
'method',
|
|
@@ -18223,6 +18342,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18223
18342
|
], fromLearningRateMultiplier);
|
|
18224
18343
|
}
|
|
18225
18344
|
}
|
|
18345
|
+
else if (discriminatorLearningRateMultiplier === 'DISTILLATION') {
|
|
18346
|
+
const fromLearningRateMultiplier = getValueByPath(fromObject, [
|
|
18347
|
+
'learningRateMultiplier',
|
|
18348
|
+
]);
|
|
18349
|
+
if (parentObject !== undefined && fromLearningRateMultiplier != null) {
|
|
18350
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'learningRateMultiplier'], fromLearningRateMultiplier);
|
|
18351
|
+
}
|
|
18352
|
+
}
|
|
18226
18353
|
let discriminatorExportLastCheckpointOnly = getValueByPath(rootObject, ['config', 'method']);
|
|
18227
18354
|
if (discriminatorExportLastCheckpointOnly === undefined) {
|
|
18228
18355
|
discriminatorExportLastCheckpointOnly = 'SUPERVISED_FINE_TUNING';
|
|
@@ -18243,6 +18370,14 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18243
18370
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'exportLastCheckpointOnly'], fromExportLastCheckpointOnly);
|
|
18244
18371
|
}
|
|
18245
18372
|
}
|
|
18373
|
+
else if (discriminatorExportLastCheckpointOnly === 'DISTILLATION') {
|
|
18374
|
+
const fromExportLastCheckpointOnly = getValueByPath(fromObject, [
|
|
18375
|
+
'exportLastCheckpointOnly',
|
|
18376
|
+
]);
|
|
18377
|
+
if (parentObject !== undefined && fromExportLastCheckpointOnly != null) {
|
|
18378
|
+
setValueByPath(parentObject, ['distillationSpec', 'exportLastCheckpointOnly'], fromExportLastCheckpointOnly);
|
|
18379
|
+
}
|
|
18380
|
+
}
|
|
18246
18381
|
let discriminatorAdapterSize = getValueByPath(rootObject, [
|
|
18247
18382
|
'config',
|
|
18248
18383
|
'method',
|
|
@@ -18262,11 +18397,58 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18262
18397
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'adapterSize'], fromAdapterSize);
|
|
18263
18398
|
}
|
|
18264
18399
|
}
|
|
18265
|
-
if (
|
|
18266
|
-
|
|
18400
|
+
else if (discriminatorAdapterSize === 'DISTILLATION') {
|
|
18401
|
+
const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
|
|
18402
|
+
if (parentObject !== undefined && fromAdapterSize != null) {
|
|
18403
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'adapterSize'], fromAdapterSize);
|
|
18404
|
+
}
|
|
18267
18405
|
}
|
|
18268
|
-
|
|
18269
|
-
|
|
18406
|
+
let discriminatorTuningMode = getValueByPath(rootObject, [
|
|
18407
|
+
'config',
|
|
18408
|
+
'method',
|
|
18409
|
+
]);
|
|
18410
|
+
if (discriminatorTuningMode === undefined) {
|
|
18411
|
+
discriminatorTuningMode = 'SUPERVISED_FINE_TUNING';
|
|
18412
|
+
}
|
|
18413
|
+
if (discriminatorTuningMode === 'SUPERVISED_FINE_TUNING') {
|
|
18414
|
+
const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
|
|
18415
|
+
if (parentObject !== undefined && fromTuningMode != null) {
|
|
18416
|
+
setValueByPath(parentObject, ['supervisedTuningSpec', 'tuningMode'], fromTuningMode);
|
|
18417
|
+
}
|
|
18418
|
+
}
|
|
18419
|
+
const fromCustomBaseModel = getValueByPath(fromObject, [
|
|
18420
|
+
'customBaseModel',
|
|
18421
|
+
]);
|
|
18422
|
+
if (parentObject !== undefined && fromCustomBaseModel != null) {
|
|
18423
|
+
setValueByPath(parentObject, ['customBaseModel'], fromCustomBaseModel);
|
|
18424
|
+
}
|
|
18425
|
+
let discriminatorBatchSize = getValueByPath(rootObject, [
|
|
18426
|
+
'config',
|
|
18427
|
+
'method',
|
|
18428
|
+
]);
|
|
18429
|
+
if (discriminatorBatchSize === undefined) {
|
|
18430
|
+
discriminatorBatchSize = 'SUPERVISED_FINE_TUNING';
|
|
18431
|
+
}
|
|
18432
|
+
if (discriminatorBatchSize === 'SUPERVISED_FINE_TUNING') {
|
|
18433
|
+
const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
|
|
18434
|
+
if (parentObject !== undefined && fromBatchSize != null) {
|
|
18435
|
+
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'batchSize'], fromBatchSize);
|
|
18436
|
+
}
|
|
18437
|
+
}
|
|
18438
|
+
let discriminatorLearningRate = getValueByPath(rootObject, [
|
|
18439
|
+
'config',
|
|
18440
|
+
'method',
|
|
18441
|
+
]);
|
|
18442
|
+
if (discriminatorLearningRate === undefined) {
|
|
18443
|
+
discriminatorLearningRate = 'SUPERVISED_FINE_TUNING';
|
|
18444
|
+
}
|
|
18445
|
+
if (discriminatorLearningRate === 'SUPERVISED_FINE_TUNING') {
|
|
18446
|
+
const fromLearningRate = getValueByPath(fromObject, [
|
|
18447
|
+
'learningRate',
|
|
18448
|
+
]);
|
|
18449
|
+
if (parentObject !== undefined && fromLearningRate != null) {
|
|
18450
|
+
setValueByPath(parentObject, ['supervisedTuningSpec', 'hyperParameters', 'learningRate'], fromLearningRate);
|
|
18451
|
+
}
|
|
18270
18452
|
}
|
|
18271
18453
|
const fromLabels = getValueByPath(fromObject, ['labels']);
|
|
18272
18454
|
if (parentObject !== undefined && fromLabels != null) {
|
|
@@ -18276,6 +18458,28 @@ function createTuningJobConfigToVertex(fromObject, parentObject, rootObject) {
|
|
|
18276
18458
|
if (parentObject !== undefined && fromBeta != null) {
|
|
18277
18459
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'hyperParameters', 'beta'], fromBeta);
|
|
18278
18460
|
}
|
|
18461
|
+
const fromBaseTeacherModel = getValueByPath(fromObject, [
|
|
18462
|
+
'baseTeacherModel',
|
|
18463
|
+
]);
|
|
18464
|
+
if (parentObject !== undefined && fromBaseTeacherModel != null) {
|
|
18465
|
+
setValueByPath(parentObject, ['distillationSpec', 'baseTeacherModel'], fromBaseTeacherModel);
|
|
18466
|
+
}
|
|
18467
|
+
const fromTunedTeacherModelSource = getValueByPath(fromObject, [
|
|
18468
|
+
'tunedTeacherModelSource',
|
|
18469
|
+
]);
|
|
18470
|
+
if (parentObject !== undefined && fromTunedTeacherModelSource != null) {
|
|
18471
|
+
setValueByPath(parentObject, ['distillationSpec', 'tunedTeacherModelSource'], fromTunedTeacherModelSource);
|
|
18472
|
+
}
|
|
18473
|
+
const fromSftLossWeightMultiplier = getValueByPath(fromObject, [
|
|
18474
|
+
'sftLossWeightMultiplier',
|
|
18475
|
+
]);
|
|
18476
|
+
if (parentObject !== undefined && fromSftLossWeightMultiplier != null) {
|
|
18477
|
+
setValueByPath(parentObject, ['distillationSpec', 'hyperParameters', 'sftLossWeightMultiplier'], fromSftLossWeightMultiplier);
|
|
18478
|
+
}
|
|
18479
|
+
const fromOutputUri = getValueByPath(fromObject, ['outputUri']);
|
|
18480
|
+
if (parentObject !== undefined && fromOutputUri != null) {
|
|
18481
|
+
setValueByPath(parentObject, ['outputUri'], fromOutputUri);
|
|
18482
|
+
}
|
|
18279
18483
|
return toObject;
|
|
18280
18484
|
}
|
|
18281
18485
|
function createTuningJobParametersPrivateToMldev(fromObject, rootObject) {
|
|
@@ -18495,6 +18699,12 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
|
|
|
18495
18699
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'trainingDatasetUri'], fromGcsUri);
|
|
18496
18700
|
}
|
|
18497
18701
|
}
|
|
18702
|
+
else if (discriminatorGcsUri === 'DISTILLATION') {
|
|
18703
|
+
const fromGcsUri = getValueByPath(fromObject, ['gcsUri']);
|
|
18704
|
+
if (parentObject !== undefined && fromGcsUri != null) {
|
|
18705
|
+
setValueByPath(parentObject, ['distillationSpec', 'promptDatasetUri'], fromGcsUri);
|
|
18706
|
+
}
|
|
18707
|
+
}
|
|
18498
18708
|
let discriminatorVertexDatasetResource = getValueByPath(rootObject, [
|
|
18499
18709
|
'config',
|
|
18500
18710
|
'method',
|
|
@@ -18518,6 +18728,14 @@ function tuningDatasetToVertex(fromObject, parentObject, rootObject) {
|
|
|
18518
18728
|
setValueByPath(parentObject, ['preferenceOptimizationSpec', 'trainingDatasetUri'], fromVertexDatasetResource);
|
|
18519
18729
|
}
|
|
18520
18730
|
}
|
|
18731
|
+
else if (discriminatorVertexDatasetResource === 'DISTILLATION') {
|
|
18732
|
+
const fromVertexDatasetResource = getValueByPath(fromObject, [
|
|
18733
|
+
'vertexDatasetResource',
|
|
18734
|
+
]);
|
|
18735
|
+
if (parentObject !== undefined && fromVertexDatasetResource != null) {
|
|
18736
|
+
setValueByPath(parentObject, ['distillationSpec', 'promptDatasetUri'], fromVertexDatasetResource);
|
|
18737
|
+
}
|
|
18738
|
+
}
|
|
18521
18739
|
if (getValueByPath(fromObject, ['examples']) !== undefined) {
|
|
18522
18740
|
throw new Error('examples parameter is not supported in Vertex AI.');
|
|
18523
18741
|
}
|
|
@@ -18641,6 +18859,12 @@ function tuningJobFromVertex(fromObject, _rootObject) {
|
|
|
18641
18859
|
if (fromPreferenceOptimizationSpec != null) {
|
|
18642
18860
|
setValueByPath(toObject, ['preferenceOptimizationSpec'], fromPreferenceOptimizationSpec);
|
|
18643
18861
|
}
|
|
18862
|
+
const fromDistillationSpec = getValueByPath(fromObject, [
|
|
18863
|
+
'distillationSpec',
|
|
18864
|
+
]);
|
|
18865
|
+
if (fromDistillationSpec != null) {
|
|
18866
|
+
setValueByPath(toObject, ['distillationSpec'], fromDistillationSpec);
|
|
18867
|
+
}
|
|
18644
18868
|
const fromTuningDataStats = getValueByPath(fromObject, [
|
|
18645
18869
|
'tuningDataStats',
|
|
18646
18870
|
]);
|
|
@@ -19290,6 +19514,7 @@ exports.Operations = Operations;
|
|
|
19290
19514
|
exports.Pager = Pager;
|
|
19291
19515
|
exports.RawReferenceImage = RawReferenceImage;
|
|
19292
19516
|
exports.RecontextImageResponse = RecontextImageResponse;
|
|
19517
|
+
exports.RegisterFilesResponse = RegisterFilesResponse;
|
|
19293
19518
|
exports.ReplayResponse = ReplayResponse;
|
|
19294
19519
|
exports.SegmentImageResponse = SegmentImageResponse;
|
|
19295
19520
|
exports.Session = Session;
|