@google/genai 2.4.0 → 2.6.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.
@@ -616,18 +616,6 @@ function videoFromVertex$1(fromObject) {
616
616
  * Copyright 2025 Google LLC
617
617
  * SPDX-License-Identifier: Apache-2.0
618
618
  */
619
- /** Programming language of the `code`. */
620
- exports.Language = void 0;
621
- (function (Language) {
622
- /**
623
- * Unspecified language. This value should not be used.
624
- */
625
- Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
626
- /**
627
- * Python >= 3.10, with numpy and simpy available.
628
- */
629
- Language["PYTHON"] = "PYTHON";
630
- })(exports.Language || (exports.Language = {}));
631
619
  /** Outcome of the code execution. */
632
620
  exports.Outcome = void 0;
633
621
  (function (Outcome) {
@@ -636,18 +624,30 @@ exports.Outcome = void 0;
636
624
  */
637
625
  Outcome["OUTCOME_UNSPECIFIED"] = "OUTCOME_UNSPECIFIED";
638
626
  /**
639
- * Code execution completed successfully.
627
+ * Code execution completed successfully. `output` contains the stdout, if any.
640
628
  */
641
629
  Outcome["OUTCOME_OK"] = "OUTCOME_OK";
642
630
  /**
643
- * Code execution finished but with a failure. `stderr` should contain the reason.
631
+ * Code execution failed. `output` contains the stderr and stdout, if any.
644
632
  */
645
633
  Outcome["OUTCOME_FAILED"] = "OUTCOME_FAILED";
646
634
  /**
647
- * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
635
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
648
636
  */
649
637
  Outcome["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
650
638
  })(exports.Outcome || (exports.Outcome = {}));
639
+ /** Programming language of the `code`. */
640
+ exports.Language = void 0;
641
+ (function (Language) {
642
+ /**
643
+ * Unspecified language. This value should not be used.
644
+ */
645
+ Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
646
+ /**
647
+ * Python >= 3.10, with numpy and simpy available.
648
+ */
649
+ Language["PYTHON"] = "PYTHON";
650
+ })(exports.Language || (exports.Language = {}));
651
651
  /** Specifies how the response should be scheduled in the conversation. */
652
652
  exports.FunctionResponseScheduling = void 0;
653
653
  (function (FunctionResponseScheduling) {
@@ -715,6 +715,14 @@ exports.Environment = void 0;
715
715
  * Operates in a web browser.
716
716
  */
717
717
  Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
718
+ /**
719
+ * Operates in a mobile environment.
720
+ */
721
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
722
+ /**
723
+ * Operates in a desktop environment.
724
+ */
725
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
718
726
  })(exports.Environment || (exports.Environment = {}));
719
727
  /** Type of auth scheme. This enum is not supported in Gemini API. */
720
728
  exports.AuthType = void 0;
@@ -1500,7 +1508,23 @@ exports.PairwiseChoice = void 0;
1500
1508
  */
1501
1509
  PairwiseChoice["TIE"] = "TIE";
1502
1510
  })(exports.PairwiseChoice || (exports.PairwiseChoice = {}));
1503
- /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
1511
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
1512
+ exports.TuningSpeed = void 0;
1513
+ (function (TuningSpeed) {
1514
+ /**
1515
+ * The default / unset value. For Veo 3.0 models, this defaults to FAST.
1516
+ */
1517
+ TuningSpeed["TUNING_SPEED_UNSPECIFIED"] = "TUNING_SPEED_UNSPECIFIED";
1518
+ /**
1519
+ * Regular tuning speed.
1520
+ */
1521
+ TuningSpeed["REGULAR"] = "REGULAR";
1522
+ /**
1523
+ * Fast tuning speed.
1524
+ */
1525
+ TuningSpeed["FAST"] = "FAST";
1526
+ })(exports.TuningSpeed || (exports.TuningSpeed = {}));
1527
+ /** The tuning task for Veo. This enum is not supported in Gemini API. */
1504
1528
  exports.TuningTask = void 0;
1505
1529
  (function (TuningTask) {
1506
1530
  /**
@@ -1520,6 +1544,22 @@ exports.TuningTask = void 0;
1520
1544
  */
1521
1545
  TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
1522
1546
  })(exports.TuningTask || (exports.TuningTask = {}));
1547
+ /** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
1548
+ exports.VideoOrientation = void 0;
1549
+ (function (VideoOrientation) {
1550
+ /**
1551
+ * Unspecified video orientation. Defaults to landscape.
1552
+ */
1553
+ VideoOrientation["VIDEO_ORIENTATION_UNSPECIFIED"] = "VIDEO_ORIENTATION_UNSPECIFIED";
1554
+ /**
1555
+ * Landscape orientation (e.g. 16:9, 1280x720).
1556
+ */
1557
+ VideoOrientation["LANDSCAPE"] = "LANDSCAPE";
1558
+ /**
1559
+ * Portrait orientation (e.g. 9:16, 720x1280).
1560
+ */
1561
+ VideoOrientation["PORTRAIT"] = "PORTRAIT";
1562
+ })(exports.VideoOrientation || (exports.VideoOrientation = {}));
1523
1563
  /** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
1524
1564
  exports.DocumentState = void 0;
1525
1565
  (function (DocumentState) {
@@ -5860,6 +5900,39 @@ function blobToMldev$3(fromObject) {
5860
5900
  }
5861
5901
  return toObject;
5862
5902
  }
5903
+ function codeExecutionResultToVertex$2(fromObject) {
5904
+ const toObject = {};
5905
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
5906
+ if (fromOutcome != null) {
5907
+ setValueByPath(toObject, ['outcome'], fromOutcome);
5908
+ }
5909
+ const fromOutput = getValueByPath(fromObject, ['output']);
5910
+ if (fromOutput != null) {
5911
+ setValueByPath(toObject, ['output'], fromOutput);
5912
+ }
5913
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
5914
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
5915
+ }
5916
+ return toObject;
5917
+ }
5918
+ function computerUseToVertex$2(fromObject) {
5919
+ const toObject = {};
5920
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
5921
+ if (fromEnvironment != null) {
5922
+ setValueByPath(toObject, ['environment'], fromEnvironment);
5923
+ }
5924
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
5925
+ 'excludedPredefinedFunctions',
5926
+ ]);
5927
+ if (fromExcludedPredefinedFunctions != null) {
5928
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
5929
+ }
5930
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
5931
+ undefined) {
5932
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
5933
+ }
5934
+ return toObject;
5935
+ }
5863
5936
  function contentToMldev$3(fromObject) {
5864
5937
  const toObject = {};
5865
5938
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -6055,6 +6128,21 @@ function deleteCachedContentResponseFromVertex(fromObject) {
6055
6128
  }
6056
6129
  return toObject;
6057
6130
  }
6131
+ function executableCodeToVertex$2(fromObject) {
6132
+ const toObject = {};
6133
+ const fromCode = getValueByPath(fromObject, ['code']);
6134
+ if (fromCode != null) {
6135
+ setValueByPath(toObject, ['code'], fromCode);
6136
+ }
6137
+ const fromLanguage = getValueByPath(fromObject, ['language']);
6138
+ if (fromLanguage != null) {
6139
+ setValueByPath(toObject, ['language'], fromLanguage);
6140
+ }
6141
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
6142
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6143
+ }
6144
+ return toObject;
6145
+ }
6058
6146
  function fileDataToMldev$3(fromObject) {
6059
6147
  const toObject = {};
6060
6148
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -6338,13 +6426,13 @@ function partToVertex$2(fromObject) {
6338
6426
  'codeExecutionResult',
6339
6427
  ]);
6340
6428
  if (fromCodeExecutionResult != null) {
6341
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
6429
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex$2(fromCodeExecutionResult));
6342
6430
  }
6343
6431
  const fromExecutableCode = getValueByPath(fromObject, [
6344
6432
  'executableCode',
6345
6433
  ]);
6346
6434
  if (fromExecutableCode != null) {
6347
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
6435
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex$2(fromExecutableCode));
6348
6436
  }
6349
6437
  const fromFileData = getValueByPath(fromObject, ['fileData']);
6350
6438
  if (fromFileData != null) {
@@ -6510,7 +6598,7 @@ function toolToVertex$2(fromObject) {
6510
6598
  }
6511
6599
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6512
6600
  if (fromComputerUse != null) {
6513
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
6601
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
6514
6602
  }
6515
6603
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6516
6604
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -7902,6 +7990,39 @@ function blobToMldev$2(fromObject) {
7902
7990
  }
7903
7991
  return toObject;
7904
7992
  }
7993
+ function codeExecutionResultToVertex$1(fromObject) {
7994
+ const toObject = {};
7995
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
7996
+ if (fromOutcome != null) {
7997
+ setValueByPath(toObject, ['outcome'], fromOutcome);
7998
+ }
7999
+ const fromOutput = getValueByPath(fromObject, ['output']);
8000
+ if (fromOutput != null) {
8001
+ setValueByPath(toObject, ['output'], fromOutput);
8002
+ }
8003
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
8004
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8005
+ }
8006
+ return toObject;
8007
+ }
8008
+ function computerUseToVertex$1(fromObject) {
8009
+ const toObject = {};
8010
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
8011
+ if (fromEnvironment != null) {
8012
+ setValueByPath(toObject, ['environment'], fromEnvironment);
8013
+ }
8014
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
8015
+ 'excludedPredefinedFunctions',
8016
+ ]);
8017
+ if (fromExcludedPredefinedFunctions != null) {
8018
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
8019
+ }
8020
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
8021
+ undefined) {
8022
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8023
+ }
8024
+ return toObject;
8025
+ }
7905
8026
  function contentToMldev$2(fromObject) {
7906
8027
  const toObject = {};
7907
8028
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -7938,6 +8059,21 @@ function contentToVertex$1(fromObject) {
7938
8059
  }
7939
8060
  return toObject;
7940
8061
  }
8062
+ function executableCodeToVertex$1(fromObject) {
8063
+ const toObject = {};
8064
+ const fromCode = getValueByPath(fromObject, ['code']);
8065
+ if (fromCode != null) {
8066
+ setValueByPath(toObject, ['code'], fromCode);
8067
+ }
8068
+ const fromLanguage = getValueByPath(fromObject, ['language']);
8069
+ if (fromLanguage != null) {
8070
+ setValueByPath(toObject, ['language'], fromLanguage);
8071
+ }
8072
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
8073
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
8074
+ }
8075
+ return toObject;
8076
+ }
7941
8077
  function fileDataToMldev$2(fromObject) {
7942
8078
  const toObject = {};
7943
8079
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -8677,13 +8813,13 @@ function partToVertex$1(fromObject) {
8677
8813
  'codeExecutionResult',
8678
8814
  ]);
8679
8815
  if (fromCodeExecutionResult != null) {
8680
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
8816
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex$1(fromCodeExecutionResult));
8681
8817
  }
8682
8818
  const fromExecutableCode = getValueByPath(fromObject, [
8683
8819
  'executableCode',
8684
8820
  ]);
8685
8821
  if (fromExecutableCode != null) {
8686
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
8822
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex$1(fromExecutableCode));
8687
8823
  }
8688
8824
  const fromFileData = getValueByPath(fromObject, ['fileData']);
8689
8825
  if (fromFileData != null) {
@@ -8835,7 +8971,7 @@ function toolToVertex$1(fromObject) {
8835
8971
  }
8836
8972
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
8837
8973
  if (fromComputerUse != null) {
8838
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
8974
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
8839
8975
  }
8840
8976
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
8841
8977
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -9115,6 +9251,21 @@ function citationMetadataFromMldev(fromObject, _rootObject) {
9115
9251
  }
9116
9252
  return toObject;
9117
9253
  }
9254
+ function codeExecutionResultToVertex(fromObject, _rootObject) {
9255
+ const toObject = {};
9256
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
9257
+ if (fromOutcome != null) {
9258
+ setValueByPath(toObject, ['outcome'], fromOutcome);
9259
+ }
9260
+ const fromOutput = getValueByPath(fromObject, ['output']);
9261
+ if (fromOutput != null) {
9262
+ setValueByPath(toObject, ['output'], fromOutput);
9263
+ }
9264
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
9265
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
9266
+ }
9267
+ return toObject;
9268
+ }
9118
9269
  function computeTokensParametersToVertex(apiClient, fromObject, rootObject) {
9119
9270
  const toObject = {};
9120
9271
  const fromModel = getValueByPath(fromObject, ['model']);
@@ -9153,6 +9304,24 @@ function computeTokensResponseFromVertex(fromObject, _rootObject) {
9153
9304
  }
9154
9305
  return toObject;
9155
9306
  }
9307
+ function computerUseToVertex(fromObject, _rootObject) {
9308
+ const toObject = {};
9309
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
9310
+ if (fromEnvironment != null) {
9311
+ setValueByPath(toObject, ['environment'], fromEnvironment);
9312
+ }
9313
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
9314
+ 'excludedPredefinedFunctions',
9315
+ ]);
9316
+ if (fromExcludedPredefinedFunctions != null) {
9317
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
9318
+ }
9319
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
9320
+ undefined) {
9321
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
9322
+ }
9323
+ return toObject;
9324
+ }
9156
9325
  function contentEmbeddingFromVertex(fromObject, rootObject) {
9157
9326
  const toObject = {};
9158
9327
  const fromValues = getValueByPath(fromObject, ['values']);
@@ -9827,6 +9996,21 @@ function endpointFromVertex(fromObject, _rootObject) {
9827
9996
  }
9828
9997
  return toObject;
9829
9998
  }
9999
+ function executableCodeToVertex(fromObject, _rootObject) {
10000
+ const toObject = {};
10001
+ const fromCode = getValueByPath(fromObject, ['code']);
10002
+ if (fromCode != null) {
10003
+ setValueByPath(toObject, ['code'], fromCode);
10004
+ }
10005
+ const fromLanguage = getValueByPath(fromObject, ['language']);
10006
+ if (fromLanguage != null) {
10007
+ setValueByPath(toObject, ['language'], fromLanguage);
10008
+ }
10009
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
10010
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
10011
+ }
10012
+ return toObject;
10013
+ }
9830
10014
  function fileDataToMldev$1(fromObject, _rootObject) {
9831
10015
  const toObject = {};
9832
10016
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -11705,7 +11889,7 @@ function partToMldev$1(fromObject, rootObject) {
11705
11889
  }
11706
11890
  return toObject;
11707
11891
  }
11708
- function partToVertex(fromObject, _rootObject) {
11892
+ function partToVertex(fromObject, rootObject) {
11709
11893
  const toObject = {};
11710
11894
  const fromMediaResolution = getValueByPath(fromObject, [
11711
11895
  'mediaResolution',
@@ -11717,13 +11901,13 @@ function partToVertex(fromObject, _rootObject) {
11717
11901
  'codeExecutionResult',
11718
11902
  ]);
11719
11903
  if (fromCodeExecutionResult != null) {
11720
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
11904
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex(fromCodeExecutionResult));
11721
11905
  }
11722
11906
  const fromExecutableCode = getValueByPath(fromObject, [
11723
11907
  'executableCode',
11724
11908
  ]);
11725
11909
  if (fromExecutableCode != null) {
11726
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
11910
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex(fromExecutableCode));
11727
11911
  }
11728
11912
  const fromFileData = getValueByPath(fromObject, ['fileData']);
11729
11913
  if (fromFileData != null) {
@@ -12198,7 +12382,7 @@ function toolToMldev$1(fromObject, rootObject) {
12198
12382
  }
12199
12383
  return toObject;
12200
12384
  }
12201
- function toolToVertex(fromObject, _rootObject) {
12385
+ function toolToVertex(fromObject, rootObject) {
12202
12386
  const toObject = {};
12203
12387
  const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
12204
12388
  if (fromRetrieval != null) {
@@ -12206,7 +12390,7 @@ function toolToVertex(fromObject, _rootObject) {
12206
12390
  }
12207
12391
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12208
12392
  if (fromComputerUse != null) {
12209
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
12393
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
12210
12394
  }
12211
12395
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12212
12396
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -12823,7 +13007,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
12823
13007
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
12824
13008
  const USER_AGENT_HEADER = 'User-Agent';
12825
13009
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
12826
- const SDK_VERSION = '2.4.0'; // x-release-please-version
13010
+ const SDK_VERSION = '2.6.0'; // x-release-please-version
12827
13011
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
12828
13012
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
12829
13013
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -20227,6 +20411,250 @@ function createTuningJobParametersPrivateToVertex(fromObject, rootObject) {
20227
20411
  }
20228
20412
  return toObject;
20229
20413
  }
20414
+ function distillationHyperParametersFromVertex(fromObject, rootObject) {
20415
+ const toObject = {};
20416
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
20417
+ if (fromAdapterSize != null) {
20418
+ setValueByPath(toObject, ['adapterSize'], fromAdapterSize);
20419
+ }
20420
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
20421
+ if (fromEpochCount != null) {
20422
+ setValueByPath(toObject, ['epochCount'], fromEpochCount);
20423
+ }
20424
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
20425
+ 'learningRateMultiplier',
20426
+ ]);
20427
+ if (fromLearningRateMultiplier != null) {
20428
+ setValueByPath(toObject, ['learningRateMultiplier'], fromLearningRateMultiplier);
20429
+ }
20430
+ const fromGenerationConfig = getValueByPath(fromObject, [
20431
+ 'generationConfig',
20432
+ ]);
20433
+ if (fromGenerationConfig != null) {
20434
+ setValueByPath(toObject, ['generationConfig'], generationConfigFromVertex(fromGenerationConfig));
20435
+ }
20436
+ const fromLearningRate = getValueByPath(fromObject, ['learningRate']);
20437
+ if (fromLearningRate != null) {
20438
+ setValueByPath(toObject, ['learningRate'], fromLearningRate);
20439
+ }
20440
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
20441
+ if (fromBatchSize != null) {
20442
+ setValueByPath(toObject, ['batchSize'], fromBatchSize);
20443
+ }
20444
+ return toObject;
20445
+ }
20446
+ function distillationSamplingSpecFromVertex(fromObject, rootObject) {
20447
+ const toObject = {};
20448
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
20449
+ 'baseTeacherModel',
20450
+ ]);
20451
+ if (fromBaseTeacherModel != null) {
20452
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
20453
+ }
20454
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
20455
+ 'tunedTeacherModelSource',
20456
+ ]);
20457
+ if (fromTunedTeacherModelSource != null) {
20458
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
20459
+ }
20460
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
20461
+ 'validationDatasetUri',
20462
+ ]);
20463
+ if (fromValidationDatasetUri != null) {
20464
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
20465
+ }
20466
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
20467
+ 'promptDatasetUri',
20468
+ ]);
20469
+ if (fromPromptDatasetUri != null) {
20470
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
20471
+ }
20472
+ const fromHyperparameters = getValueByPath(fromObject, [
20473
+ 'hyperparameters',
20474
+ ]);
20475
+ if (fromHyperparameters != null) {
20476
+ setValueByPath(toObject, ['hyperparameters'], distillationHyperParametersFromVertex(fromHyperparameters));
20477
+ }
20478
+ return toObject;
20479
+ }
20480
+ function distillationSpecFromVertex(fromObject, rootObject) {
20481
+ const toObject = {};
20482
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
20483
+ 'promptDatasetUri',
20484
+ ]);
20485
+ if (fromPromptDatasetUri != null) {
20486
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
20487
+ }
20488
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
20489
+ 'baseTeacherModel',
20490
+ ]);
20491
+ if (fromBaseTeacherModel != null) {
20492
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
20493
+ }
20494
+ const fromHyperParameters = getValueByPath(fromObject, [
20495
+ 'hyperParameters',
20496
+ ]);
20497
+ if (fromHyperParameters != null) {
20498
+ setValueByPath(toObject, ['hyperParameters'], distillationHyperParametersFromVertex(fromHyperParameters));
20499
+ }
20500
+ const fromPipelineRootDirectory = getValueByPath(fromObject, [
20501
+ 'pipelineRootDirectory',
20502
+ ]);
20503
+ if (fromPipelineRootDirectory != null) {
20504
+ setValueByPath(toObject, ['pipelineRootDirectory'], fromPipelineRootDirectory);
20505
+ }
20506
+ const fromStudentModel = getValueByPath(fromObject, ['studentModel']);
20507
+ if (fromStudentModel != null) {
20508
+ setValueByPath(toObject, ['studentModel'], fromStudentModel);
20509
+ }
20510
+ const fromTrainingDatasetUri = getValueByPath(fromObject, [
20511
+ 'trainingDatasetUri',
20512
+ ]);
20513
+ if (fromTrainingDatasetUri != null) {
20514
+ setValueByPath(toObject, ['trainingDatasetUri'], fromTrainingDatasetUri);
20515
+ }
20516
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
20517
+ 'tunedTeacherModelSource',
20518
+ ]);
20519
+ if (fromTunedTeacherModelSource != null) {
20520
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
20521
+ }
20522
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
20523
+ 'validationDatasetUri',
20524
+ ]);
20525
+ if (fromValidationDatasetUri != null) {
20526
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
20527
+ }
20528
+ const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
20529
+ if (fromTuningMode != null) {
20530
+ setValueByPath(toObject, ['tuningMode'], fromTuningMode);
20531
+ }
20532
+ return toObject;
20533
+ }
20534
+ function generationConfigFromVertex(fromObject, _rootObject) {
20535
+ const toObject = {};
20536
+ const fromModelSelectionConfig = getValueByPath(fromObject, [
20537
+ 'modelConfig',
20538
+ ]);
20539
+ if (fromModelSelectionConfig != null) {
20540
+ setValueByPath(toObject, ['modelSelectionConfig'], fromModelSelectionConfig);
20541
+ }
20542
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
20543
+ 'responseJsonSchema',
20544
+ ]);
20545
+ if (fromResponseJsonSchema != null) {
20546
+ setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
20547
+ }
20548
+ const fromAudioTimestamp = getValueByPath(fromObject, [
20549
+ 'audioTimestamp',
20550
+ ]);
20551
+ if (fromAudioTimestamp != null) {
20552
+ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);
20553
+ }
20554
+ const fromCandidateCount = getValueByPath(fromObject, [
20555
+ 'candidateCount',
20556
+ ]);
20557
+ if (fromCandidateCount != null) {
20558
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
20559
+ }
20560
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
20561
+ 'enableAffectiveDialog',
20562
+ ]);
20563
+ if (fromEnableAffectiveDialog != null) {
20564
+ setValueByPath(toObject, ['enableAffectiveDialog'], fromEnableAffectiveDialog);
20565
+ }
20566
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
20567
+ 'frequencyPenalty',
20568
+ ]);
20569
+ if (fromFrequencyPenalty != null) {
20570
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
20571
+ }
20572
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
20573
+ if (fromLogprobs != null) {
20574
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
20575
+ }
20576
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
20577
+ 'maxOutputTokens',
20578
+ ]);
20579
+ if (fromMaxOutputTokens != null) {
20580
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
20581
+ }
20582
+ const fromMediaResolution = getValueByPath(fromObject, [
20583
+ 'mediaResolution',
20584
+ ]);
20585
+ if (fromMediaResolution != null) {
20586
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
20587
+ }
20588
+ const fromPresencePenalty = getValueByPath(fromObject, [
20589
+ 'presencePenalty',
20590
+ ]);
20591
+ if (fromPresencePenalty != null) {
20592
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
20593
+ }
20594
+ const fromResponseLogprobs = getValueByPath(fromObject, [
20595
+ 'responseLogprobs',
20596
+ ]);
20597
+ if (fromResponseLogprobs != null) {
20598
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
20599
+ }
20600
+ const fromResponseMimeType = getValueByPath(fromObject, [
20601
+ 'responseMimeType',
20602
+ ]);
20603
+ if (fromResponseMimeType != null) {
20604
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
20605
+ }
20606
+ const fromResponseModalities = getValueByPath(fromObject, [
20607
+ 'responseModalities',
20608
+ ]);
20609
+ if (fromResponseModalities != null) {
20610
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
20611
+ }
20612
+ const fromResponseSchema = getValueByPath(fromObject, [
20613
+ 'responseSchema',
20614
+ ]);
20615
+ if (fromResponseSchema != null) {
20616
+ setValueByPath(toObject, ['responseSchema'], fromResponseSchema);
20617
+ }
20618
+ const fromRoutingConfig = getValueByPath(fromObject, [
20619
+ 'routingConfig',
20620
+ ]);
20621
+ if (fromRoutingConfig != null) {
20622
+ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);
20623
+ }
20624
+ const fromSeed = getValueByPath(fromObject, ['seed']);
20625
+ if (fromSeed != null) {
20626
+ setValueByPath(toObject, ['seed'], fromSeed);
20627
+ }
20628
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
20629
+ if (fromSpeechConfig != null) {
20630
+ setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
20631
+ }
20632
+ const fromStopSequences = getValueByPath(fromObject, [
20633
+ 'stopSequences',
20634
+ ]);
20635
+ if (fromStopSequences != null) {
20636
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
20637
+ }
20638
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
20639
+ if (fromTemperature != null) {
20640
+ setValueByPath(toObject, ['temperature'], fromTemperature);
20641
+ }
20642
+ const fromThinkingConfig = getValueByPath(fromObject, [
20643
+ 'thinkingConfig',
20644
+ ]);
20645
+ if (fromThinkingConfig != null) {
20646
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
20647
+ }
20648
+ const fromTopK = getValueByPath(fromObject, ['topK']);
20649
+ if (fromTopK != null) {
20650
+ setValueByPath(toObject, ['topK'], fromTopK);
20651
+ }
20652
+ const fromTopP = getValueByPath(fromObject, ['topP']);
20653
+ if (fromTopP != null) {
20654
+ setValueByPath(toObject, ['topP'], fromTopP);
20655
+ }
20656
+ return toObject;
20657
+ }
20230
20658
  function getTuningJobParametersToMldev(fromObject, _rootObject) {
20231
20659
  const toObject = {};
20232
20660
  const fromName = getValueByPath(fromObject, ['name']);
@@ -20440,7 +20868,7 @@ function tuningJobFromMldev(fromObject, rootObject) {
20440
20868
  }
20441
20869
  return toObject;
20442
20870
  }
20443
- function tuningJobFromVertex(fromObject, _rootObject) {
20871
+ function tuningJobFromVertex(fromObject, rootObject) {
20444
20872
  const toObject = {};
20445
20873
  const fromSdkHttpResponse = getValueByPath(fromObject, [
20446
20874
  'sdkHttpResponse',
@@ -20510,7 +20938,7 @@ function tuningJobFromVertex(fromObject, _rootObject) {
20510
20938
  'distillationSpec',
20511
20939
  ]);
20512
20940
  if (fromDistillationSpec != null) {
20513
- setValueByPath(toObject, ['distillationSpec'], fromDistillationSpec);
20941
+ setValueByPath(toObject, ['distillationSpec'], distillationSpecFromVertex(fromDistillationSpec));
20514
20942
  }
20515
20943
  const fromTuningDataStats = getValueByPath(fromObject, [
20516
20944
  'tuningDataStats',
@@ -20594,18 +21022,24 @@ function tuningJobFromVertex(fromObject, _rootObject) {
20594
21022
  if (fromVeoTuningSpec != null) {
20595
21023
  setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
20596
21024
  }
20597
- const fromDistillationSamplingSpec = getValueByPath(fromObject, [
20598
- 'distillationSamplingSpec',
20599
- ]);
20600
- if (fromDistillationSamplingSpec != null) {
20601
- setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
20602
- }
20603
21025
  const fromTuningJobMetadata = getValueByPath(fromObject, [
20604
21026
  'tuningJobMetadata',
20605
21027
  ]);
20606
21028
  if (fromTuningJobMetadata != null) {
20607
21029
  setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
20608
21030
  }
21031
+ const fromVeoLoraTuningSpec = getValueByPath(fromObject, [
21032
+ 'veoLoraTuningSpec',
21033
+ ]);
21034
+ if (fromVeoLoraTuningSpec != null) {
21035
+ setValueByPath(toObject, ['veoLoraTuningSpec'], fromVeoLoraTuningSpec);
21036
+ }
21037
+ const fromDistillationSamplingSpec = getValueByPath(fromObject, [
21038
+ 'distillationSamplingSpec',
21039
+ ]);
21040
+ if (fromDistillationSamplingSpec != null) {
21041
+ setValueByPath(toObject, ['distillationSamplingSpec'], distillationSamplingSpecFromVertex(fromDistillationSamplingSpec));
21042
+ }
20609
21043
  return toObject;
20610
21044
  }
20611
21045
  function tuningOperationFromMldev(fromObject, _rootObject) {