@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.
- package/dist/genai.d.ts +72 -2
- package/dist/index.cjs +330 -104
- package/dist/index.mjs +331 -105
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +330 -104
- package/dist/node/index.mjs +331 -105
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +72 -2
- package/dist/web/index.mjs +331 -105
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +72 -2
- package/package.json +4 -1
package/dist/web/web.d.ts
CHANGED
|
@@ -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. */
|
|
@@ -4707,6 +4711,12 @@ export declare interface LiveServerContent {
|
|
|
4707
4711
|
outputTranscription?: Transcription;
|
|
4708
4712
|
/** Metadata related to url context retrieval tool. */
|
|
4709
4713
|
urlContextMetadata?: UrlContextMetadata;
|
|
4714
|
+
/** Reason for the turn is complete. */
|
|
4715
|
+
turnCompleteReason?: TurnCompleteReason;
|
|
4716
|
+
/** If true, indicates that the model is not generating content because
|
|
4717
|
+
it is waiting for more input from the user, e.g. because it expects the
|
|
4718
|
+
user to continue talking. */
|
|
4719
|
+
waitingForInput?: boolean;
|
|
4710
4720
|
}
|
|
4711
4721
|
|
|
4712
4722
|
/** Server will not be able to service client soon. */
|
|
@@ -7011,6 +7021,26 @@ export declare interface TuningValidationDataset {
|
|
|
7011
7021
|
vertexDatasetResource?: string;
|
|
7012
7022
|
}
|
|
7013
7023
|
|
|
7024
|
+
/** The reason why the turn is complete. */
|
|
7025
|
+
export declare enum TurnCompleteReason {
|
|
7026
|
+
/**
|
|
7027
|
+
* Default value. Reason is unspecified.
|
|
7028
|
+
*/
|
|
7029
|
+
TURN_COMPLETE_REASON_UNSPECIFIED = "TURN_COMPLETE_REASON_UNSPECIFIED",
|
|
7030
|
+
/**
|
|
7031
|
+
* The function call generated by the model is invalid.
|
|
7032
|
+
*/
|
|
7033
|
+
MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL",
|
|
7034
|
+
/**
|
|
7035
|
+
* The response is rejected by the model.
|
|
7036
|
+
*/
|
|
7037
|
+
RESPONSE_REJECTED = "RESPONSE_REJECTED",
|
|
7038
|
+
/**
|
|
7039
|
+
* Needs more input from the user.
|
|
7040
|
+
*/
|
|
7041
|
+
NEED_MORE_INPUT = "NEED_MORE_INPUT"
|
|
7042
|
+
}
|
|
7043
|
+
|
|
7014
7044
|
/** Options about which input is included in the user's turn. */
|
|
7015
7045
|
export declare enum TurnCoverage {
|
|
7016
7046
|
/**
|
|
@@ -7108,9 +7138,11 @@ declare namespace types {
|
|
|
7108
7138
|
EditMode,
|
|
7109
7139
|
SegmentMode,
|
|
7110
7140
|
VideoGenerationReferenceType,
|
|
7141
|
+
VideoGenerationMaskMode,
|
|
7111
7142
|
VideoCompressionQuality,
|
|
7112
7143
|
FileState,
|
|
7113
7144
|
FileSource,
|
|
7145
|
+
TurnCompleteReason,
|
|
7114
7146
|
MediaModality,
|
|
7115
7147
|
StartSensitivity,
|
|
7116
7148
|
EndSensitivity,
|
|
@@ -7271,6 +7303,7 @@ declare namespace types {
|
|
|
7271
7303
|
Video,
|
|
7272
7304
|
GenerateVideosSource,
|
|
7273
7305
|
VideoGenerationReferenceImage,
|
|
7306
|
+
VideoGenerationMask,
|
|
7274
7307
|
GenerateVideosConfig,
|
|
7275
7308
|
GenerateVideosParameters,
|
|
7276
7309
|
GeneratedVideo,
|
|
@@ -7745,6 +7778,43 @@ export declare enum VideoCompressionQuality {
|
|
|
7745
7778
|
LOSSLESS = "LOSSLESS"
|
|
7746
7779
|
}
|
|
7747
7780
|
|
|
7781
|
+
/** A mask for video generation. */
|
|
7782
|
+
export declare interface VideoGenerationMask {
|
|
7783
|
+
/** The image mask to use for generating videos. */
|
|
7784
|
+
image?: Image_2;
|
|
7785
|
+
/** Describes how the mask will be used. Inpainting masks must
|
|
7786
|
+
match the aspect ratio of the input video. Outpainting masks can be
|
|
7787
|
+
either 9:16 or 16:9. */
|
|
7788
|
+
maskMode?: VideoGenerationMaskMode;
|
|
7789
|
+
}
|
|
7790
|
+
|
|
7791
|
+
/** Enum for the mask mode of a video generation mask. */
|
|
7792
|
+
export declare enum VideoGenerationMaskMode {
|
|
7793
|
+
/**
|
|
7794
|
+
* The image mask contains a masked rectangular region which is
|
|
7795
|
+
applied on the first frame of the input video. The object described in
|
|
7796
|
+
the prompt is inserted into this region and will appear in subsequent
|
|
7797
|
+
frames.
|
|
7798
|
+
*/
|
|
7799
|
+
INSERT = "INSERT",
|
|
7800
|
+
/**
|
|
7801
|
+
* The image mask is used to determine an object in the
|
|
7802
|
+
first video frame to track. This object is removed from the video.
|
|
7803
|
+
*/
|
|
7804
|
+
REMOVE = "REMOVE",
|
|
7805
|
+
/**
|
|
7806
|
+
* The image mask is used to determine a region in the
|
|
7807
|
+
video. Objects in this region will be removed.
|
|
7808
|
+
*/
|
|
7809
|
+
REMOVE_STATIC = "REMOVE_STATIC",
|
|
7810
|
+
/**
|
|
7811
|
+
* The image mask contains a masked rectangular region where
|
|
7812
|
+
the input video will go. The remaining area will be generated. Video
|
|
7813
|
+
masks are not supported.
|
|
7814
|
+
*/
|
|
7815
|
+
OUTPAINT = "OUTPAINT"
|
|
7816
|
+
}
|
|
7817
|
+
|
|
7748
7818
|
/** A reference image for video generation. */
|
|
7749
7819
|
export declare interface VideoGenerationReferenceImage {
|
|
7750
7820
|
/** The reference image. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@google/genai",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.20.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.mjs",
|
|
@@ -61,6 +61,9 @@
|
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=20.0.0"
|
|
63
63
|
},
|
|
64
|
+
"overrides": {
|
|
65
|
+
"tmp": "^0.2.4"
|
|
66
|
+
},
|
|
64
67
|
"files": [
|
|
65
68
|
"dist/genai.d.ts",
|
|
66
69
|
"dist/index.mjs",
|