@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/genai.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. */
|
|
@@ -2719,6 +3100,7 @@ export declare class GoogleGenAI {
|
|
|
2719
3100
|
private readonly apiVersion?;
|
|
2720
3101
|
readonly models: Models;
|
|
2721
3102
|
readonly live: Live;
|
|
3103
|
+
readonly batches: Batches;
|
|
2722
3104
|
readonly chats: Chats;
|
|
2723
3105
|
readonly caches: Caches;
|
|
2724
3106
|
readonly files: Files;
|
|
@@ -2879,7 +3261,7 @@ export declare interface GroundingMetadata {
|
|
|
2879
3261
|
|
|
2880
3262
|
/** Grounding support. */
|
|
2881
3263
|
export declare interface GroundingSupport {
|
|
2882
|
-
/** Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident.
|
|
3264
|
+
/** 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. */
|
|
2883
3265
|
confidenceScores?: number[];
|
|
2884
3266
|
/** 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. */
|
|
2885
3267
|
groundingChunkIndices?: number[];
|
|
@@ -2956,7 +3338,23 @@ export declare enum HarmCategory {
|
|
|
2956
3338
|
/**
|
|
2957
3339
|
* Deprecated: Election filter is not longer supported. The harm category is civic integrity.
|
|
2958
3340
|
*/
|
|
2959
|
-
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY"
|
|
3341
|
+
HARM_CATEGORY_CIVIC_INTEGRITY = "HARM_CATEGORY_CIVIC_INTEGRITY",
|
|
3342
|
+
/**
|
|
3343
|
+
* The harm category is image hate.
|
|
3344
|
+
*/
|
|
3345
|
+
HARM_CATEGORY_IMAGE_HATE = "HARM_CATEGORY_IMAGE_HATE",
|
|
3346
|
+
/**
|
|
3347
|
+
* The harm category is image dangerous content.
|
|
3348
|
+
*/
|
|
3349
|
+
HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT = "HARM_CATEGORY_IMAGE_DANGEROUS_CONTENT",
|
|
3350
|
+
/**
|
|
3351
|
+
* The harm category is image harassment.
|
|
3352
|
+
*/
|
|
3353
|
+
HARM_CATEGORY_IMAGE_HARASSMENT = "HARM_CATEGORY_IMAGE_HARASSMENT",
|
|
3354
|
+
/**
|
|
3355
|
+
* The harm category is image sexually explicit content.
|
|
3356
|
+
*/
|
|
3357
|
+
HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT = "HARM_CATEGORY_IMAGE_SEXUALLY_EXPLICIT"
|
|
2960
3358
|
}
|
|
2961
3359
|
|
|
2962
3360
|
/** Output only. Harm probability levels in the content. */
|
|
@@ -3090,7 +3488,8 @@ declare interface Image_2 {
|
|
|
3090
3488
|
gcsUri?: string;
|
|
3091
3489
|
/** The image bytes data. ``Image`` can contain a value for this field
|
|
3092
3490
|
or the ``gcs_uri`` field but not both.
|
|
3093
|
-
|
|
3491
|
+
|
|
3492
|
+
* @remarks Encoded as base64 string. */
|
|
3094
3493
|
imageBytes?: string;
|
|
3095
3494
|
/** The MIME type of the image. */
|
|
3096
3495
|
mimeType?: string;
|
|
@@ -3106,6 +3505,29 @@ export declare enum ImagePromptLanguage {
|
|
|
3106
3505
|
hi = "hi"
|
|
3107
3506
|
}
|
|
3108
3507
|
|
|
3508
|
+
/** Config for inlined request. */
|
|
3509
|
+
export declare interface InlinedRequest {
|
|
3510
|
+
/** ID of the model to use. For a list of models, see `Google models
|
|
3511
|
+
<https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
|
|
3512
|
+
model?: string;
|
|
3513
|
+
/** Content of the request.
|
|
3514
|
+
*/
|
|
3515
|
+
contents?: ContentListUnion;
|
|
3516
|
+
/** Configuration that contains optional model parameters.
|
|
3517
|
+
*/
|
|
3518
|
+
config?: GenerateContentConfig;
|
|
3519
|
+
}
|
|
3520
|
+
|
|
3521
|
+
/** Config for `inlined_responses` parameter. */
|
|
3522
|
+
export declare class InlinedResponse {
|
|
3523
|
+
/** The response to the request.
|
|
3524
|
+
*/
|
|
3525
|
+
response?: GenerateContentResponse;
|
|
3526
|
+
/** The error encountered while processing the request.
|
|
3527
|
+
*/
|
|
3528
|
+
error?: JobError;
|
|
3529
|
+
}
|
|
3530
|
+
|
|
3109
3531
|
/** Represents a time interval, encoded as a start time (inclusive) and an end time (exclusive).
|
|
3110
3532
|
|
|
3111
3533
|
The start time must be less than or equal to the end time.
|
|
@@ -3120,7 +3542,17 @@ export declare interface Interval {
|
|
|
3120
3542
|
endTime?: string;
|
|
3121
3543
|
}
|
|
3122
3544
|
|
|
3123
|
-
/**
|
|
3545
|
+
/** Job error. */
|
|
3546
|
+
export declare interface JobError {
|
|
3547
|
+
/** A list of messages that carry the error details. There is a common set of message types for APIs to use. */
|
|
3548
|
+
details?: string[];
|
|
3549
|
+
/** The status code. */
|
|
3550
|
+
code?: number;
|
|
3551
|
+
/** A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the `details` field. */
|
|
3552
|
+
message?: string;
|
|
3553
|
+
}
|
|
3554
|
+
|
|
3555
|
+
/** Job state. */
|
|
3124
3556
|
export declare enum JobState {
|
|
3125
3557
|
/**
|
|
3126
3558
|
* The job state is unspecified.
|
|
@@ -3163,7 +3595,7 @@ export declare enum JobState {
|
|
|
3163
3595
|
*/
|
|
3164
3596
|
JOB_STATE_EXPIRED = "JOB_STATE_EXPIRED",
|
|
3165
3597
|
/**
|
|
3166
|
-
* The job is being updated. Only jobs in the `
|
|
3598
|
+
* 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.
|
|
3167
3599
|
*/
|
|
3168
3600
|
JOB_STATE_UPDATING = "JOB_STATE_UPDATING",
|
|
3169
3601
|
/**
|
|
@@ -3198,6 +3630,33 @@ export declare interface LatLng {
|
|
|
3198
3630
|
longitude?: number;
|
|
3199
3631
|
}
|
|
3200
3632
|
|
|
3633
|
+
/** Config for optional parameters. */
|
|
3634
|
+
export declare interface ListBatchJobsConfig {
|
|
3635
|
+
/** Used to override HTTP request options. */
|
|
3636
|
+
httpOptions?: HttpOptions;
|
|
3637
|
+
/** Abort signal which can be used to cancel the request.
|
|
3638
|
+
|
|
3639
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
3640
|
+
operation will not cancel the request in the service. You will still
|
|
3641
|
+
be charged usage for any applicable operations.
|
|
3642
|
+
*/
|
|
3643
|
+
abortSignal?: AbortSignal;
|
|
3644
|
+
pageSize?: number;
|
|
3645
|
+
pageToken?: string;
|
|
3646
|
+
filter?: string;
|
|
3647
|
+
}
|
|
3648
|
+
|
|
3649
|
+
/** Config for batches.list parameters. */
|
|
3650
|
+
export declare interface ListBatchJobsParameters {
|
|
3651
|
+
config?: ListBatchJobsConfig;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
/** Config for batches.list return value. */
|
|
3655
|
+
export declare class ListBatchJobsResponse {
|
|
3656
|
+
nextPageToken?: string;
|
|
3657
|
+
batchJobs?: BatchJob[];
|
|
3658
|
+
}
|
|
3659
|
+
|
|
3201
3660
|
/** Config for caches.list method. */
|
|
3202
3661
|
export declare interface ListCachedContentsConfig {
|
|
3203
3662
|
/** Used to override HTTP request options. */
|
|
@@ -4042,6 +4501,8 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
4042
4501
|
}
|
|
4043
4502
|
|
|
4044
4503
|
export declare interface LiveServerSetupComplete {
|
|
4504
|
+
/** The session id of the live session. */
|
|
4505
|
+
sessionId?: string;
|
|
4045
4506
|
}
|
|
4046
4507
|
|
|
4047
4508
|
/** Request for the client to execute the `function_calls` and return the responses with the matching `id`s. */
|
|
@@ -4775,7 +5236,8 @@ export declare interface Part {
|
|
|
4775
5236
|
inlineData?: Blob_2;
|
|
4776
5237
|
/** Optional. URI based data. */
|
|
4777
5238
|
fileData?: FileData;
|
|
4778
|
-
/** An opaque signature for the thought so it can be reused in subsequent requests.
|
|
5239
|
+
/** An opaque signature for the thought so it can be reused in subsequent requests.
|
|
5240
|
+
* @remarks Encoded as base64 string. */
|
|
4779
5241
|
thoughtSignature?: string;
|
|
4780
5242
|
/** Optional. Result of executing the [ExecutableCode]. */
|
|
4781
5243
|
codeExecutionResult?: CodeExecutionResult;
|
|
@@ -4805,8 +5267,17 @@ export declare type PartUnion = Part | string;
|
|
|
4805
5267
|
|
|
4806
5268
|
/** Enum that controls the generation of people. */
|
|
4807
5269
|
export declare enum PersonGeneration {
|
|
5270
|
+
/**
|
|
5271
|
+
* Block generation of images of people.
|
|
5272
|
+
*/
|
|
4808
5273
|
DONT_ALLOW = "DONT_ALLOW",
|
|
5274
|
+
/**
|
|
5275
|
+
* Generate images of adults, but not children.
|
|
5276
|
+
*/
|
|
4809
5277
|
ALLOW_ADULT = "ALLOW_ADULT",
|
|
5278
|
+
/**
|
|
5279
|
+
* Generate images that include adults and children.
|
|
5280
|
+
*/
|
|
4810
5281
|
ALLOW_ALL = "ALLOW_ALL"
|
|
4811
5282
|
}
|
|
4812
5283
|
|
|
@@ -4971,6 +5442,8 @@ export declare class ReplayResponse {
|
|
|
4971
5442
|
export declare interface Retrieval {
|
|
4972
5443
|
/** Optional. Deprecated. This option is no longer supported. */
|
|
4973
5444
|
disableAttribution?: boolean;
|
|
5445
|
+
/** Use data source powered by external API for grounding. */
|
|
5446
|
+
externalApi?: ExternalApi;
|
|
4974
5447
|
/** Set to use data source powered by Vertex AI Search. */
|
|
4975
5448
|
vertexAiSearch?: VertexAISearch;
|
|
4976
5449
|
/** Set to use data source powered by Vertex RAG store. User data is uploaded via the VertexRagDataService. */
|
|
@@ -5019,6 +5492,8 @@ export declare interface SafetyRating {
|
|
|
5019
5492
|
blocked?: boolean;
|
|
5020
5493
|
/** Output only. Harm category. */
|
|
5021
5494
|
category?: HarmCategory;
|
|
5495
|
+
/** 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. */
|
|
5496
|
+
overwrittenThreshold?: HarmBlockThreshold;
|
|
5022
5497
|
/** Output only. Harm probability levels in the content. */
|
|
5023
5498
|
probability?: HarmProbability;
|
|
5024
5499
|
/** Output only. Harm probability score. */
|
|
@@ -5155,7 +5630,8 @@ export declare type SchemaUnion = Schema | unknown;
|
|
|
5155
5630
|
export declare interface SearchEntryPoint {
|
|
5156
5631
|
/** Optional. Web content snippet that can be embedded in a web page or an app webview. */
|
|
5157
5632
|
renderedContent?: string;
|
|
5158
|
-
/** Optional. Base64 encoded JSON representing array of tuple.
|
|
5633
|
+
/** Optional. Base64 encoded JSON representing array of tuple.
|
|
5634
|
+
* @remarks Encoded as base64 string. */
|
|
5159
5635
|
sdkBlob?: string;
|
|
5160
5636
|
}
|
|
5161
5637
|
|
|
@@ -5476,7 +5952,7 @@ export declare interface SupervisedHyperParameters {
|
|
|
5476
5952
|
adapterSize?: AdapterSize;
|
|
5477
5953
|
/** Optional. Number of complete passes the model makes over the entire training dataset during training. */
|
|
5478
5954
|
epochCount?: string;
|
|
5479
|
-
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
5955
|
+
/** Optional. Multiplier for adjusting the default learning rate. Mutually exclusive with `learning_rate`. */
|
|
5480
5956
|
learningRateMultiplier?: number;
|
|
5481
5957
|
}
|
|
5482
5958
|
|
|
@@ -5546,9 +6022,9 @@ export declare interface SupervisedTuningSpec {
|
|
|
5546
6022
|
exportLastCheckpointOnly?: boolean;
|
|
5547
6023
|
/** Optional. Hyperparameters for SFT. */
|
|
5548
6024
|
hyperParameters?: SupervisedHyperParameters;
|
|
5549
|
-
/** Required.
|
|
6025
|
+
/** 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. */
|
|
5550
6026
|
trainingDatasetUri?: string;
|
|
5551
|
-
/** Optional.
|
|
6027
|
+
/** 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. */
|
|
5552
6028
|
validationDatasetUri?: string;
|
|
5553
6029
|
}
|
|
5554
6030
|
|
|
@@ -5677,7 +6153,8 @@ export declare interface TokensInfo {
|
|
|
5677
6153
|
role?: string;
|
|
5678
6154
|
/** A list of token ids from the input. */
|
|
5679
6155
|
tokenIds?: string[];
|
|
5680
|
-
/** A list of tokens from the input.
|
|
6156
|
+
/** A list of tokens from the input.
|
|
6157
|
+
* @remarks Encoded as base64 string. */
|
|
5681
6158
|
tokens?: string[];
|
|
5682
6159
|
}
|
|
5683
6160
|
|
|
@@ -5702,12 +6179,20 @@ export declare interface Tool {
|
|
|
5702
6179
|
urlContext?: UrlContext;
|
|
5703
6180
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
5704
6181
|
codeExecution?: ToolCodeExecution;
|
|
6182
|
+
/** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
|
|
6183
|
+
computerUse?: ToolComputerUse;
|
|
5705
6184
|
}
|
|
5706
6185
|
|
|
5707
6186
|
/** 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. */
|
|
5708
6187
|
export declare interface ToolCodeExecution {
|
|
5709
6188
|
}
|
|
5710
6189
|
|
|
6190
|
+
/** Tool to support computer use. */
|
|
6191
|
+
export declare interface ToolComputerUse {
|
|
6192
|
+
/** Required. The environment being operated. */
|
|
6193
|
+
environment?: Environment;
|
|
6194
|
+
}
|
|
6195
|
+
|
|
5711
6196
|
/** Tool config.
|
|
5712
6197
|
|
|
5713
6198
|
This config is shared for all tools provided in the request.
|
|
@@ -5791,6 +6276,8 @@ export declare interface TunedModelInfo {
|
|
|
5791
6276
|
export declare interface TuningDataset {
|
|
5792
6277
|
/** GCS URI of the file containing training dataset in JSONL format. */
|
|
5793
6278
|
gcsUri?: string;
|
|
6279
|
+
/** 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'. */
|
|
6280
|
+
vertexDatasetResource?: string;
|
|
5794
6281
|
/** Inline examples with simple input/output text. */
|
|
5795
6282
|
examples?: TuningExample[];
|
|
5796
6283
|
}
|
|
@@ -5848,6 +6335,10 @@ export declare interface TuningJob {
|
|
|
5848
6335
|
labels?: Record<string, string>;
|
|
5849
6336
|
/** Output only. The resource name of the PipelineJob associated with the TuningJob. Format: `projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`. */
|
|
5850
6337
|
pipelineJob?: string;
|
|
6338
|
+
/** Output only. Reserved for future use. */
|
|
6339
|
+
satisfiesPzi?: boolean;
|
|
6340
|
+
/** Output only. Reserved for future use. */
|
|
6341
|
+
satisfiesPzs?: boolean;
|
|
5851
6342
|
/** 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. */
|
|
5852
6343
|
serviceAccount?: string;
|
|
5853
6344
|
/** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
|
|
@@ -5896,6 +6387,8 @@ declare class Tunings extends BaseModule {
|
|
|
5896
6387
|
export declare interface TuningValidationDataset {
|
|
5897
6388
|
/** GCS URI of the file containing validation dataset in JSONL format. */
|
|
5898
6389
|
gcsUri?: string;
|
|
6390
|
+
/** 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'. */
|
|
6391
|
+
vertexDatasetResource?: string;
|
|
5899
6392
|
}
|
|
5900
6393
|
|
|
5901
6394
|
/** Options about which input is included in the user's turn. */
|
|
@@ -5969,6 +6462,9 @@ declare namespace types {
|
|
|
5969
6462
|
HarmBlockThreshold,
|
|
5970
6463
|
Mode,
|
|
5971
6464
|
AuthType,
|
|
6465
|
+
ApiSpec,
|
|
6466
|
+
Environment,
|
|
6467
|
+
UrlRetrievalStatus,
|
|
5972
6468
|
FinishReason,
|
|
5973
6469
|
HarmProbability,
|
|
5974
6470
|
HarmSeverity,
|
|
@@ -5982,7 +6478,6 @@ declare namespace types {
|
|
|
5982
6478
|
Behavior,
|
|
5983
6479
|
DynamicRetrievalConfigMode,
|
|
5984
6480
|
FunctionCallingConfigMode,
|
|
5985
|
-
UrlRetrievalStatus,
|
|
5986
6481
|
SafetyFilterLevel,
|
|
5987
6482
|
PersonGeneration,
|
|
5988
6483
|
ImagePromptLanguage,
|
|
@@ -5990,6 +6485,7 @@ declare namespace types {
|
|
|
5990
6485
|
ControlReferenceType,
|
|
5991
6486
|
SubjectReferenceType,
|
|
5992
6487
|
EditMode,
|
|
6488
|
+
VideoCompressionQuality,
|
|
5993
6489
|
FileState,
|
|
5994
6490
|
FileSource,
|
|
5995
6491
|
MediaModality,
|
|
@@ -6027,6 +6523,11 @@ declare namespace types {
|
|
|
6027
6523
|
AuthConfig,
|
|
6028
6524
|
GoogleMaps,
|
|
6029
6525
|
UrlContext,
|
|
6526
|
+
ApiAuthApiKeyConfig,
|
|
6527
|
+
ApiAuth,
|
|
6528
|
+
ExternalApiElasticSearchParams,
|
|
6529
|
+
ExternalApiSimpleSearchParams,
|
|
6530
|
+
ExternalApi,
|
|
6030
6531
|
VertexAISearchDataStoreSpec,
|
|
6031
6532
|
VertexAISearch,
|
|
6032
6533
|
VertexRagStoreRagResource,
|
|
@@ -6039,6 +6540,7 @@ declare namespace types {
|
|
|
6039
6540
|
VertexRagStore,
|
|
6040
6541
|
Retrieval,
|
|
6041
6542
|
ToolCodeExecution,
|
|
6543
|
+
ToolComputerUse,
|
|
6042
6544
|
Tool,
|
|
6043
6545
|
FunctionCallingConfig,
|
|
6044
6546
|
LatLng,
|
|
@@ -6188,6 +6690,24 @@ declare namespace types {
|
|
|
6188
6690
|
DeleteFileConfig,
|
|
6189
6691
|
DeleteFileParameters,
|
|
6190
6692
|
DeleteFileResponse,
|
|
6693
|
+
InlinedRequest,
|
|
6694
|
+
BatchJobSource,
|
|
6695
|
+
JobError,
|
|
6696
|
+
InlinedResponse,
|
|
6697
|
+
BatchJobDestination,
|
|
6698
|
+
CreateBatchJobConfig,
|
|
6699
|
+
CreateBatchJobParameters,
|
|
6700
|
+
BatchJob,
|
|
6701
|
+
GetBatchJobConfig,
|
|
6702
|
+
GetBatchJobParameters,
|
|
6703
|
+
CancelBatchJobConfig,
|
|
6704
|
+
CancelBatchJobParameters,
|
|
6705
|
+
ListBatchJobsConfig,
|
|
6706
|
+
ListBatchJobsParameters,
|
|
6707
|
+
ListBatchJobsResponse,
|
|
6708
|
+
DeleteBatchJobConfig,
|
|
6709
|
+
DeleteBatchJobParameters,
|
|
6710
|
+
DeleteResourceJob,
|
|
6191
6711
|
GetOperationConfig,
|
|
6192
6712
|
GetOperationParameters,
|
|
6193
6713
|
FetchPredictOperationConfig,
|
|
@@ -6270,7 +6790,8 @@ declare namespace types {
|
|
|
6270
6790
|
SpeechConfigUnion,
|
|
6271
6791
|
ToolUnion,
|
|
6272
6792
|
ToolListUnion,
|
|
6273
|
-
DownloadableFileUnion
|
|
6793
|
+
DownloadableFileUnion,
|
|
6794
|
+
BatchJobSourceUnion
|
|
6274
6795
|
}
|
|
6275
6796
|
}
|
|
6276
6797
|
|
|
@@ -6396,6 +6917,15 @@ export declare interface UpscaleImageConfig {
|
|
|
6396
6917
|
/** The level of compression if the ``output_mime_type`` is
|
|
6397
6918
|
``image/jpeg``. */
|
|
6398
6919
|
outputCompressionQuality?: number;
|
|
6920
|
+
/** Whether to add an image enhancing step before upscaling.
|
|
6921
|
+
It is expected to suppress the noise and JPEG compression artifacts
|
|
6922
|
+
from the input image. */
|
|
6923
|
+
enhanceInputImage?: boolean;
|
|
6924
|
+
/** With a higher image preservation factor, the original image
|
|
6925
|
+
pixels are more respected. With a lower image preservation factor, the
|
|
6926
|
+
output image will have be more different from the input image, but
|
|
6927
|
+
with finer details and less noise. */
|
|
6928
|
+
imagePreservationFactor?: number;
|
|
6399
6929
|
}
|
|
6400
6930
|
|
|
6401
6931
|
/** User-facing config UpscaleImageParameters. */
|
|
@@ -6526,12 +7056,27 @@ export declare interface VertexRagStoreRagResource {
|
|
|
6526
7056
|
export declare interface Video {
|
|
6527
7057
|
/** Path to another storage. */
|
|
6528
7058
|
uri?: string;
|
|
6529
|
-
/** Video bytes.
|
|
7059
|
+
/** Video bytes.
|
|
7060
|
+
* @remarks Encoded as base64 string. */
|
|
6530
7061
|
videoBytes?: string;
|
|
6531
7062
|
/** Video encoding, for example "video/mp4". */
|
|
6532
7063
|
mimeType?: string;
|
|
6533
7064
|
}
|
|
6534
7065
|
|
|
7066
|
+
/** Enum that controls the compression quality of the generated videos. */
|
|
7067
|
+
export declare enum VideoCompressionQuality {
|
|
7068
|
+
/**
|
|
7069
|
+
* Optimized video compression quality. This will produce videos
|
|
7070
|
+
with a compressed, smaller file size.
|
|
7071
|
+
*/
|
|
7072
|
+
OPTIMIZED = "OPTIMIZED",
|
|
7073
|
+
/**
|
|
7074
|
+
* Lossless video compression quality. This will produce videos
|
|
7075
|
+
with a larger file size.
|
|
7076
|
+
*/
|
|
7077
|
+
LOSSLESS = "LOSSLESS"
|
|
7078
|
+
}
|
|
7079
|
+
|
|
6535
7080
|
/** Describes how the video in the Part should be used by the model. */
|
|
6536
7081
|
export declare interface VideoMetadata {
|
|
6537
7082
|
/** The frame rate of the video sent to the model. If not specified, the
|