@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.
@@ -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. */
@@ -3783,6 +3802,13 @@ declare interface Image_2 {
3783
3802
  }
3784
3803
  export { Image_2 as Image }
3785
3804
 
3805
+ /** The image generation configuration to be used in GenerateContentConfig. */
3806
+ export declare interface ImageConfig {
3807
+ /** Aspect ratio of the generated images. Supported values are
3808
+ "1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
3809
+ aspectRatio?: string;
3810
+ }
3811
+
3786
3812
  /** Enum that specifies the language of the text in the prompt. */
3787
3813
  export declare enum ImagePromptLanguage {
3788
3814
  /**
@@ -4362,6 +4388,11 @@ export declare interface LiveConnectConfig {
4362
4388
  /** The speech generation configuration.
4363
4389
  */
4364
4390
  speechConfig?: SpeechConfig;
4391
+ /** Config for thinking features.
4392
+ An error will be returned if this field is set for models that don't
4393
+ support thinking.
4394
+ */
4395
+ thinkingConfig?: ThinkingConfig;
4365
4396
  /** If enabled, the model will detect emotions and adapt its responses accordingly. */
4366
4397
  enableAffectiveDialog?: boolean;
4367
4398
  /** The user provided system instructions for the model.
@@ -6827,7 +6858,7 @@ export declare interface Tool {
6827
6858
  /** Optional. Tool to support the model interacting directly with the
6828
6859
  computer. If enabled, it automatically populates computer-use specific
6829
6860
  Function Declarations. */
6830
- computerUse?: ToolComputerUse;
6861
+ computerUse?: ComputerUse;
6831
6862
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
6832
6863
  codeExecution?: ToolCodeExecution;
6833
6864
  }
@@ -6836,18 +6867,6 @@ export declare interface Tool {
6836
6867
  export declare interface ToolCodeExecution {
6837
6868
  }
6838
6869
 
6839
- /** Tool to support computer use. */
6840
- export declare interface ToolComputerUse {
6841
- /** Required. The environment being operated. */
6842
- environment?: Environment;
6843
- /** By default, predefined functions are included in the final model call.
6844
- Some of them can be explicitly excluded from being automatically included.
6845
- This can serve two purposes:
6846
- 1. Using a more restricted / different action space.
6847
- 2. Improving the definitions / instructions of predefined functions. */
6848
- excludedPredefinedFunctions?: string[];
6849
- }
6850
-
6851
6870
  /** Tool config.
6852
6871
 
6853
6872
  This config is shared for all tools provided in the request.
@@ -7002,6 +7021,8 @@ export declare interface TuningJob {
7002
7021
  serviceAccount?: string;
7003
7022
  /** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
7004
7023
  tunedModelDisplayName?: string;
7024
+ /** Tuning Spec for Veo Tuning. */
7025
+ veoTuningSpec?: VeoTuningSpec;
7005
7026
  }
7006
7027
 
7007
7028
  /** Tuning mode. */
@@ -7085,6 +7106,22 @@ declare class Tunings extends BaseModule {
7085
7106
  private tuneMldevInternal;
7086
7107
  }
7087
7108
 
7109
+ /** Optional. The tuning task. Either I2V or T2V. */
7110
+ export declare enum TuningTask {
7111
+ /**
7112
+ * Default value. This value is unused.
7113
+ */
7114
+ TUNING_TASK_UNSPECIFIED = "TUNING_TASK_UNSPECIFIED",
7115
+ /**
7116
+ * Tuning task for image to video.
7117
+ */
7118
+ TUNING_TASK_I2V = "TUNING_TASK_I2V",
7119
+ /**
7120
+ * Tuning task for text to video.
7121
+ */
7122
+ TUNING_TASK_T2V = "TUNING_TASK_T2V"
7123
+ }
7124
+
7088
7125
  export declare interface TuningValidationDataset {
7089
7126
  /** GCS URI of the file containing validation dataset in JSONL format. */
7090
7127
  gcsUri?: string;
@@ -7195,6 +7232,7 @@ declare namespace types {
7195
7232
  JobState,
7196
7233
  TuningMode,
7197
7234
  AdapterSize,
7235
+ TuningTask,
7198
7236
  FeatureSelectionPreference,
7199
7237
  Behavior,
7200
7238
  DynamicRetrievalConfigMode,
@@ -7253,7 +7291,7 @@ declare namespace types {
7253
7291
  AuthConfig,
7254
7292
  GoogleMaps,
7255
7293
  UrlContext,
7256
- ToolComputerUse,
7294
+ ComputerUse,
7257
7295
  ApiAuthApiKeyConfig,
7258
7296
  ApiAuth,
7259
7297
  ExternalApiElasticSearchParams,
@@ -7283,6 +7321,7 @@ declare namespace types {
7283
7321
  SpeechConfig,
7284
7322
  AutomaticFunctionCallingConfig,
7285
7323
  ThinkingConfig,
7324
+ ImageConfig,
7286
7325
  GenerationConfigRoutingConfigAutoRoutingMode,
7287
7326
  GenerationConfigRoutingConfigManualRoutingMode,
7288
7327
  GenerationConfigRoutingConfig,
@@ -7405,6 +7444,8 @@ declare namespace types {
7405
7444
  TuningDataStats,
7406
7445
  EncryptionSpec,
7407
7446
  PartnerModelTuningSpec,
7447
+ VeoHyperParameters,
7448
+ VeoTuningSpec,
7408
7449
  TuningJob,
7409
7450
  ListTuningJobsConfig,
7410
7451
  ListTuningJobsParameters,
@@ -7782,6 +7823,26 @@ export declare interface UsageMetadata {
7782
7823
  trafficType?: TrafficType;
7783
7824
  }
7784
7825
 
7826
+ /** Hyperparameters for Veo. */
7827
+ export declare interface VeoHyperParameters {
7828
+ /** Optional. Number of complete passes the model makes over the entire training dataset during training. */
7829
+ epochCount?: string;
7830
+ /** Optional. Multiplier for adjusting the default learning rate. */
7831
+ learningRateMultiplier?: number;
7832
+ /** Optional. The tuning task. Either I2V or T2V. */
7833
+ tuningTask?: TuningTask;
7834
+ }
7835
+
7836
+ /** Tuning Spec for Veo Model Tuning. */
7837
+ export declare interface VeoTuningSpec {
7838
+ /** Optional. Hyperparameters for Veo. */
7839
+ hyperParameters?: VeoHyperParameters;
7840
+ /** 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. */
7841
+ trainingDatasetUri?: string;
7842
+ /** 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. */
7843
+ validationDatasetUri?: string;
7844
+ }
7845
+
7785
7846
  /** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */
7786
7847
  export declare interface VertexAISearch {
7787
7848
  /** 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. */