@google/genai 1.21.0 → 1.22.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 CHANGED
@@ -1069,6 +1069,18 @@ export declare interface CodeExecutionResult {
1069
1069
  output?: string;
1070
1070
  }
1071
1071
 
1072
+ /** Tool to support computer use. */
1073
+ export declare interface ComputerUse {
1074
+ /** Required. The environment being operated. */
1075
+ environment?: Environment;
1076
+ /** By default, predefined functions are included in the final model call.
1077
+ Some of them can be explicitly excluded from being automatically included.
1078
+ This can serve two purposes:
1079
+ 1. Using a more restricted / different action space.
1080
+ 2. Improving the definitions / instructions of predefined functions. */
1081
+ excludedPredefinedFunctions?: string[];
1082
+ }
1083
+
1072
1084
  /** Optional parameters for computing tokens. */
1073
1085
  export declare interface ComputeTokensConfig {
1074
1086
  /** Used to override HTTP request options. */
@@ -2344,7 +2356,11 @@ export declare enum FinishReason {
2344
2356
  /**
2345
2357
  * The tool call generated by the model is invalid.
2346
2358
  */
2347
- UNEXPECTED_TOOL_CALL = "UNEXPECTED_TOOL_CALL"
2359
+ UNEXPECTED_TOOL_CALL = "UNEXPECTED_TOOL_CALL",
2360
+ /**
2361
+ * Image generation stopped because the generated images have prohibited content.
2362
+ */
2363
+ IMAGE_PROHIBITED_CONTENT = "IMAGE_PROHIBITED_CONTENT"
2348
2364
  }
2349
2365
 
2350
2366
  /** A function call. */
@@ -2650,6 +2666,9 @@ export declare interface GenerateContentConfig {
2650
2666
  /** The thinking features configuration.
2651
2667
  */
2652
2668
  thinkingConfig?: ThinkingConfig;
2669
+ /** The image generation configuration.
2670
+ */
2671
+ imageConfig?: ImageConfig;
2653
2672
  }
2654
2673
 
2655
2674
  /** Config for models.generate_content parameters. */
@@ -3771,6 +3790,13 @@ declare interface Image_2 {
3771
3790
  }
3772
3791
  export { Image_2 as Image }
3773
3792
 
3793
+ /** The image generation configuration to be used in GenerateContentConfig. */
3794
+ export declare interface ImageConfig {
3795
+ /** Aspect ratio of the generated images. Supported values are
3796
+ "1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
3797
+ aspectRatio?: string;
3798
+ }
3799
+
3774
3800
  /** Enum that specifies the language of the text in the prompt. */
3775
3801
  export declare enum ImagePromptLanguage {
3776
3802
  /**
@@ -4350,6 +4376,11 @@ export declare interface LiveConnectConfig {
4350
4376
  /** The speech generation configuration.
4351
4377
  */
4352
4378
  speechConfig?: SpeechConfig;
4379
+ /** Config for thinking features.
4380
+ An error will be returned if this field is set for models that don't
4381
+ support thinking.
4382
+ */
4383
+ thinkingConfig?: ThinkingConfig;
4353
4384
  /** If enabled, the model will detect emotions and adapt its responses accordingly. */
4354
4385
  enableAffectiveDialog?: boolean;
4355
4386
  /** The user provided system instructions for the model.
@@ -6815,7 +6846,7 @@ export declare interface Tool {
6815
6846
  /** Optional. Tool to support the model interacting directly with the
6816
6847
  computer. If enabled, it automatically populates computer-use specific
6817
6848
  Function Declarations. */
6818
- computerUse?: ToolComputerUse;
6849
+ computerUse?: ComputerUse;
6819
6850
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
6820
6851
  codeExecution?: ToolCodeExecution;
6821
6852
  }
@@ -6824,18 +6855,6 @@ export declare interface Tool {
6824
6855
  export declare interface ToolCodeExecution {
6825
6856
  }
6826
6857
 
6827
- /** Tool to support computer use. */
6828
- export declare interface ToolComputerUse {
6829
- /** Required. The environment being operated. */
6830
- environment?: Environment;
6831
- /** By default, predefined functions are included in the final model call.
6832
- Some of them can be explicitly excluded from being automatically included.
6833
- This can serve two purposes:
6834
- 1. Using a more restricted / different action space.
6835
- 2. Improving the definitions / instructions of predefined functions. */
6836
- excludedPredefinedFunctions?: string[];
6837
- }
6838
-
6839
6858
  /** Tool config.
6840
6859
 
6841
6860
  This config is shared for all tools provided in the request.
@@ -6990,6 +7009,8 @@ export declare interface TuningJob {
6990
7009
  serviceAccount?: string;
6991
7010
  /** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
6992
7011
  tunedModelDisplayName?: string;
7012
+ /** Tuning Spec for Veo Tuning. */
7013
+ veoTuningSpec?: VeoTuningSpec;
6993
7014
  }
6994
7015
 
6995
7016
  /** Tuning mode. */
@@ -7073,6 +7094,22 @@ declare class Tunings extends BaseModule {
7073
7094
  private tuneMldevInternal;
7074
7095
  }
7075
7096
 
7097
+ /** Optional. The tuning task. Either I2V or T2V. */
7098
+ export declare enum TuningTask {
7099
+ /**
7100
+ * Default value. This value is unused.
7101
+ */
7102
+ TUNING_TASK_UNSPECIFIED = "TUNING_TASK_UNSPECIFIED",
7103
+ /**
7104
+ * Tuning task for image to video.
7105
+ */
7106
+ TUNING_TASK_I2V = "TUNING_TASK_I2V",
7107
+ /**
7108
+ * Tuning task for text to video.
7109
+ */
7110
+ TUNING_TASK_T2V = "TUNING_TASK_T2V"
7111
+ }
7112
+
7076
7113
  export declare interface TuningValidationDataset {
7077
7114
  /** GCS URI of the file containing validation dataset in JSONL format. */
7078
7115
  gcsUri?: string;
@@ -7183,6 +7220,7 @@ declare namespace types {
7183
7220
  JobState,
7184
7221
  TuningMode,
7185
7222
  AdapterSize,
7223
+ TuningTask,
7186
7224
  FeatureSelectionPreference,
7187
7225
  Behavior,
7188
7226
  DynamicRetrievalConfigMode,
@@ -7241,7 +7279,7 @@ declare namespace types {
7241
7279
  AuthConfig,
7242
7280
  GoogleMaps,
7243
7281
  UrlContext,
7244
- ToolComputerUse,
7282
+ ComputerUse,
7245
7283
  ApiAuthApiKeyConfig,
7246
7284
  ApiAuth,
7247
7285
  ExternalApiElasticSearchParams,
@@ -7271,6 +7309,7 @@ declare namespace types {
7271
7309
  SpeechConfig,
7272
7310
  AutomaticFunctionCallingConfig,
7273
7311
  ThinkingConfig,
7312
+ ImageConfig,
7274
7313
  GenerationConfigRoutingConfigAutoRoutingMode,
7275
7314
  GenerationConfigRoutingConfigManualRoutingMode,
7276
7315
  GenerationConfigRoutingConfig,
@@ -7393,6 +7432,8 @@ declare namespace types {
7393
7432
  TuningDataStats,
7394
7433
  EncryptionSpec,
7395
7434
  PartnerModelTuningSpec,
7435
+ VeoHyperParameters,
7436
+ VeoTuningSpec,
7396
7437
  TuningJob,
7397
7438
  ListTuningJobsConfig,
7398
7439
  ListTuningJobsParameters,
@@ -7770,6 +7811,26 @@ export declare interface UsageMetadata {
7770
7811
  trafficType?: TrafficType;
7771
7812
  }
7772
7813
 
7814
+ /** Hyperparameters for Veo. */
7815
+ export declare interface VeoHyperParameters {
7816
+ /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
7817
+ epochCount?: string;
7818
+ /** Optional. Multiplier for adjusting the default learning rate. */
7819
+ learningRateMultiplier?: number;
7820
+ /** Optional. The tuning task. Either I2V or T2V. */
7821
+ tuningTask?: TuningTask;
7822
+ }
7823
+
7824
+ /** Tuning Spec for Veo Model Tuning. */
7825
+ export declare interface VeoTuningSpec {
7826
+ /** Optional. Hyperparameters for Veo. */
7827
+ hyperParameters?: VeoHyperParameters;
7828
+ /** Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
7829
+ trainingDatasetUri?: string;
7830
+ /** Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
7831
+ validationDatasetUri?: string;
7832
+ }
7833
+
7773
7834
  /** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */
7774
7835
  export declare interface VertexAISearch {
7775
7836
  /** Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used. */