@google/genai 1.6.0 → 1.8.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 +43 -0
- package/dist/genai.d.ts +568 -23
- package/dist/index.cjs +2300 -216
- package/dist/index.mjs +2298 -217
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +2300 -216
- package/dist/node/index.mjs +2298 -217
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +568 -23
- package/dist/web/index.mjs +2298 -217
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +568 -23
- package/package.json +1 -1
package/dist/web/web.d.ts
CHANGED
|
@@ -66,6 +66,20 @@ export declare enum AdapterSize {
|
|
|
66
66
|
ADAPTER_SIZE_THIRTY_TWO = "ADAPTER_SIZE_THIRTY_TWO"
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/** The generic reusable api auth config. Deprecated. Please use AuthConfig (google/cloud/aiplatform/master/auth.proto) instead. */
|
|
70
|
+
export declare interface ApiAuth {
|
|
71
|
+
/** The API secret. */
|
|
72
|
+
apiKeyConfig?: ApiAuthApiKeyConfig;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/** The API secret. */
|
|
76
|
+
export declare interface ApiAuthApiKeyConfig {
|
|
77
|
+
/** Required. The SecretManager secret version resource name storing API key. e.g. projects/{project}/secrets/{secret}/versions/{version} */
|
|
78
|
+
apiKeySecretVersion?: string;
|
|
79
|
+
/** The API key string. Either this or `api_key_secret_version` must be set. */
|
|
80
|
+
apiKeyString?: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
69
83
|
/**
|
|
70
84
|
* The ApiClient class is used to send requests to the Gemini API or Vertex AI
|
|
71
85
|
* endpoints.
|
|
@@ -222,9 +236,26 @@ export declare interface ApiKeyConfig {
|
|
|
222
236
|
apiKeyString?: string;
|
|
223
237
|
}
|
|
224
238
|
|
|
239
|
+
/** The API spec that the external API implements. */
|
|
240
|
+
export declare enum ApiSpec {
|
|
241
|
+
/**
|
|
242
|
+
* Unspecified API spec. This value should not be used.
|
|
243
|
+
*/
|
|
244
|
+
API_SPEC_UNSPECIFIED = "API_SPEC_UNSPECIFIED",
|
|
245
|
+
/**
|
|
246
|
+
* Simple search API spec.
|
|
247
|
+
*/
|
|
248
|
+
SIMPLE_SEARCH = "SIMPLE_SEARCH",
|
|
249
|
+
/**
|
|
250
|
+
* Elastic search API spec.
|
|
251
|
+
*/
|
|
252
|
+
ELASTIC_SEARCH = "ELASTIC_SEARCH"
|
|
253
|
+
}
|
|
254
|
+
|
|
225
255
|
/** Representation of an audio chunk. */
|
|
226
256
|
export declare interface AudioChunk {
|
|
227
|
-
/** Raw
|
|
257
|
+
/** Raw bytes of audio data.
|
|
258
|
+
* @remarks Encoded as base64 string. */
|
|
228
259
|
data?: string;
|
|
229
260
|
/** MIME type of the audio chunk. */
|
|
230
261
|
mimeType?: string;
|
|
@@ -384,6 +415,174 @@ export declare interface BaseUrlParameters {
|
|
|
384
415
|
vertexUrl?: string;
|
|
385
416
|
}
|
|
386
417
|
|
|
418
|
+
export declare class Batches extends BaseModule {
|
|
419
|
+
private readonly apiClient;
|
|
420
|
+
constructor(apiClient: ApiClient);
|
|
421
|
+
/**
|
|
422
|
+
* Create batch job.
|
|
423
|
+
*
|
|
424
|
+
* @param params - The parameters for create batch job request.
|
|
425
|
+
* @return The created batch job.
|
|
426
|
+
*
|
|
427
|
+
* @example
|
|
428
|
+
* ```ts
|
|
429
|
+
* const response = await ai.batches.create({
|
|
430
|
+
* model: 'gemini-2.0-flash',
|
|
431
|
+
* src: {gcsUri: 'gs://bucket/path/to/file.jsonl', format: 'jsonl'},
|
|
432
|
+
* config: {
|
|
433
|
+
* dest: {gcsUri: 'gs://bucket/path/output/directory', format: 'jsonl'},
|
|
434
|
+
* }
|
|
435
|
+
* });
|
|
436
|
+
* console.log(response);
|
|
437
|
+
* ```
|
|
438
|
+
*/
|
|
439
|
+
create: (params: types.CreateBatchJobParameters) => Promise<types.BatchJob>;
|
|
440
|
+
/**
|
|
441
|
+
* Lists batch job configurations.
|
|
442
|
+
*
|
|
443
|
+
* @param params - The parameters for the list request.
|
|
444
|
+
* @return The paginated results of the list of batch jobs.
|
|
445
|
+
*
|
|
446
|
+
* @example
|
|
447
|
+
* ```ts
|
|
448
|
+
* const batchJobs = await ai.batches.list({config: {'pageSize': 2}});
|
|
449
|
+
* for await (const batchJob of batchJobs) {
|
|
450
|
+
* console.log(batchJob);
|
|
451
|
+
* }
|
|
452
|
+
* ```
|
|
453
|
+
*/
|
|
454
|
+
list: (params?: types.ListBatchJobsParameters) => Promise<Pager<types.BatchJob>>;
|
|
455
|
+
/**
|
|
456
|
+
* Internal method to create batch job.
|
|
457
|
+
*
|
|
458
|
+
* @param params - The parameters for create batch job request.
|
|
459
|
+
* @return The created batch job.
|
|
460
|
+
*
|
|
461
|
+
*/
|
|
462
|
+
private createInternal;
|
|
463
|
+
/**
|
|
464
|
+
* Gets batch job configurations.
|
|
465
|
+
*
|
|
466
|
+
* @param params - The parameters for the get request.
|
|
467
|
+
* @return The batch job.
|
|
468
|
+
*
|
|
469
|
+
* @example
|
|
470
|
+
* ```ts
|
|
471
|
+
* await ai.batches.get({name: '...'}); // The server-generated resource name.
|
|
472
|
+
* ```
|
|
473
|
+
*/
|
|
474
|
+
get(params: types.GetBatchJobParameters): Promise<types.BatchJob>;
|
|
475
|
+
/**
|
|
476
|
+
* Cancels a batch job.
|
|
477
|
+
*
|
|
478
|
+
* @param params - The parameters for the cancel request.
|
|
479
|
+
* @return The empty response returned by the API.
|
|
480
|
+
*
|
|
481
|
+
* @example
|
|
482
|
+
* ```ts
|
|
483
|
+
* await ai.batches.cancel({name: '...'}); // The server-generated resource name.
|
|
484
|
+
* ```
|
|
485
|
+
*/
|
|
486
|
+
cancel(params: types.CancelBatchJobParameters): Promise<void>;
|
|
487
|
+
private listInternal;
|
|
488
|
+
/**
|
|
489
|
+
* Deletes a batch job.
|
|
490
|
+
*
|
|
491
|
+
* @param params - The parameters for the delete request.
|
|
492
|
+
* @return The empty response returned by the API.
|
|
493
|
+
*
|
|
494
|
+
* @example
|
|
495
|
+
* ```ts
|
|
496
|
+
* await ai.batches.delete({name: '...'}); // The server-generated resource name.
|
|
497
|
+
* ```
|
|
498
|
+
*/
|
|
499
|
+
delete(params: types.DeleteBatchJobParameters): Promise<types.DeleteResourceJob>;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/** Config for batches.create return value. */
|
|
503
|
+
export declare interface BatchJob {
|
|
504
|
+
/** The resource name of the BatchJob. Output only.".
|
|
505
|
+
*/
|
|
506
|
+
name?: string;
|
|
507
|
+
/** The display name of the BatchJob.
|
|
508
|
+
*/
|
|
509
|
+
displayName?: string;
|
|
510
|
+
/** The state of the BatchJob.
|
|
511
|
+
*/
|
|
512
|
+
state?: JobState;
|
|
513
|
+
/** Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. */
|
|
514
|
+
error?: JobError;
|
|
515
|
+
/** The time when the BatchJob was created.
|
|
516
|
+
*/
|
|
517
|
+
createTime?: string;
|
|
518
|
+
/** Output only. Time when the Job for the first time entered the `JOB_STATE_RUNNING` state. */
|
|
519
|
+
startTime?: string;
|
|
520
|
+
/** The time when the BatchJob was completed.
|
|
521
|
+
*/
|
|
522
|
+
endTime?: string;
|
|
523
|
+
/** The time when the BatchJob was last updated.
|
|
524
|
+
*/
|
|
525
|
+
updateTime?: string;
|
|
526
|
+
/** The name of the model that produces the predictions via the BatchJob.
|
|
527
|
+
*/
|
|
528
|
+
model?: string;
|
|
529
|
+
/** Configuration for the input data.
|
|
530
|
+
*/
|
|
531
|
+
src?: BatchJobSource;
|
|
532
|
+
/** Configuration for the output data.
|
|
533
|
+
*/
|
|
534
|
+
dest?: BatchJobDestination;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
/** Config for `des` parameter. */
|
|
538
|
+
export declare interface BatchJobDestination {
|
|
539
|
+
/** Storage format of the output files. Must be one of:
|
|
540
|
+
'jsonl', 'bigquery'.
|
|
541
|
+
*/
|
|
542
|
+
format?: string;
|
|
543
|
+
/** The Google Cloud Storage URI to the output file.
|
|
544
|
+
*/
|
|
545
|
+
gcsUri?: string;
|
|
546
|
+
/** The BigQuery URI to the output table.
|
|
547
|
+
*/
|
|
548
|
+
bigqueryUri?: string;
|
|
549
|
+
/** The Gemini Developer API's file resource name of the output data
|
|
550
|
+
(e.g. "files/12345"). The file will be a JSONL file with a single response
|
|
551
|
+
per line. The responses will be GenerateContentResponse messages formatted
|
|
552
|
+
as JSON. The responses will be written in the same order as the input
|
|
553
|
+
requests.
|
|
554
|
+
*/
|
|
555
|
+
fileName?: string;
|
|
556
|
+
/** The responses to the requests in the batch. Returned when the batch was
|
|
557
|
+
built using inlined requests. The responses will be in the same order as
|
|
558
|
+
the input requests.
|
|
559
|
+
*/
|
|
560
|
+
inlinedResponses?: InlinedResponse[];
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
/** Config for `src` parameter. */
|
|
564
|
+
export declare interface BatchJobSource {
|
|
565
|
+
/** Storage format of the input files. Must be one of:
|
|
566
|
+
'jsonl', 'bigquery'.
|
|
567
|
+
*/
|
|
568
|
+
format?: string;
|
|
569
|
+
/** The Google Cloud Storage URIs to input files.
|
|
570
|
+
*/
|
|
571
|
+
gcsUri?: string[];
|
|
572
|
+
/** The BigQuery URI to input table.
|
|
573
|
+
*/
|
|
574
|
+
bigqueryUri?: string;
|
|
575
|
+
/** The Gemini Developer API's file resource name of the input data
|
|
576
|
+
(e.g. "files/12345").
|
|
577
|
+
*/
|
|
578
|
+
fileName?: string;
|
|
579
|
+
/** The Gemini Developer API's inlined input data to run batch job.
|
|
580
|
+
*/
|
|
581
|
+
inlinedRequests?: InlinedRequest[];
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
export declare type BatchJobSourceUnion = BatchJobSource | InlinedRequest[] | string;
|
|
585
|
+
|
|
387
586
|
/** Defines the function behavior. Defaults to `BLOCKING`. */
|
|
388
587
|
export declare enum Behavior {
|
|
389
588
|
/**
|
|
@@ -404,7 +603,8 @@ export declare enum Behavior {
|
|
|
404
603
|
declare interface Blob_2 {
|
|
405
604
|
/** 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. */
|
|
406
605
|
displayName?: string;
|
|
407
|
-
/** Required. Raw bytes.
|
|
606
|
+
/** Required. Raw bytes.
|
|
607
|
+
* @remarks Encoded as base64 string. */
|
|
408
608
|
data?: string;
|
|
409
609
|
/** Required. The IANA standard MIME type of the source data. */
|
|
410
610
|
mimeType?: string;
|
|
@@ -434,7 +634,11 @@ export declare enum BlockedReason {
|
|
|
434
634
|
/**
|
|
435
635
|
* Candidates blocked due to prohibited content.
|
|
436
636
|
*/
|
|
437
|
-
PROHIBITED_CONTENT = "PROHIBITED_CONTENT"
|
|
637
|
+
PROHIBITED_CONTENT = "PROHIBITED_CONTENT",
|
|
638
|
+
/**
|
|
639
|
+
* Candidates blocked due to unsafe image generation content.
|
|
640
|
+
*/
|
|
641
|
+
IMAGE_SAFETY = "IMAGE_SAFETY"
|
|
438
642
|
}
|
|
439
643
|
|
|
440
644
|
/** A resource used in LLM queries for users to explicitly specify what to cache. */
|
|
@@ -587,6 +791,30 @@ export declare interface CallableToolConfig {
|
|
|
587
791
|
timeout?: number;
|
|
588
792
|
}
|
|
589
793
|
|
|
794
|
+
/** Optional parameters. */
|
|
795
|
+
export declare interface CancelBatchJobConfig {
|
|
796
|
+
/** Used to override HTTP request options. */
|
|
797
|
+
httpOptions?: HttpOptions;
|
|
798
|
+
/** Abort signal which can be used to cancel the request.
|
|
799
|
+
|
|
800
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
801
|
+
operation will not cancel the request in the service. You will still
|
|
802
|
+
be charged usage for any applicable operations.
|
|
803
|
+
*/
|
|
804
|
+
abortSignal?: AbortSignal;
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
/** Config for batches.cancel parameters. */
|
|
808
|
+
export declare interface CancelBatchJobParameters {
|
|
809
|
+
/** A fully-qualified BatchJob resource name or ID.
|
|
810
|
+
Example: "projects/.../locations/.../batchPredictionJobs/456"
|
|
811
|
+
or "456" when project and location are initialized in the client.
|
|
812
|
+
*/
|
|
813
|
+
name: string;
|
|
814
|
+
/** Optional parameters for the request. */
|
|
815
|
+
config?: CancelBatchJobConfig;
|
|
816
|
+
}
|
|
817
|
+
|
|
590
818
|
/** A response candidate generated from the model. */
|
|
591
819
|
export declare interface Candidate {
|
|
592
820
|
/** Contains the multi-part content of the response.
|
|
@@ -776,7 +1004,7 @@ export declare interface CitationMetadata {
|
|
|
776
1004
|
citations?: Citation[];
|
|
777
1005
|
}
|
|
778
1006
|
|
|
779
|
-
/** Result of executing the [ExecutableCode].
|
|
1007
|
+
/** Result of executing the [ExecutableCode]. Only generated when using the [CodeExecution] tool, and always follows a `part` containing the [ExecutableCode]. */
|
|
780
1008
|
export declare interface CodeExecutionResult {
|
|
781
1009
|
/** Required. Outcome of the code execution. */
|
|
782
1010
|
outcome?: Outcome;
|
|
@@ -984,6 +1212,40 @@ export declare interface CreateAuthTokenParameters {
|
|
|
984
1212
|
config?: CreateAuthTokenConfig;
|
|
985
1213
|
}
|
|
986
1214
|
|
|
1215
|
+
/** Config for optional parameters. */
|
|
1216
|
+
export declare interface CreateBatchJobConfig {
|
|
1217
|
+
/** Used to override HTTP request options. */
|
|
1218
|
+
httpOptions?: HttpOptions;
|
|
1219
|
+
/** Abort signal which can be used to cancel the request.
|
|
1220
|
+
|
|
1221
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
1222
|
+
operation will not cancel the request in the service. You will still
|
|
1223
|
+
be charged usage for any applicable operations.
|
|
1224
|
+
*/
|
|
1225
|
+
abortSignal?: AbortSignal;
|
|
1226
|
+
/** The user-defined name of this BatchJob.
|
|
1227
|
+
*/
|
|
1228
|
+
displayName?: string;
|
|
1229
|
+
/** GCS or BigQuery URI prefix for the output predictions. Example:
|
|
1230
|
+
"gs://path/to/output/data" or "bq://projectId.bqDatasetId.bqTableId".
|
|
1231
|
+
*/
|
|
1232
|
+
dest?: string;
|
|
1233
|
+
}
|
|
1234
|
+
|
|
1235
|
+
/** Config for batches.create parameters. */
|
|
1236
|
+
export declare interface CreateBatchJobParameters {
|
|
1237
|
+
/** The name of the model to produces the predictions via the BatchJob.
|
|
1238
|
+
*/
|
|
1239
|
+
model?: string;
|
|
1240
|
+
/** GCS URI(-s) or BigQuery URI to your input data to run batch job.
|
|
1241
|
+
Example: "gs://path/to/input/data" or "bq://projectId.bqDatasetId.bqTableId".
|
|
1242
|
+
*/
|
|
1243
|
+
src: BatchJobSourceUnion;
|
|
1244
|
+
/** Optional parameters for creating a BatchJob.
|
|
1245
|
+
*/
|
|
1246
|
+
config?: CreateBatchJobConfig;
|
|
1247
|
+
}
|
|
1248
|
+
|
|
987
1249
|
/** Optional configuration for cached content creation. */
|
|
988
1250
|
export declare interface CreateCachedContentConfig {
|
|
989
1251
|
/** Used to override HTTP request options. */
|
|
@@ -1230,6 +1492,30 @@ export declare interface DatasetStats {
|
|
|
1230
1492
|
userOutputTokenDistribution?: DatasetDistribution;
|
|
1231
1493
|
}
|
|
1232
1494
|
|
|
1495
|
+
/** Optional parameters for models.get method. */
|
|
1496
|
+
export declare interface DeleteBatchJobConfig {
|
|
1497
|
+
/** Used to override HTTP request options. */
|
|
1498
|
+
httpOptions?: HttpOptions;
|
|
1499
|
+
/** Abort signal which can be used to cancel the request.
|
|
1500
|
+
|
|
1501
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
1502
|
+
operation will not cancel the request in the service. You will still
|
|
1503
|
+
be charged usage for any applicable operations.
|
|
1504
|
+
*/
|
|
1505
|
+
abortSignal?: AbortSignal;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
/** Config for batches.delete parameters. */
|
|
1509
|
+
export declare interface DeleteBatchJobParameters {
|
|
1510
|
+
/** A fully-qualified BatchJob resource name or ID.
|
|
1511
|
+
Example: "projects/.../locations/.../batchPredictionJobs/456"
|
|
1512
|
+
or "456" when project and location are initialized in the client.
|
|
1513
|
+
*/
|
|
1514
|
+
name: string;
|
|
1515
|
+
/** Optional parameters for the request. */
|
|
1516
|
+
config?: DeleteBatchJobConfig;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1233
1519
|
/** Optional parameters for caches.delete method. */
|
|
1234
1520
|
export declare interface DeleteCachedContentConfig {
|
|
1235
1521
|
/** Used to override HTTP request options. */
|
|
@@ -1305,6 +1591,13 @@ export declare interface DeleteModelParameters {
|
|
|
1305
1591
|
export declare class DeleteModelResponse {
|
|
1306
1592
|
}
|
|
1307
1593
|
|
|
1594
|
+
/** The return value of delete operation. */
|
|
1595
|
+
export declare interface DeleteResourceJob {
|
|
1596
|
+
name?: string;
|
|
1597
|
+
done?: boolean;
|
|
1598
|
+
error?: JobError;
|
|
1599
|
+
}
|
|
1600
|
+
|
|
1308
1601
|
/** Statistics computed for datasets used for distillation. */
|
|
1309
1602
|
export declare interface DistillationDataStats {
|
|
1310
1603
|
/** Output only. Statistics computed for the training dataset. */
|
|
@@ -1415,7 +1708,8 @@ export declare interface EditImageConfig {
|
|
|
1415
1708
|
/** Number of images to generate.
|
|
1416
1709
|
*/
|
|
1417
1710
|
numberOfImages?: number;
|
|
1418
|
-
/** Aspect ratio of the generated images.
|
|
1711
|
+
/** Aspect ratio of the generated images. Supported values are
|
|
1712
|
+
"1:1", "3:4", "4:3", "9:16", and "16:9".
|
|
1419
1713
|
*/
|
|
1420
1714
|
aspectRatio?: string;
|
|
1421
1715
|
/** Controls how much the model adheres to the text prompt. Large
|
|
@@ -1588,7 +1882,19 @@ export declare enum EndSensitivity {
|
|
|
1588
1882
|
export declare interface EnterpriseWebSearch {
|
|
1589
1883
|
}
|
|
1590
1884
|
|
|
1591
|
-
/**
|
|
1885
|
+
/** Required. The environment being operated. */
|
|
1886
|
+
export declare enum Environment {
|
|
1887
|
+
/**
|
|
1888
|
+
* Defaults to browser.
|
|
1889
|
+
*/
|
|
1890
|
+
ENVIRONMENT_UNSPECIFIED = "ENVIRONMENT_UNSPECIFIED",
|
|
1891
|
+
/**
|
|
1892
|
+
* Operates in a web browser.
|
|
1893
|
+
*/
|
|
1894
|
+
ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER"
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1897
|
+
/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the [CodeExecution] tool, in which the code will be automatically executed, and a corresponding [CodeExecutionResult] will also be generated. */
|
|
1592
1898
|
export declare interface ExecutableCode {
|
|
1593
1899
|
/** Required. The code to be executed. */
|
|
1594
1900
|
code?: string;
|
|
@@ -1596,6 +1902,36 @@ export declare interface ExecutableCode {
|
|
|
1596
1902
|
language?: Language;
|
|
1597
1903
|
}
|
|
1598
1904
|
|
|
1905
|
+
/** Retrieve from data source powered by external API for grounding. The external API is not owned by Google, but need to follow the pre-defined API spec. */
|
|
1906
|
+
export declare interface ExternalApi {
|
|
1907
|
+
/** The authentication config to access the API. Deprecated. Please use auth_config instead. */
|
|
1908
|
+
apiAuth?: ApiAuth;
|
|
1909
|
+
/** The API spec that the external API implements. */
|
|
1910
|
+
apiSpec?: ApiSpec;
|
|
1911
|
+
/** The authentication config to access the API. */
|
|
1912
|
+
authConfig?: AuthConfig;
|
|
1913
|
+
/** Parameters for the elastic search API. */
|
|
1914
|
+
elasticSearchParams?: ExternalApiElasticSearchParams;
|
|
1915
|
+
/** The endpoint of the external API. The system will call the API at this endpoint to retrieve the data for grounding. Example: https://acme.com:443/search */
|
|
1916
|
+
endpoint?: string;
|
|
1917
|
+
/** Parameters for the simple search API. */
|
|
1918
|
+
simpleSearchParams?: ExternalApiSimpleSearchParams;
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
/** The search parameters to use for the ELASTIC_SEARCH spec. */
|
|
1922
|
+
export declare interface ExternalApiElasticSearchParams {
|
|
1923
|
+
/** The ElasticSearch index to use. */
|
|
1924
|
+
index?: string;
|
|
1925
|
+
/** Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param. */
|
|
1926
|
+
numHits?: number;
|
|
1927
|
+
/** The ElasticSearch search template to use. */
|
|
1928
|
+
searchTemplate?: string;
|
|
1929
|
+
}
|
|
1930
|
+
|
|
1931
|
+
/** The search parameters to use for SIMPLE_SEARCH spec. */
|
|
1932
|
+
export declare interface ExternalApiSimpleSearchParams {
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1599
1935
|
/** Options for feature selection preference. */
|
|
1600
1936
|
export declare enum FeatureSelectionPreference {
|
|
1601
1937
|
FEATURE_SELECTION_PREFERENCE_UNSPECIFIED = "FEATURE_SELECTION_PREFERENCE_UNSPECIFIED",
|
|
@@ -2068,6 +2404,22 @@ export declare interface GenerateContentConfig {
|
|
|
2068
2404
|
Compatible mimetypes: `application/json`: Schema for JSON response.
|
|
2069
2405
|
*/
|
|
2070
2406
|
responseSchema?: SchemaUnion;
|
|
2407
|
+
/** Optional. Output schema of the generated response.
|
|
2408
|
+
This is an alternative to `response_schema` that accepts [JSON
|
|
2409
|
+
Schema](https://json-schema.org/). If set, `response_schema` must be
|
|
2410
|
+
omitted, but `response_mime_type` is required. While the full JSON Schema
|
|
2411
|
+
may be sent, not all features are supported. Specifically, only the
|
|
2412
|
+
following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor`
|
|
2413
|
+
- `type` - `format` - `title` - `description` - `enum` (for strings and
|
|
2414
|
+
numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` -
|
|
2415
|
+
`maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) -
|
|
2416
|
+
`properties` - `additionalProperties` - `required` The non-standard
|
|
2417
|
+
`propertyOrdering` property may also be set. Cyclic references are
|
|
2418
|
+
unrolled to a limited degree and, as such, may only be used within
|
|
2419
|
+
non-required properties. (Nullable properties are not sufficient.) If
|
|
2420
|
+
`$ref` is set on a sub-schema, no other properties, except for than those
|
|
2421
|
+
starting as a `$`, may be set. */
|
|
2422
|
+
responseJsonSchema?: unknown;
|
|
2071
2423
|
/** Configuration for model router requests.
|
|
2072
2424
|
*/
|
|
2073
2425
|
routingConfig?: GenerationConfigRoutingConfig;
|
|
@@ -2356,7 +2708,8 @@ export declare interface GenerateImagesConfig {
|
|
|
2356
2708
|
/** Number of images to generate.
|
|
2357
2709
|
*/
|
|
2358
2710
|
numberOfImages?: number;
|
|
2359
|
-
/** Aspect ratio of the generated images.
|
|
2711
|
+
/** Aspect ratio of the generated images. Supported values are
|
|
2712
|
+
"1:1", "3:4", "4:3", "9:16", and "16:9".
|
|
2360
2713
|
*/
|
|
2361
2714
|
aspectRatio?: string;
|
|
2362
2715
|
/** Controls how much the model adheres to the text prompt. Large
|
|
@@ -2461,6 +2814,8 @@ export declare interface GenerateVideosConfig {
|
|
|
2461
2814
|
generateAudio?: boolean;
|
|
2462
2815
|
/** Image to use as the last frame of generated videos. Only supported for image to video use cases. */
|
|
2463
2816
|
lastFrame?: Image_2;
|
|
2817
|
+
/** Compression quality of the generated videos. */
|
|
2818
|
+
compressionQuality?: VideoCompressionQuality;
|
|
2464
2819
|
}
|
|
2465
2820
|
|
|
2466
2821
|
/** A video generation operation. */
|
|
@@ -2512,6 +2867,8 @@ export declare interface GenerationConfig {
|
|
|
2512
2867
|
audioTimestamp?: boolean;
|
|
2513
2868
|
/** Optional. Number of candidates to generate. */
|
|
2514
2869
|
candidateCount?: number;
|
|
2870
|
+
/** Optional. If enabled, the model will detect emotions and adapt its responses accordingly. */
|
|
2871
|
+
enableAffectiveDialog?: boolean;
|
|
2515
2872
|
/** Optional. Frequency penalties. */
|
|
2516
2873
|
frequencyPenalty?: number;
|
|
2517
2874
|
/** Optional. Logit probabilities. */
|
|
@@ -2522,6 +2879,8 @@ export declare interface GenerationConfig {
|
|
|
2522
2879
|
mediaResolution?: MediaResolution;
|
|
2523
2880
|
/** Optional. Positive penalties. */
|
|
2524
2881
|
presencePenalty?: number;
|
|
2882
|
+
/** Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor` - `type` - `format` - `title` - `description` - `enum` (for strings and numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` - `maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) - `properties` - `additionalProperties` - `required` The non-standard `propertyOrdering` property may also be set. Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If `$ref` is set on a sub-schema, no other properties, except for than those starting as a `$`, may be set. */
|
|
2883
|
+
responseJsonSchema?: unknown;
|
|
2525
2884
|
/** Optional. If true, export the logprobs results in response. */
|
|
2526
2885
|
responseLogprobs?: boolean;
|
|
2527
2886
|
/** Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature. */
|
|
@@ -2530,8 +2889,6 @@ export declare interface GenerationConfig {
|
|
|
2530
2889
|
responseModalities?: Modality[];
|
|
2531
2890
|
/** Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response. */
|
|
2532
2891
|
responseSchema?: Schema;
|
|
2533
|
-
/** Optional. Output schema of the generated response. This is an alternative to `response_schema` that accepts [JSON Schema](https://json-schema.org/). If set, `response_schema` must be omitted, but `response_mime_type` is required. While the full JSON Schema may be sent, not all features are supported. Specifically, only the following properties are supported: - `$id` - `$defs` - `$ref` - `$anchor` - `type` - `format` - `title` - `description` - `enum` (for strings and numbers) - `items` - `prefixItems` - `minItems` - `maxItems` - `minimum` - `maximum` - `anyOf` - `oneOf` (interpreted the same as `anyOf`) - `properties` - `additionalProperties` - `required` The non-standard `propertyOrdering` property may also be set. Cyclic references are unrolled to a limited degree and, as such, may only be used within non-required properties. (Nullable properties are not sufficient.) If `$ref` is set on a sub-schema, no other properties, except for than those starting as a `$`, may be set. */
|
|
2534
|
-
responseJsonSchema?: unknown;
|
|
2535
2892
|
/** Optional. Routing configuration. */
|
|
2536
2893
|
routingConfig?: GenerationConfigRoutingConfig;
|
|
2537
2894
|
/** Optional. Seed. */
|
|
@@ -2578,6 +2935,30 @@ export declare interface GenerationConfigThinkingConfig {
|
|
|
2578
2935
|
thinkingBudget?: number;
|
|
2579
2936
|
}
|
|
2580
2937
|
|
|
2938
|
+
/** Optional parameters. */
|
|
2939
|
+
export declare interface GetBatchJobConfig {
|
|
2940
|
+
/** Used to override HTTP request options. */
|
|
2941
|
+
httpOptions?: HttpOptions;
|
|
2942
|
+
/** Abort signal which can be used to cancel the request.
|
|
2943
|
+
|
|
2944
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
2945
|
+
operation will not cancel the request in the service. You will still
|
|
2946
|
+
be charged usage for any applicable operations.
|
|
2947
|
+
*/
|
|
2948
|
+
abortSignal?: AbortSignal;
|
|
2949
|
+
}
|
|
2950
|
+
|
|
2951
|
+
/** Config for batches.get parameters. */
|
|
2952
|
+
export declare interface GetBatchJobParameters {
|
|
2953
|
+
/** A fully-qualified BatchJob resource name or ID.
|
|
2954
|
+
Example: "projects/.../locations/.../batchPredictionJobs/456"
|
|
2955
|
+
or "456" when project and location are initialized in the client.
|
|
2956
|
+
*/
|
|
2957
|
+
name: string;
|
|
2958
|
+
/** Optional parameters for the request. */
|
|
2959
|
+
config?: GetBatchJobConfig;
|
|
2960
|
+
}
|
|
2961
|
+
|
|
2581
2962
|
/** Optional parameters for caches.get method. */
|
|
2582
2963
|
export declare interface GetCachedContentConfig {
|
|
2583
2964
|
/** Used to override HTTP request options. */
|
|
@@ -2724,6 +3105,7 @@ export declare class GoogleGenAI {
|
|
|
2724
3105
|
private readonly apiVersion?;
|
|
2725
3106
|
readonly models: Models;
|
|
2726
3107
|
readonly live: Live;
|
|
3108
|
+
readonly batches: Batches;
|
|
2727
3109
|
readonly chats: Chats;
|
|
2728
3110
|
readonly caches: Caches;
|
|
2729
3111
|
readonly files: Files;
|
|
@@ -2884,7 +3266,7 @@ export declare interface GroundingMetadata {
|
|
|
2884
3266
|
|
|
2885
3267
|
/** Grounding support. */
|
|
2886
3268
|
export declare interface GroundingSupport {
|
|
2887
|
-
/** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident.
|
|
3269
|
+
/** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. For Gemini 2.0 and before, this list must have the same size as the grounding_chunk_indices. For Gemini 2.5 and after, this list will be empty and should be ignored. */
|
|
2888
3270
|
confidenceScores?: number[];
|
|
2889
3271
|
/** A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim. */
|
|
2890
3272
|
groundingChunkIndices?: number[];
|
|
@@ -2961,7 +3343,23 @@ export declare enum HarmCategory {
|
|
|
2961
3343
|
/**
|
|
2962
3344
|
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
2963
3345
|
*/
|
|
2964
|
-
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY"
|
|
3346
|
+
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY",
|
|
3347
|
+
/**
|
|
3348
|
+
* The harm category is image hate.
|
|
3349
|
+
*/
|
|
3350
|
+
HARM_CATEGORY_IMAGE_HATE = "HARM_CATEGORY_IMAGE_HATE",
|
|
3351
|
+
/**
|
|
3352
|
+
* The harm category is image dangerous content.
|
|
3353
|
+
*/
|
|
3354
|
+
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",
|
|
3355
|
+
/**
|
|
3356
|
+
* The harm category is image harassment.
|
|
3357
|
+
*/
|
|
3358
|
+
HARM_CATEGORY_IMAGE_HARASSMENT = "HARM_CATEGORY_IMAGE_HARASSMENT",
|
|
3359
|
+
/**
|
|
3360
|
+
* The harm category is image sexually explicit content.
|
|
3361
|
+
*/
|
|
3362
|
+
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"
|
|
2965
3363
|
}
|
|
2966
3364
|
|
|
2967
3365
|
/** Output only. Harm probability levels in the content. */
|
|
@@ -3095,7 +3493,8 @@ declare interface Image_2 {
|
|
|
3095
3493
|
gcsUri?: string;
|
|
3096
3494
|
/** The image bytes data. ``Image`` can contain a value for this field
|
|
3097
3495
|
or the ``gcs_uri`` field but not both.
|
|
3098
|
-
|
|
3496
|
+
|
|
3497
|
+
* @remarks Encoded as base64 string. */
|
|
3099
3498
|
imageBytes?: string;
|
|
3100
3499
|
/** The MIME type of the image. */
|
|
3101
3500
|
mimeType?: string;
|
|
@@ -3111,6 +3510,29 @@ export declare enum ImagePromptLanguage {
|
|
|
3111
3510
|
hi = "hi"
|
|
3112
3511
|
}
|
|
3113
3512
|
|
|
3513
|
+
/** Config for inlined request. */
|
|
3514
|
+
export declare interface InlinedRequest {
|
|
3515
|
+
/** ID of the model to use. For a list of models, see `Google models
|
|
3516
|
+
<https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
|
|
3517
|
+
model?: string;
|
|
3518
|
+
/** Content of the request.
|
|
3519
|
+
*/
|
|
3520
|
+
contents?: ContentListUnion;
|
|
3521
|
+
/** Configuration that contains optional model parameters.
|
|
3522
|
+
*/
|
|
3523
|
+
config?: GenerateContentConfig;
|
|
3524
|
+
}
|
|
3525
|
+
|
|
3526
|
+
/** Config for `inlined_responses` parameter. */
|
|
3527
|
+
export declare class InlinedResponse {
|
|
3528
|
+
/** The response to the request.
|
|
3529
|
+
*/
|
|
3530
|
+
response?: GenerateContentResponse;
|
|
3531
|
+
/** The error encountered while processing the request.
|
|
3532
|
+
*/
|
|
3533
|
+
error?: JobError;
|
|
3534
|
+
}
|
|
3535
|
+
|
|
3114
3536
|
/** Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
|
|
3115
3537
|
|
|
3116
3538
|
The start time must be less than or equal to the end time.
|
|
@@ -3125,7 +3547,17 @@ export declare interface Interval {
|
|
|
3125
3547
|
endTime?: string;
|
|
3126
3548
|
}
|
|
3127
3549
|
|
|
3128
|
-
/**
|
|
3550
|
+
/** Job error. */
|
|
3551
|
+
export declare interface JobError {
|
|
3552
|
+
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
3553
|
+
details?: string[];
|
|
3554
|
+
/** The status code. */
|
|
3555
|
+
code?: number;
|
|
3556
|
+
/** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the `details` field. */
|
|
3557
|
+
message?: string;
|
|
3558
|
+
}
|
|
3559
|
+
|
|
3560
|
+
/** Job state. */
|
|
3129
3561
|
export declare enum JobState {
|
|
3130
3562
|
/**
|
|
3131
3563
|
* The job state is unspecified.
|
|
@@ -3168,7 +3600,7 @@ export declare enum JobState {
|
|
|
3168
3600
|
*/
|
|
3169
3601
|
JOB_STATE_EXPIRED = "JOB_STATE_EXPIRED",
|
|
3170
3602
|
/**
|
|
3171
|
-
* The job is being updated. Only jobs in the `
|
|
3603
|
+
* The job is being updated. Only jobs in the `JOB_STATE_RUNNING` state can be updated. After updating, the job goes back to the `JOB_STATE_RUNNING` state.
|
|
3172
3604
|
*/
|
|
3173
3605
|
JOB_STATE_UPDATING = "JOB_STATE_UPDATING",
|
|
3174
3606
|
/**
|
|
@@ -3203,6 +3635,33 @@ export declare interface LatLng {
|
|
|
3203
3635
|
longitude?: number;
|
|
3204
3636
|
}
|
|
3205
3637
|
|
|
3638
|
+
/** Config for optional parameters. */
|
|
3639
|
+
export declare interface ListBatchJobsConfig {
|
|
3640
|
+
/** Used to override HTTP request options. */
|
|
3641
|
+
httpOptions?: HttpOptions;
|
|
3642
|
+
/** Abort signal which can be used to cancel the request.
|
|
3643
|
+
|
|
3644
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
3645
|
+
operation will not cancel the request in the service. You will still
|
|
3646
|
+
be charged usage for any applicable operations.
|
|
3647
|
+
*/
|
|
3648
|
+
abortSignal?: AbortSignal;
|
|
3649
|
+
pageSize?: number;
|
|
3650
|
+
pageToken?: string;
|
|
3651
|
+
filter?: string;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
/** Config for batches.list parameters. */
|
|
3655
|
+
export declare interface ListBatchJobsParameters {
|
|
3656
|
+
config?: ListBatchJobsConfig;
|
|
3657
|
+
}
|
|
3658
|
+
|
|
3659
|
+
/** Config for batches.list return value. */
|
|
3660
|
+
export declare class ListBatchJobsResponse {
|
|
3661
|
+
nextPageToken?: string;
|
|
3662
|
+
batchJobs?: BatchJob[];
|
|
3663
|
+
}
|
|
3664
|
+
|
|
3206
3665
|
/** Config for caches.list method. */
|
|
3207
3666
|
export declare interface ListCachedContentsConfig {
|
|
3208
3667
|
/** Used to override HTTP request options. */
|
|
@@ -4047,6 +4506,8 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
4047
4506
|
}
|
|
4048
4507
|
|
|
4049
4508
|
export declare interface LiveServerSetupComplete {
|
|
4509
|
+
/** The session id of the live session. */
|
|
4510
|
+
sessionId?: string;
|
|
4050
4511
|
}
|
|
4051
4512
|
|
|
4052
4513
|
/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */
|
|
@@ -4780,7 +5241,8 @@ export declare interface Part {
|
|
|
4780
5241
|
inlineData?: Blob_2;
|
|
4781
5242
|
/** Optional. URI based data. */
|
|
4782
5243
|
fileData?: FileData;
|
|
4783
|
-
/** An opaque signature for the thought so it can be reused in subsequent requests.
|
|
5244
|
+
/** An opaque signature for the thought so it can be reused in subsequent requests.
|
|
5245
|
+
* @remarks Encoded as base64 string. */
|
|
4784
5246
|
thoughtSignature?: string;
|
|
4785
5247
|
/** Optional. Result of executing the [ExecutableCode]. */
|
|
4786
5248
|
codeExecutionResult?: CodeExecutionResult;
|
|
@@ -4810,8 +5272,17 @@ export declare type PartUnion = Part | string;
|
|
|
4810
5272
|
|
|
4811
5273
|
/** Enum that controls the generation of people. */
|
|
4812
5274
|
export declare enum PersonGeneration {
|
|
5275
|
+
/**
|
|
5276
|
+
* Block generation of images of people.
|
|
5277
|
+
*/
|
|
4813
5278
|
DONT_ALLOW = "DONT_ALLOW",
|
|
5279
|
+
/**
|
|
5280
|
+
* Generate images of adults, but not children.
|
|
5281
|
+
*/
|
|
4814
5282
|
ALLOW_ADULT = "ALLOW_ADULT",
|
|
5283
|
+
/**
|
|
5284
|
+
* Generate images that include adults and children.
|
|
5285
|
+
*/
|
|
4815
5286
|
ALLOW_ALL = "ALLOW_ALL"
|
|
4816
5287
|
}
|
|
4817
5288
|
|
|
@@ -4976,6 +5447,8 @@ export declare class ReplayResponse {
|
|
|
4976
5447
|
export declare interface Retrieval {
|
|
4977
5448
|
/** Optional. Deprecated. This option is no longer supported. */
|
|
4978
5449
|
disableAttribution?: boolean;
|
|
5450
|
+
/** Use data source powered by external API for grounding. */
|
|
5451
|
+
externalApi?: ExternalApi;
|
|
4979
5452
|
/** Set to use data source powered by Vertex AI Search. */
|
|
4980
5453
|
vertexAiSearch?: VertexAISearch;
|
|
4981
5454
|
/** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */
|
|
@@ -5024,6 +5497,8 @@ export declare interface SafetyRating {
|
|
|
5024
5497
|
blocked?: boolean;
|
|
5025
5498
|
/** Output only. Harm category. */
|
|
5026
5499
|
category?: HarmCategory;
|
|
5500
|
+
/** Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold. */
|
|
5501
|
+
overwrittenThreshold?: HarmBlockThreshold;
|
|
5027
5502
|
/** Output only. Harm probability levels in the content. */
|
|
5028
5503
|
probability?: HarmProbability;
|
|
5029
5504
|
/** Output only. Harm probability score. */
|
|
@@ -5160,7 +5635,8 @@ export declare type SchemaUnion = Schema | unknown;
|
|
|
5160
5635
|
export declare interface SearchEntryPoint {
|
|
5161
5636
|
/** Optional. Web content snippet that can be embedded in a web page or an app webview. */
|
|
5162
5637
|
renderedContent?: string;
|
|
5163
|
-
/** Optional. Base64 encoded JSON representing array of tuple.
|
|
5638
|
+
/** Optional. Base64 encoded JSON representing array of tuple.
|
|
5639
|
+
* @remarks Encoded as base64 string. */
|
|
5164
5640
|
sdkBlob?: string;
|
|
5165
5641
|
}
|
|
5166
5642
|
|
|
@@ -5481,7 +5957,7 @@ export declare interface SupervisedHyperParameters {
|
|
|
5481
5957
|
adapterSize?: AdapterSize;
|
|
5482
5958
|
/** Optional. Number of complete passes the model makes over the entire training dataset during training. */
|
|
5483
5959
|
epochCount?: string;
|
|
5484
|
-
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
5960
|
+
/** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. */
|
|
5485
5961
|
learningRateMultiplier?: number;
|
|
5486
5962
|
}
|
|
5487
5963
|
|
|
@@ -5551,9 +6027,9 @@ export declare interface SupervisedTuningSpec {
|
|
|
5551
6027
|
exportLastCheckpointOnly?: boolean;
|
|
5552
6028
|
/** Optional. Hyperparameters for SFT. */
|
|
5553
6029
|
hyperParameters?: SupervisedHyperParameters;
|
|
5554
|
-
/** Required.
|
|
6030
|
+
/** 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. */
|
|
5555
6031
|
trainingDatasetUri?: string;
|
|
5556
|
-
/** Optional.
|
|
6032
|
+
/** 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. */
|
|
5557
6033
|
validationDatasetUri?: string;
|
|
5558
6034
|
}
|
|
5559
6035
|
|
|
@@ -5682,7 +6158,8 @@ export declare interface TokensInfo {
|
|
|
5682
6158
|
role?: string;
|
|
5683
6159
|
/** A list of token ids from the input. */
|
|
5684
6160
|
tokenIds?: string[];
|
|
5685
|
-
/** A list of tokens from the input.
|
|
6161
|
+
/** A list of tokens from the input.
|
|
6162
|
+
* @remarks Encoded as base64 string. */
|
|
5686
6163
|
tokens?: string[];
|
|
5687
6164
|
}
|
|
5688
6165
|
|
|
@@ -5707,12 +6184,20 @@ export declare interface Tool {
|
|
|
5707
6184
|
urlContext?: UrlContext;
|
|
5708
6185
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
5709
6186
|
codeExecution?: ToolCodeExecution;
|
|
6187
|
+
/** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
|
|
6188
|
+
computerUse?: ToolComputerUse;
|
|
5710
6189
|
}
|
|
5711
6190
|
|
|
5712
6191
|
/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. */
|
|
5713
6192
|
export declare interface ToolCodeExecution {
|
|
5714
6193
|
}
|
|
5715
6194
|
|
|
6195
|
+
/** Tool to support computer use. */
|
|
6196
|
+
export declare interface ToolComputerUse {
|
|
6197
|
+
/** Required. The environment being operated. */
|
|
6198
|
+
environment?: Environment;
|
|
6199
|
+
}
|
|
6200
|
+
|
|
5716
6201
|
/** Tool config.
|
|
5717
6202
|
|
|
5718
6203
|
This config is shared for all tools provided in the request.
|
|
@@ -5796,6 +6281,8 @@ export declare interface TunedModelInfo {
|
|
|
5796
6281
|
export declare interface TuningDataset {
|
|
5797
6282
|
/** GCS URI of the file containing training dataset in JSONL format. */
|
|
5798
6283
|
gcsUri?: string;
|
|
6284
|
+
/** The resource name of the Vertex Multimodal Dataset that is used as training dataset. Example: 'projects/my-project-id-or-number/locations/my-location/datasets/my-dataset-id'. */
|
|
6285
|
+
vertexDatasetResource?: string;
|
|
5799
6286
|
/** Inline examples with simple input/output text. */
|
|
5800
6287
|
examples?: TuningExample[];
|
|
5801
6288
|
}
|
|
@@ -5853,6 +6340,10 @@ export declare interface TuningJob {
|
|
|
5853
6340
|
labels?: Record<string, string>;
|
|
5854
6341
|
/** Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. */
|
|
5855
6342
|
pipelineJob?: string;
|
|
6343
|
+
/** Output only. Reserved for future use. */
|
|
6344
|
+
satisfiesPzi?: boolean;
|
|
6345
|
+
/** Output only. Reserved for future use. */
|
|
6346
|
+
satisfiesPzs?: boolean;
|
|
5856
6347
|
/** The service account that the tuningJob workload runs as. If not specified, the Vertex AI Secure Fine-Tuned Service Agent in the project will be used. See https://cloud.google.com/iam/docs/service-agents#vertex-ai-secure-fine-tuning-service-agent Users starting the pipeline must have the `iam.serviceAccounts.actAs` permission on this service account. */
|
|
5857
6348
|
serviceAccount?: string;
|
|
5858
6349
|
/** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
|
|
@@ -5901,6 +6392,8 @@ declare class Tunings extends BaseModule {
|
|
|
5901
6392
|
export declare interface TuningValidationDataset {
|
|
5902
6393
|
/** GCS URI of the file containing validation dataset in JSONL format. */
|
|
5903
6394
|
gcsUri?: string;
|
|
6395
|
+
/** The resource name of the Vertex Multimodal Dataset that is used as training dataset. Example: 'projects/my-project-id-or-number/locations/my-location/datasets/my-dataset-id'. */
|
|
6396
|
+
vertexDatasetResource?: string;
|
|
5904
6397
|
}
|
|
5905
6398
|
|
|
5906
6399
|
/** Options about which input is included in the user's turn. */
|
|
@@ -5974,6 +6467,9 @@ declare namespace types {
|
|
|
5974
6467
|
HarmBlockThreshold,
|
|
5975
6468
|
Mode,
|
|
5976
6469
|
AuthType,
|
|
6470
|
+
ApiSpec,
|
|
6471
|
+
Environment,
|
|
6472
|
+
UrlRetrievalStatus,
|
|
5977
6473
|
FinishReason,
|
|
5978
6474
|
HarmProbability,
|
|
5979
6475
|
HarmSeverity,
|
|
@@ -5987,7 +6483,6 @@ declare namespace types {
|
|
|
5987
6483
|
Behavior,
|
|
5988
6484
|
DynamicRetrievalConfigMode,
|
|
5989
6485
|
FunctionCallingConfigMode,
|
|
5990
|
-
UrlRetrievalStatus,
|
|
5991
6486
|
SafetyFilterLevel,
|
|
5992
6487
|
PersonGeneration,
|
|
5993
6488
|
ImagePromptLanguage,
|
|
@@ -5995,6 +6490,7 @@ declare namespace types {
|
|
|
5995
6490
|
ControlReferenceType,
|
|
5996
6491
|
SubjectReferenceType,
|
|
5997
6492
|
EditMode,
|
|
6493
|
+
VideoCompressionQuality,
|
|
5998
6494
|
FileState,
|
|
5999
6495
|
FileSource,
|
|
6000
6496
|
MediaModality,
|
|
@@ -6032,6 +6528,11 @@ declare namespace types {
|
|
|
6032
6528
|
AuthConfig,
|
|
6033
6529
|
GoogleMaps,
|
|
6034
6530
|
UrlContext,
|
|
6531
|
+
ApiAuthApiKeyConfig,
|
|
6532
|
+
ApiAuth,
|
|
6533
|
+
ExternalApiElasticSearchParams,
|
|
6534
|
+
ExternalApiSimpleSearchParams,
|
|
6535
|
+
ExternalApi,
|
|
6035
6536
|
VertexAISearchDataStoreSpec,
|
|
6036
6537
|
VertexAISearch,
|
|
6037
6538
|
VertexRagStoreRagResource,
|
|
@@ -6044,6 +6545,7 @@ declare namespace types {
|
|
|
6044
6545
|
VertexRagStore,
|
|
6045
6546
|
Retrieval,
|
|
6046
6547
|
ToolCodeExecution,
|
|
6548
|
+
ToolComputerUse,
|
|
6047
6549
|
Tool,
|
|
6048
6550
|
FunctionCallingConfig,
|
|
6049
6551
|
LatLng,
|
|
@@ -6193,6 +6695,24 @@ declare namespace types {
|
|
|
6193
6695
|
DeleteFileConfig,
|
|
6194
6696
|
DeleteFileParameters,
|
|
6195
6697
|
DeleteFileResponse,
|
|
6698
|
+
InlinedRequest,
|
|
6699
|
+
BatchJobSource,
|
|
6700
|
+
JobError,
|
|
6701
|
+
InlinedResponse,
|
|
6702
|
+
BatchJobDestination,
|
|
6703
|
+
CreateBatchJobConfig,
|
|
6704
|
+
CreateBatchJobParameters,
|
|
6705
|
+
BatchJob,
|
|
6706
|
+
GetBatchJobConfig,
|
|
6707
|
+
GetBatchJobParameters,
|
|
6708
|
+
CancelBatchJobConfig,
|
|
6709
|
+
CancelBatchJobParameters,
|
|
6710
|
+
ListBatchJobsConfig,
|
|
6711
|
+
ListBatchJobsParameters,
|
|
6712
|
+
ListBatchJobsResponse,
|
|
6713
|
+
DeleteBatchJobConfig,
|
|
6714
|
+
DeleteBatchJobParameters,
|
|
6715
|
+
DeleteResourceJob,
|
|
6196
6716
|
GetOperationConfig,
|
|
6197
6717
|
GetOperationParameters,
|
|
6198
6718
|
FetchPredictOperationConfig,
|
|
@@ -6275,7 +6795,8 @@ declare namespace types {
|
|
|
6275
6795
|
SpeechConfigUnion,
|
|
6276
6796
|
ToolUnion,
|
|
6277
6797
|
ToolListUnion,
|
|
6278
|
-
DownloadableFileUnion
|
|
6798
|
+
DownloadableFileUnion,
|
|
6799
|
+
BatchJobSourceUnion
|
|
6279
6800
|
}
|
|
6280
6801
|
}
|
|
6281
6802
|
|
|
@@ -6401,6 +6922,15 @@ export declare interface UpscaleImageConfig {
|
|
|
6401
6922
|
/** The level of compression if the ``output_mime_type`` is
|
|
6402
6923
|
``image/jpeg``. */
|
|
6403
6924
|
outputCompressionQuality?: number;
|
|
6925
|
+
/** Whether to add an image enhancing step before upscaling.
|
|
6926
|
+
It is expected to suppress the noise and JPEG compression artifacts
|
|
6927
|
+
from the input image. */
|
|
6928
|
+
enhanceInputImage?: boolean;
|
|
6929
|
+
/** With a higher image preservation factor, the original image
|
|
6930
|
+
pixels are more respected. With a lower image preservation factor, the
|
|
6931
|
+
output image will have be more different from the input image, but
|
|
6932
|
+
with finer details and less noise. */
|
|
6933
|
+
imagePreservationFactor?: number;
|
|
6404
6934
|
}
|
|
6405
6935
|
|
|
6406
6936
|
/** User-facing config UpscaleImageParameters. */
|
|
@@ -6531,12 +7061,27 @@ export declare interface VertexRagStoreRagResource {
|
|
|
6531
7061
|
export declare interface Video {
|
|
6532
7062
|
/** Path to another storage. */
|
|
6533
7063
|
uri?: string;
|
|
6534
|
-
/** Video bytes.
|
|
7064
|
+
/** Video bytes.
|
|
7065
|
+
* @remarks Encoded as base64 string. */
|
|
6535
7066
|
videoBytes?: string;
|
|
6536
7067
|
/** Video encoding, for example "video/mp4". */
|
|
6537
7068
|
mimeType?: string;
|
|
6538
7069
|
}
|
|
6539
7070
|
|
|
7071
|
+
/** Enum that controls the compression quality of the generated videos. */
|
|
7072
|
+
export declare enum VideoCompressionQuality {
|
|
7073
|
+
/**
|
|
7074
|
+
* Optimized video compression quality. This will produce videos
|
|
7075
|
+
with a compressed, smaller file size.
|
|
7076
|
+
*/
|
|
7077
|
+
OPTIMIZED = "OPTIMIZED",
|
|
7078
|
+
/**
|
|
7079
|
+
* Lossless video compression quality. This will produce videos
|
|
7080
|
+
with a larger file size.
|
|
7081
|
+
*/
|
|
7082
|
+
LOSSLESS = "LOSSLESS"
|
|
7083
|
+
}
|
|
7084
|
+
|
|
6540
7085
|
/** Describes how the video in the Part should be used by the model. */
|
|
6541
7086
|
export declare interface VideoMetadata {
|
|
6542
7087
|
/** The frame rate of the video sent to the model. If not specified, the
|