@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/web/web.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.
|
|
@@ -2179,6 +2436,12 @@ export declare interface GoogleGenAIOptions {
|
|
|
2179
2436
|
httpOptions?: HttpOptions;
|
|
2180
2437
|
}
|
|
2181
2438
|
|
|
2439
|
+
/** Tool to support Google Maps in Model. */
|
|
2440
|
+
export declare interface GoogleMaps {
|
|
2441
|
+
/** Optional. Auth config for the Google Maps tool. */
|
|
2442
|
+
authConfig?: AuthConfig;
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2182
2445
|
/** 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). */
|
|
2183
2446
|
export declare interface GoogleRpcStatus {
|
|
2184
2447
|
/** The status code, which should be an enum value of google.rpc.Code. */
|
|
@@ -2427,6 +2690,20 @@ export declare enum Language {
|
|
|
2427
2690
|
PYTHON = "PYTHON"
|
|
2428
2691
|
}
|
|
2429
2692
|
|
|
2693
|
+
/** An object that represents a latitude/longitude pair.
|
|
2694
|
+
|
|
2695
|
+
This is expressed as a pair of doubles to represent degrees latitude and
|
|
2696
|
+
degrees longitude. Unless specified otherwise, this object must conform to the
|
|
2697
|
+
<a href="https://en.wikipedia.org/wiki/World_Geodetic_System#1984_version">
|
|
2698
|
+
WGS84 standard</a>. Values must be within normalized ranges.
|
|
2699
|
+
*/
|
|
2700
|
+
export declare interface LatLng {
|
|
2701
|
+
/** The latitude in degrees. It must be in the range [-90.0, +90.0]. */
|
|
2702
|
+
latitude?: number;
|
|
2703
|
+
/** The longitude in degrees. It must be in the range [-180.0, +180.0] */
|
|
2704
|
+
longitude?: number;
|
|
2705
|
+
}
|
|
2706
|
+
|
|
2430
2707
|
/** Config for caches.list method. */
|
|
2431
2708
|
export declare interface ListCachedContentsConfig {
|
|
2432
2709
|
/** Used to override HTTP request options. */
|
|
@@ -2485,6 +2762,32 @@ export declare class ListFilesResponse {
|
|
|
2485
2762
|
files?: File_2[];
|
|
2486
2763
|
}
|
|
2487
2764
|
|
|
2765
|
+
export declare interface ListModelsConfig {
|
|
2766
|
+
/** Used to override HTTP request options. */
|
|
2767
|
+
httpOptions?: HttpOptions;
|
|
2768
|
+
/** Abort signal which can be used to cancel the request.
|
|
2769
|
+
|
|
2770
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
2771
|
+
operation will not cancel the request in the service. You will still
|
|
2772
|
+
be charged usage for any applicable operations.
|
|
2773
|
+
*/
|
|
2774
|
+
abortSignal?: AbortSignal;
|
|
2775
|
+
pageSize?: number;
|
|
2776
|
+
pageToken?: string;
|
|
2777
|
+
filter?: string;
|
|
2778
|
+
/** Set true to list base models, false to list tuned models. */
|
|
2779
|
+
queryBase?: boolean;
|
|
2780
|
+
}
|
|
2781
|
+
|
|
2782
|
+
export declare interface ListModelsParameters {
|
|
2783
|
+
config?: ListModelsConfig;
|
|
2784
|
+
}
|
|
2785
|
+
|
|
2786
|
+
export declare class ListModelsResponse {
|
|
2787
|
+
nextPageToken?: string;
|
|
2788
|
+
models?: Model[];
|
|
2789
|
+
}
|
|
2790
|
+
|
|
2488
2791
|
/** Configuration for the list tuning jobs method. */
|
|
2489
2792
|
export declare interface ListTuningJobsConfig {
|
|
2490
2793
|
/** Used to override HTTP request options. */
|
|
@@ -2881,7 +3184,7 @@ export declare interface LiveServerGoAway {
|
|
|
2881
3184
|
}
|
|
2882
3185
|
|
|
2883
3186
|
/** Response message for API call. */
|
|
2884
|
-
export declare
|
|
3187
|
+
export declare class LiveServerMessage {
|
|
2885
3188
|
/** Sent in response to a `LiveClientSetup` message from the client. */
|
|
2886
3189
|
setupComplete?: LiveServerSetupComplete;
|
|
2887
3190
|
/** Content generated by the model in response to client messages. */
|
|
@@ -2896,6 +3199,23 @@ export declare interface LiveServerMessage {
|
|
|
2896
3199
|
goAway?: LiveServerGoAway;
|
|
2897
3200
|
/** Update of the session resumption state. */
|
|
2898
3201
|
sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;
|
|
3202
|
+
/**
|
|
3203
|
+
* Returns the concatenation of all text parts from the server content if present.
|
|
3204
|
+
*
|
|
3205
|
+
* @remarks
|
|
3206
|
+
* If there are non-text parts in the response, the concatenation of all text
|
|
3207
|
+
* parts will be returned, and a warning will be logged.
|
|
3208
|
+
*/
|
|
3209
|
+
get text(): string | undefined;
|
|
3210
|
+
/**
|
|
3211
|
+
* Returns the concatenation of all inline data parts from the server content if present.
|
|
3212
|
+
*
|
|
3213
|
+
* @remarks
|
|
3214
|
+
* If there are non-inline data parts in the
|
|
3215
|
+
* response, the concatenation of all inline data parts will be returned, and
|
|
3216
|
+
* a warning will be logged.
|
|
3217
|
+
*/
|
|
3218
|
+
get data(): string | undefined;
|
|
2899
3219
|
}
|
|
2900
3220
|
|
|
2901
3221
|
/** Update of the session resumption state.
|
|
@@ -2915,7 +3235,6 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
2915
3235
|
lastConsumedClientMessageIndex?: string;
|
|
2916
3236
|
}
|
|
2917
3237
|
|
|
2918
|
-
/** Sent in response to a `LiveGenerateContentSetup` message from the client. */
|
|
2919
3238
|
export declare interface LiveServerSetupComplete {
|
|
2920
3239
|
}
|
|
2921
3240
|
|
|
@@ -2983,7 +3302,7 @@ export declare interface MaskReferenceConfig {
|
|
|
2983
3302
|
image. If the user provides a mask image, the mask must be in the same
|
|
2984
3303
|
dimensions as the raw image.
|
|
2985
3304
|
*/
|
|
2986
|
-
export declare
|
|
3305
|
+
export declare class MaskReferenceImage {
|
|
2987
3306
|
/** The reference image for the editing operation. */
|
|
2988
3307
|
referenceImage?: Image_2;
|
|
2989
3308
|
/** The id of the reference image. */
|
|
@@ -2992,6 +3311,8 @@ export declare interface MaskReferenceImage {
|
|
|
2992
3311
|
referenceType?: string;
|
|
2993
3312
|
/** Configuration for the mask reference image. */
|
|
2994
3313
|
config?: MaskReferenceConfig;
|
|
3314
|
+
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
3315
|
+
toReferenceImageAPI(): any;
|
|
2995
3316
|
}
|
|
2996
3317
|
|
|
2997
3318
|
/** Enum representing the mask mode of a mask reference image. */
|
|
@@ -3069,6 +3390,11 @@ export declare interface Model {
|
|
|
3069
3390
|
outputTokenLimit?: number;
|
|
3070
3391
|
/** List of actions that are supported by the model. */
|
|
3071
3392
|
supportedActions?: string[];
|
|
3393
|
+
/** The default checkpoint id of a model version.
|
|
3394
|
+
*/
|
|
3395
|
+
defaultCheckpointId?: string;
|
|
3396
|
+
/** The checkpoints of the model. */
|
|
3397
|
+
checkpoints?: Checkpoint[];
|
|
3072
3398
|
}
|
|
3073
3399
|
|
|
3074
3400
|
export declare class Models extends BaseModule {
|
|
@@ -3158,9 +3484,7 @@ export declare class Models extends BaseModule {
|
|
|
3158
3484
|
/**
|
|
3159
3485
|
* Generates an image based on a text description and configuration.
|
|
3160
3486
|
*
|
|
3161
|
-
* @param
|
|
3162
|
-
* @param prompt - A text description of the image to generate.
|
|
3163
|
-
* @param [config] - The config for image generation.
|
|
3487
|
+
* @param params - The parameters for generating images.
|
|
3164
3488
|
* @return The response from the API.
|
|
3165
3489
|
*
|
|
3166
3490
|
* @example
|
|
@@ -3177,6 +3501,49 @@ export declare class Models extends BaseModule {
|
|
|
3177
3501
|
* ```
|
|
3178
3502
|
*/
|
|
3179
3503
|
generateImages: (params: types.GenerateImagesParameters) => Promise<types.GenerateImagesResponse>;
|
|
3504
|
+
list: (params?: types.ListModelsParameters) => Promise<Pager<types.Model>>;
|
|
3505
|
+
/**
|
|
3506
|
+
* Edits an image based on a prompt, list of reference images, and configuration.
|
|
3507
|
+
*
|
|
3508
|
+
* @param params - The parameters for editing an image.
|
|
3509
|
+
* @return The response from the API.
|
|
3510
|
+
*
|
|
3511
|
+
* @example
|
|
3512
|
+
* ```ts
|
|
3513
|
+
* const response = await client.models.editImage({
|
|
3514
|
+
* model: 'imagen-3.0-capability-001',
|
|
3515
|
+
* prompt: 'Generate an image containing a mug with the product logo [1] visible on the side of the mug.',
|
|
3516
|
+
* referenceImages: [subjectReferenceImage]
|
|
3517
|
+
* config: {
|
|
3518
|
+
* numberOfImages: 1,
|
|
3519
|
+
* includeRaiReason: true,
|
|
3520
|
+
* },
|
|
3521
|
+
* });
|
|
3522
|
+
* console.log(response?.generatedImages?.[0]?.image?.imageBytes);
|
|
3523
|
+
* ```
|
|
3524
|
+
*/
|
|
3525
|
+
editImage: (params: types.EditImageParameters) => Promise<types.EditImageResponse>;
|
|
3526
|
+
/**
|
|
3527
|
+
* Upscales an image based on an image, upscale factor, and configuration.
|
|
3528
|
+
* Only supported in Vertex AI currently.
|
|
3529
|
+
*
|
|
3530
|
+
* @param params - The parameters for upscaling an image.
|
|
3531
|
+
* @return The response from the API.
|
|
3532
|
+
*
|
|
3533
|
+
* @example
|
|
3534
|
+
* ```ts
|
|
3535
|
+
* const response = await client.models.upscaleImage({
|
|
3536
|
+
* model: 'imagen-3.0-generate-002',
|
|
3537
|
+
* image: image,
|
|
3538
|
+
* upscaleFactor: 'x2',
|
|
3539
|
+
* config: {
|
|
3540
|
+
* includeRaiReason: true,
|
|
3541
|
+
* },
|
|
3542
|
+
* });
|
|
3543
|
+
* console.log(response?.generatedImages?.[0]?.image?.imageBytes);
|
|
3544
|
+
* ```
|
|
3545
|
+
*/
|
|
3546
|
+
upscaleImage: (params: types.UpscaleImageParameters) => Promise<types.UpscaleImageResponse>;
|
|
3180
3547
|
private generateContentInternal;
|
|
3181
3548
|
private generateContentStreamInternal;
|
|
3182
3549
|
/**
|
|
@@ -3221,6 +3588,8 @@ export declare class Models extends BaseModule {
|
|
|
3221
3588
|
* ```
|
|
3222
3589
|
*/
|
|
3223
3590
|
private generateImagesInternal;
|
|
3591
|
+
private editImageInternal;
|
|
3592
|
+
private upscaleImageInternal;
|
|
3224
3593
|
/**
|
|
3225
3594
|
* Fetches information about a model by name.
|
|
3226
3595
|
*
|
|
@@ -3230,6 +3599,7 @@ export declare class Models extends BaseModule {
|
|
|
3230
3599
|
* ```
|
|
3231
3600
|
*/
|
|
3232
3601
|
get(params: types.GetModelParameters): Promise<types.Model>;
|
|
3602
|
+
private listInternal;
|
|
3233
3603
|
/**
|
|
3234
3604
|
* Updates a tuned model by its name.
|
|
3235
3605
|
*
|
|
@@ -3513,6 +3883,8 @@ export declare interface Part {
|
|
|
3513
3883
|
videoMetadata?: VideoMetadata;
|
|
3514
3884
|
/** Indicates if the part is thought from the model. */
|
|
3515
3885
|
thought?: boolean;
|
|
3886
|
+
/** Optional. Inlined bytes data. */
|
|
3887
|
+
inlineData?: Blob_2;
|
|
3516
3888
|
/** Optional. Result of executing the [ExecutableCode]. */
|
|
3517
3889
|
codeExecutionResult?: CodeExecutionResult;
|
|
3518
3890
|
/** Optional. Code generated by the model that is meant to be executed. */
|
|
@@ -3523,8 +3895,6 @@ export declare interface Part {
|
|
|
3523
3895
|
functionCall?: FunctionCall;
|
|
3524
3896
|
/** 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. */
|
|
3525
3897
|
functionResponse?: FunctionResponse;
|
|
3526
|
-
/** Optional. Inlined bytes data. */
|
|
3527
|
-
inlineData?: Blob_2;
|
|
3528
3898
|
/** Optional. Text part (can be code). */
|
|
3529
3899
|
text?: string;
|
|
3530
3900
|
}
|
|
@@ -3611,13 +3981,15 @@ export declare interface RagRetrievalConfigRankingRankService {
|
|
|
3611
3981
|
It can optionally be provided in addition to a mask reference image or
|
|
3612
3982
|
a style reference image.
|
|
3613
3983
|
*/
|
|
3614
|
-
export declare
|
|
3984
|
+
export declare class RawReferenceImage {
|
|
3615
3985
|
/** The reference image for the editing operation. */
|
|
3616
3986
|
referenceImage?: Image_2;
|
|
3617
3987
|
/** The id of the reference image. */
|
|
3618
3988
|
referenceId?: number;
|
|
3619
3989
|
/** The type of the reference image. Only set by the SDK. */
|
|
3620
3990
|
referenceType?: string;
|
|
3991
|
+
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
3992
|
+
toReferenceImageAPI(): any;
|
|
3621
3993
|
}
|
|
3622
3994
|
|
|
3623
3995
|
/** Marks the end of user activity.
|
|
@@ -3634,6 +4006,8 @@ export declare interface RealtimeInputConfig {
|
|
|
3634
4006
|
turnCoverage?: TurnCoverage;
|
|
3635
4007
|
}
|
|
3636
4008
|
|
|
4009
|
+
export declare type ReferenceImage = RawReferenceImage | MaskReferenceImage | ControlReferenceImage | StyleReferenceImage | SubjectReferenceImage;
|
|
4010
|
+
|
|
3637
4011
|
/** Represents a recorded session. */
|
|
3638
4012
|
export declare interface ReplayFile {
|
|
3639
4013
|
replayId?: string;
|
|
@@ -3672,6 +4046,13 @@ export declare interface Retrieval {
|
|
|
3672
4046
|
vertexRagStore?: VertexRagStore;
|
|
3673
4047
|
}
|
|
3674
4048
|
|
|
4049
|
+
/** Retrieval config.
|
|
4050
|
+
*/
|
|
4051
|
+
export declare interface RetrievalConfig {
|
|
4052
|
+
/** Optional. The location of the user. */
|
|
4053
|
+
latLng?: LatLng;
|
|
4054
|
+
}
|
|
4055
|
+
|
|
3675
4056
|
/** Metadata related to retrieval in the grounding flow. */
|
|
3676
4057
|
export declare interface RetrievalMetadata {
|
|
3677
4058
|
/** 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. */
|
|
@@ -4024,7 +4405,7 @@ export declare interface StyleReferenceConfig {
|
|
|
4024
4405
|
A raw reference image can also be provided as a destination for the style to
|
|
4025
4406
|
be applied to.
|
|
4026
4407
|
*/
|
|
4027
|
-
export declare
|
|
4408
|
+
export declare class StyleReferenceImage {
|
|
4028
4409
|
/** The reference image for the editing operation. */
|
|
4029
4410
|
referenceImage?: Image_2;
|
|
4030
4411
|
/** The id of the reference image. */
|
|
@@ -4033,6 +4414,8 @@ export declare interface StyleReferenceImage {
|
|
|
4033
4414
|
referenceType?: string;
|
|
4034
4415
|
/** Configuration for the style reference image. */
|
|
4035
4416
|
config?: StyleReferenceConfig;
|
|
4417
|
+
/** Internal method to convert to ReferenceImageAPIInternal. */
|
|
4418
|
+
toReferenceImageAPI(): any;
|
|
4036
4419
|
}
|
|
4037
4420
|
|
|
4038
4421
|
/** Configuration for a Subject reference image. */
|
|
@@ -4051,7 +4434,7 @@ export declare interface SubjectReferenceConfig {
|
|
|
4051
4434
|
A raw reference image can also be provided as a destination for the subject to
|
|
4052
4435
|
be applied to.
|
|
4053
4436
|
*/
|
|
4054
|
-
export declare
|
|
4437
|
+
export declare class SubjectReferenceImage {
|
|
4055
4438
|
/** The reference image for the editing operation. */
|
|
4056
4439
|
referenceImage?: Image_2;
|
|
4057
4440
|
/** The id of the reference image. */
|
|
@@ -4060,6 +4443,7 @@ export declare interface SubjectReferenceImage {
|
|
|
4060
4443
|
referenceType?: string;
|
|
4061
4444
|
/** Configuration for the subject reference image. */
|
|
4062
4445
|
config?: SubjectReferenceConfig;
|
|
4446
|
+
toReferenceImageAPI(): any;
|
|
4063
4447
|
}
|
|
4064
4448
|
|
|
4065
4449
|
/** Enum representing the subject type of a subject reference image. */
|
|
@@ -4146,6 +4530,8 @@ export declare interface SupervisedTuningSpec {
|
|
|
4146
4530
|
trainingDatasetUri?: string;
|
|
4147
4531
|
/** Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
4148
4532
|
validationDatasetUri?: string;
|
|
4533
|
+
/** Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. */
|
|
4534
|
+
exportLastCheckpointOnly?: boolean;
|
|
4149
4535
|
}
|
|
4150
4536
|
|
|
4151
4537
|
export declare interface TestTableFile {
|
|
@@ -4203,6 +4589,12 @@ export declare interface Tool {
|
|
|
4203
4589
|
googleSearch?: GoogleSearch;
|
|
4204
4590
|
/** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */
|
|
4205
4591
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
4592
|
+
/** Optional. Enterprise web search tool type. Specialized retrieval
|
|
4593
|
+
tool that is powered by Vertex AI Search and Sec4 compliance. */
|
|
4594
|
+
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
4595
|
+
/** Optional. Google Maps tool type. Specialized retrieval tool
|
|
4596
|
+
that is powered by Google Maps. */
|
|
4597
|
+
googleMaps?: GoogleMaps;
|
|
4206
4598
|
/** 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. */
|
|
4207
4599
|
codeExecution?: ToolCodeExecution;
|
|
4208
4600
|
/** 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. */
|
|
@@ -4220,6 +4612,8 @@ export declare interface ToolCodeExecution {
|
|
|
4220
4612
|
export declare interface ToolConfig {
|
|
4221
4613
|
/** Optional. Function calling config. */
|
|
4222
4614
|
functionCallingConfig?: FunctionCallingConfig;
|
|
4615
|
+
/** Optional. Retrieval config. */
|
|
4616
|
+
retrievalConfig?: RetrievalConfig;
|
|
4223
4617
|
}
|
|
4224
4618
|
|
|
4225
4619
|
export declare type ToolListUnion = Tool[];
|
|
@@ -4246,6 +4640,27 @@ export declare interface TunedModel {
|
|
|
4246
4640
|
model?: string;
|
|
4247
4641
|
/** Output only. A resource name of an Endpoint. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`. */
|
|
4248
4642
|
endpoint?: string;
|
|
4643
|
+
/** The checkpoints associated with this TunedModel.
|
|
4644
|
+
This field is only populated for tuning jobs that enable intermediate
|
|
4645
|
+
checkpoints. */
|
|
4646
|
+
checkpoints?: TunedModelCheckpoint[];
|
|
4647
|
+
}
|
|
4648
|
+
|
|
4649
|
+
/** TunedModelCheckpoint for the Tuned Model of a Tuning Job. */
|
|
4650
|
+
export declare interface TunedModelCheckpoint {
|
|
4651
|
+
/** The ID of the checkpoint.
|
|
4652
|
+
*/
|
|
4653
|
+
checkpointId?: string;
|
|
4654
|
+
/** The epoch of the checkpoint.
|
|
4655
|
+
*/
|
|
4656
|
+
epoch?: string;
|
|
4657
|
+
/** The step of the checkpoint.
|
|
4658
|
+
*/
|
|
4659
|
+
step?: string;
|
|
4660
|
+
/** The Endpoint resource name that the checkpoint is deployed to.
|
|
4661
|
+
Format: `projects/{project}/locations/{location}/endpoints/{endpoint}`.
|
|
4662
|
+
*/
|
|
4663
|
+
endpoint?: string;
|
|
4249
4664
|
}
|
|
4250
4665
|
|
|
4251
4666
|
/** A tuned machine learning model. */
|
|
@@ -4402,6 +4817,7 @@ declare namespace types {
|
|
|
4402
4817
|
HarmBlockMethod,
|
|
4403
4818
|
HarmBlockThreshold,
|
|
4404
4819
|
Mode,
|
|
4820
|
+
AuthType,
|
|
4405
4821
|
Type,
|
|
4406
4822
|
FinishReason,
|
|
4407
4823
|
HarmProbability,
|
|
@@ -4418,23 +4834,24 @@ declare namespace types {
|
|
|
4418
4834
|
SafetyFilterLevel,
|
|
4419
4835
|
PersonGeneration,
|
|
4420
4836
|
ImagePromptLanguage,
|
|
4421
|
-
FileState,
|
|
4422
|
-
FileSource,
|
|
4423
4837
|
MaskReferenceMode,
|
|
4424
4838
|
ControlReferenceType,
|
|
4425
4839
|
SubjectReferenceType,
|
|
4840
|
+
EditMode,
|
|
4841
|
+
FileState,
|
|
4842
|
+
FileSource,
|
|
4426
4843
|
MediaModality,
|
|
4427
4844
|
StartSensitivity,
|
|
4428
4845
|
EndSensitivity,
|
|
4429
4846
|
ActivityHandling,
|
|
4430
4847
|
TurnCoverage,
|
|
4848
|
+
Blob_2 as Blob,
|
|
4431
4849
|
VideoMetadata,
|
|
4432
4850
|
CodeExecutionResult,
|
|
4433
4851
|
ExecutableCode,
|
|
4434
4852
|
FileData,
|
|
4435
4853
|
FunctionCall,
|
|
4436
4854
|
FunctionResponse,
|
|
4437
|
-
Blob_2 as Blob,
|
|
4438
4855
|
Part,
|
|
4439
4856
|
Content,
|
|
4440
4857
|
HttpOptions,
|
|
@@ -4443,6 +4860,14 @@ declare namespace types {
|
|
|
4443
4860
|
GoogleSearch,
|
|
4444
4861
|
DynamicRetrievalConfig,
|
|
4445
4862
|
GoogleSearchRetrieval,
|
|
4863
|
+
EnterpriseWebSearch,
|
|
4864
|
+
ApiKeyConfig,
|
|
4865
|
+
AuthConfigGoogleServiceAccountConfig,
|
|
4866
|
+
AuthConfigHttpBasicAuthConfig,
|
|
4867
|
+
AuthConfigOauthConfig,
|
|
4868
|
+
AuthConfigOidcConfig,
|
|
4869
|
+
AuthConfig,
|
|
4870
|
+
GoogleMaps,
|
|
4446
4871
|
VertexAISearch,
|
|
4447
4872
|
VertexRagStoreRagResource,
|
|
4448
4873
|
RagRetrievalConfigFilter,
|
|
@@ -4458,6 +4883,8 @@ declare namespace types {
|
|
|
4458
4883
|
FunctionDeclaration,
|
|
4459
4884
|
Tool,
|
|
4460
4885
|
FunctionCallingConfig,
|
|
4886
|
+
LatLng,
|
|
4887
|
+
RetrievalConfig,
|
|
4461
4888
|
ToolConfig,
|
|
4462
4889
|
PrebuiltVoiceConfig,
|
|
4463
4890
|
VoiceConfig,
|
|
@@ -4488,6 +4915,8 @@ declare namespace types {
|
|
|
4488
4915
|
ModalityTokenCount,
|
|
4489
4916
|
GenerateContentResponseUsageMetadata,
|
|
4490
4917
|
GenerateContentResponse,
|
|
4918
|
+
ReferenceImage,
|
|
4919
|
+
EditImageParameters,
|
|
4491
4920
|
EmbedContentConfig,
|
|
4492
4921
|
EmbedContentParameters,
|
|
4493
4922
|
ContentEmbeddingStatistics,
|
|
@@ -4500,11 +4929,22 @@ declare namespace types {
|
|
|
4500
4929
|
SafetyAttributes,
|
|
4501
4930
|
GeneratedImage,
|
|
4502
4931
|
GenerateImagesResponse,
|
|
4932
|
+
MaskReferenceConfig,
|
|
4933
|
+
ControlReferenceConfig,
|
|
4934
|
+
StyleReferenceConfig,
|
|
4935
|
+
SubjectReferenceConfig,
|
|
4936
|
+
EditImageConfig,
|
|
4937
|
+
EditImageResponse,
|
|
4938
|
+
UpscaleImageResponse,
|
|
4503
4939
|
GetModelConfig,
|
|
4504
4940
|
GetModelParameters,
|
|
4505
4941
|
Endpoint,
|
|
4506
4942
|
TunedModelInfo,
|
|
4943
|
+
Checkpoint,
|
|
4507
4944
|
Model,
|
|
4945
|
+
ListModelsConfig,
|
|
4946
|
+
ListModelsParameters,
|
|
4947
|
+
ListModelsResponse,
|
|
4508
4948
|
UpdateModelConfig,
|
|
4509
4949
|
UpdateModelParameters,
|
|
4510
4950
|
DeleteModelConfig,
|
|
@@ -4526,6 +4966,7 @@ declare namespace types {
|
|
|
4526
4966
|
GenerateVideosOperation,
|
|
4527
4967
|
GetTuningJobConfig,
|
|
4528
4968
|
GetTuningJobParameters,
|
|
4969
|
+
TunedModelCheckpoint,
|
|
4529
4970
|
TunedModel,
|
|
4530
4971
|
GoogleRpcStatus,
|
|
4531
4972
|
SupervisedHyperParameters,
|
|
@@ -4594,16 +5035,13 @@ declare namespace types {
|
|
|
4594
5035
|
ReplayFile,
|
|
4595
5036
|
UploadFileConfig,
|
|
4596
5037
|
DownloadFileConfig,
|
|
5038
|
+
DownloadFileParameters,
|
|
4597
5039
|
UpscaleImageConfig,
|
|
4598
5040
|
UpscaleImageParameters,
|
|
4599
5041
|
RawReferenceImage,
|
|
4600
|
-
MaskReferenceConfig,
|
|
4601
5042
|
MaskReferenceImage,
|
|
4602
|
-
ControlReferenceConfig,
|
|
4603
5043
|
ControlReferenceImage,
|
|
4604
|
-
StyleReferenceConfig,
|
|
4605
5044
|
StyleReferenceImage,
|
|
4606
|
-
SubjectReferenceConfig,
|
|
4607
5045
|
SubjectReferenceImage,
|
|
4608
5046
|
LiveServerSetupComplete,
|
|
4609
5047
|
Transcription,
|
|
@@ -4625,6 +5063,7 @@ declare namespace types {
|
|
|
4625
5063
|
ActivityStart,
|
|
4626
5064
|
ActivityEnd,
|
|
4627
5065
|
LiveClientRealtimeInput,
|
|
5066
|
+
LiveSendRealtimeInputParameters,
|
|
4628
5067
|
LiveClientToolResponse,
|
|
4629
5068
|
LiveClientMessage,
|
|
4630
5069
|
LiveConnectConfig,
|
|
@@ -4632,7 +5071,6 @@ declare namespace types {
|
|
|
4632
5071
|
CreateChatParameters,
|
|
4633
5072
|
SendMessageParameters,
|
|
4634
5073
|
LiveSendClientContentParameters,
|
|
4635
|
-
LiveSendRealtimeInputParameters,
|
|
4636
5074
|
LiveSendToolResponseParameters,
|
|
4637
5075
|
OperationGetParameters,
|
|
4638
5076
|
BlobImageUnion,
|
|
@@ -4642,7 +5080,8 @@ declare namespace types {
|
|
|
4642
5080
|
ContentListUnion,
|
|
4643
5081
|
SchemaUnion,
|
|
4644
5082
|
SpeechConfigUnion,
|
|
4645
|
-
ToolListUnion
|
|
5083
|
+
ToolListUnion,
|
|
5084
|
+
DownloadableFileUnion
|
|
4646
5085
|
}
|
|
4647
5086
|
}
|
|
4648
5087
|
|
|
@@ -4685,6 +5124,7 @@ export declare interface UpdateModelConfig {
|
|
|
4685
5124
|
abortSignal?: AbortSignal;
|
|
4686
5125
|
displayName?: string;
|
|
4687
5126
|
description?: string;
|
|
5127
|
+
defaultCheckpointId?: string;
|
|
4688
5128
|
}
|
|
4689
5129
|
|
|
4690
5130
|
/** Configuration for updating a tuned model. */
|
|
@@ -4781,6 +5221,11 @@ export declare interface UpscaleImageParameters {
|
|
|
4781
5221
|
config?: UpscaleImageConfig;
|
|
4782
5222
|
}
|
|
4783
5223
|
|
|
5224
|
+
export declare class UpscaleImageResponse {
|
|
5225
|
+
/** Generated images. */
|
|
5226
|
+
generatedImages?: GeneratedImage[];
|
|
5227
|
+
}
|
|
5228
|
+
|
|
4784
5229
|
/** Usage metadata about response(s). */
|
|
4785
5230
|
export declare interface UsageMetadata {
|
|
4786
5231
|
/** 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. */
|