@google/genai 0.12.0 → 0.14.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/README.md +27 -1
- package/dist/genai.d.ts +468 -23
- package/dist/index.js +1619 -151
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1611 -152
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.js +1672 -143
- package/dist/node/index.js.map +1 -1
- package/dist/node/node.d.ts +468 -23
- package/dist/web/index.mjs +1577 -118
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +468 -23
- package/package.json +4 -1
package/dist/genai.d.ts
CHANGED
|
@@ -41,6 +41,21 @@ export declare enum AdapterSize {
|
|
|
41
41
|
declare class ApiClient {
|
|
42
42
|
readonly clientOptions: ApiClientInitOptions;
|
|
43
43
|
constructor(opts: ApiClientInitOptions);
|
|
44
|
+
/**
|
|
45
|
+
* Determines the base URL for Vertex AI based on project and location.
|
|
46
|
+
* Uses the global endpoint if location is 'global' or if project/location
|
|
47
|
+
* are not specified (implying API key usage).
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
private baseUrlFromProjectLocation;
|
|
51
|
+
/**
|
|
52
|
+
* Normalizes authentication parameters for Vertex AI.
|
|
53
|
+
* If project and location are provided, API key is cleared.
|
|
54
|
+
* If project and location are not provided (implying API key usage),
|
|
55
|
+
* project and location are cleared.
|
|
56
|
+
* @private
|
|
57
|
+
*/
|
|
58
|
+
private normalizeAuthParameters;
|
|
44
59
|
isVertexAI(): boolean;
|
|
45
60
|
getProject(): string | undefined;
|
|
46
61
|
getLocation(): string | undefined;
|
|
@@ -77,6 +92,13 @@ declare class ApiClient {
|
|
|
77
92
|
* @throws An error if the `mimeType` is not provided and can not be inferred,
|
|
78
93
|
*/
|
|
79
94
|
uploadFile(file: string | Blob, config?: UploadFileConfig): Promise<File_2>;
|
|
95
|
+
/**
|
|
96
|
+
* Downloads a file asynchronously to the specified path.
|
|
97
|
+
*
|
|
98
|
+
* @params params - The parameters for the download request, see {@link
|
|
99
|
+
* DownloadFileParameters}
|
|
100
|
+
*/
|
|
101
|
+
downloadFile(params: DownloadFileParameters): Promise<void>;
|
|
80
102
|
private fetchUploadUrl;
|
|
81
103
|
}
|
|
82
104
|
|
|
@@ -95,6 +117,12 @@ declare interface ApiClientInitOptions {
|
|
|
95
117
|
* creating a client, will be set through the Node_client or Web_client.
|
|
96
118
|
*/
|
|
97
119
|
uploader: Uploader;
|
|
120
|
+
/**
|
|
121
|
+
* Optional. The downloader to use for downloading files. This field is
|
|
122
|
+
* required for creating a client, will be set through the Node_client or
|
|
123
|
+
* Web_client.
|
|
124
|
+
*/
|
|
125
|
+
downloader: Downloader;
|
|
98
126
|
/**
|
|
99
127
|
* Optional. The Google Cloud project ID for Vertex AI users.
|
|
100
128
|
* It is not the numeric project name.
|
|
@@ -132,6 +160,12 @@ declare interface ApiClientInitOptions {
|
|
|
132
160
|
userAgentExtra?: string;
|
|
133
161
|
}
|
|
134
162
|
|
|
163
|
+
/** Config for authentication with API key. */
|
|
164
|
+
export declare interface ApiKeyConfig {
|
|
165
|
+
/** The API key to be used in the request directly. */
|
|
166
|
+
apiKeyString?: string;
|
|
167
|
+
}
|
|
168
|
+
|
|
135
169
|
/** The audio transcription configuration in Setup. */
|
|
136
170
|
export declare interface AudioTranscriptionConfig {
|
|
137
171
|
}
|
|
@@ -153,6 +187,61 @@ declare interface Auth {
|
|
|
153
187
|
addAuthHeaders(headers: Headers): Promise<void>;
|
|
154
188
|
}
|
|
155
189
|
|
|
190
|
+
/** Auth configuration to run the extension. */
|
|
191
|
+
export declare interface AuthConfig {
|
|
192
|
+
/** Config for API key auth. */
|
|
193
|
+
apiKeyConfig?: ApiKeyConfig;
|
|
194
|
+
/** Type of auth scheme. */
|
|
195
|
+
authType?: AuthType;
|
|
196
|
+
/** Config for Google Service Account auth. */
|
|
197
|
+
googleServiceAccountConfig?: AuthConfigGoogleServiceAccountConfig;
|
|
198
|
+
/** Config for HTTP Basic auth. */
|
|
199
|
+
httpBasicAuthConfig?: AuthConfigHttpBasicAuthConfig;
|
|
200
|
+
/** Config for user oauth. */
|
|
201
|
+
oauthConfig?: AuthConfigOauthConfig;
|
|
202
|
+
/** Config for user OIDC auth. */
|
|
203
|
+
oidcConfig?: AuthConfigOidcConfig;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/** Config for Google Service Account Authentication. */
|
|
207
|
+
export declare interface AuthConfigGoogleServiceAccountConfig {
|
|
208
|
+
/** Optional. The service account that the extension execution service runs as. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified service account. - If not specified, the Vertex AI Extension Service Agent will be used to execute the Extension. */
|
|
209
|
+
serviceAccount?: string;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
/** Config for HTTP Basic Authentication. */
|
|
213
|
+
export declare interface AuthConfigHttpBasicAuthConfig {
|
|
214
|
+
/** Required. The name of the SecretManager secret version resource storing the base64 encoded credentials. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource. */
|
|
215
|
+
credentialSecret?: string;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/** Config for user oauth. */
|
|
219
|
+
export declare interface AuthConfigOauthConfig {
|
|
220
|
+
/** Access token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. */
|
|
221
|
+
accessToken?: string;
|
|
222
|
+
/** The service account used to generate access tokens for executing the Extension. - If the service account is specified, the `iam.serviceAccounts.getAccessToken` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the provided service account. */
|
|
223
|
+
serviceAccount?: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
/** Config for user OIDC auth. */
|
|
227
|
+
export declare interface AuthConfigOidcConfig {
|
|
228
|
+
/** OpenID Connect formatted ID token for extension endpoint. Only used to propagate token from [[ExecuteExtensionRequest.runtime_auth_config]] at request time. */
|
|
229
|
+
idToken?: string;
|
|
230
|
+
/** The service account used to generate an OpenID Connect (OIDC)-compatible JWT token signed by the Google OIDC Provider (accounts.google.com) for extension endpoint (https://cloud.google.com/iam/docs/create-short-lived-credentials-direct#sa-credentials-oidc). - The audience for the token will be set to the URL in the server url defined in the OpenApi spec. - If the service account is provided, the service account should grant `iam.serviceAccounts.getOpenIdToken` permission to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents). */
|
|
231
|
+
serviceAccount?: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/** Type of auth scheme. */
|
|
235
|
+
export declare enum AuthType {
|
|
236
|
+
AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
|
|
237
|
+
NO_AUTH = "NO_AUTH",
|
|
238
|
+
API_KEY_AUTH = "API_KEY_AUTH",
|
|
239
|
+
HTTP_BASIC_AUTH = "HTTP_BASIC_AUTH",
|
|
240
|
+
GOOGLE_SERVICE_ACCOUNT_AUTH = "GOOGLE_SERVICE_ACCOUNT_AUTH",
|
|
241
|
+
OAUTH = "OAUTH",
|
|
242
|
+
OIDC_AUTH = "OIDC_AUTH"
|
|
243
|
+
}
|
|
244
|
+
|
|
156
245
|
/** Configures automatic detection of activity. */
|
|
157
246
|
export declare interface AutomaticActivityDetection {
|
|
158
247
|
/** If enabled, detected voice and text input count as activity. If disabled, the client must send activity signals. */
|
|
@@ -185,6 +274,8 @@ export declare interface BaseUrlParameters {
|
|
|
185
274
|
|
|
186
275
|
/** Content blob. */
|
|
187
276
|
declare interface Blob_2 {
|
|
277
|
+
/** Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is not currently used in the Gemini GenerateContent calls. */
|
|
278
|
+
displayName?: string;
|
|
188
279
|
/** Required. Raw bytes. */
|
|
189
280
|
data?: string;
|
|
190
281
|
/** Required. The IANA standard MIME type of the source data. */
|
|
@@ -471,6 +562,19 @@ export declare class Chats {
|
|
|
471
562
|
create(params: types.CreateChatParameters): Chat;
|
|
472
563
|
}
|
|
473
564
|
|
|
565
|
+
/** Describes the machine learning model version checkpoint. */
|
|
566
|
+
export declare interface Checkpoint {
|
|
567
|
+
/** The ID of the checkpoint.
|
|
568
|
+
*/
|
|
569
|
+
checkpointId?: string;
|
|
570
|
+
/** The epoch of the checkpoint.
|
|
571
|
+
*/
|
|
572
|
+
epoch?: string;
|
|
573
|
+
/** The step of the checkpoint.
|
|
574
|
+
*/
|
|
575
|
+
step?: string;
|
|
576
|
+
}
|
|
577
|
+
|
|
474
578
|
/** Source attributions for content. */
|
|
475
579
|
export declare interface Citation {
|
|
476
580
|
/** Output only. End index into the content. */
|
|
@@ -600,7 +704,7 @@ export declare interface ControlReferenceConfig {
|
|
|
600
704
|
A control image is an image that represents a sketch image of areas for the
|
|
601
705
|
model to fill in based on the prompt.
|
|
602
706
|
*/
|
|
603
|
-
export declare
|
|
707
|
+
export declare class ControlReferenceImage {
|
|
604
708
|
/** The reference image for the editing operation. */
|
|
605
709
|
referenceImage?: Image_2;
|
|
606
710
|
/** The id of the reference image. */
|
|
@@ -609,6 +713,8 @@ export declare interface ControlReferenceImage {
|
|
|
609
713
|
referenceType?: string;
|
|
610
714
|
/** Configuration for the control reference image. */
|
|
611
715
|
config?: ControlReferenceConfig;
|
|
716
|
+
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
717
|
+
toReferenceImageAPI(): any;
|
|
612
718
|
}
|
|
613
719
|
|
|
614
720
|
/** Enum representing the control type of a control reference image. */
|
|
@@ -823,6 +929,8 @@ export declare interface CreateTuningJobConfig {
|
|
|
823
929
|
epochCount?: number;
|
|
824
930
|
/** Multiplier for adjusting the default learning rate. */
|
|
825
931
|
learningRateMultiplier?: number;
|
|
932
|
+
/** If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. */
|
|
933
|
+
exportLastCheckpointOnly?: boolean;
|
|
826
934
|
/** Adapter size for tuning. */
|
|
827
935
|
adapterSize?: AdapterSize;
|
|
828
936
|
/** The batch size hyperparameter for tuning. If not set, a default of 4 or 16 will be used based on the number of training examples. */
|
|
@@ -1005,6 +1113,19 @@ export declare interface DistillationSpec {
|
|
|
1005
1113
|
validationDatasetUri?: string;
|
|
1006
1114
|
}
|
|
1007
1115
|
|
|
1116
|
+
export declare type DownloadableFileUnion = string | File_2 | GeneratedVideo | Video;
|
|
1117
|
+
|
|
1118
|
+
declare interface Downloader {
|
|
1119
|
+
/**
|
|
1120
|
+
* Downloads a file to the given location.
|
|
1121
|
+
*
|
|
1122
|
+
* @param params The parameters for downloading the file.
|
|
1123
|
+
* @param apiClient The ApiClient to use for uploading.
|
|
1124
|
+
* @return A Promises that resolves when the download is complete.
|
|
1125
|
+
*/
|
|
1126
|
+
download(params: DownloadFileParameters, apiClient: ApiClient): Promise<void>;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1008
1129
|
/** Used to override the default configuration. */
|
|
1009
1130
|
export declare interface DownloadFileConfig {
|
|
1010
1131
|
/** Used to override HTTP request options. */
|
|
@@ -1018,6 +1139,16 @@ export declare interface DownloadFileConfig {
|
|
|
1018
1139
|
abortSignal?: AbortSignal;
|
|
1019
1140
|
}
|
|
1020
1141
|
|
|
1142
|
+
/** Parameters used to download a file. */
|
|
1143
|
+
export declare interface DownloadFileParameters {
|
|
1144
|
+
/** The file to download. It can be a file name, a file object or a generated video. */
|
|
1145
|
+
file: DownloadableFileUnion;
|
|
1146
|
+
/** Location where the file should be downloaded to. */
|
|
1147
|
+
downloadPath: string;
|
|
1148
|
+
/** Configuration to for the download operation. */
|
|
1149
|
+
config?: DownloadFileConfig;
|
|
1150
|
+
}
|
|
1151
|
+
|
|
1021
1152
|
/** Describes the options to customize dynamic retrieval. */
|
|
1022
1153
|
export declare interface DynamicRetrievalConfig {
|
|
1023
1154
|
/** The mode of the predictor to be used in dynamic retrieval. */
|
|
@@ -1032,6 +1163,100 @@ export declare enum DynamicRetrievalConfigMode {
|
|
|
1032
1163
|
MODE_DYNAMIC = "MODE_DYNAMIC"
|
|
1033
1164
|
}
|
|
1034
1165
|
|
|
1166
|
+
/** Configuration for editing an image. */
|
|
1167
|
+
export declare interface EditImageConfig {
|
|
1168
|
+
/** Used to override HTTP request options. */
|
|
1169
|
+
httpOptions?: HttpOptions;
|
|
1170
|
+
/** Abort signal which can be used to cancel the request.
|
|
1171
|
+
|
|
1172
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
1173
|
+
operation will not cancel the request in the service. You will still
|
|
1174
|
+
be charged usage for any applicable operations.
|
|
1175
|
+
*/
|
|
1176
|
+
abortSignal?: AbortSignal;
|
|
1177
|
+
/** Cloud Storage URI used to store the generated images.
|
|
1178
|
+
*/
|
|
1179
|
+
outputGcsUri?: string;
|
|
1180
|
+
/** Description of what to discourage in the generated images.
|
|
1181
|
+
*/
|
|
1182
|
+
negativePrompt?: string;
|
|
1183
|
+
/** Number of images to generate.
|
|
1184
|
+
*/
|
|
1185
|
+
numberOfImages?: number;
|
|
1186
|
+
/** Aspect ratio of the generated images.
|
|
1187
|
+
*/
|
|
1188
|
+
aspectRatio?: string;
|
|
1189
|
+
/** Controls how much the model adheres to the text prompt. Large
|
|
1190
|
+
values increase output and prompt alignment, but may compromise image
|
|
1191
|
+
quality.
|
|
1192
|
+
*/
|
|
1193
|
+
guidanceScale?: number;
|
|
1194
|
+
/** Random seed for image generation. This is not available when
|
|
1195
|
+
``add_watermark`` is set to true.
|
|
1196
|
+
*/
|
|
1197
|
+
seed?: number;
|
|
1198
|
+
/** Filter level for safety filtering.
|
|
1199
|
+
*/
|
|
1200
|
+
safetyFilterLevel?: SafetyFilterLevel;
|
|
1201
|
+
/** Allows generation of people by the model.
|
|
1202
|
+
*/
|
|
1203
|
+
personGeneration?: PersonGeneration;
|
|
1204
|
+
/** Whether to report the safety scores of each generated image and
|
|
1205
|
+
the positive prompt in the response.
|
|
1206
|
+
*/
|
|
1207
|
+
includeSafetyAttributes?: boolean;
|
|
1208
|
+
/** Whether to include the Responsible AI filter reason if the image
|
|
1209
|
+
is filtered out of the response.
|
|
1210
|
+
*/
|
|
1211
|
+
includeRaiReason?: boolean;
|
|
1212
|
+
/** Language of the text in the prompt.
|
|
1213
|
+
*/
|
|
1214
|
+
language?: ImagePromptLanguage;
|
|
1215
|
+
/** MIME type of the generated image.
|
|
1216
|
+
*/
|
|
1217
|
+
outputMimeType?: string;
|
|
1218
|
+
/** Compression quality of the generated image (for ``image/jpeg``
|
|
1219
|
+
only).
|
|
1220
|
+
*/
|
|
1221
|
+
outputCompressionQuality?: number;
|
|
1222
|
+
/** Describes the editing mode for the request. */
|
|
1223
|
+
editMode?: EditMode;
|
|
1224
|
+
/** The number of sampling steps. A higher value has better image
|
|
1225
|
+
quality, while a lower value has better latency. */
|
|
1226
|
+
baseSteps?: number;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
/** Parameters for the request to edit an image. */
|
|
1230
|
+
export declare interface EditImageParameters {
|
|
1231
|
+
/** The model to use. */
|
|
1232
|
+
model: string;
|
|
1233
|
+
/** A text description of the edit to apply to the image. */
|
|
1234
|
+
prompt: string;
|
|
1235
|
+
/** The reference images for Imagen 3 editing. */
|
|
1236
|
+
referenceImages: ReferenceImage[];
|
|
1237
|
+
/** Configuration for editing. */
|
|
1238
|
+
config?: EditImageConfig;
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
/** Response for the request to edit an image. */
|
|
1242
|
+
export declare class EditImageResponse {
|
|
1243
|
+
/** Generated images. */
|
|
1244
|
+
generatedImages?: GeneratedImage[];
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
/** Enum representing the Imagen 3 Edit mode. */
|
|
1248
|
+
export declare enum EditMode {
|
|
1249
|
+
EDIT_MODE_DEFAULT = "EDIT_MODE_DEFAULT",
|
|
1250
|
+
EDIT_MODE_INPAINT_REMOVAL = "EDIT_MODE_INPAINT_REMOVAL",
|
|
1251
|
+
EDIT_MODE_INPAINT_INSERTION = "EDIT_MODE_INPAINT_INSERTION",
|
|
1252
|
+
EDIT_MODE_OUTPAINT = "EDIT_MODE_OUTPAINT",
|
|
1253
|
+
EDIT_MODE_CONTROLLED_EDITING = "EDIT_MODE_CONTROLLED_EDITING",
|
|
1254
|
+
EDIT_MODE_STYLE = "EDIT_MODE_STYLE",
|
|
1255
|
+
EDIT_MODE_BGSWAP = "EDIT_MODE_BGSWAP",
|
|
1256
|
+
EDIT_MODE_PRODUCT_IMAGE = "EDIT_MODE_PRODUCT_IMAGE"
|
|
1257
|
+
}
|
|
1258
|
+
|
|
1259
|
+
/** Optional parameters for the embed_content method. */
|
|
1035
1260
|
export declare interface EmbedContentConfig {
|
|
1036
1261
|
/** Used to override HTTP request options. */
|
|
1037
1262
|
httpOptions?: HttpOptions;
|
|
@@ -1118,6 +1343,10 @@ export declare enum EndSensitivity {
|
|
|
1118
1343
|
END_SENSITIVITY_LOW = "END_SENSITIVITY_LOW"
|
|
1119
1344
|
}
|
|
1120
1345
|
|
|
1346
|
+
/** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. */
|
|
1347
|
+
export declare interface EnterpriseWebSearch {
|
|
1348
|
+
}
|
|
1349
|
+
|
|
1121
1350
|
/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [FunctionDeclaration] tool and [FunctionCallingConfig] mode is set to [Mode.CODE]. */
|
|
1122
1351
|
export declare interface ExecutableCode {
|
|
1123
1352
|
/** Required. The code to be executed. */
|
|
@@ -1261,6 +1490,23 @@ export declare class Files extends BaseModule {
|
|
|
1261
1490
|
* ```
|
|
1262
1491
|
*/
|
|
1263
1492
|
upload(params: types.UploadFileParameters): Promise<types.File>;
|
|
1493
|
+
/**
|
|
1494
|
+
* Downloads a remotely stored file asynchronously to a location specified in
|
|
1495
|
+
* the `params` object. This method only works on Node environment, to
|
|
1496
|
+
* download files in the browser, use a browser compliant method like an <a>
|
|
1497
|
+
* tag.
|
|
1498
|
+
*
|
|
1499
|
+
* @param params - The parameters for the download request.
|
|
1500
|
+
*
|
|
1501
|
+
* @example
|
|
1502
|
+
* The following code downloads an example file named "files/mehozpxf877d" as
|
|
1503
|
+
* "file.txt".
|
|
1504
|
+
*
|
|
1505
|
+
* ```ts
|
|
1506
|
+
* await ai.files.download({file: file.name, downloadPath: 'file.txt'});
|
|
1507
|
+
* ```
|
|
1508
|
+
*/
|
|
1509
|
+
download(params: types.DownloadFileParameters): Promise<void>;
|
|
1264
1510
|
private listInternal;
|
|
1265
1511
|
private createInternal;
|
|
1266
1512
|
/**
|
|
@@ -1477,10 +1723,21 @@ export declare interface GenerateContentConfig {
|
|
|
1477
1723
|
random number is used.
|
|
1478
1724
|
*/
|
|
1479
1725
|
seed?: number;
|
|
1480
|
-
/** Output response
|
|
1726
|
+
/** Output response mimetype of the generated candidate text.
|
|
1727
|
+
Supported mimetype:
|
|
1728
|
+
- `text/plain`: (default) Text output.
|
|
1729
|
+
- `application/json`: JSON response in the candidates.
|
|
1730
|
+
The model needs to be prompted to output the appropriate response type,
|
|
1731
|
+
otherwise the behavior is undefined.
|
|
1732
|
+
This is a preview feature.
|
|
1481
1733
|
*/
|
|
1482
1734
|
responseMimeType?: string;
|
|
1483
|
-
/** Schema
|
|
1735
|
+
/** The `Schema` object allows the definition of input and output data types.
|
|
1736
|
+
These types can be objects, but also primitives and arrays.
|
|
1737
|
+
Represents a select subset of an [OpenAPI 3.0 schema
|
|
1738
|
+
object](https://spec.openapis.org/oas/v3.0.3#schema).
|
|
1739
|
+
If set, a compatible response_mime_type must also be set.
|
|
1740
|
+
Compatible mimetypes: `application/json`: Schema for JSON response.
|
|
1484
1741
|
*/
|
|
1485
1742
|
responseSchema?: SchemaUnion;
|
|
1486
1743
|
/** Configuration for model router requests.
|
|
@@ -2174,6 +2431,12 @@ export declare interface GoogleGenAIOptions {
|
|
|
2174
2431
|
httpOptions?: HttpOptions;
|
|
2175
2432
|
}
|
|
2176
2433
|
|
|
2434
|
+
/** Tool to support Google Maps in Model. */
|
|
2435
|
+
export declare interface GoogleMaps {
|
|
2436
|
+
/** Optional. Auth config for the Google Maps tool. */
|
|
2437
|
+
authConfig?: AuthConfig;
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2177
2440
|
/** The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). */
|
|
2178
2441
|
export declare interface GoogleRpcStatus {
|
|
2179
2442
|
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
@@ -2422,6 +2685,20 @@ export declare enum Language {
|
|
|
2422
2685
|
PYTHON = "PYTHON"
|
|
2423
2686
|
}
|
|
2424
2687
|
|
|
2688
|
+
/** An object that represents a latitude/longitude pair.
|
|
2689
|
+
|
|
2690
|
+
This is expressed as a pair of doubles to represent degrees latitude and
|
|
2691
|
+
degrees longitude. Unless specified otherwise, this object must conform to the
|
|
2692
|
+
<a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
|
|
2693
|
+
WGS84 standard</a>. Values must be within normalized ranges.
|
|
2694
|
+
*/
|
|
2695
|
+
export declare interface LatLng {
|
|
2696
|
+
/** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
|
|
2697
|
+
latitude?: number;
|
|
2698
|
+
/** The longitude in degrees. It must be in the range [-180.0, +180.0] */
|
|
2699
|
+
longitude?: number;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2425
2702
|
/** Config for caches.list method. */
|
|
2426
2703
|
export declare interface ListCachedContentsConfig {
|
|
2427
2704
|
/** Used to override HTTP request options. */
|
|
@@ -2480,6 +2757,32 @@ export declare class ListFilesResponse {
|
|
|
2480
2757
|
files?: File_2[];
|
|
2481
2758
|
}
|
|
2482
2759
|
|
|
2760
|
+
export declare interface ListModelsConfig {
|
|
2761
|
+
/** Used to override HTTP request options. */
|
|
2762
|
+
httpOptions?: HttpOptions;
|
|
2763
|
+
/** Abort signal which can be used to cancel the request.
|
|
2764
|
+
|
|
2765
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
2766
|
+
operation will not cancel the request in the service. You will still
|
|
2767
|
+
be charged usage for any applicable operations.
|
|
2768
|
+
*/
|
|
2769
|
+
abortSignal?: AbortSignal;
|
|
2770
|
+
pageSize?: number;
|
|
2771
|
+
pageToken?: string;
|
|
2772
|
+
filter?: string;
|
|
2773
|
+
/** Set true to list base models, false to list tuned models. */
|
|
2774
|
+
queryBase?: boolean;
|
|
2775
|
+
}
|
|
2776
|
+
|
|
2777
|
+
export declare interface ListModelsParameters {
|
|
2778
|
+
config?: ListModelsConfig;
|
|
2779
|
+
}
|
|
2780
|
+
|
|
2781
|
+
export declare class ListModelsResponse {
|
|
2782
|
+
nextPageToken?: string;
|
|
2783
|
+
models?: Model[];
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2483
2786
|
/** Configuration for the list tuning jobs method. */
|
|
2484
2787
|
export declare interface ListTuningJobsConfig {
|
|
2485
2788
|
/** Used to override HTTP request options. */
|
|
@@ -2876,7 +3179,7 @@ export declare interface LiveServerGoAway {
|
|
|
2876
3179
|
}
|
|
2877
3180
|
|
|
2878
3181
|
/** Response message for API call. */
|
|
2879
|
-
export declare
|
|
3182
|
+
export declare class LiveServerMessage {
|
|
2880
3183
|
/** Sent in response to a `LiveClientSetup` message from the client. */
|
|
2881
3184
|
setupComplete?: LiveServerSetupComplete;
|
|
2882
3185
|
/** Content generated by the model in response to client messages. */
|
|
@@ -2891,6 +3194,23 @@ export declare interface LiveServerMessage {
|
|
|
2891
3194
|
goAway?: LiveServerGoAway;
|
|
2892
3195
|
/** Update of the session resumption state. */
|
|
2893
3196
|
sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;
|
|
3197
|
+
/**
|
|
3198
|
+
* Returns the concatenation of all text parts from the server content if present.
|
|
3199
|
+
*
|
|
3200
|
+
* @remarks
|
|
3201
|
+
* If there are non-text parts in the response, the concatenation of all text
|
|
3202
|
+
* parts will be returned, and a warning will be logged.
|
|
3203
|
+
*/
|
|
3204
|
+
get text(): string | undefined;
|
|
3205
|
+
/**
|
|
3206
|
+
* Returns the concatenation of all inline data parts from the server content if present.
|
|
3207
|
+
*
|
|
3208
|
+
* @remarks
|
|
3209
|
+
* If there are non-inline data parts in the
|
|
3210
|
+
* response, the concatenation of all inline data parts will be returned, and
|
|
3211
|
+
* a warning will be logged.
|
|
3212
|
+
*/
|
|
3213
|
+
get data(): string | undefined;
|
|
2894
3214
|
}
|
|
2895
3215
|
|
|
2896
3216
|
/** Update of the session resumption state.
|
|
@@ -2910,7 +3230,6 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
2910
3230
|
lastConsumedClientMessageIndex?: string;
|
|
2911
3231
|
}
|
|
2912
3232
|
|
|
2913
|
-
/** Sent in response to a `LiveGenerateContentSetup` message from the client. */
|
|
2914
3233
|
export declare interface LiveServerSetupComplete {
|
|
2915
3234
|
}
|
|
2916
3235
|
|
|
@@ -2978,7 +3297,7 @@ export declare interface MaskReferenceConfig {
|
|
|
2978
3297
|
image. If the user provides a mask image, the mask must be in the same
|
|
2979
3298
|
dimensions as the raw image.
|
|
2980
3299
|
*/
|
|
2981
|
-
export declare
|
|
3300
|
+
export declare class MaskReferenceImage {
|
|
2982
3301
|
/** The reference image for the editing operation. */
|
|
2983
3302
|
referenceImage?: Image_2;
|
|
2984
3303
|
/** The id of the reference image. */
|
|
@@ -2987,6 +3306,8 @@ export declare interface MaskReferenceImage {
|
|
|
2987
3306
|
referenceType?: string;
|
|
2988
3307
|
/** Configuration for the mask reference image. */
|
|
2989
3308
|
config?: MaskReferenceConfig;
|
|
3309
|
+
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
3310
|
+
toReferenceImageAPI(): any;
|
|
2990
3311
|
}
|
|
2991
3312
|
|
|
2992
3313
|
/** Enum representing the mask mode of a mask reference image. */
|
|
@@ -3064,6 +3385,11 @@ export declare interface Model {
|
|
|
3064
3385
|
outputTokenLimit?: number;
|
|
3065
3386
|
/** List of actions that are supported by the model. */
|
|
3066
3387
|
supportedActions?: string[];
|
|
3388
|
+
/** The default checkpoint id of a model version.
|
|
3389
|
+
*/
|
|
3390
|
+
defaultCheckpointId?: string;
|
|
3391
|
+
/** The checkpoints of the model. */
|
|
3392
|
+
checkpoints?: Checkpoint[];
|
|
3067
3393
|
}
|
|
3068
3394
|
|
|
3069
3395
|
export declare class Models extends BaseModule {
|
|
@@ -3153,9 +3479,7 @@ export declare class Models extends BaseModule {
|
|
|
3153
3479
|
/**
|
|
3154
3480
|
* Generates an image based on a text description and configuration.
|
|
3155
3481
|
*
|
|
3156
|
-
* @param
|
|
3157
|
-
* @param prompt - A text description of the image to generate.
|
|
3158
|
-
* @param [config] - The config for image generation.
|
|
3482
|
+
* @param params - The parameters for generating images.
|
|
3159
3483
|
* @return The response from the API.
|
|
3160
3484
|
*
|
|
3161
3485
|
* @example
|
|
@@ -3172,6 +3496,49 @@ export declare class Models extends BaseModule {
|
|
|
3172
3496
|
* ```
|
|
3173
3497
|
*/
|
|
3174
3498
|
generateImages: (params: types.GenerateImagesParameters) => Promise<types.GenerateImagesResponse>;
|
|
3499
|
+
list: (params?: types.ListModelsParameters) => Promise<Pager<types.Model>>;
|
|
3500
|
+
/**
|
|
3501
|
+
* Edits an image based on a prompt, list of reference images, and configuration.
|
|
3502
|
+
*
|
|
3503
|
+
* @param params - The parameters for editing an image.
|
|
3504
|
+
* @return The response from the API.
|
|
3505
|
+
*
|
|
3506
|
+
* @example
|
|
3507
|
+
* ```ts
|
|
3508
|
+
* const response = await client.models.editImage({
|
|
3509
|
+
* model: 'imagen-3.0-capability-001',
|
|
3510
|
+
* prompt: 'Generate an image containing a mug with the product logo [1] visible on the side of the mug.',
|
|
3511
|
+
* referenceImages: [subjectReferenceImage]
|
|
3512
|
+
* config: {
|
|
3513
|
+
* numberOfImages: 1,
|
|
3514
|
+
* includeRaiReason: true,
|
|
3515
|
+
* },
|
|
3516
|
+
* });
|
|
3517
|
+
* console.log(response?.generatedImages?.[0]?.image?.imageBytes);
|
|
3518
|
+
* ```
|
|
3519
|
+
*/
|
|
3520
|
+
editImage: (params: types.EditImageParameters) => Promise<types.EditImageResponse>;
|
|
3521
|
+
/**
|
|
3522
|
+
* Upscales an image based on an image, upscale factor, and configuration.
|
|
3523
|
+
* Only supported in Vertex AI currently.
|
|
3524
|
+
*
|
|
3525
|
+
* @param params - The parameters for upscaling an image.
|
|
3526
|
+
* @return The response from the API.
|
|
3527
|
+
*
|
|
3528
|
+
* @example
|
|
3529
|
+
* ```ts
|
|
3530
|
+
* const response = await client.models.upscaleImage({
|
|
3531
|
+
* model: 'imagen-3.0-generate-002',
|
|
3532
|
+
* image: image,
|
|
3533
|
+
* upscaleFactor: 'x2',
|
|
3534
|
+
* config: {
|
|
3535
|
+
* includeRaiReason: true,
|
|
3536
|
+
* },
|
|
3537
|
+
* });
|
|
3538
|
+
* console.log(response?.generatedImages?.[0]?.image?.imageBytes);
|
|
3539
|
+
* ```
|
|
3540
|
+
*/
|
|
3541
|
+
upscaleImage: (params: types.UpscaleImageParameters) => Promise<types.UpscaleImageResponse>;
|
|
3175
3542
|
private generateContentInternal;
|
|
3176
3543
|
private generateContentStreamInternal;
|
|
3177
3544
|
/**
|
|
@@ -3216,6 +3583,8 @@ export declare class Models extends BaseModule {
|
|
|
3216
3583
|
* ```
|
|
3217
3584
|
*/
|
|
3218
3585
|
private generateImagesInternal;
|
|
3586
|
+
private editImageInternal;
|
|
3587
|
+
private upscaleImageInternal;
|
|
3219
3588
|
/**
|
|
3220
3589
|
* Fetches information about a model by name.
|
|
3221
3590
|
*
|
|
@@ -3225,6 +3594,7 @@ export declare class Models extends BaseModule {
|
|
|
3225
3594
|
* ```
|
|
3226
3595
|
*/
|
|
3227
3596
|
get(params: types.GetModelParameters): Promise<types.Model>;
|
|
3597
|
+
private listInternal;
|
|
3228
3598
|
/**
|
|
3229
3599
|
* Updates a tuned model by its name.
|
|
3230
3600
|
*
|
|
@@ -3508,6 +3878,8 @@ export declare interface Part {
|
|
|
3508
3878
|
videoMetadata?: VideoMetadata;
|
|
3509
3879
|
/** Indicates if the part is thought from the model. */
|
|
3510
3880
|
thought?: boolean;
|
|
3881
|
+
/** Optional. Inlined bytes data. */
|
|
3882
|
+
inlineData?: Blob_2;
|
|
3511
3883
|
/** Optional. Result of executing the [ExecutableCode]. */
|
|
3512
3884
|
codeExecutionResult?: CodeExecutionResult;
|
|
3513
3885
|
/** Optional. Code generated by the model that is meant to be executed. */
|
|
@@ -3518,8 +3890,6 @@ export declare interface Part {
|
|
|
3518
3890
|
functionCall?: FunctionCall;
|
|
3519
3891
|
/** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */
|
|
3520
3892
|
functionResponse?: FunctionResponse;
|
|
3521
|
-
/** Optional. Inlined bytes data. */
|
|
3522
|
-
inlineData?: Blob_2;
|
|
3523
3893
|
/** Optional. Text part (can be code). */
|
|
3524
3894
|
text?: string;
|
|
3525
3895
|
}
|
|
@@ -3606,13 +3976,15 @@ export declare interface RagRetrievalConfigRankingRankService {
|
|
|
3606
3976
|
It can optionally be provided in addition to a mask reference image or
|
|
3607
3977
|
a style reference image.
|
|
3608
3978
|
*/
|
|
3609
|
-
export declare
|
|
3979
|
+
export declare class RawReferenceImage {
|
|
3610
3980
|
/** The reference image for the editing operation. */
|
|
3611
3981
|
referenceImage?: Image_2;
|
|
3612
3982
|
/** The id of the reference image. */
|
|
3613
3983
|
referenceId?: number;
|
|
3614
3984
|
/** The type of the reference image. Only set by the SDK. */
|
|
3615
3985
|
referenceType?: string;
|
|
3986
|
+
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
3987
|
+
toReferenceImageAPI(): any;
|
|
3616
3988
|
}
|
|
3617
3989
|
|
|
3618
3990
|
/** Marks the end of user activity.
|
|
@@ -3629,6 +4001,8 @@ export declare interface RealtimeInputConfig {
|
|
|
3629
4001
|
turnCoverage?: TurnCoverage;
|
|
3630
4002
|
}
|
|
3631
4003
|
|
|
4004
|
+
export declare type ReferenceImage = RawReferenceImage | MaskReferenceImage | ControlReferenceImage | StyleReferenceImage | SubjectReferenceImage;
|
|
4005
|
+
|
|
3632
4006
|
/** Represents a recorded session. */
|
|
3633
4007
|
export declare interface ReplayFile {
|
|
3634
4008
|
replayId?: string;
|
|
@@ -3667,6 +4041,13 @@ export declare interface Retrieval {
|
|
|
3667
4041
|
vertexRagStore?: VertexRagStore;
|
|
3668
4042
|
}
|
|
3669
4043
|
|
|
4044
|
+
/** Retrieval config.
|
|
4045
|
+
*/
|
|
4046
|
+
export declare interface RetrievalConfig {
|
|
4047
|
+
/** Optional. The location of the user. */
|
|
4048
|
+
latLng?: LatLng;
|
|
4049
|
+
}
|
|
4050
|
+
|
|
3670
4051
|
/** Metadata related to retrieval in the grounding flow. */
|
|
3671
4052
|
export declare interface RetrievalMetadata {
|
|
3672
4053
|
/** Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search. */
|
|
@@ -4019,7 +4400,7 @@ export declare interface StyleReferenceConfig {
|
|
|
4019
4400
|
A raw reference image can also be provided as a destination for the style to
|
|
4020
4401
|
be applied to.
|
|
4021
4402
|
*/
|
|
4022
|
-
export declare
|
|
4403
|
+
export declare class StyleReferenceImage {
|
|
4023
4404
|
/** The reference image for the editing operation. */
|
|
4024
4405
|
referenceImage?: Image_2;
|
|
4025
4406
|
/** The id of the reference image. */
|
|
@@ -4028,6 +4409,8 @@ export declare interface StyleReferenceImage {
|
|
|
4028
4409
|
referenceType?: string;
|
|
4029
4410
|
/** Configuration for the style reference image. */
|
|
4030
4411
|
config?: StyleReferenceConfig;
|
|
4412
|
+
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
4413
|
+
toReferenceImageAPI(): any;
|
|
4031
4414
|
}
|
|
4032
4415
|
|
|
4033
4416
|
/** Configuration for a Subject reference image. */
|
|
@@ -4046,7 +4429,7 @@ export declare interface SubjectReferenceConfig {
|
|
|
4046
4429
|
A raw reference image can also be provided as a destination for the subject to
|
|
4047
4430
|
be applied to.
|
|
4048
4431
|
*/
|
|
4049
|
-
export declare
|
|
4432
|
+
export declare class SubjectReferenceImage {
|
|
4050
4433
|
/** The reference image for the editing operation. */
|
|
4051
4434
|
referenceImage?: Image_2;
|
|
4052
4435
|
/** The id of the reference image. */
|
|
@@ -4055,6 +4438,7 @@ export declare interface SubjectReferenceImage {
|
|
|
4055
4438
|
referenceType?: string;
|
|
4056
4439
|
/** Configuration for the subject reference image. */
|
|
4057
4440
|
config?: SubjectReferenceConfig;
|
|
4441
|
+
toReferenceImageAPI(): any;
|
|
4058
4442
|
}
|
|
4059
4443
|
|
|
4060
4444
|
/** Enum representing the subject type of a subject reference image. */
|
|
@@ -4141,6 +4525,8 @@ export declare interface SupervisedTuningSpec {
|
|
|
4141
4525
|
trainingDatasetUri?: string;
|
|
4142
4526
|
/** Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
4143
4527
|
validationDatasetUri?: string;
|
|
4528
|
+
/** Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. */
|
|
4529
|
+
exportLastCheckpointOnly?: boolean;
|
|
4144
4530
|
}
|
|
4145
4531
|
|
|
4146
4532
|
export declare interface TestTableFile {
|
|
@@ -4198,6 +4584,12 @@ export declare interface Tool {
|
|
|
4198
4584
|
googleSearch?: GoogleSearch;
|
|
4199
4585
|
/** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */
|
|
4200
4586
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
4587
|
+
/** Optional. Enterprise web search tool type. Specialized retrieval
|
|
4588
|
+
tool that is powered by Vertex AI Search and Sec4 compliance. */
|
|
4589
|
+
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
4590
|
+
/** Optional. Google Maps tool type. Specialized retrieval tool
|
|
4591
|
+
that is powered by Google Maps. */
|
|
4592
|
+
googleMaps?: GoogleMaps;
|
|
4201
4593
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. This field is only used by the Gemini Developer API services. */
|
|
4202
4594
|
codeExecution?: ToolCodeExecution;
|
|
4203
4595
|
/** Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 128 function declarations can be provided. */
|
|
@@ -4215,6 +4607,8 @@ export declare interface ToolCodeExecution {
|
|
|
4215
4607
|
export declare interface ToolConfig {
|
|
4216
4608
|
/** Optional. Function calling config. */
|
|
4217
4609
|
functionCallingConfig?: FunctionCallingConfig;
|
|
4610
|
+
/** Optional. Retrieval config. */
|
|
4611
|
+
retrievalConfig?: RetrievalConfig;
|
|
4218
4612
|
}
|
|
4219
4613
|
|
|
4220
4614
|
export declare type ToolListUnion = Tool[];
|
|
@@ -4241,6 +4635,27 @@ export declare interface TunedModel {
|
|
|
4241
4635
|
model?: string;
|
|
4242
4636
|
/** Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. */
|
|
4243
4637
|
endpoint?: string;
|
|
4638
|
+
/** The checkpoints associated with this TunedModel.
|
|
4639
|
+
This field is only populated for tuning jobs that enable intermediate
|
|
4640
|
+
checkpoints. */
|
|
4641
|
+
checkpoints?: TunedModelCheckpoint[];
|
|
4642
|
+
}
|
|
4643
|
+
|
|
4644
|
+
/** TunedModelCheckpoint for the Tuned Model of a Tuning Job. */
|
|
4645
|
+
export declare interface TunedModelCheckpoint {
|
|
4646
|
+
/** The ID of the checkpoint.
|
|
4647
|
+
*/
|
|
4648
|
+
checkpointId?: string;
|
|
4649
|
+
/** The epoch of the checkpoint.
|
|
4650
|
+
*/
|
|
4651
|
+
epoch?: string;
|
|
4652
|
+
/** The step of the checkpoint.
|
|
4653
|
+
*/
|
|
4654
|
+
step?: string;
|
|
4655
|
+
/** The Endpoint resource name that the checkpoint is deployed to.
|
|
4656
|
+
Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
|
|
4657
|
+
*/
|
|
4658
|
+
endpoint?: string;
|
|
4244
4659
|
}
|
|
4245
4660
|
|
|
4246
4661
|
/** A tuned machine learning model. */
|
|
@@ -4397,6 +4812,7 @@ declare namespace types {
|
|
|
4397
4812
|
HarmBlockMethod,
|
|
4398
4813
|
HarmBlockThreshold,
|
|
4399
4814
|
Mode,
|
|
4815
|
+
AuthType,
|
|
4400
4816
|
Type,
|
|
4401
4817
|
FinishReason,
|
|
4402
4818
|
HarmProbability,
|
|
@@ -4413,23 +4829,24 @@ declare namespace types {
|
|
|
4413
4829
|
SafetyFilterLevel,
|
|
4414
4830
|
PersonGeneration,
|
|
4415
4831
|
ImagePromptLanguage,
|
|
4416
|
-
FileState,
|
|
4417
|
-
FileSource,
|
|
4418
4832
|
MaskReferenceMode,
|
|
4419
4833
|
ControlReferenceType,
|
|
4420
4834
|
SubjectReferenceType,
|
|
4835
|
+
EditMode,
|
|
4836
|
+
FileState,
|
|
4837
|
+
FileSource,
|
|
4421
4838
|
MediaModality,
|
|
4422
4839
|
StartSensitivity,
|
|
4423
4840
|
EndSensitivity,
|
|
4424
4841
|
ActivityHandling,
|
|
4425
4842
|
TurnCoverage,
|
|
4843
|
+
Blob_2 as Blob,
|
|
4426
4844
|
VideoMetadata,
|
|
4427
4845
|
CodeExecutionResult,
|
|
4428
4846
|
ExecutableCode,
|
|
4429
4847
|
FileData,
|
|
4430
4848
|
FunctionCall,
|
|
4431
4849
|
FunctionResponse,
|
|
4432
|
-
Blob_2 as Blob,
|
|
4433
4850
|
Part,
|
|
4434
4851
|
Content,
|
|
4435
4852
|
HttpOptions,
|
|
@@ -4438,6 +4855,14 @@ declare namespace types {
|
|
|
4438
4855
|
GoogleSearch,
|
|
4439
4856
|
DynamicRetrievalConfig,
|
|
4440
4857
|
GoogleSearchRetrieval,
|
|
4858
|
+
EnterpriseWebSearch,
|
|
4859
|
+
ApiKeyConfig,
|
|
4860
|
+
AuthConfigGoogleServiceAccountConfig,
|
|
4861
|
+
AuthConfigHttpBasicAuthConfig,
|
|
4862
|
+
AuthConfigOauthConfig,
|
|
4863
|
+
AuthConfigOidcConfig,
|
|
4864
|
+
AuthConfig,
|
|
4865
|
+
GoogleMaps,
|
|
4441
4866
|
VertexAISearch,
|
|
4442
4867
|
VertexRagStoreRagResource,
|
|
4443
4868
|
RagRetrievalConfigFilter,
|
|
@@ -4453,6 +4878,8 @@ declare namespace types {
|
|
|
4453
4878
|
FunctionDeclaration,
|
|
4454
4879
|
Tool,
|
|
4455
4880
|
FunctionCallingConfig,
|
|
4881
|
+
LatLng,
|
|
4882
|
+
RetrievalConfig,
|
|
4456
4883
|
ToolConfig,
|
|
4457
4884
|
PrebuiltVoiceConfig,
|
|
4458
4885
|
VoiceConfig,
|
|
@@ -4483,6 +4910,8 @@ declare namespace types {
|
|
|
4483
4910
|
ModalityTokenCount,
|
|
4484
4911
|
GenerateContentResponseUsageMetadata,
|
|
4485
4912
|
GenerateContentResponse,
|
|
4913
|
+
ReferenceImage,
|
|
4914
|
+
EditImageParameters,
|
|
4486
4915
|
EmbedContentConfig,
|
|
4487
4916
|
EmbedContentParameters,
|
|
4488
4917
|
ContentEmbeddingStatistics,
|
|
@@ -4495,11 +4924,22 @@ declare namespace types {
|
|
|
4495
4924
|
SafetyAttributes,
|
|
4496
4925
|
GeneratedImage,
|
|
4497
4926
|
GenerateImagesResponse,
|
|
4927
|
+
MaskReferenceConfig,
|
|
4928
|
+
ControlReferenceConfig,
|
|
4929
|
+
StyleReferenceConfig,
|
|
4930
|
+
SubjectReferenceConfig,
|
|
4931
|
+
EditImageConfig,
|
|
4932
|
+
EditImageResponse,
|
|
4933
|
+
UpscaleImageResponse,
|
|
4498
4934
|
GetModelConfig,
|
|
4499
4935
|
GetModelParameters,
|
|
4500
4936
|
Endpoint,
|
|
4501
4937
|
TunedModelInfo,
|
|
4938
|
+
Checkpoint,
|
|
4502
4939
|
Model,
|
|
4940
|
+
ListModelsConfig,
|
|
4941
|
+
ListModelsParameters,
|
|
4942
|
+
ListModelsResponse,
|
|
4503
4943
|
UpdateModelConfig,
|
|
4504
4944
|
UpdateModelParameters,
|
|
4505
4945
|
DeleteModelConfig,
|
|
@@ -4521,6 +4961,7 @@ declare namespace types {
|
|
|
4521
4961
|
GenerateVideosOperation,
|
|
4522
4962
|
GetTuningJobConfig,
|
|
4523
4963
|
GetTuningJobParameters,
|
|
4964
|
+
TunedModelCheckpoint,
|
|
4524
4965
|
TunedModel,
|
|
4525
4966
|
GoogleRpcStatus,
|
|
4526
4967
|
SupervisedHyperParameters,
|
|
@@ -4589,16 +5030,13 @@ declare namespace types {
|
|
|
4589
5030
|
ReplayFile,
|
|
4590
5031
|
UploadFileConfig,
|
|
4591
5032
|
DownloadFileConfig,
|
|
5033
|
+
DownloadFileParameters,
|
|
4592
5034
|
UpscaleImageConfig,
|
|
4593
5035
|
UpscaleImageParameters,
|
|
4594
5036
|
RawReferenceImage,
|
|
4595
|
-
MaskReferenceConfig,
|
|
4596
5037
|
MaskReferenceImage,
|
|
4597
|
-
ControlReferenceConfig,
|
|
4598
5038
|
ControlReferenceImage,
|
|
4599
|
-
StyleReferenceConfig,
|
|
4600
5039
|
StyleReferenceImage,
|
|
4601
|
-
SubjectReferenceConfig,
|
|
4602
5040
|
SubjectReferenceImage,
|
|
4603
5041
|
LiveServerSetupComplete,
|
|
4604
5042
|
Transcription,
|
|
@@ -4620,6 +5058,7 @@ declare namespace types {
|
|
|
4620
5058
|
ActivityStart,
|
|
4621
5059
|
ActivityEnd,
|
|
4622
5060
|
LiveClientRealtimeInput,
|
|
5061
|
+
LiveSendRealtimeInputParameters,
|
|
4623
5062
|
LiveClientToolResponse,
|
|
4624
5063
|
LiveClientMessage,
|
|
4625
5064
|
LiveConnectConfig,
|
|
@@ -4627,7 +5066,6 @@ declare namespace types {
|
|
|
4627
5066
|
CreateChatParameters,
|
|
4628
5067
|
SendMessageParameters,
|
|
4629
5068
|
LiveSendClientContentParameters,
|
|
4630
|
-
LiveSendRealtimeInputParameters,
|
|
4631
5069
|
LiveSendToolResponseParameters,
|
|
4632
5070
|
OperationGetParameters,
|
|
4633
5071
|
BlobImageUnion,
|
|
@@ -4637,7 +5075,8 @@ declare namespace types {
|
|
|
4637
5075
|
ContentListUnion,
|
|
4638
5076
|
SchemaUnion,
|
|
4639
5077
|
SpeechConfigUnion,
|
|
4640
|
-
ToolListUnion
|
|
5078
|
+
ToolListUnion,
|
|
5079
|
+
DownloadableFileUnion
|
|
4641
5080
|
}
|
|
4642
5081
|
}
|
|
4643
5082
|
|
|
@@ -4680,6 +5119,7 @@ export declare interface UpdateModelConfig {
|
|
|
4680
5119
|
abortSignal?: AbortSignal;
|
|
4681
5120
|
displayName?: string;
|
|
4682
5121
|
description?: string;
|
|
5122
|
+
defaultCheckpointId?: string;
|
|
4683
5123
|
}
|
|
4684
5124
|
|
|
4685
5125
|
/** Configuration for updating a tuned model. */
|
|
@@ -4776,6 +5216,11 @@ export declare interface UpscaleImageParameters {
|
|
|
4776
5216
|
config?: UpscaleImageConfig;
|
|
4777
5217
|
}
|
|
4778
5218
|
|
|
5219
|
+
export declare class UpscaleImageResponse {
|
|
5220
|
+
/** Generated images. */
|
|
5221
|
+
generatedImages?: GeneratedImage[];
|
|
5222
|
+
}
|
|
5223
|
+
|
|
4779
5224
|
/** Usage metadata about response(s). */
|
|
4780
5225
|
export declare interface UsageMetadata {
|
|
4781
5226
|
/** Number of tokens in the prompt. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */
|