@google/genai 1.18.0 → 1.20.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.
@@ -1517,6 +1517,8 @@ export declare interface CreateTuningJobConfig {
1517
1517
  batchSize?: number;
1518
1518
  /** The learning rate hyperparameter for tuning. If not set, a default of 0.001 or 0.0002 will be calculated based on the number of training examples. */
1519
1519
  learningRate?: number;
1520
+ /** Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. */
1521
+ labels?: Record<string, string>;
1520
1522
  }
1521
1523
 
1522
1524
  /** Supervised fine-tuning job creation parameters - optional fields. */
@@ -2949,6 +2951,8 @@ export declare interface GenerateVideosConfig {
2949
2951
  be associated with a type. Veo 2 supports up to 3 asset images *or* 1
2950
2952
  style image. */
2951
2953
  referenceImages?: VideoGenerationReferenceImage[];
2954
+ /** The mask to use for generating videos. */
2955
+ mask?: VideoGenerationMask;
2952
2956
  /** Compression quality of the generated videos. */
2953
2957
  compressionQuality?: VideoCompressionQuality;
2954
2958
  }
@@ -2965,13 +2969,13 @@ export declare class GenerateVideosOperation implements Operation<GenerateVideos
2965
2969
  error?: Record<string, unknown>;
2966
2970
  /** The generated videos. */
2967
2971
  response?: GenerateVideosResponse;
2968
- /** The full HTTP response. */
2969
- sdkHttpResponse?: HttpResponse;
2970
2972
  /**
2971
2973
  * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
2972
2974
  * @internal
2973
2975
  */
2974
2976
  _fromAPIResponse({ apiResponse, isVertexAI, }: OperationFromAPIResponseParameters): Operation<GenerateVideosResponse>;
2977
+ /** The full HTTP response. */
2978
+ sdkHttpResponse?: HttpResponse;
2975
2979
  }
2976
2980
 
2977
2981
  /** Class that represents the parameters for generating videos. */
@@ -4714,6 +4718,12 @@ export declare interface LiveServerContent {
4714
4718
  outputTranscription?: Transcription;
4715
4719
  /** Metadata related to url context retrieval tool. */
4716
4720
  urlContextMetadata?: UrlContextMetadata;
4721
+ /** Reason for the turn is complete. */
4722
+ turnCompleteReason?: TurnCompleteReason;
4723
+ /** If true, indicates that the model is not generating content because
4724
+ it is waiting for more input from the user, e.g. because it expects the
4725
+ user to continue talking. */
4726
+ waitingForInput?: boolean;
4717
4727
  }
4718
4728
 
4719
4729
  /** Server will not be able to service client soon. */
@@ -7018,6 +7028,26 @@ export declare interface TuningValidationDataset {
7018
7028
  vertexDatasetResource?: string;
7019
7029
  }
7020
7030
 
7031
+ /** The reason why the turn is complete. */
7032
+ export declare enum TurnCompleteReason {
7033
+ /**
7034
+ * Default value. Reason is unspecified.
7035
+ */
7036
+ TURN_COMPLETE_REASON_UNSPECIFIED = "TURN_COMPLETE_REASON_UNSPECIFIED",
7037
+ /**
7038
+ * The function call generated by the model is invalid.
7039
+ */
7040
+ MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL",
7041
+ /**
7042
+ * The response is rejected by the model.
7043
+ */
7044
+ RESPONSE_REJECTED = "RESPONSE_REJECTED",
7045
+ /**
7046
+ * Needs more input from the user.
7047
+ */
7048
+ NEED_MORE_INPUT = "NEED_MORE_INPUT"
7049
+ }
7050
+
7021
7051
  /** Options about which input is included in the user's turn. */
7022
7052
  export declare enum TurnCoverage {
7023
7053
  /**
@@ -7115,9 +7145,11 @@ declare namespace types {
7115
7145
  EditMode,
7116
7146
  SegmentMode,
7117
7147
  VideoGenerationReferenceType,
7148
+ VideoGenerationMaskMode,
7118
7149
  VideoCompressionQuality,
7119
7150
  FileState,
7120
7151
  FileSource,
7152
+ TurnCompleteReason,
7121
7153
  MediaModality,
7122
7154
  StartSensitivity,
7123
7155
  EndSensitivity,
@@ -7278,6 +7310,7 @@ declare namespace types {
7278
7310
  Video,
7279
7311
  GenerateVideosSource,
7280
7312
  VideoGenerationReferenceImage,
7313
+ VideoGenerationMask,
7281
7314
  GenerateVideosConfig,
7282
7315
  GenerateVideosParameters,
7283
7316
  GeneratedVideo,
@@ -7752,6 +7785,43 @@ export declare enum VideoCompressionQuality {
7752
7785
  LOSSLESS = "LOSSLESS"
7753
7786
  }
7754
7787
 
7788
+ /** A mask for video generation. */
7789
+ export declare interface VideoGenerationMask {
7790
+ /** The image mask to use for generating videos. */
7791
+ image?: Image_2;
7792
+ /** Describes how the mask will be used. Inpainting masks must
7793
+ match the aspect ratio of the input video. Outpainting masks can be
7794
+ either 9:16 or 16:9. */
7795
+ maskMode?: VideoGenerationMaskMode;
7796
+ }
7797
+
7798
+ /** Enum for the mask mode of a video generation mask. */
7799
+ export declare enum VideoGenerationMaskMode {
7800
+ /**
7801
+ * The image mask contains a masked rectangular region which is
7802
+ applied on the first frame of the input video. The object described in
7803
+ the prompt is inserted into this region and will appear in subsequent
7804
+ frames.
7805
+ */
7806
+ INSERT = "INSERT",
7807
+ /**
7808
+ * The image mask is used to determine an object in the
7809
+ first video frame to track. This object is removed from the video.
7810
+ */
7811
+ REMOVE = "REMOVE",
7812
+ /**
7813
+ * The image mask is used to determine a region in the
7814
+ video. Objects in this region will be removed.
7815
+ */
7816
+ REMOVE_STATIC = "REMOVE_STATIC",
7817
+ /**
7818
+ * The image mask contains a masked rectangular region where
7819
+ the input video will go. The remaining area will be generated. Video
7820
+ masks are not supported.
7821
+ */
7822
+ OUTPAINT = "OUTPAINT"
7823
+ }
7824
+
7755
7825
  /** A reference image for video generation. */
7756
7826
  export declare interface VideoGenerationReferenceImage {
7757
7827
  /** The reference image. */