@google/genai 1.21.0 → 1.23.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 +134 -78
- package/dist/index.cjs +969 -5159
- package/dist/index.mjs +968 -5160
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +969 -5159
- package/dist/node/index.mjs +968 -5160
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +134 -78
- package/dist/web/index.mjs +968 -5160
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +134 -78
- package/package.json +1 -1
package/dist/web/web.d.ts
CHANGED
|
@@ -5,8 +5,7 @@ import { GoogleAuthOptions } from 'google-auth-library';
|
|
|
5
5
|
/** Marks the end of user activity.
|
|
6
6
|
|
|
7
7
|
This can only be sent if automatic (i.e. server-side) activity detection is
|
|
8
|
-
disabled.
|
|
9
|
-
*/
|
|
8
|
+
disabled. */
|
|
10
9
|
export declare interface ActivityEnd {
|
|
11
10
|
}
|
|
12
11
|
|
|
@@ -29,8 +28,7 @@ export declare enum ActivityHandling {
|
|
|
29
28
|
/** Marks the start of user activity.
|
|
30
29
|
|
|
31
30
|
This can only be sent if automatic (i.e. server-side) activity detection is
|
|
32
|
-
disabled.
|
|
33
|
-
*/
|
|
31
|
+
disabled. */
|
|
34
32
|
export declare interface ActivityStart {
|
|
35
33
|
}
|
|
36
34
|
|
|
@@ -1069,6 +1067,18 @@ export declare interface CodeExecutionResult {
|
|
|
1069
1067
|
output?: string;
|
|
1070
1068
|
}
|
|
1071
1069
|
|
|
1070
|
+
/** Tool to support computer use. */
|
|
1071
|
+
export declare interface ComputerUse {
|
|
1072
|
+
/** Required. The environment being operated. */
|
|
1073
|
+
environment?: Environment;
|
|
1074
|
+
/** By default, predefined functions are included in the final model call.
|
|
1075
|
+
Some of them can be explicitly excluded from being automatically included.
|
|
1076
|
+
This can serve two purposes:
|
|
1077
|
+
1. Using a more restricted / different action space.
|
|
1078
|
+
2. Improving the definitions / instructions of predefined functions. */
|
|
1079
|
+
excludedPredefinedFunctions?: string[];
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1072
1082
|
/** Optional parameters for computing tokens. */
|
|
1073
1083
|
export declare interface ComputeTokensConfig {
|
|
1074
1084
|
/** Used to override HTTP request options. */
|
|
@@ -1141,8 +1151,7 @@ export declare type ContentListUnion = Content | Content[] | PartUnion | PartUni
|
|
|
1141
1151
|
|
|
1142
1152
|
A content reference image represents a subject to reference (ex. person,
|
|
1143
1153
|
product, animal) provided by the user. It can optionally be provided in
|
|
1144
|
-
addition to a style reference image (ex. background, style reference).
|
|
1145
|
-
*/
|
|
1154
|
+
addition to a style reference image (ex. background, style reference). */
|
|
1146
1155
|
export declare class ContentReferenceImage {
|
|
1147
1156
|
/** The reference image for the editing operation. */
|
|
1148
1157
|
referenceImage?: Image_2;
|
|
@@ -1182,8 +1191,7 @@ export declare interface ControlReferenceConfig {
|
|
|
1182
1191
|
enable_control_image_computation field in the config should be set to True.
|
|
1183
1192
|
|
|
1184
1193
|
A control image is an image that represents a sketch image of areas for the
|
|
1185
|
-
model to fill in based on the prompt.
|
|
1186
|
-
*/
|
|
1194
|
+
model to fill in based on the prompt. */
|
|
1187
1195
|
export declare class ControlReferenceImage {
|
|
1188
1196
|
/** The reference image for the editing operation. */
|
|
1189
1197
|
referenceImage?: Image_2;
|
|
@@ -1378,8 +1386,7 @@ export declare interface CreateCachedContentParameters {
|
|
|
1378
1386
|
/** Parameters for initializing a new chat session.
|
|
1379
1387
|
|
|
1380
1388
|
These parameters are used when creating a chat session with the
|
|
1381
|
-
`chats.create()` method.
|
|
1382
|
-
*/
|
|
1389
|
+
`chats.create()` method. */
|
|
1383
1390
|
export declare interface CreateChatParameters {
|
|
1384
1391
|
/** The name of the model to use for the chat session.
|
|
1385
1392
|
|
|
@@ -1463,6 +1470,16 @@ export declare class CreateFileResponse {
|
|
|
1463
1470
|
sdkHttpResponse?: HttpResponse;
|
|
1464
1471
|
}
|
|
1465
1472
|
|
|
1473
|
+
/**
|
|
1474
|
+
* Creates a `FunctionResponsePart` object from a `base64` encoded `string`.
|
|
1475
|
+
*/
|
|
1476
|
+
export declare function createFunctionResponsePartFromBase64(data: string, mimeType: string): FunctionResponsePart;
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* Creates a `FunctionResponsePart` object from a `URI` string.
|
|
1480
|
+
*/
|
|
1481
|
+
export declare function createFunctionResponsePartFromUri(uri: string, mimeType: string): FunctionResponsePart;
|
|
1482
|
+
|
|
1466
1483
|
/**
|
|
1467
1484
|
* Creates a `Content` object with a model role from a `PartListUnion` object or `string`.
|
|
1468
1485
|
*/
|
|
@@ -1491,7 +1508,7 @@ export declare function createPartFromFunctionCall(name: string, args: Record<st
|
|
|
1491
1508
|
/**
|
|
1492
1509
|
* Creates a `Part` object from a `FunctionResponse` object.
|
|
1493
1510
|
*/
|
|
1494
|
-
export declare function createPartFromFunctionResponse(id: string, name: string, response: Record<string, unknown
|
|
1511
|
+
export declare function createPartFromFunctionResponse(id: string, name: string, response: Record<string, unknown>, parts?: FunctionResponsePart[]): Part;
|
|
1495
1512
|
|
|
1496
1513
|
/**
|
|
1497
1514
|
* Creates a `Part` object from a `text` string.
|
|
@@ -1837,6 +1854,8 @@ export declare interface EditImageConfig {
|
|
|
1837
1854
|
outputCompressionQuality?: number;
|
|
1838
1855
|
/** Whether to add a watermark to the generated images. */
|
|
1839
1856
|
addWatermark?: boolean;
|
|
1857
|
+
/** User specified labels to track billing usage. */
|
|
1858
|
+
labels?: Record<string, string>;
|
|
1840
1859
|
/** Describes the editing mode for the request. */
|
|
1841
1860
|
editMode?: EditMode;
|
|
1842
1861
|
/** The number of sampling steps. A higher value has better image
|
|
@@ -2290,8 +2309,7 @@ export declare interface FileStatus {
|
|
|
2290
2309
|
|
|
2291
2310
|
/** Output only. The reason why the model stopped generating tokens.
|
|
2292
2311
|
|
|
2293
|
-
If empty, the model has not stopped generating the tokens.
|
|
2294
|
-
*/
|
|
2312
|
+
If empty, the model has not stopped generating the tokens. */
|
|
2295
2313
|
export declare enum FinishReason {
|
|
2296
2314
|
/**
|
|
2297
2315
|
* The finish reason is unspecified.
|
|
@@ -2344,7 +2362,15 @@ export declare enum FinishReason {
|
|
|
2344
2362
|
/**
|
|
2345
2363
|
* The tool call generated by the model is invalid.
|
|
2346
2364
|
*/
|
|
2347
|
-
UNEXPECTED_TOOL_CALL = "UNEXPECTED_TOOL_CALL"
|
|
2365
|
+
UNEXPECTED_TOOL_CALL = "UNEXPECTED_TOOL_CALL",
|
|
2366
|
+
/**
|
|
2367
|
+
* Image generation stopped because the generated images have prohibited content.
|
|
2368
|
+
*/
|
|
2369
|
+
IMAGE_PROHIBITED_CONTENT = "IMAGE_PROHIBITED_CONTENT",
|
|
2370
|
+
/**
|
|
2371
|
+
* The model was expected to generate an image, but none was generated.
|
|
2372
|
+
*/
|
|
2373
|
+
NO_IMAGE = "NO_IMAGE"
|
|
2348
2374
|
}
|
|
2349
2375
|
|
|
2350
2376
|
/** A function call. */
|
|
@@ -2393,8 +2419,7 @@ export declare enum FunctionCallingConfigMode {
|
|
|
2393
2419
|
/** Defines a function that the model can generate JSON inputs for.
|
|
2394
2420
|
|
|
2395
2421
|
The inputs are based on `OpenAPI 3.0 specifications
|
|
2396
|
-
<https://spec.openapis.org/oas/v3.0.3>`_.
|
|
2397
|
-
*/
|
|
2422
|
+
<https://spec.openapis.org/oas/v3.0.3>`_. */
|
|
2398
2423
|
export declare interface FunctionDeclaration {
|
|
2399
2424
|
/** Defines the function behavior. */
|
|
2400
2425
|
behavior?: Behavior;
|
|
@@ -2432,8 +2457,7 @@ export declare class FunctionResponse {
|
|
|
2432
2457
|
/** Raw media bytes for function response.
|
|
2433
2458
|
|
|
2434
2459
|
Text should not be sent as raw bytes, use the FunctionResponse.response
|
|
2435
|
-
field.
|
|
2436
|
-
*/
|
|
2460
|
+
field. */
|
|
2437
2461
|
export declare class FunctionResponseBlob {
|
|
2438
2462
|
/** Required. The IANA standard MIME type of the source data. */
|
|
2439
2463
|
mimeType?: string;
|
|
@@ -2458,8 +2482,7 @@ export declare class FunctionResponseFileData {
|
|
|
2458
2482
|
|
|
2459
2483
|
A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
|
|
2460
2484
|
type and subtype of the media if the `inline_data` field is filled with raw
|
|
2461
|
-
bytes.
|
|
2462
|
-
*/
|
|
2485
|
+
bytes. */
|
|
2463
2486
|
export declare class FunctionResponsePart {
|
|
2464
2487
|
/** Optional. Inline media bytes. */
|
|
2465
2488
|
inlineData?: FunctionResponseBlob;
|
|
@@ -2506,8 +2529,7 @@ export declare interface GeminiPreferenceExampleCompletion {
|
|
|
2506
2529
|
/** Optional model configuration parameters.
|
|
2507
2530
|
|
|
2508
2531
|
For more information, see `Content generation parameters
|
|
2509
|
-
<https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>`_.
|
|
2510
|
-
*/
|
|
2532
|
+
<https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/content-generation-parameters>`_. */
|
|
2511
2533
|
export declare interface GenerateContentConfig {
|
|
2512
2534
|
/** Used to override HTTP request options. */
|
|
2513
2535
|
httpOptions?: HttpOptions;
|
|
@@ -2650,6 +2672,9 @@ export declare interface GenerateContentConfig {
|
|
|
2650
2672
|
/** The thinking features configuration.
|
|
2651
2673
|
*/
|
|
2652
2674
|
thinkingConfig?: ThinkingConfig;
|
|
2675
|
+
/** The image generation configuration.
|
|
2676
|
+
*/
|
|
2677
|
+
imageConfig?: ImageConfig;
|
|
2653
2678
|
}
|
|
2654
2679
|
|
|
2655
2680
|
/** Config for models.generate_content parameters. */
|
|
@@ -2926,6 +2951,8 @@ export declare interface GenerateImagesConfig {
|
|
|
2926
2951
|
outputCompressionQuality?: number;
|
|
2927
2952
|
/** Whether to add a watermark to the generated images. */
|
|
2928
2953
|
addWatermark?: boolean;
|
|
2954
|
+
/** User specified labels to track billing usage. */
|
|
2955
|
+
labels?: Record<string, string>;
|
|
2929
2956
|
/** The size of the largest dimension of the generated image.
|
|
2930
2957
|
Supported sizes are 1K and 2K (not supported for Imagen 3 models). */
|
|
2931
2958
|
imageSize?: string;
|
|
@@ -3776,6 +3803,13 @@ declare interface Image_2 {
|
|
|
3776
3803
|
}
|
|
3777
3804
|
export { Image_2 as Image }
|
|
3778
3805
|
|
|
3806
|
+
/** The image generation configuration to be used in GenerateContentConfig. */
|
|
3807
|
+
export declare interface ImageConfig {
|
|
3808
|
+
/** Aspect ratio of the generated images. Supported values are
|
|
3809
|
+
"1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
|
|
3810
|
+
aspectRatio?: string;
|
|
3811
|
+
}
|
|
3812
|
+
|
|
3779
3813
|
/** Enum that specifies the language of the text in the prompt. */
|
|
3780
3814
|
export declare enum ImagePromptLanguage {
|
|
3781
3815
|
/**
|
|
@@ -3850,8 +3884,7 @@ export declare class InlinedResponse {
|
|
|
3850
3884
|
The start time must be less than or equal to the end time.
|
|
3851
3885
|
When the start equals the end time, the interval is an empty interval.
|
|
3852
3886
|
(matches no time)
|
|
3853
|
-
When both start and end are unspecified, the interval matches any time.
|
|
3854
|
-
*/
|
|
3887
|
+
When both start and end are unspecified, the interval matches any time. */
|
|
3855
3888
|
export declare interface Interval {
|
|
3856
3889
|
/** The start time of the interval. */
|
|
3857
3890
|
startTime?: string;
|
|
@@ -3938,8 +3971,7 @@ export declare enum Language {
|
|
|
3938
3971
|
This is expressed as a pair of doubles to represent degrees latitude and
|
|
3939
3972
|
degrees longitude. Unless specified otherwise, this object must conform to the
|
|
3940
3973
|
<a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
|
|
3941
|
-
WGS84 standard</a>. Values must be within normalized ranges.
|
|
3942
|
-
*/
|
|
3974
|
+
WGS84 standard</a>. Values must be within normalized ranges. */
|
|
3943
3975
|
export declare interface LatLng {
|
|
3944
3976
|
/** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
|
|
3945
3977
|
latitude?: number;
|
|
@@ -4180,8 +4212,7 @@ export declare interface LiveCallbacks {
|
|
|
4180
4212
|
All the content here will unconditionally be appended to the conversation
|
|
4181
4213
|
history and used as part of the prompt to the model to generate content.
|
|
4182
4214
|
|
|
4183
|
-
A message here will interrupt any current model generation.
|
|
4184
|
-
*/
|
|
4215
|
+
A message here will interrupt any current model generation. */
|
|
4185
4216
|
export declare interface LiveClientContent {
|
|
4186
4217
|
/** The content appended to the current conversation with the model.
|
|
4187
4218
|
|
|
@@ -4221,8 +4252,7 @@ export declare interface LiveClientMessage {
|
|
|
4221
4252
|
- Even before the end of turn, the data is processed incrementally
|
|
4222
4253
|
to optimize for a fast start of the response from the model.
|
|
4223
4254
|
- Is always assumed to be the user's input (cannot be used to populate
|
|
4224
|
-
conversation history).
|
|
4225
|
-
*/
|
|
4255
|
+
conversation history). */
|
|
4226
4256
|
export declare interface LiveClientRealtimeInput {
|
|
4227
4257
|
/** Inlined bytes data for media input. */
|
|
4228
4258
|
mediaChunks?: Blob_2[];
|
|
@@ -4299,8 +4329,7 @@ export declare interface LiveClientSetup {
|
|
|
4299
4329
|
Note that in the unary and server-streaming GenerateContent APIs function
|
|
4300
4330
|
calling happens by exchanging the `Content` parts, while in the bidi
|
|
4301
4331
|
GenerateContent APIs function calling happens over this dedicated set of
|
|
4302
|
-
messages.
|
|
4303
|
-
*/
|
|
4332
|
+
messages. */
|
|
4304
4333
|
export declare class LiveClientToolResponse {
|
|
4305
4334
|
/** The response to the function calls. */
|
|
4306
4335
|
functionResponses?: FunctionResponse[];
|
|
@@ -4355,6 +4384,11 @@ export declare interface LiveConnectConfig {
|
|
|
4355
4384
|
/** The speech generation configuration.
|
|
4356
4385
|
*/
|
|
4357
4386
|
speechConfig?: SpeechConfig;
|
|
4387
|
+
/** Config for thinking features.
|
|
4388
|
+
An error will be returned if this field is set for models that don't
|
|
4389
|
+
support thinking.
|
|
4390
|
+
*/
|
|
4391
|
+
thinkingConfig?: ThinkingConfig;
|
|
4358
4392
|
/** If enabled, the model will detect emotions and adapt its responses accordingly. */
|
|
4359
4393
|
enableAffectiveDialog?: boolean;
|
|
4360
4394
|
/** The user provided system instructions for the model.
|
|
@@ -4575,8 +4609,7 @@ export declare enum LiveMusicPlaybackControl {
|
|
|
4575
4609
|
/** Server update generated by the model in response to client messages.
|
|
4576
4610
|
|
|
4577
4611
|
Content is generated as quickly as possible, and not in real time.
|
|
4578
|
-
Clients may choose to buffer and play it out in real time.
|
|
4579
|
-
*/
|
|
4612
|
+
Clients may choose to buffer and play it out in real time. */
|
|
4580
4613
|
export declare interface LiveMusicServerContent {
|
|
4581
4614
|
/** The audio chunks that the model has generated. */
|
|
4582
4615
|
audioChunks?: AudioChunk[];
|
|
@@ -4738,8 +4771,7 @@ export declare class LiveSendToolResponseParameters {
|
|
|
4738
4771
|
/** Incremental server update generated by the model in response to client messages.
|
|
4739
4772
|
|
|
4740
4773
|
Content is generated as quickly as possible, and not in real time. Clients
|
|
4741
|
-
may choose to buffer and play it out in real time.
|
|
4742
|
-
*/
|
|
4774
|
+
may choose to buffer and play it out in real time. */
|
|
4743
4775
|
export declare interface LiveServerContent {
|
|
4744
4776
|
/** The content that the model has generated as part of the current conversation with the user. */
|
|
4745
4777
|
modelTurn?: Content;
|
|
@@ -4820,8 +4852,7 @@ export declare class LiveServerMessage {
|
|
|
4820
4852
|
|
|
4821
4853
|
/** Update of the session resumption state.
|
|
4822
4854
|
|
|
4823
|
-
Only sent if `session_resumption` was set in the connection config.
|
|
4824
|
-
*/
|
|
4855
|
+
Only sent if `session_resumption` was set in the connection config. */
|
|
4825
4856
|
export declare interface LiveServerSessionResumptionUpdate {
|
|
4826
4857
|
/** New handle that represents state that can be resumed. Empty if `resumable`=false. */
|
|
4827
4858
|
newHandle?: string;
|
|
@@ -4851,8 +4882,7 @@ export declare interface LiveServerToolCall {
|
|
|
4851
4882
|
|
|
4852
4883
|
If there were side-effects to those tool calls, clients may attempt to undo
|
|
4853
4884
|
the tool calls. This message occurs only in cases where the clients interrupt
|
|
4854
|
-
server turns.
|
|
4855
|
-
*/
|
|
4885
|
+
server turns. */
|
|
4856
4886
|
export declare interface LiveServerToolCallCancellation {
|
|
4857
4887
|
/** The ids of the tool calls to be cancelled. */
|
|
4858
4888
|
ids?: string[];
|
|
@@ -4903,8 +4933,7 @@ export declare interface MaskReferenceConfig {
|
|
|
4903
4933
|
|
|
4904
4934
|
A mask image is an image whose non-zero values indicate where to edit the base
|
|
4905
4935
|
image. If the user provides a mask image, the mask must be in the same
|
|
4906
|
-
dimensions as the raw image.
|
|
4907
|
-
*/
|
|
4936
|
+
dimensions as the raw image. */
|
|
4908
4937
|
export declare class MaskReferenceImage {
|
|
4909
4938
|
/** The reference image for the editing operation. */
|
|
4910
4939
|
referenceImage?: Image_2;
|
|
@@ -5668,8 +5697,7 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
5668
5697
|
|
|
5669
5698
|
Exactly one field within a Part should be set, representing the specific type
|
|
5670
5699
|
of content being conveyed. Using multiple fields within the same `Part`
|
|
5671
|
-
instance is considered invalid.
|
|
5672
|
-
*/
|
|
5700
|
+
instance is considered invalid. */
|
|
5673
5701
|
export declare interface Part {
|
|
5674
5702
|
/** Metadata for a given video. */
|
|
5675
5703
|
videoMetadata?: VideoMetadata;
|
|
@@ -5844,8 +5872,7 @@ export declare interface RagRetrievalConfigRankingRankService {
|
|
|
5844
5872
|
|
|
5845
5873
|
A raw reference image represents the base image to edit, provided by the user.
|
|
5846
5874
|
It can optionally be provided in addition to a mask reference image or
|
|
5847
|
-
a style reference image.
|
|
5848
|
-
*/
|
|
5875
|
+
a style reference image. */
|
|
5849
5876
|
export declare class RawReferenceImage {
|
|
5850
5877
|
/** The reference image for the editing operation. */
|
|
5851
5878
|
referenceImage?: Image_2;
|
|
@@ -5860,8 +5887,7 @@ export declare class RawReferenceImage {
|
|
|
5860
5887
|
/** Marks the end of user activity.
|
|
5861
5888
|
|
|
5862
5889
|
This can only be sent if automatic (i.e. server-side) activity detection is
|
|
5863
|
-
disabled.
|
|
5864
|
-
*/
|
|
5890
|
+
disabled. */
|
|
5865
5891
|
export declare interface RealtimeInputConfig {
|
|
5866
5892
|
/** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */
|
|
5867
5893
|
automaticActivityDetection?: AutomaticActivityDetection;
|
|
@@ -5905,6 +5931,8 @@ export declare interface RecontextImageConfig {
|
|
|
5905
5931
|
outputCompressionQuality?: number;
|
|
5906
5932
|
/** Whether to use the prompt rewriting logic. */
|
|
5907
5933
|
enhancePrompt?: boolean;
|
|
5934
|
+
/** User specified labels to track billing usage. */
|
|
5935
|
+
labels?: Record<string, string>;
|
|
5908
5936
|
}
|
|
5909
5937
|
|
|
5910
5938
|
/** The parameters for recontextualizing an image. */
|
|
@@ -6118,8 +6146,7 @@ export declare enum Scale {
|
|
|
6118
6146
|
|
|
6119
6147
|
Represents a select subset of an [OpenAPI 3.0 schema
|
|
6120
6148
|
object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
6121
|
-
be added in the future as needed.
|
|
6122
|
-
*/
|
|
6149
|
+
be added in the future as needed. */
|
|
6123
6150
|
export declare interface Schema {
|
|
6124
6151
|
/** Optional. The value should be validated against any (one or more) of the subschemas in the list. */
|
|
6125
6152
|
anyOf?: Schema[];
|
|
@@ -6224,6 +6251,8 @@ export declare interface SegmentImageConfig {
|
|
|
6224
6251
|
can be set to a decimal value between 0 and 255 non-inclusive.
|
|
6225
6252
|
Set to -1 for no binary color thresholding. */
|
|
6226
6253
|
binaryColorThreshold?: number;
|
|
6254
|
+
/** User specified labels to track billing usage. */
|
|
6255
|
+
labels?: Record<string, string>;
|
|
6227
6256
|
}
|
|
6228
6257
|
|
|
6229
6258
|
/** The parameters for segmenting an image. */
|
|
@@ -6267,8 +6296,7 @@ export declare enum SegmentMode {
|
|
|
6267
6296
|
|
|
6268
6297
|
/** Parameters for sending a message within a chat session.
|
|
6269
6298
|
|
|
6270
|
-
These parameters are used with the `chat.sendMessage()` method.
|
|
6271
|
-
*/
|
|
6299
|
+
These parameters are used with the `chat.sendMessage()` method. */
|
|
6272
6300
|
export declare interface SendMessageParameters {
|
|
6273
6301
|
/** The message to send to the model.
|
|
6274
6302
|
|
|
@@ -6414,8 +6442,7 @@ export declare class Session {
|
|
|
6414
6442
|
/** Configuration of session resumption mechanism.
|
|
6415
6443
|
|
|
6416
6444
|
Included in `LiveConnectConfig.session_resumption`. If included server
|
|
6417
|
-
will send `LiveServerSessionResumptionUpdate` messages.
|
|
6418
|
-
*/
|
|
6445
|
+
will send `LiveServerSessionResumptionUpdate` messages. */
|
|
6419
6446
|
export declare interface SessionResumptionConfig {
|
|
6420
6447
|
/** Session resumption handle of previous session (session to restore).
|
|
6421
6448
|
|
|
@@ -6462,8 +6489,7 @@ export declare class SingleEmbedContentResponse {
|
|
|
6462
6489
|
Context window will always be cut at start of USER role turn. System
|
|
6463
6490
|
instructions and `BidiGenerateContentSetup.prefix_turns` will not be
|
|
6464
6491
|
subject to the sliding window mechanism, they will always stay at the
|
|
6465
|
-
beginning of context window.
|
|
6466
|
-
*/
|
|
6492
|
+
beginning of context window. */
|
|
6467
6493
|
export declare interface SlidingWindow {
|
|
6468
6494
|
/** Session reduction target -- how many tokens we should keep. Window shortening operation has some latency costs, so we should avoid running it on every turn. Should be < trigger_tokens. If not set, trigger_tokens/2 is assumed. */
|
|
6469
6495
|
targetTokens?: string;
|
|
@@ -6523,8 +6549,7 @@ export declare interface StyleReferenceConfig {
|
|
|
6523
6549
|
additionally optional config parameters for the style reference image.
|
|
6524
6550
|
|
|
6525
6551
|
A raw reference image can also be provided as a destination for the style to
|
|
6526
|
-
be applied to.
|
|
6527
|
-
*/
|
|
6552
|
+
be applied to. */
|
|
6528
6553
|
export declare class StyleReferenceImage {
|
|
6529
6554
|
/** The reference image for the editing operation. */
|
|
6530
6555
|
referenceImage?: Image_2;
|
|
@@ -6552,8 +6577,7 @@ export declare interface SubjectReferenceConfig {
|
|
|
6552
6577
|
additionally optional config parameters for the subject reference image.
|
|
6553
6578
|
|
|
6554
6579
|
A raw reference image can also be provided as a destination for the subject to
|
|
6555
|
-
be applied to.
|
|
6556
|
-
*/
|
|
6580
|
+
be applied to. */
|
|
6557
6581
|
export declare class SubjectReferenceImage {
|
|
6558
6582
|
/** The reference image for the editing operation. */
|
|
6559
6583
|
referenceImage?: Image_2;
|
|
@@ -6820,7 +6844,7 @@ export declare interface Tool {
|
|
|
6820
6844
|
/** Optional. Tool to support the model interacting directly with the
|
|
6821
6845
|
computer. If enabled, it automatically populates computer-use specific
|
|
6822
6846
|
Function Declarations. */
|
|
6823
|
-
computerUse?:
|
|
6847
|
+
computerUse?: ComputerUse;
|
|
6824
6848
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
6825
6849
|
codeExecution?: ToolCodeExecution;
|
|
6826
6850
|
}
|
|
@@ -6829,22 +6853,9 @@ export declare interface Tool {
|
|
|
6829
6853
|
export declare interface ToolCodeExecution {
|
|
6830
6854
|
}
|
|
6831
6855
|
|
|
6832
|
-
/** Tool to support computer use. */
|
|
6833
|
-
export declare interface ToolComputerUse {
|
|
6834
|
-
/** Required. The environment being operated. */
|
|
6835
|
-
environment?: Environment;
|
|
6836
|
-
/** By default, predefined functions are included in the final model call.
|
|
6837
|
-
Some of them can be explicitly excluded from being automatically included.
|
|
6838
|
-
This can serve two purposes:
|
|
6839
|
-
1. Using a more restricted / different action space.
|
|
6840
|
-
2. Improving the definitions / instructions of predefined functions. */
|
|
6841
|
-
excludedPredefinedFunctions?: string[];
|
|
6842
|
-
}
|
|
6843
|
-
|
|
6844
6856
|
/** Tool config.
|
|
6845
6857
|
|
|
6846
|
-
This config is shared for all tools provided in the request.
|
|
6847
|
-
*/
|
|
6858
|
+
This config is shared for all tools provided in the request. */
|
|
6848
6859
|
export declare interface ToolConfig {
|
|
6849
6860
|
/** Optional. Function calling config. */
|
|
6850
6861
|
functionCallingConfig?: FunctionCallingConfig;
|
|
@@ -6995,6 +7006,8 @@ export declare interface TuningJob {
|
|
|
6995
7006
|
serviceAccount?: string;
|
|
6996
7007
|
/** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
|
|
6997
7008
|
tunedModelDisplayName?: string;
|
|
7009
|
+
/** Tuning Spec for Veo Tuning. */
|
|
7010
|
+
veoTuningSpec?: VeoTuningSpec;
|
|
6998
7011
|
}
|
|
6999
7012
|
|
|
7000
7013
|
/** Tuning mode. */
|
|
@@ -7078,6 +7091,22 @@ declare class Tunings extends BaseModule {
|
|
|
7078
7091
|
private tuneMldevInternal;
|
|
7079
7092
|
}
|
|
7080
7093
|
|
|
7094
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
7095
|
+
export declare enum TuningTask {
|
|
7096
|
+
/**
|
|
7097
|
+
* Default value. This value is unused.
|
|
7098
|
+
*/
|
|
7099
|
+
TUNING_TASK_UNSPECIFIED = "TUNING_TASK_UNSPECIFIED",
|
|
7100
|
+
/**
|
|
7101
|
+
* Tuning task for image to video.
|
|
7102
|
+
*/
|
|
7103
|
+
TUNING_TASK_I2V = "TUNING_TASK_I2V",
|
|
7104
|
+
/**
|
|
7105
|
+
* Tuning task for text to video.
|
|
7106
|
+
*/
|
|
7107
|
+
TUNING_TASK_T2V = "TUNING_TASK_T2V"
|
|
7108
|
+
}
|
|
7109
|
+
|
|
7081
7110
|
export declare interface TuningValidationDataset {
|
|
7082
7111
|
/** GCS URI of the file containing validation dataset in JSONL format. */
|
|
7083
7112
|
gcsUri?: string;
|
|
@@ -7159,6 +7188,8 @@ export declare enum Type {
|
|
|
7159
7188
|
|
|
7160
7189
|
declare namespace types {
|
|
7161
7190
|
export {
|
|
7191
|
+
createFunctionResponsePartFromBase64,
|
|
7192
|
+
createFunctionResponsePartFromUri,
|
|
7162
7193
|
createPartFromUri,
|
|
7163
7194
|
createPartFromText,
|
|
7164
7195
|
createPartFromFunctionCall,
|
|
@@ -7188,6 +7219,7 @@ declare namespace types {
|
|
|
7188
7219
|
JobState,
|
|
7189
7220
|
TuningMode,
|
|
7190
7221
|
AdapterSize,
|
|
7222
|
+
TuningTask,
|
|
7191
7223
|
FeatureSelectionPreference,
|
|
7192
7224
|
Behavior,
|
|
7193
7225
|
DynamicRetrievalConfigMode,
|
|
@@ -7246,7 +7278,7 @@ declare namespace types {
|
|
|
7246
7278
|
AuthConfig,
|
|
7247
7279
|
GoogleMaps,
|
|
7248
7280
|
UrlContext,
|
|
7249
|
-
|
|
7281
|
+
ComputerUse,
|
|
7250
7282
|
ApiAuthApiKeyConfig,
|
|
7251
7283
|
ApiAuth,
|
|
7252
7284
|
ExternalApiElasticSearchParams,
|
|
@@ -7276,6 +7308,7 @@ declare namespace types {
|
|
|
7276
7308
|
SpeechConfig,
|
|
7277
7309
|
AutomaticFunctionCallingConfig,
|
|
7278
7310
|
ThinkingConfig,
|
|
7311
|
+
ImageConfig,
|
|
7279
7312
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
7280
7313
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
7281
7314
|
GenerationConfigRoutingConfig,
|
|
@@ -7398,6 +7431,8 @@ declare namespace types {
|
|
|
7398
7431
|
TuningDataStats,
|
|
7399
7432
|
EncryptionSpec,
|
|
7400
7433
|
PartnerModelTuningSpec,
|
|
7434
|
+
VeoHyperParameters,
|
|
7435
|
+
VeoTuningSpec,
|
|
7401
7436
|
TuningJob,
|
|
7402
7437
|
ListTuningJobsConfig,
|
|
7403
7438
|
ListTuningJobsParameters,
|
|
@@ -7654,8 +7689,7 @@ export declare interface UploadFileParameters {
|
|
|
7654
7689
|
|
|
7655
7690
|
For more information on this configuration, refer to
|
|
7656
7691
|
the `Imagen API reference documentation
|
|
7657
|
-
<https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api>`_.
|
|
7658
|
-
*/
|
|
7692
|
+
<https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api>`_. */
|
|
7659
7693
|
export declare interface UpscaleImageConfig {
|
|
7660
7694
|
/** Used to override HTTP request options. */
|
|
7661
7695
|
httpOptions?: HttpOptions;
|
|
@@ -7685,6 +7719,8 @@ export declare interface UpscaleImageConfig {
|
|
|
7685
7719
|
output image will have be more different from the input image, but
|
|
7686
7720
|
with finer details and less noise. */
|
|
7687
7721
|
imagePreservationFactor?: number;
|
|
7722
|
+
/** User specified labels to track billing usage. */
|
|
7723
|
+
labels?: Record<string, string>;
|
|
7688
7724
|
}
|
|
7689
7725
|
|
|
7690
7726
|
/** User-facing config UpscaleImageParameters. */
|
|
@@ -7775,6 +7811,26 @@ export declare interface UsageMetadata {
|
|
|
7775
7811
|
trafficType?: TrafficType;
|
|
7776
7812
|
}
|
|
7777
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
|
+
|
|
7778
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 */
|
|
7779
7835
|
export declare interface VertexAISearch {
|
|
7780
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. */
|