@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.
package/dist/index.mjs CHANGED
@@ -556,18 +556,6 @@ function videoFromVertex$1(fromObject) {
556
556
  * Copyright 2025 Google LLC
557
557
  * SPDX-License-Identifier: Apache-2.0
558
558
  */
559
- /** Programming language of the `code`. */
560
- var Language;
561
- (function (Language) {
562
- /**
563
- * Unspecified language. This value should not be used.
564
- */
565
- Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
566
- /**
567
- * Python >= 3.10, with numpy and simpy available.
568
- */
569
- Language["PYTHON"] = "PYTHON";
570
- })(Language || (Language = {}));
571
559
  /** Outcome of the code execution. */
572
560
  var Outcome;
573
561
  (function (Outcome) {
@@ -576,18 +564,30 @@ var Outcome;
576
564
  */
577
565
  Outcome["OUTCOME_UNSPECIFIED"] = "OUTCOME_UNSPECIFIED";
578
566
  /**
579
- * Code execution completed successfully.
567
+ * Code execution completed successfully. `output` contains the stdout, if any.
580
568
  */
581
569
  Outcome["OUTCOME_OK"] = "OUTCOME_OK";
582
570
  /**
583
- * Code execution finished but with a failure. `stderr` should contain the reason.
571
+ * Code execution failed. `output` contains the stderr and stdout, if any.
584
572
  */
585
573
  Outcome["OUTCOME_FAILED"] = "OUTCOME_FAILED";
586
574
  /**
587
- * Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
575
+ * Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
588
576
  */
589
577
  Outcome["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
590
578
  })(Outcome || (Outcome = {}));
579
+ /** Programming language of the `code`. */
580
+ var Language;
581
+ (function (Language) {
582
+ /**
583
+ * Unspecified language. This value should not be used.
584
+ */
585
+ Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
586
+ /**
587
+ * Python >= 3.10, with numpy and simpy available.
588
+ */
589
+ Language["PYTHON"] = "PYTHON";
590
+ })(Language || (Language = {}));
591
591
  /** Specifies how the response should be scheduled in the conversation. */
592
592
  var FunctionResponseScheduling;
593
593
  (function (FunctionResponseScheduling) {
@@ -655,6 +655,14 @@ var Environment;
655
655
  * Operates in a web browser.
656
656
  */
657
657
  Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
658
+ /**
659
+ * Operates in a mobile environment.
660
+ */
661
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
662
+ /**
663
+ * Operates in a desktop environment.
664
+ */
665
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
658
666
  })(Environment || (Environment = {}));
659
667
  /** Type of auth scheme. This enum is not supported in Gemini API. */
660
668
  var AuthType;
@@ -1440,7 +1448,23 @@ var PairwiseChoice;
1440
1448
  */
1441
1449
  PairwiseChoice["TIE"] = "TIE";
1442
1450
  })(PairwiseChoice || (PairwiseChoice = {}));
1443
- /** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
1451
+ /** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
1452
+ var TuningSpeed;
1453
+ (function (TuningSpeed) {
1454
+ /**
1455
+ * The default / unset value. For Veo 3.0 models, this defaults to FAST.
1456
+ */
1457
+ TuningSpeed["TUNING_SPEED_UNSPECIFIED"] = "TUNING_SPEED_UNSPECIFIED";
1458
+ /**
1459
+ * Regular tuning speed.
1460
+ */
1461
+ TuningSpeed["REGULAR"] = "REGULAR";
1462
+ /**
1463
+ * Fast tuning speed.
1464
+ */
1465
+ TuningSpeed["FAST"] = "FAST";
1466
+ })(TuningSpeed || (TuningSpeed = {}));
1467
+ /** The tuning task for Veo. This enum is not supported in Gemini API. */
1444
1468
  var TuningTask;
1445
1469
  (function (TuningTask) {
1446
1470
  /**
@@ -1460,6 +1484,22 @@ var TuningTask;
1460
1484
  */
1461
1485
  TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
1462
1486
  })(TuningTask || (TuningTask = {}));
1487
+ /** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
1488
+ var VideoOrientation;
1489
+ (function (VideoOrientation) {
1490
+ /**
1491
+ * Unspecified video orientation. Defaults to landscape.
1492
+ */
1493
+ VideoOrientation["VIDEO_ORIENTATION_UNSPECIFIED"] = "VIDEO_ORIENTATION_UNSPECIFIED";
1494
+ /**
1495
+ * Landscape orientation (e.g. 16:9, 1280x720).
1496
+ */
1497
+ VideoOrientation["LANDSCAPE"] = "LANDSCAPE";
1498
+ /**
1499
+ * Portrait orientation (e.g. 9:16, 720x1280).
1500
+ */
1501
+ VideoOrientation["PORTRAIT"] = "PORTRAIT";
1502
+ })(VideoOrientation || (VideoOrientation = {}));
1463
1503
  /** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
1464
1504
  var DocumentState;
1465
1505
  (function (DocumentState) {
@@ -5800,6 +5840,39 @@ function blobToMldev$3(fromObject) {
5800
5840
  }
5801
5841
  return toObject;
5802
5842
  }
5843
+ function codeExecutionResultToVertex$2(fromObject) {
5844
+ const toObject = {};
5845
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
5846
+ if (fromOutcome != null) {
5847
+ setValueByPath(toObject, ['outcome'], fromOutcome);
5848
+ }
5849
+ const fromOutput = getValueByPath(fromObject, ['output']);
5850
+ if (fromOutput != null) {
5851
+ setValueByPath(toObject, ['output'], fromOutput);
5852
+ }
5853
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
5854
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
5855
+ }
5856
+ return toObject;
5857
+ }
5858
+ function computerUseToVertex$2(fromObject) {
5859
+ const toObject = {};
5860
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
5861
+ if (fromEnvironment != null) {
5862
+ setValueByPath(toObject, ['environment'], fromEnvironment);
5863
+ }
5864
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
5865
+ 'excludedPredefinedFunctions',
5866
+ ]);
5867
+ if (fromExcludedPredefinedFunctions != null) {
5868
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
5869
+ }
5870
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
5871
+ undefined) {
5872
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
5873
+ }
5874
+ return toObject;
5875
+ }
5803
5876
  function contentToMldev$3(fromObject) {
5804
5877
  const toObject = {};
5805
5878
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -5995,6 +6068,21 @@ function deleteCachedContentResponseFromVertex(fromObject) {
5995
6068
  }
5996
6069
  return toObject;
5997
6070
  }
6071
+ function executableCodeToVertex$2(fromObject) {
6072
+ const toObject = {};
6073
+ const fromCode = getValueByPath(fromObject, ['code']);
6074
+ if (fromCode != null) {
6075
+ setValueByPath(toObject, ['code'], fromCode);
6076
+ }
6077
+ const fromLanguage = getValueByPath(fromObject, ['language']);
6078
+ if (fromLanguage != null) {
6079
+ setValueByPath(toObject, ['language'], fromLanguage);
6080
+ }
6081
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
6082
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
6083
+ }
6084
+ return toObject;
6085
+ }
5998
6086
  function fileDataToMldev$3(fromObject) {
5999
6087
  const toObject = {};
6000
6088
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -6278,13 +6366,13 @@ function partToVertex$2(fromObject) {
6278
6366
  'codeExecutionResult',
6279
6367
  ]);
6280
6368
  if (fromCodeExecutionResult != null) {
6281
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
6369
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex$2(fromCodeExecutionResult));
6282
6370
  }
6283
6371
  const fromExecutableCode = getValueByPath(fromObject, [
6284
6372
  'executableCode',
6285
6373
  ]);
6286
6374
  if (fromExecutableCode != null) {
6287
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
6375
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex$2(fromExecutableCode));
6288
6376
  }
6289
6377
  const fromFileData = getValueByPath(fromObject, ['fileData']);
6290
6378
  if (fromFileData != null) {
@@ -6450,7 +6538,7 @@ function toolToVertex$2(fromObject) {
6450
6538
  }
6451
6539
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
6452
6540
  if (fromComputerUse != null) {
6453
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
6541
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$2(fromComputerUse));
6454
6542
  }
6455
6543
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
6456
6544
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -7594,7 +7682,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
7594
7682
  const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
7595
7683
  const USER_AGENT_HEADER = 'User-Agent';
7596
7684
  const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
7597
- const SDK_VERSION = '2.4.0'; // x-release-please-version
7685
+ const SDK_VERSION = '2.6.0'; // x-release-please-version
7598
7686
  const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
7599
7687
  const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
7600
7688
  const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
@@ -11631,6 +11719,39 @@ function blobToMldev$2(fromObject) {
11631
11719
  }
11632
11720
  return toObject;
11633
11721
  }
11722
+ function codeExecutionResultToVertex$1(fromObject) {
11723
+ const toObject = {};
11724
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
11725
+ if (fromOutcome != null) {
11726
+ setValueByPath(toObject, ['outcome'], fromOutcome);
11727
+ }
11728
+ const fromOutput = getValueByPath(fromObject, ['output']);
11729
+ if (fromOutput != null) {
11730
+ setValueByPath(toObject, ['output'], fromOutput);
11731
+ }
11732
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
11733
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11734
+ }
11735
+ return toObject;
11736
+ }
11737
+ function computerUseToVertex$1(fromObject) {
11738
+ const toObject = {};
11739
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
11740
+ if (fromEnvironment != null) {
11741
+ setValueByPath(toObject, ['environment'], fromEnvironment);
11742
+ }
11743
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
11744
+ 'excludedPredefinedFunctions',
11745
+ ]);
11746
+ if (fromExcludedPredefinedFunctions != null) {
11747
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
11748
+ }
11749
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
11750
+ undefined) {
11751
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11752
+ }
11753
+ return toObject;
11754
+ }
11634
11755
  function contentToMldev$2(fromObject) {
11635
11756
  const toObject = {};
11636
11757
  const fromParts = getValueByPath(fromObject, ['parts']);
@@ -11667,6 +11788,21 @@ function contentToVertex$1(fromObject) {
11667
11788
  }
11668
11789
  return toObject;
11669
11790
  }
11791
+ function executableCodeToVertex$1(fromObject) {
11792
+ const toObject = {};
11793
+ const fromCode = getValueByPath(fromObject, ['code']);
11794
+ if (fromCode != null) {
11795
+ setValueByPath(toObject, ['code'], fromCode);
11796
+ }
11797
+ const fromLanguage = getValueByPath(fromObject, ['language']);
11798
+ if (fromLanguage != null) {
11799
+ setValueByPath(toObject, ['language'], fromLanguage);
11800
+ }
11801
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
11802
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
11803
+ }
11804
+ return toObject;
11805
+ }
11670
11806
  function fileDataToMldev$2(fromObject) {
11671
11807
  const toObject = {};
11672
11808
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -12406,13 +12542,13 @@ function partToVertex$1(fromObject) {
12406
12542
  'codeExecutionResult',
12407
12543
  ]);
12408
12544
  if (fromCodeExecutionResult != null) {
12409
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
12545
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex$1(fromCodeExecutionResult));
12410
12546
  }
12411
12547
  const fromExecutableCode = getValueByPath(fromObject, [
12412
12548
  'executableCode',
12413
12549
  ]);
12414
12550
  if (fromExecutableCode != null) {
12415
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
12551
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex$1(fromExecutableCode));
12416
12552
  }
12417
12553
  const fromFileData = getValueByPath(fromObject, ['fileData']);
12418
12554
  if (fromFileData != null) {
@@ -12564,7 +12700,7 @@ function toolToVertex$1(fromObject) {
12564
12700
  }
12565
12701
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
12566
12702
  if (fromComputerUse != null) {
12567
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
12703
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex$1(fromComputerUse));
12568
12704
  }
12569
12705
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
12570
12706
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -12844,6 +12980,21 @@ function citationMetadataFromMldev(fromObject, _rootObject) {
12844
12980
  }
12845
12981
  return toObject;
12846
12982
  }
12983
+ function codeExecutionResultToVertex(fromObject, _rootObject) {
12984
+ const toObject = {};
12985
+ const fromOutcome = getValueByPath(fromObject, ['outcome']);
12986
+ if (fromOutcome != null) {
12987
+ setValueByPath(toObject, ['outcome'], fromOutcome);
12988
+ }
12989
+ const fromOutput = getValueByPath(fromObject, ['output']);
12990
+ if (fromOutput != null) {
12991
+ setValueByPath(toObject, ['output'], fromOutput);
12992
+ }
12993
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
12994
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
12995
+ }
12996
+ return toObject;
12997
+ }
12847
12998
  function computeTokensParametersToVertex(apiClient, fromObject, rootObject) {
12848
12999
  const toObject = {};
12849
13000
  const fromModel = getValueByPath(fromObject, ['model']);
@@ -12882,6 +13033,24 @@ function computeTokensResponseFromVertex(fromObject, _rootObject) {
12882
13033
  }
12883
13034
  return toObject;
12884
13035
  }
13036
+ function computerUseToVertex(fromObject, _rootObject) {
13037
+ const toObject = {};
13038
+ const fromEnvironment = getValueByPath(fromObject, ['environment']);
13039
+ if (fromEnvironment != null) {
13040
+ setValueByPath(toObject, ['environment'], fromEnvironment);
13041
+ }
13042
+ const fromExcludedPredefinedFunctions = getValueByPath(fromObject, [
13043
+ 'excludedPredefinedFunctions',
13044
+ ]);
13045
+ if (fromExcludedPredefinedFunctions != null) {
13046
+ setValueByPath(toObject, ['excludedPredefinedFunctions'], fromExcludedPredefinedFunctions);
13047
+ }
13048
+ if (getValueByPath(fromObject, ['enablePromptInjectionDetection']) !==
13049
+ undefined) {
13050
+ throw new Error('enablePromptInjectionDetection parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
13051
+ }
13052
+ return toObject;
13053
+ }
12885
13054
  function contentEmbeddingFromVertex(fromObject, rootObject) {
12886
13055
  const toObject = {};
12887
13056
  const fromValues = getValueByPath(fromObject, ['values']);
@@ -13556,6 +13725,21 @@ function endpointFromVertex(fromObject, _rootObject) {
13556
13725
  }
13557
13726
  return toObject;
13558
13727
  }
13728
+ function executableCodeToVertex(fromObject, _rootObject) {
13729
+ const toObject = {};
13730
+ const fromCode = getValueByPath(fromObject, ['code']);
13731
+ if (fromCode != null) {
13732
+ setValueByPath(toObject, ['code'], fromCode);
13733
+ }
13734
+ const fromLanguage = getValueByPath(fromObject, ['language']);
13735
+ if (fromLanguage != null) {
13736
+ setValueByPath(toObject, ['language'], fromLanguage);
13737
+ }
13738
+ if (getValueByPath(fromObject, ['id']) !== undefined) {
13739
+ throw new Error('id parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
13740
+ }
13741
+ return toObject;
13742
+ }
13559
13743
  function fileDataToMldev$1(fromObject, _rootObject) {
13560
13744
  const toObject = {};
13561
13745
  if (getValueByPath(fromObject, ['displayName']) !== undefined) {
@@ -15434,7 +15618,7 @@ function partToMldev$1(fromObject, rootObject) {
15434
15618
  }
15435
15619
  return toObject;
15436
15620
  }
15437
- function partToVertex(fromObject, _rootObject) {
15621
+ function partToVertex(fromObject, rootObject) {
15438
15622
  const toObject = {};
15439
15623
  const fromMediaResolution = getValueByPath(fromObject, [
15440
15624
  'mediaResolution',
@@ -15446,13 +15630,13 @@ function partToVertex(fromObject, _rootObject) {
15446
15630
  'codeExecutionResult',
15447
15631
  ]);
15448
15632
  if (fromCodeExecutionResult != null) {
15449
- setValueByPath(toObject, ['codeExecutionResult'], fromCodeExecutionResult);
15633
+ setValueByPath(toObject, ['codeExecutionResult'], codeExecutionResultToVertex(fromCodeExecutionResult));
15450
15634
  }
15451
15635
  const fromExecutableCode = getValueByPath(fromObject, [
15452
15636
  'executableCode',
15453
15637
  ]);
15454
15638
  if (fromExecutableCode != null) {
15455
- setValueByPath(toObject, ['executableCode'], fromExecutableCode);
15639
+ setValueByPath(toObject, ['executableCode'], executableCodeToVertex(fromExecutableCode));
15456
15640
  }
15457
15641
  const fromFileData = getValueByPath(fromObject, ['fileData']);
15458
15642
  if (fromFileData != null) {
@@ -15927,7 +16111,7 @@ function toolToMldev$1(fromObject, rootObject) {
15927
16111
  }
15928
16112
  return toObject;
15929
16113
  }
15930
- function toolToVertex(fromObject, _rootObject) {
16114
+ function toolToVertex(fromObject, rootObject) {
15931
16115
  const toObject = {};
15932
16116
  const fromRetrieval = getValueByPath(fromObject, ['retrieval']);
15933
16117
  if (fromRetrieval != null) {
@@ -15935,7 +16119,7 @@ function toolToVertex(fromObject, _rootObject) {
15935
16119
  }
15936
16120
  const fromComputerUse = getValueByPath(fromObject, ['computerUse']);
15937
16121
  if (fromComputerUse != null) {
15938
- setValueByPath(toObject, ['computerUse'], fromComputerUse);
16122
+ setValueByPath(toObject, ['computerUse'], computerUseToVertex(fromComputerUse));
15939
16123
  }
15940
16124
  if (getValueByPath(fromObject, ['fileSearch']) !== undefined) {
15941
16125
  throw new Error('fileSearch parameter is only supported in Gemini Developer API mode, not in Gemini Enterprise Agent Platform mode.');
@@ -20139,6 +20323,250 @@ function createTuningJobParametersPrivateToVertex(fromObject, rootObject) {
20139
20323
  }
20140
20324
  return toObject;
20141
20325
  }
20326
+ function distillationHyperParametersFromVertex(fromObject, rootObject) {
20327
+ const toObject = {};
20328
+ const fromAdapterSize = getValueByPath(fromObject, ['adapterSize']);
20329
+ if (fromAdapterSize != null) {
20330
+ setValueByPath(toObject, ['adapterSize'], fromAdapterSize);
20331
+ }
20332
+ const fromEpochCount = getValueByPath(fromObject, ['epochCount']);
20333
+ if (fromEpochCount != null) {
20334
+ setValueByPath(toObject, ['epochCount'], fromEpochCount);
20335
+ }
20336
+ const fromLearningRateMultiplier = getValueByPath(fromObject, [
20337
+ 'learningRateMultiplier',
20338
+ ]);
20339
+ if (fromLearningRateMultiplier != null) {
20340
+ setValueByPath(toObject, ['learningRateMultiplier'], fromLearningRateMultiplier);
20341
+ }
20342
+ const fromGenerationConfig = getValueByPath(fromObject, [
20343
+ 'generationConfig',
20344
+ ]);
20345
+ if (fromGenerationConfig != null) {
20346
+ setValueByPath(toObject, ['generationConfig'], generationConfigFromVertex(fromGenerationConfig));
20347
+ }
20348
+ const fromLearningRate = getValueByPath(fromObject, ['learningRate']);
20349
+ if (fromLearningRate != null) {
20350
+ setValueByPath(toObject, ['learningRate'], fromLearningRate);
20351
+ }
20352
+ const fromBatchSize = getValueByPath(fromObject, ['batchSize']);
20353
+ if (fromBatchSize != null) {
20354
+ setValueByPath(toObject, ['batchSize'], fromBatchSize);
20355
+ }
20356
+ return toObject;
20357
+ }
20358
+ function distillationSamplingSpecFromVertex(fromObject, rootObject) {
20359
+ const toObject = {};
20360
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
20361
+ 'baseTeacherModel',
20362
+ ]);
20363
+ if (fromBaseTeacherModel != null) {
20364
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
20365
+ }
20366
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
20367
+ 'tunedTeacherModelSource',
20368
+ ]);
20369
+ if (fromTunedTeacherModelSource != null) {
20370
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
20371
+ }
20372
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
20373
+ 'validationDatasetUri',
20374
+ ]);
20375
+ if (fromValidationDatasetUri != null) {
20376
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
20377
+ }
20378
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
20379
+ 'promptDatasetUri',
20380
+ ]);
20381
+ if (fromPromptDatasetUri != null) {
20382
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
20383
+ }
20384
+ const fromHyperparameters = getValueByPath(fromObject, [
20385
+ 'hyperparameters',
20386
+ ]);
20387
+ if (fromHyperparameters != null) {
20388
+ setValueByPath(toObject, ['hyperparameters'], distillationHyperParametersFromVertex(fromHyperparameters));
20389
+ }
20390
+ return toObject;
20391
+ }
20392
+ function distillationSpecFromVertex(fromObject, rootObject) {
20393
+ const toObject = {};
20394
+ const fromPromptDatasetUri = getValueByPath(fromObject, [
20395
+ 'promptDatasetUri',
20396
+ ]);
20397
+ if (fromPromptDatasetUri != null) {
20398
+ setValueByPath(toObject, ['promptDatasetUri'], fromPromptDatasetUri);
20399
+ }
20400
+ const fromBaseTeacherModel = getValueByPath(fromObject, [
20401
+ 'baseTeacherModel',
20402
+ ]);
20403
+ if (fromBaseTeacherModel != null) {
20404
+ setValueByPath(toObject, ['baseTeacherModel'], fromBaseTeacherModel);
20405
+ }
20406
+ const fromHyperParameters = getValueByPath(fromObject, [
20407
+ 'hyperParameters',
20408
+ ]);
20409
+ if (fromHyperParameters != null) {
20410
+ setValueByPath(toObject, ['hyperParameters'], distillationHyperParametersFromVertex(fromHyperParameters));
20411
+ }
20412
+ const fromPipelineRootDirectory = getValueByPath(fromObject, [
20413
+ 'pipelineRootDirectory',
20414
+ ]);
20415
+ if (fromPipelineRootDirectory != null) {
20416
+ setValueByPath(toObject, ['pipelineRootDirectory'], fromPipelineRootDirectory);
20417
+ }
20418
+ const fromStudentModel = getValueByPath(fromObject, ['studentModel']);
20419
+ if (fromStudentModel != null) {
20420
+ setValueByPath(toObject, ['studentModel'], fromStudentModel);
20421
+ }
20422
+ const fromTrainingDatasetUri = getValueByPath(fromObject, [
20423
+ 'trainingDatasetUri',
20424
+ ]);
20425
+ if (fromTrainingDatasetUri != null) {
20426
+ setValueByPath(toObject, ['trainingDatasetUri'], fromTrainingDatasetUri);
20427
+ }
20428
+ const fromTunedTeacherModelSource = getValueByPath(fromObject, [
20429
+ 'tunedTeacherModelSource',
20430
+ ]);
20431
+ if (fromTunedTeacherModelSource != null) {
20432
+ setValueByPath(toObject, ['tunedTeacherModelSource'], fromTunedTeacherModelSource);
20433
+ }
20434
+ const fromValidationDatasetUri = getValueByPath(fromObject, [
20435
+ 'validationDatasetUri',
20436
+ ]);
20437
+ if (fromValidationDatasetUri != null) {
20438
+ setValueByPath(toObject, ['validationDatasetUri'], fromValidationDatasetUri);
20439
+ }
20440
+ const fromTuningMode = getValueByPath(fromObject, ['tuningMode']);
20441
+ if (fromTuningMode != null) {
20442
+ setValueByPath(toObject, ['tuningMode'], fromTuningMode);
20443
+ }
20444
+ return toObject;
20445
+ }
20446
+ function generationConfigFromVertex(fromObject, _rootObject) {
20447
+ const toObject = {};
20448
+ const fromModelSelectionConfig = getValueByPath(fromObject, [
20449
+ 'modelConfig',
20450
+ ]);
20451
+ if (fromModelSelectionConfig != null) {
20452
+ setValueByPath(toObject, ['modelSelectionConfig'], fromModelSelectionConfig);
20453
+ }
20454
+ const fromResponseJsonSchema = getValueByPath(fromObject, [
20455
+ 'responseJsonSchema',
20456
+ ]);
20457
+ if (fromResponseJsonSchema != null) {
20458
+ setValueByPath(toObject, ['responseJsonSchema'], fromResponseJsonSchema);
20459
+ }
20460
+ const fromAudioTimestamp = getValueByPath(fromObject, [
20461
+ 'audioTimestamp',
20462
+ ]);
20463
+ if (fromAudioTimestamp != null) {
20464
+ setValueByPath(toObject, ['audioTimestamp'], fromAudioTimestamp);
20465
+ }
20466
+ const fromCandidateCount = getValueByPath(fromObject, [
20467
+ 'candidateCount',
20468
+ ]);
20469
+ if (fromCandidateCount != null) {
20470
+ setValueByPath(toObject, ['candidateCount'], fromCandidateCount);
20471
+ }
20472
+ const fromEnableAffectiveDialog = getValueByPath(fromObject, [
20473
+ 'enableAffectiveDialog',
20474
+ ]);
20475
+ if (fromEnableAffectiveDialog != null) {
20476
+ setValueByPath(toObject, ['enableAffectiveDialog'], fromEnableAffectiveDialog);
20477
+ }
20478
+ const fromFrequencyPenalty = getValueByPath(fromObject, [
20479
+ 'frequencyPenalty',
20480
+ ]);
20481
+ if (fromFrequencyPenalty != null) {
20482
+ setValueByPath(toObject, ['frequencyPenalty'], fromFrequencyPenalty);
20483
+ }
20484
+ const fromLogprobs = getValueByPath(fromObject, ['logprobs']);
20485
+ if (fromLogprobs != null) {
20486
+ setValueByPath(toObject, ['logprobs'], fromLogprobs);
20487
+ }
20488
+ const fromMaxOutputTokens = getValueByPath(fromObject, [
20489
+ 'maxOutputTokens',
20490
+ ]);
20491
+ if (fromMaxOutputTokens != null) {
20492
+ setValueByPath(toObject, ['maxOutputTokens'], fromMaxOutputTokens);
20493
+ }
20494
+ const fromMediaResolution = getValueByPath(fromObject, [
20495
+ 'mediaResolution',
20496
+ ]);
20497
+ if (fromMediaResolution != null) {
20498
+ setValueByPath(toObject, ['mediaResolution'], fromMediaResolution);
20499
+ }
20500
+ const fromPresencePenalty = getValueByPath(fromObject, [
20501
+ 'presencePenalty',
20502
+ ]);
20503
+ if (fromPresencePenalty != null) {
20504
+ setValueByPath(toObject, ['presencePenalty'], fromPresencePenalty);
20505
+ }
20506
+ const fromResponseLogprobs = getValueByPath(fromObject, [
20507
+ 'responseLogprobs',
20508
+ ]);
20509
+ if (fromResponseLogprobs != null) {
20510
+ setValueByPath(toObject, ['responseLogprobs'], fromResponseLogprobs);
20511
+ }
20512
+ const fromResponseMimeType = getValueByPath(fromObject, [
20513
+ 'responseMimeType',
20514
+ ]);
20515
+ if (fromResponseMimeType != null) {
20516
+ setValueByPath(toObject, ['responseMimeType'], fromResponseMimeType);
20517
+ }
20518
+ const fromResponseModalities = getValueByPath(fromObject, [
20519
+ 'responseModalities',
20520
+ ]);
20521
+ if (fromResponseModalities != null) {
20522
+ setValueByPath(toObject, ['responseModalities'], fromResponseModalities);
20523
+ }
20524
+ const fromResponseSchema = getValueByPath(fromObject, [
20525
+ 'responseSchema',
20526
+ ]);
20527
+ if (fromResponseSchema != null) {
20528
+ setValueByPath(toObject, ['responseSchema'], fromResponseSchema);
20529
+ }
20530
+ const fromRoutingConfig = getValueByPath(fromObject, [
20531
+ 'routingConfig',
20532
+ ]);
20533
+ if (fromRoutingConfig != null) {
20534
+ setValueByPath(toObject, ['routingConfig'], fromRoutingConfig);
20535
+ }
20536
+ const fromSeed = getValueByPath(fromObject, ['seed']);
20537
+ if (fromSeed != null) {
20538
+ setValueByPath(toObject, ['seed'], fromSeed);
20539
+ }
20540
+ const fromSpeechConfig = getValueByPath(fromObject, ['speechConfig']);
20541
+ if (fromSpeechConfig != null) {
20542
+ setValueByPath(toObject, ['speechConfig'], fromSpeechConfig);
20543
+ }
20544
+ const fromStopSequences = getValueByPath(fromObject, [
20545
+ 'stopSequences',
20546
+ ]);
20547
+ if (fromStopSequences != null) {
20548
+ setValueByPath(toObject, ['stopSequences'], fromStopSequences);
20549
+ }
20550
+ const fromTemperature = getValueByPath(fromObject, ['temperature']);
20551
+ if (fromTemperature != null) {
20552
+ setValueByPath(toObject, ['temperature'], fromTemperature);
20553
+ }
20554
+ const fromThinkingConfig = getValueByPath(fromObject, [
20555
+ 'thinkingConfig',
20556
+ ]);
20557
+ if (fromThinkingConfig != null) {
20558
+ setValueByPath(toObject, ['thinkingConfig'], fromThinkingConfig);
20559
+ }
20560
+ const fromTopK = getValueByPath(fromObject, ['topK']);
20561
+ if (fromTopK != null) {
20562
+ setValueByPath(toObject, ['topK'], fromTopK);
20563
+ }
20564
+ const fromTopP = getValueByPath(fromObject, ['topP']);
20565
+ if (fromTopP != null) {
20566
+ setValueByPath(toObject, ['topP'], fromTopP);
20567
+ }
20568
+ return toObject;
20569
+ }
20142
20570
  function getTuningJobParametersToMldev(fromObject, _rootObject) {
20143
20571
  const toObject = {};
20144
20572
  const fromName = getValueByPath(fromObject, ['name']);
@@ -20352,7 +20780,7 @@ function tuningJobFromMldev(fromObject, rootObject) {
20352
20780
  }
20353
20781
  return toObject;
20354
20782
  }
20355
- function tuningJobFromVertex(fromObject, _rootObject) {
20783
+ function tuningJobFromVertex(fromObject, rootObject) {
20356
20784
  const toObject = {};
20357
20785
  const fromSdkHttpResponse = getValueByPath(fromObject, [
20358
20786
  'sdkHttpResponse',
@@ -20422,7 +20850,7 @@ function tuningJobFromVertex(fromObject, _rootObject) {
20422
20850
  'distillationSpec',
20423
20851
  ]);
20424
20852
  if (fromDistillationSpec != null) {
20425
- setValueByPath(toObject, ['distillationSpec'], fromDistillationSpec);
20853
+ setValueByPath(toObject, ['distillationSpec'], distillationSpecFromVertex(fromDistillationSpec));
20426
20854
  }
20427
20855
  const fromTuningDataStats = getValueByPath(fromObject, [
20428
20856
  'tuningDataStats',
@@ -20506,18 +20934,24 @@ function tuningJobFromVertex(fromObject, _rootObject) {
20506
20934
  if (fromVeoTuningSpec != null) {
20507
20935
  setValueByPath(toObject, ['veoTuningSpec'], fromVeoTuningSpec);
20508
20936
  }
20509
- const fromDistillationSamplingSpec = getValueByPath(fromObject, [
20510
- 'distillationSamplingSpec',
20511
- ]);
20512
- if (fromDistillationSamplingSpec != null) {
20513
- setValueByPath(toObject, ['distillationSamplingSpec'], fromDistillationSamplingSpec);
20514
- }
20515
20937
  const fromTuningJobMetadata = getValueByPath(fromObject, [
20516
20938
  'tuningJobMetadata',
20517
20939
  ]);
20518
20940
  if (fromTuningJobMetadata != null) {
20519
20941
  setValueByPath(toObject, ['tuningJobMetadata'], fromTuningJobMetadata);
20520
20942
  }
20943
+ const fromVeoLoraTuningSpec = getValueByPath(fromObject, [
20944
+ 'veoLoraTuningSpec',
20945
+ ]);
20946
+ if (fromVeoLoraTuningSpec != null) {
20947
+ setValueByPath(toObject, ['veoLoraTuningSpec'], fromVeoLoraTuningSpec);
20948
+ }
20949
+ const fromDistillationSamplingSpec = getValueByPath(fromObject, [
20950
+ 'distillationSamplingSpec',
20951
+ ]);
20952
+ if (fromDistillationSamplingSpec != null) {
20953
+ setValueByPath(toObject, ['distillationSamplingSpec'], distillationSamplingSpecFromVertex(fromDistillationSamplingSpec));
20954
+ }
20521
20955
  return toObject;
20522
20956
  }
20523
20957
  function tuningOperationFromMldev(fromObject, _rootObject) {
@@ -21054,5 +21488,5 @@ class GoogleGenAI {
21054
21488
  }
21055
21489
  }
21056
21490
 
21057
- export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImageResizeMode, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, ModelStage, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, ServiceTier, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
21491
+ export { ActivityHandling, AdapterSize, AggregationMetric, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EmbeddingApiType, EndSensitivity, Environment, EvaluateDatasetResponse, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImageResizeMode, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, ModelStage, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PairwiseChoice, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, ProminentPeople, RawReferenceImage, RecontextImageResponse, RegisterFilesResponse, ReplayResponse, ResourceScope, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, ServiceTier, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, ToolResponse, ToolType, TrafficType, TuningJobState, TuningMethod, TuningMode, TuningSpeed, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VideoOrientation, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
21058
21492
  //# sourceMappingURL=index.mjs.map