@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/genai.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;
|
|
@@ -3771,6 +3798,13 @@ declare interface Image_2 {
|
|
|
3771
3798
|
}
|
|
3772
3799
|
export { Image_2 as Image }
|
|
3773
3800
|
|
|
3801
|
+
/** The image generation configuration to be used in GenerateContentConfig. */
|
|
3802
|
+
export declare interface ImageConfig {
|
|
3803
|
+
/** Aspect ratio of the generated images. Supported values are
|
|
3804
|
+
"1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
|
|
3805
|
+
aspectRatio?: string;
|
|
3806
|
+
}
|
|
3807
|
+
|
|
3774
3808
|
/** Enum that specifies the language of the text in the prompt. */
|
|
3775
3809
|
export declare enum ImagePromptLanguage {
|
|
3776
3810
|
/**
|
|
@@ -3845,8 +3879,7 @@ export declare class InlinedResponse {
|
|
|
3845
3879
|
The start time must be less than or equal to the end time.
|
|
3846
3880
|
When the start equals the end time, the interval is an empty interval.
|
|
3847
3881
|
(matches no time)
|
|
3848
|
-
When both start and end are unspecified, the interval matches any time.
|
|
3849
|
-
*/
|
|
3882
|
+
When both start and end are unspecified, the interval matches any time. */
|
|
3850
3883
|
export declare interface Interval {
|
|
3851
3884
|
/** The start time of the interval. */
|
|
3852
3885
|
startTime?: string;
|
|
@@ -3933,8 +3966,7 @@ export declare enum Language {
|
|
|
3933
3966
|
This is expressed as a pair of doubles to represent degrees latitude and
|
|
3934
3967
|
degrees longitude. Unless specified otherwise, this object must conform to the
|
|
3935
3968
|
<a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
|
|
3936
|
-
WGS84 standard</a>. Values must be within normalized ranges.
|
|
3937
|
-
*/
|
|
3969
|
+
WGS84 standard</a>. Values must be within normalized ranges. */
|
|
3938
3970
|
export declare interface LatLng {
|
|
3939
3971
|
/** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
|
|
3940
3972
|
latitude?: number;
|
|
@@ -4175,8 +4207,7 @@ export declare interface LiveCallbacks {
|
|
|
4175
4207
|
All the content here will unconditionally be appended to the conversation
|
|
4176
4208
|
history and used as part of the prompt to the model to generate content.
|
|
4177
4209
|
|
|
4178
|
-
A message here will interrupt any current model generation.
|
|
4179
|
-
*/
|
|
4210
|
+
A message here will interrupt any current model generation. */
|
|
4180
4211
|
export declare interface LiveClientContent {
|
|
4181
4212
|
/** The content appended to the current conversation with the model.
|
|
4182
4213
|
|
|
@@ -4216,8 +4247,7 @@ export declare interface LiveClientMessage {
|
|
|
4216
4247
|
- Even before the end of turn, the data is processed incrementally
|
|
4217
4248
|
to optimize for a fast start of the response from the model.
|
|
4218
4249
|
- Is always assumed to be the user's input (cannot be used to populate
|
|
4219
|
-
conversation history).
|
|
4220
|
-
*/
|
|
4250
|
+
conversation history). */
|
|
4221
4251
|
export declare interface LiveClientRealtimeInput {
|
|
4222
4252
|
/** Inlined bytes data for media input. */
|
|
4223
4253
|
mediaChunks?: Blob_2[];
|
|
@@ -4294,8 +4324,7 @@ export declare interface LiveClientSetup {
|
|
|
4294
4324
|
Note that in the unary and server-streaming GenerateContent APIs function
|
|
4295
4325
|
calling happens by exchanging the `Content` parts, while in the bidi
|
|
4296
4326
|
GenerateContent APIs function calling happens over this dedicated set of
|
|
4297
|
-
messages.
|
|
4298
|
-
*/
|
|
4327
|
+
messages. */
|
|
4299
4328
|
export declare class LiveClientToolResponse {
|
|
4300
4329
|
/** The response to the function calls. */
|
|
4301
4330
|
functionResponses?: FunctionResponse[];
|
|
@@ -4350,6 +4379,11 @@ export declare interface LiveConnectConfig {
|
|
|
4350
4379
|
/** The speech generation configuration.
|
|
4351
4380
|
*/
|
|
4352
4381
|
speechConfig?: SpeechConfig;
|
|
4382
|
+
/** Config for thinking features.
|
|
4383
|
+
An error will be returned if this field is set for models that don't
|
|
4384
|
+
support thinking.
|
|
4385
|
+
*/
|
|
4386
|
+
thinkingConfig?: ThinkingConfig;
|
|
4353
4387
|
/** If enabled, the model will detect emotions and adapt its responses accordingly. */
|
|
4354
4388
|
enableAffectiveDialog?: boolean;
|
|
4355
4389
|
/** The user provided system instructions for the model.
|
|
@@ -4570,8 +4604,7 @@ export declare enum LiveMusicPlaybackControl {
|
|
|
4570
4604
|
/** Server update generated by the model in response to client messages.
|
|
4571
4605
|
|
|
4572
4606
|
Content is generated as quickly as possible, and not in real time.
|
|
4573
|
-
Clients may choose to buffer and play it out in real time.
|
|
4574
|
-
*/
|
|
4607
|
+
Clients may choose to buffer and play it out in real time. */
|
|
4575
4608
|
export declare interface LiveMusicServerContent {
|
|
4576
4609
|
/** The audio chunks that the model has generated. */
|
|
4577
4610
|
audioChunks?: AudioChunk[];
|
|
@@ -4733,8 +4766,7 @@ export declare class LiveSendToolResponseParameters {
|
|
|
4733
4766
|
/** Incremental server update generated by the model in response to client messages.
|
|
4734
4767
|
|
|
4735
4768
|
Content is generated as quickly as possible, and not in real time. Clients
|
|
4736
|
-
may choose to buffer and play it out in real time.
|
|
4737
|
-
*/
|
|
4769
|
+
may choose to buffer and play it out in real time. */
|
|
4738
4770
|
export declare interface LiveServerContent {
|
|
4739
4771
|
/** The content that the model has generated as part of the current conversation with the user. */
|
|
4740
4772
|
modelTurn?: Content;
|
|
@@ -4815,8 +4847,7 @@ export declare class LiveServerMessage {
|
|
|
4815
4847
|
|
|
4816
4848
|
/** Update of the session resumption state.
|
|
4817
4849
|
|
|
4818
|
-
Only sent if `session_resumption` was set in the connection config.
|
|
4819
|
-
*/
|
|
4850
|
+
Only sent if `session_resumption` was set in the connection config. */
|
|
4820
4851
|
export declare interface LiveServerSessionResumptionUpdate {
|
|
4821
4852
|
/** New handle that represents state that can be resumed. Empty if `resumable`=false. */
|
|
4822
4853
|
newHandle?: string;
|
|
@@ -4846,8 +4877,7 @@ export declare interface LiveServerToolCall {
|
|
|
4846
4877
|
|
|
4847
4878
|
If there were side-effects to those tool calls, clients may attempt to undo
|
|
4848
4879
|
the tool calls. This message occurs only in cases where the clients interrupt
|
|
4849
|
-
server turns.
|
|
4850
|
-
*/
|
|
4880
|
+
server turns. */
|
|
4851
4881
|
export declare interface LiveServerToolCallCancellation {
|
|
4852
4882
|
/** The ids of the tool calls to be cancelled. */
|
|
4853
4883
|
ids?: string[];
|
|
@@ -4898,8 +4928,7 @@ export declare interface MaskReferenceConfig {
|
|
|
4898
4928
|
|
|
4899
4929
|
A mask image is an image whose non-zero values indicate where to edit the base
|
|
4900
4930
|
image. If the user provides a mask image, the mask must be in the same
|
|
4901
|
-
dimensions as the raw image.
|
|
4902
|
-
*/
|
|
4931
|
+
dimensions as the raw image. */
|
|
4903
4932
|
export declare class MaskReferenceImage {
|
|
4904
4933
|
/** The reference image for the editing operation. */
|
|
4905
4934
|
referenceImage?: Image_2;
|
|
@@ -5663,8 +5692,7 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
5663
5692
|
|
|
5664
5693
|
Exactly one field within a Part should be set, representing the specific type
|
|
5665
5694
|
of content being conveyed. Using multiple fields within the same `Part`
|
|
5666
|
-
instance is considered invalid.
|
|
5667
|
-
*/
|
|
5695
|
+
instance is considered invalid. */
|
|
5668
5696
|
export declare interface Part {
|
|
5669
5697
|
/** Metadata for a given video. */
|
|
5670
5698
|
videoMetadata?: VideoMetadata;
|
|
@@ -5839,8 +5867,7 @@ export declare interface RagRetrievalConfigRankingRankService {
|
|
|
5839
5867
|
|
|
5840
5868
|
A raw reference image represents the base image to edit, provided by the user.
|
|
5841
5869
|
It can optionally be provided in addition to a mask reference image or
|
|
5842
|
-
a style reference image.
|
|
5843
|
-
*/
|
|
5870
|
+
a style reference image. */
|
|
5844
5871
|
export declare class RawReferenceImage {
|
|
5845
5872
|
/** The reference image for the editing operation. */
|
|
5846
5873
|
referenceImage?: Image_2;
|
|
@@ -5855,8 +5882,7 @@ export declare class RawReferenceImage {
|
|
|
5855
5882
|
/** Marks the end of user activity.
|
|
5856
5883
|
|
|
5857
5884
|
This can only be sent if automatic (i.e. server-side) activity detection is
|
|
5858
|
-
disabled.
|
|
5859
|
-
*/
|
|
5885
|
+
disabled. */
|
|
5860
5886
|
export declare interface RealtimeInputConfig {
|
|
5861
5887
|
/** If not set, automatic activity detection is enabled by default. If automatic voice detection is disabled, the client must send activity signals. */
|
|
5862
5888
|
automaticActivityDetection?: AutomaticActivityDetection;
|
|
@@ -5900,6 +5926,8 @@ export declare interface RecontextImageConfig {
|
|
|
5900
5926
|
outputCompressionQuality?: number;
|
|
5901
5927
|
/** Whether to use the prompt rewriting logic. */
|
|
5902
5928
|
enhancePrompt?: boolean;
|
|
5929
|
+
/** User specified labels to track billing usage. */
|
|
5930
|
+
labels?: Record<string, string>;
|
|
5903
5931
|
}
|
|
5904
5932
|
|
|
5905
5933
|
/** The parameters for recontextualizing an image. */
|
|
@@ -6113,8 +6141,7 @@ export declare enum Scale {
|
|
|
6113
6141
|
|
|
6114
6142
|
Represents a select subset of an [OpenAPI 3.0 schema
|
|
6115
6143
|
object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
6116
|
-
be added in the future as needed.
|
|
6117
|
-
*/
|
|
6144
|
+
be added in the future as needed. */
|
|
6118
6145
|
export declare interface Schema {
|
|
6119
6146
|
/** Optional. The value should be validated against any (one or more) of the subschemas in the list. */
|
|
6120
6147
|
anyOf?: Schema[];
|
|
@@ -6219,6 +6246,8 @@ export declare interface SegmentImageConfig {
|
|
|
6219
6246
|
can be set to a decimal value between 0 and 255 non-inclusive.
|
|
6220
6247
|
Set to -1 for no binary color thresholding. */
|
|
6221
6248
|
binaryColorThreshold?: number;
|
|
6249
|
+
/** User specified labels to track billing usage. */
|
|
6250
|
+
labels?: Record<string, string>;
|
|
6222
6251
|
}
|
|
6223
6252
|
|
|
6224
6253
|
/** The parameters for segmenting an image. */
|
|
@@ -6262,8 +6291,7 @@ export declare enum SegmentMode {
|
|
|
6262
6291
|
|
|
6263
6292
|
/** Parameters for sending a message within a chat session.
|
|
6264
6293
|
|
|
6265
|
-
These parameters are used with the `chat.sendMessage()` method.
|
|
6266
|
-
*/
|
|
6294
|
+
These parameters are used with the `chat.sendMessage()` method. */
|
|
6267
6295
|
export declare interface SendMessageParameters {
|
|
6268
6296
|
/** The message to send to the model.
|
|
6269
6297
|
|
|
@@ -6409,8 +6437,7 @@ export declare class Session {
|
|
|
6409
6437
|
/** Configuration of session resumption mechanism.
|
|
6410
6438
|
|
|
6411
6439
|
Included in `LiveConnectConfig.session_resumption`. If included server
|
|
6412
|
-
will send `LiveServerSessionResumptionUpdate` messages.
|
|
6413
|
-
*/
|
|
6440
|
+
will send `LiveServerSessionResumptionUpdate` messages. */
|
|
6414
6441
|
export declare interface SessionResumptionConfig {
|
|
6415
6442
|
/** Session resumption handle of previous session (session to restore).
|
|
6416
6443
|
|
|
@@ -6457,8 +6484,7 @@ export declare class SingleEmbedContentResponse {
|
|
|
6457
6484
|
Context window will always be cut at start of USER role turn. System
|
|
6458
6485
|
instructions and `BidiGenerateContentSetup.prefix_turns` will not be
|
|
6459
6486
|
subject to the sliding window mechanism, they will always stay at the
|
|
6460
|
-
beginning of context window.
|
|
6461
|
-
*/
|
|
6487
|
+
beginning of context window. */
|
|
6462
6488
|
export declare interface SlidingWindow {
|
|
6463
6489
|
/** 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. */
|
|
6464
6490
|
targetTokens?: string;
|
|
@@ -6518,8 +6544,7 @@ export declare interface StyleReferenceConfig {
|
|
|
6518
6544
|
additionally optional config parameters for the style reference image.
|
|
6519
6545
|
|
|
6520
6546
|
A raw reference image can also be provided as a destination for the style to
|
|
6521
|
-
be applied to.
|
|
6522
|
-
*/
|
|
6547
|
+
be applied to. */
|
|
6523
6548
|
export declare class StyleReferenceImage {
|
|
6524
6549
|
/** The reference image for the editing operation. */
|
|
6525
6550
|
referenceImage?: Image_2;
|
|
@@ -6547,8 +6572,7 @@ export declare interface SubjectReferenceConfig {
|
|
|
6547
6572
|
additionally optional config parameters for the subject reference image.
|
|
6548
6573
|
|
|
6549
6574
|
A raw reference image can also be provided as a destination for the subject to
|
|
6550
|
-
be applied to.
|
|
6551
|
-
*/
|
|
6575
|
+
be applied to. */
|
|
6552
6576
|
export declare class SubjectReferenceImage {
|
|
6553
6577
|
/** The reference image for the editing operation. */
|
|
6554
6578
|
referenceImage?: Image_2;
|
|
@@ -6815,7 +6839,7 @@ export declare interface Tool {
|
|
|
6815
6839
|
/** Optional. Tool to support the model interacting directly with the
|
|
6816
6840
|
computer. If enabled, it automatically populates computer-use specific
|
|
6817
6841
|
Function Declarations. */
|
|
6818
|
-
computerUse?:
|
|
6842
|
+
computerUse?: ComputerUse;
|
|
6819
6843
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
6820
6844
|
codeExecution?: ToolCodeExecution;
|
|
6821
6845
|
}
|
|
@@ -6824,22 +6848,9 @@ export declare interface Tool {
|
|
|
6824
6848
|
export declare interface ToolCodeExecution {
|
|
6825
6849
|
}
|
|
6826
6850
|
|
|
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
6851
|
/** Tool config.
|
|
6840
6852
|
|
|
6841
|
-
This config is shared for all tools provided in the request.
|
|
6842
|
-
*/
|
|
6853
|
+
This config is shared for all tools provided in the request. */
|
|
6843
6854
|
export declare interface ToolConfig {
|
|
6844
6855
|
/** Optional. Function calling config. */
|
|
6845
6856
|
functionCallingConfig?: FunctionCallingConfig;
|
|
@@ -6990,6 +7001,8 @@ export declare interface TuningJob {
|
|
|
6990
7001
|
serviceAccount?: string;
|
|
6991
7002
|
/** 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
7003
|
tunedModelDisplayName?: string;
|
|
7004
|
+
/** Tuning Spec for Veo Tuning. */
|
|
7005
|
+
veoTuningSpec?: VeoTuningSpec;
|
|
6993
7006
|
}
|
|
6994
7007
|
|
|
6995
7008
|
/** Tuning mode. */
|
|
@@ -7073,6 +7086,22 @@ declare class Tunings extends BaseModule {
|
|
|
7073
7086
|
private tuneMldevInternal;
|
|
7074
7087
|
}
|
|
7075
7088
|
|
|
7089
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
7090
|
+
export declare enum TuningTask {
|
|
7091
|
+
/**
|
|
7092
|
+
* Default value. This value is unused.
|
|
7093
|
+
*/
|
|
7094
|
+
TUNING_TASK_UNSPECIFIED = "TUNING_TASK_UNSPECIFIED",
|
|
7095
|
+
/**
|
|
7096
|
+
* Tuning task for image to video.
|
|
7097
|
+
*/
|
|
7098
|
+
TUNING_TASK_I2V = "TUNING_TASK_I2V",
|
|
7099
|
+
/**
|
|
7100
|
+
* Tuning task for text to video.
|
|
7101
|
+
*/
|
|
7102
|
+
TUNING_TASK_T2V = "TUNING_TASK_T2V"
|
|
7103
|
+
}
|
|
7104
|
+
|
|
7076
7105
|
export declare interface TuningValidationDataset {
|
|
7077
7106
|
/** GCS URI of the file containing validation dataset in JSONL format. */
|
|
7078
7107
|
gcsUri?: string;
|
|
@@ -7154,6 +7183,8 @@ export declare enum Type {
|
|
|
7154
7183
|
|
|
7155
7184
|
declare namespace types {
|
|
7156
7185
|
export {
|
|
7186
|
+
createFunctionResponsePartFromBase64,
|
|
7187
|
+
createFunctionResponsePartFromUri,
|
|
7157
7188
|
createPartFromUri,
|
|
7158
7189
|
createPartFromText,
|
|
7159
7190
|
createPartFromFunctionCall,
|
|
@@ -7183,6 +7214,7 @@ declare namespace types {
|
|
|
7183
7214
|
JobState,
|
|
7184
7215
|
TuningMode,
|
|
7185
7216
|
AdapterSize,
|
|
7217
|
+
TuningTask,
|
|
7186
7218
|
FeatureSelectionPreference,
|
|
7187
7219
|
Behavior,
|
|
7188
7220
|
DynamicRetrievalConfigMode,
|
|
@@ -7241,7 +7273,7 @@ declare namespace types {
|
|
|
7241
7273
|
AuthConfig,
|
|
7242
7274
|
GoogleMaps,
|
|
7243
7275
|
UrlContext,
|
|
7244
|
-
|
|
7276
|
+
ComputerUse,
|
|
7245
7277
|
ApiAuthApiKeyConfig,
|
|
7246
7278
|
ApiAuth,
|
|
7247
7279
|
ExternalApiElasticSearchParams,
|
|
@@ -7271,6 +7303,7 @@ declare namespace types {
|
|
|
7271
7303
|
SpeechConfig,
|
|
7272
7304
|
AutomaticFunctionCallingConfig,
|
|
7273
7305
|
ThinkingConfig,
|
|
7306
|
+
ImageConfig,
|
|
7274
7307
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
7275
7308
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
7276
7309
|
GenerationConfigRoutingConfig,
|
|
@@ -7393,6 +7426,8 @@ declare namespace types {
|
|
|
7393
7426
|
TuningDataStats,
|
|
7394
7427
|
EncryptionSpec,
|
|
7395
7428
|
PartnerModelTuningSpec,
|
|
7429
|
+
VeoHyperParameters,
|
|
7430
|
+
VeoTuningSpec,
|
|
7396
7431
|
TuningJob,
|
|
7397
7432
|
ListTuningJobsConfig,
|
|
7398
7433
|
ListTuningJobsParameters,
|
|
@@ -7649,8 +7684,7 @@ export declare interface UploadFileParameters {
|
|
|
7649
7684
|
|
|
7650
7685
|
For more information on this configuration, refer to
|
|
7651
7686
|
the `Imagen API reference documentation
|
|
7652
|
-
<https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api>`_.
|
|
7653
|
-
*/
|
|
7687
|
+
<https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api>`_. */
|
|
7654
7688
|
export declare interface UpscaleImageConfig {
|
|
7655
7689
|
/** Used to override HTTP request options. */
|
|
7656
7690
|
httpOptions?: HttpOptions;
|
|
@@ -7680,6 +7714,8 @@ export declare interface UpscaleImageConfig {
|
|
|
7680
7714
|
output image will have be more different from the input image, but
|
|
7681
7715
|
with finer details and less noise. */
|
|
7682
7716
|
imagePreservationFactor?: number;
|
|
7717
|
+
/** User specified labels to track billing usage. */
|
|
7718
|
+
labels?: Record<string, string>;
|
|
7683
7719
|
}
|
|
7684
7720
|
|
|
7685
7721
|
/** User-facing config UpscaleImageParameters. */
|
|
@@ -7770,6 +7806,26 @@ export declare interface UsageMetadata {
|
|
|
7770
7806
|
trafficType?: TrafficType;
|
|
7771
7807
|
}
|
|
7772
7808
|
|
|
7809
|
+
/** Hyperparameters for Veo. */
|
|
7810
|
+
export declare interface VeoHyperParameters {
|
|
7811
|
+
/** Optional. Number of complete passes the model makes over the entire training dataset during training. */
|
|
7812
|
+
epochCount?: string;
|
|
7813
|
+
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
7814
|
+
learningRateMultiplier?: number;
|
|
7815
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
7816
|
+
tuningTask?: TuningTask;
|
|
7817
|
+
}
|
|
7818
|
+
|
|
7819
|
+
/** Tuning Spec for Veo Model Tuning. */
|
|
7820
|
+
export declare interface VeoTuningSpec {
|
|
7821
|
+
/** Optional. Hyperparameters for Veo. */
|
|
7822
|
+
hyperParameters?: VeoHyperParameters;
|
|
7823
|
+
/** 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. */
|
|
7824
|
+
trainingDatasetUri?: string;
|
|
7825
|
+
/** 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. */
|
|
7826
|
+
validationDatasetUri?: string;
|
|
7827
|
+
}
|
|
7828
|
+
|
|
7773
7829
|
/** 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
7830
|
export declare interface VertexAISearch {
|
|
7775
7831
|
/** 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. */
|