@google/genai 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/genai.d.ts +270 -17
- package/dist/index.js +2669 -1724
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2661 -1721
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.js +4397 -3452
- package/dist/node/index.js.map +1 -1
- package/dist/node/node.d.ts +270 -17
- package/dist/web/index.mjs +4389 -3449
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +270 -17
- package/package.json +3 -2
package/dist/node/node.d.ts
CHANGED
|
@@ -187,6 +187,12 @@ export declare class Caches extends BaseModule {
|
|
|
187
187
|
/**
|
|
188
188
|
* Creates a cached contents resource.
|
|
189
189
|
*
|
|
190
|
+
* @remarks
|
|
191
|
+
* Context caching is only supported for specific models. See [Gemini
|
|
192
|
+
* Developer API reference] (https://ai.google.dev/gemini-api/docs/caching?lang=node/context-cac)
|
|
193
|
+
* and [Vertex AI reference] (https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview#supported_models)
|
|
194
|
+
* for more information.
|
|
195
|
+
*
|
|
190
196
|
* @param params - The parameters for the create request.
|
|
191
197
|
* @return The created cached content.
|
|
192
198
|
*
|
|
@@ -194,7 +200,7 @@ export declare class Caches extends BaseModule {
|
|
|
194
200
|
* ```ts
|
|
195
201
|
* const contents = ...; // Initialize the content to cache.
|
|
196
202
|
* const response = await ai.caches.create({
|
|
197
|
-
* model: 'gemini-
|
|
203
|
+
* model: 'gemini-1.5-flash',
|
|
198
204
|
* config: {
|
|
199
205
|
* 'contents': contents,
|
|
200
206
|
* 'displayName': 'test cache',
|
|
@@ -578,9 +584,9 @@ export declare class CountTokensResponse {
|
|
|
578
584
|
export declare interface CreateCachedContentConfig {
|
|
579
585
|
/** Used to override HTTP request options. */
|
|
580
586
|
httpOptions?: HttpOptions;
|
|
581
|
-
/** The TTL for this resource. The expiration time is computed: now + TTL. */
|
|
587
|
+
/** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". */
|
|
582
588
|
ttl?: string;
|
|
583
|
-
/** Timestamp of when this resource is considered expired. */
|
|
589
|
+
/** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */
|
|
584
590
|
expireTime?: string;
|
|
585
591
|
/** The user-generated meaningful display name of the cached content.
|
|
586
592
|
*/
|
|
@@ -725,6 +731,24 @@ export declare interface DeleteCachedContentParameters {
|
|
|
725
731
|
export declare class DeleteCachedContentResponse {
|
|
726
732
|
}
|
|
727
733
|
|
|
734
|
+
/** Used to override the default configuration. */
|
|
735
|
+
export declare interface DeleteFileConfig {
|
|
736
|
+
/** Used to override HTTP request options. */
|
|
737
|
+
httpOptions?: HttpOptions;
|
|
738
|
+
}
|
|
739
|
+
|
|
740
|
+
/** Generates the parameters for the get method. */
|
|
741
|
+
export declare interface DeleteFileParameters {
|
|
742
|
+
/** The name identifier for the file to be deleted. */
|
|
743
|
+
name: string;
|
|
744
|
+
/** Used to override the default configuration. */
|
|
745
|
+
config?: DeleteFileConfig;
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/** Response for the delete file method. */
|
|
749
|
+
export declare class DeleteFileResponse {
|
|
750
|
+
}
|
|
751
|
+
|
|
728
752
|
/** Used to override the default configuration. */
|
|
729
753
|
export declare interface DownloadFileConfig {
|
|
730
754
|
/** Used to override HTTP request options. */
|
|
@@ -810,6 +834,20 @@ export declare interface ExecutableCode {
|
|
|
810
834
|
language?: Language;
|
|
811
835
|
}
|
|
812
836
|
|
|
837
|
+
export declare interface FetchPredictOperationConfig {
|
|
838
|
+
/** Used to override HTTP request options. */
|
|
839
|
+
httpOptions?: HttpOptions;
|
|
840
|
+
}
|
|
841
|
+
|
|
842
|
+
/** Parameters for the fetchPredictOperation method. */
|
|
843
|
+
export declare interface FetchPredictOperationParameters {
|
|
844
|
+
/** The server-assigned name for the operation. */
|
|
845
|
+
operationName: string;
|
|
846
|
+
resourceName: string;
|
|
847
|
+
/** Used to override the default configuration. */
|
|
848
|
+
config?: FetchPredictOperationConfig;
|
|
849
|
+
}
|
|
850
|
+
|
|
813
851
|
/** A file uploaded to the API. */
|
|
814
852
|
declare interface File_2 {
|
|
815
853
|
/** The `File` resource name. The ID (name excluding the "files/" prefix) can contain up to 40 characters that are lowercase alphanumeric or dashes (-). The ID cannot start or end with a dash. If the name is empty on create, a unique name will be generated. Example: `files/123-456` */
|
|
@@ -819,7 +857,7 @@ declare interface File_2 {
|
|
|
819
857
|
/** Output only. MIME type of the file. */
|
|
820
858
|
mimeType?: string;
|
|
821
859
|
/** Output only. Size of the file in bytes. */
|
|
822
|
-
sizeBytes?:
|
|
860
|
+
sizeBytes?: string;
|
|
823
861
|
/** Output only. The timestamp of when the `File` was created. */
|
|
824
862
|
createTime?: string;
|
|
825
863
|
/** Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is scheduled to expire. */
|
|
@@ -851,7 +889,7 @@ export declare interface FileData {
|
|
|
851
889
|
mimeType?: string;
|
|
852
890
|
}
|
|
853
891
|
|
|
854
|
-
declare class Files extends BaseModule {
|
|
892
|
+
export declare class Files extends BaseModule {
|
|
855
893
|
private readonly apiClient;
|
|
856
894
|
constructor(apiClient: ApiClient);
|
|
857
895
|
/**
|
|
@@ -897,7 +935,6 @@ declare class Files extends BaseModule {
|
|
|
897
935
|
*
|
|
898
936
|
* @param params - Optional parameters specified in the
|
|
899
937
|
* `common.UploadFileParameters` interface.
|
|
900
|
-
* Optional @see {@link common.UploadFileParameters}
|
|
901
938
|
* @return A promise that resolves to a `types.File` object.
|
|
902
939
|
* @throws An error if called on a Vertex AI client.
|
|
903
940
|
* @throws An error if the `mimeType` is not provided and can not be inferred,
|
|
@@ -933,6 +970,20 @@ declare class Files extends BaseModule {
|
|
|
933
970
|
* ```
|
|
934
971
|
*/
|
|
935
972
|
get(params: types.GetFileParameters): Promise<types.File>;
|
|
973
|
+
/**
|
|
974
|
+
* Deletes a remotely stored file.
|
|
975
|
+
*
|
|
976
|
+
* @param params - The parameters for the delete request.
|
|
977
|
+
* @return The DeleteFileResponse, the response for the delete method.
|
|
978
|
+
*
|
|
979
|
+
* @example
|
|
980
|
+
* The following code deletes an example file named "files/mehozpxf877d".
|
|
981
|
+
*
|
|
982
|
+
* ```ts
|
|
983
|
+
* await ai.files.delete({name: file.name});
|
|
984
|
+
* ```
|
|
985
|
+
*/
|
|
986
|
+
delete(params: types.DeleteFileParameters): Promise<types.DeleteFileResponse>;
|
|
936
987
|
}
|
|
937
988
|
|
|
938
989
|
export declare enum FileSource {
|
|
@@ -1355,6 +1406,12 @@ export declare interface GeneratedImage {
|
|
|
1355
1406
|
enhancedPrompt?: string;
|
|
1356
1407
|
}
|
|
1357
1408
|
|
|
1409
|
+
/** A generated video. */
|
|
1410
|
+
export declare interface GeneratedVideo {
|
|
1411
|
+
/** The output video */
|
|
1412
|
+
video?: Video;
|
|
1413
|
+
}
|
|
1414
|
+
|
|
1358
1415
|
/** The config for generating an images. */
|
|
1359
1416
|
export declare interface GenerateImagesConfig {
|
|
1360
1417
|
/** Used to override HTTP request options. */
|
|
@@ -1386,7 +1443,8 @@ export declare interface GenerateImagesConfig {
|
|
|
1386
1443
|
/** Allows generation of people by the model.
|
|
1387
1444
|
*/
|
|
1388
1445
|
personGeneration?: PersonGeneration;
|
|
1389
|
-
/** Whether to report the safety scores of each image
|
|
1446
|
+
/** Whether to report the safety scores of each generated image and
|
|
1447
|
+
the positive prompt in the response.
|
|
1390
1448
|
*/
|
|
1391
1449
|
includeSafetyAttributes?: boolean;
|
|
1392
1450
|
/** Whether to include the Responsible AI filter reason if the image
|
|
@@ -1429,6 +1487,78 @@ export declare class GenerateImagesResponse {
|
|
|
1429
1487
|
/** List of generated images.
|
|
1430
1488
|
*/
|
|
1431
1489
|
generatedImages?: GeneratedImage[];
|
|
1490
|
+
/** Safety attributes of the positive prompt. Only populated if
|
|
1491
|
+
``include_safety_attributes`` is set to True.
|
|
1492
|
+
*/
|
|
1493
|
+
positivePromptSafetyAttributes?: SafetyAttributes;
|
|
1494
|
+
}
|
|
1495
|
+
|
|
1496
|
+
/** Configuration for generating videos. */
|
|
1497
|
+
export declare interface GenerateVideosConfig {
|
|
1498
|
+
/** Used to override HTTP request options. */
|
|
1499
|
+
httpOptions?: HttpOptions;
|
|
1500
|
+
/** Number of output videos. */
|
|
1501
|
+
numberOfVideos?: number;
|
|
1502
|
+
/** The gcs bucket where to save the generated videos. */
|
|
1503
|
+
outputGcsUri?: string;
|
|
1504
|
+
/** Frames per second for video generation. */
|
|
1505
|
+
fps?: number;
|
|
1506
|
+
/** Duration of the clip for video generation in seconds. */
|
|
1507
|
+
durationSeconds?: number;
|
|
1508
|
+
/** The RNG seed. If RNG seed is exactly same for each request with unchanged inputs, the prediction results will be consistent. Otherwise, a random RNG seed will be used each time to produce a different result. */
|
|
1509
|
+
seed?: number;
|
|
1510
|
+
/** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */
|
|
1511
|
+
aspectRatio?: string;
|
|
1512
|
+
/** The resolution for the generated video. 1280x720, 1920x1080 are supported. */
|
|
1513
|
+
resolution?: string;
|
|
1514
|
+
/** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */
|
|
1515
|
+
personGeneration?: string;
|
|
1516
|
+
/** The pubsub topic where to publish the video generation progress. */
|
|
1517
|
+
pubsubTopic?: string;
|
|
1518
|
+
/** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */
|
|
1519
|
+
negativePrompt?: string;
|
|
1520
|
+
/** Whether to use the prompt rewriting logic. */
|
|
1521
|
+
enhancePrompt?: boolean;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
/** A video generation operation. */
|
|
1525
|
+
export declare interface GenerateVideosOperation {
|
|
1526
|
+
/** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
|
|
1527
|
+
name?: string;
|
|
1528
|
+
/** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */
|
|
1529
|
+
metadata?: Record<string, unknown>;
|
|
1530
|
+
/** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
|
|
1531
|
+
done?: boolean;
|
|
1532
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
1533
|
+
error?: Record<string, unknown>;
|
|
1534
|
+
/** The normal response of the operation in case of success. */
|
|
1535
|
+
response?: Record<string, unknown>;
|
|
1536
|
+
/** The generated videos. */
|
|
1537
|
+
result?: GenerateVideosResponse;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
/** Class that represents the parameters for generating an image. */
|
|
1541
|
+
export declare interface GenerateVideosParameters {
|
|
1542
|
+
/** ID of the model to use. For a list of models, see `Google models
|
|
1543
|
+
<https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
|
|
1544
|
+
model: string;
|
|
1545
|
+
/** The text prompt for generating the videos. Optional for image to video use cases. */
|
|
1546
|
+
prompt?: string;
|
|
1547
|
+
/** The input image for generating the videos.
|
|
1548
|
+
Optional if prompt is provided. */
|
|
1549
|
+
image?: Image_2;
|
|
1550
|
+
/** Configuration for generating videos. */
|
|
1551
|
+
config?: GenerateVideosConfig;
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
/** Response with generated videos. */
|
|
1555
|
+
export declare class GenerateVideosResponse {
|
|
1556
|
+
/** List of the generated videos */
|
|
1557
|
+
generatedVideos?: GeneratedVideo[];
|
|
1558
|
+
/** Returns if any videos were filtered due to RAI policies. */
|
|
1559
|
+
raiMediaFilteredCount?: number;
|
|
1560
|
+
/** Returns rai failure reasons if any. */
|
|
1561
|
+
raiMediaFilteredReasons?: string[];
|
|
1432
1562
|
}
|
|
1433
1563
|
|
|
1434
1564
|
/** Generation config. */
|
|
@@ -1515,6 +1645,19 @@ export declare interface GetFileParameters {
|
|
|
1515
1645
|
config?: GetFileConfig;
|
|
1516
1646
|
}
|
|
1517
1647
|
|
|
1648
|
+
export declare interface GetOperationConfig {
|
|
1649
|
+
/** Used to override HTTP request options. */
|
|
1650
|
+
httpOptions?: HttpOptions;
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
/** Parameters for the GET method. */
|
|
1654
|
+
export declare interface GetOperationParameters {
|
|
1655
|
+
/** The server-assigned name for the operation. */
|
|
1656
|
+
operationName: string;
|
|
1657
|
+
/** Used to override the default configuration. */
|
|
1658
|
+
config?: GetOperationConfig;
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1518
1661
|
declare function getValueByPath(data: unknown, keys: string[]): unknown;
|
|
1519
1662
|
|
|
1520
1663
|
/**
|
|
@@ -1570,6 +1713,7 @@ export declare class GoogleGenAI {
|
|
|
1570
1713
|
readonly chats: Chats;
|
|
1571
1714
|
readonly caches: Caches;
|
|
1572
1715
|
readonly files: Files;
|
|
1716
|
+
readonly operations: Operations;
|
|
1573
1717
|
constructor(options: GoogleGenAIOptions);
|
|
1574
1718
|
}
|
|
1575
1719
|
|
|
@@ -2216,6 +2360,15 @@ export declare enum MaskReferenceMode {
|
|
|
2216
2360
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
2217
2361
|
}
|
|
2218
2362
|
|
|
2363
|
+
export declare enum MediaModality {
|
|
2364
|
+
MODALITY_UNSPECIFIED = "MODALITY_UNSPECIFIED",
|
|
2365
|
+
TEXT = "TEXT",
|
|
2366
|
+
IMAGE = "IMAGE",
|
|
2367
|
+
VIDEO = "VIDEO",
|
|
2368
|
+
AUDIO = "AUDIO",
|
|
2369
|
+
DOCUMENT = "DOCUMENT"
|
|
2370
|
+
}
|
|
2371
|
+
|
|
2219
2372
|
export declare enum MediaResolution {
|
|
2220
2373
|
MEDIA_RESOLUTION_UNSPECIFIED = "MEDIA_RESOLUTION_UNSPECIFIED",
|
|
2221
2374
|
MEDIA_RESOLUTION_LOW = "MEDIA_RESOLUTION_LOW",
|
|
@@ -2233,7 +2386,7 @@ export declare enum Modality {
|
|
|
2233
2386
|
/** Represents token counting info for a single modality. */
|
|
2234
2387
|
export declare interface ModalityTokenCount {
|
|
2235
2388
|
/** The modality associated with this token count. */
|
|
2236
|
-
modality?:
|
|
2389
|
+
modality?: MediaModality;
|
|
2237
2390
|
/** Number of tokens. */
|
|
2238
2391
|
tokenCount?: number;
|
|
2239
2392
|
}
|
|
@@ -2327,6 +2480,28 @@ export declare class Models extends BaseModule {
|
|
|
2327
2480
|
* ```
|
|
2328
2481
|
*/
|
|
2329
2482
|
generateContentStream: (params: types.GenerateContentParameters) => Promise<AsyncGenerator<types.GenerateContentResponse>>;
|
|
2483
|
+
/**
|
|
2484
|
+
* Generates an image based on a text description and configuration.
|
|
2485
|
+
*
|
|
2486
|
+
* @param model - The model to use.
|
|
2487
|
+
* @param prompt - A text description of the image to generate.
|
|
2488
|
+
* @param [config] - The config for image generation.
|
|
2489
|
+
* @return The response from the API.
|
|
2490
|
+
*
|
|
2491
|
+
* @example
|
|
2492
|
+
* ```ts
|
|
2493
|
+
* const response = await client.models.generateImages({
|
|
2494
|
+
* model: 'imagen-3.0-generate-002',
|
|
2495
|
+
* prompt: 'Robot holding a red skateboard',
|
|
2496
|
+
* config: {
|
|
2497
|
+
* numberOfImages: 1,
|
|
2498
|
+
* includeRaiReason: true,
|
|
2499
|
+
* },
|
|
2500
|
+
* });
|
|
2501
|
+
* console.log(response?.generatedImages?.[0]?.image?.imageBytes);
|
|
2502
|
+
* ```
|
|
2503
|
+
*/
|
|
2504
|
+
generateImages: (params: types.GenerateImagesParameters) => Promise<types.GenerateImagesResponse>;
|
|
2330
2505
|
private generateContentInternal;
|
|
2331
2506
|
private generateContentStreamInternal;
|
|
2332
2507
|
/**
|
|
@@ -2370,7 +2545,7 @@ export declare class Models extends BaseModule {
|
|
|
2370
2545
|
* console.log(response?.generatedImages?.[0]?.image?.imageBytes);
|
|
2371
2546
|
* ```
|
|
2372
2547
|
*/
|
|
2373
|
-
|
|
2548
|
+
private generateImagesInternal;
|
|
2374
2549
|
/**
|
|
2375
2550
|
* Counts the number of tokens in the given contents. Multimodal input is
|
|
2376
2551
|
* supported for Gemini models.
|
|
@@ -2407,6 +2582,52 @@ export declare class Models extends BaseModule {
|
|
|
2407
2582
|
* ```
|
|
2408
2583
|
*/
|
|
2409
2584
|
computeTokens(params: types.ComputeTokensParameters): Promise<types.ComputeTokensResponse>;
|
|
2585
|
+
/**
|
|
2586
|
+
* Generates videos based on a text description and configuration.
|
|
2587
|
+
*
|
|
2588
|
+
* @param params - The parameters for generating videos.
|
|
2589
|
+
* @return A Promise<GenerateVideosOperation> which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.
|
|
2590
|
+
*
|
|
2591
|
+
* @example
|
|
2592
|
+
* ```ts
|
|
2593
|
+
* const operation = await ai.models.generateVideos({
|
|
2594
|
+
* model: 'veo-2.0-generate-001',
|
|
2595
|
+
* prompt: 'A neon hologram of a cat driving at top speed',
|
|
2596
|
+
* config: {
|
|
2597
|
+
* numberOfVideos: 1
|
|
2598
|
+
* });
|
|
2599
|
+
*
|
|
2600
|
+
* while (!operation.done) {
|
|
2601
|
+
* await new Promise(resolve => setTimeout(resolve, 10000));
|
|
2602
|
+
* operation = await ai.operations.get({operation: operation});
|
|
2603
|
+
* }
|
|
2604
|
+
*
|
|
2605
|
+
* console.log(operation.result?.generatedVideos?.[0]?.video?.uri);
|
|
2606
|
+
* ```
|
|
2607
|
+
*/
|
|
2608
|
+
generateVideos(params: types.GenerateVideosParameters): Promise<types.GenerateVideosOperation>;
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
/** Parameters for the get method of the operations module. */
|
|
2612
|
+
export declare interface OperationGetParameters {
|
|
2613
|
+
/** The operation to be retrieved. */
|
|
2614
|
+
operation: GenerateVideosOperation;
|
|
2615
|
+
/** Used to override the default configuration. */
|
|
2616
|
+
config?: GetOperationConfig;
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
export declare class Operations extends BaseModule {
|
|
2620
|
+
private readonly apiClient;
|
|
2621
|
+
constructor(apiClient: ApiClient);
|
|
2622
|
+
/**
|
|
2623
|
+
* Gets the status of a long-running operation.
|
|
2624
|
+
*
|
|
2625
|
+
* @param operation The Operation object returned by a previous API call.
|
|
2626
|
+
* @return The updated Operation object, with the latest status or result.
|
|
2627
|
+
*/
|
|
2628
|
+
get(parameters: types.OperationGetParameters): Promise<types.GenerateVideosOperation>;
|
|
2629
|
+
private getVideosOperationInternal;
|
|
2630
|
+
private fetchPredictVideosOperationInternal;
|
|
2410
2631
|
}
|
|
2411
2632
|
|
|
2412
2633
|
/**
|
|
@@ -2429,7 +2650,7 @@ export declare enum Outcome {
|
|
|
2429
2650
|
/**
|
|
2430
2651
|
* Pagers for the GenAI List APIs.
|
|
2431
2652
|
*/
|
|
2432
|
-
declare enum PagedItem {
|
|
2653
|
+
export declare enum PagedItem {
|
|
2433
2654
|
PAGED_ITEM_BATCH_JOBS = "batchJobs",
|
|
2434
2655
|
PAGED_ITEM_MODELS = "models",
|
|
2435
2656
|
PAGED_ITEM_TUNING_JOBS = "tuningJobs",
|
|
@@ -2456,7 +2677,7 @@ declare interface PagedItemResponse<T> {
|
|
|
2456
2677
|
/**
|
|
2457
2678
|
* Pager class for iterating through paginated results.
|
|
2458
2679
|
*/
|
|
2459
|
-
declare class Pager<T> implements AsyncIterable<T> {
|
|
2680
|
+
export declare class Pager<T> implements AsyncIterable<T> {
|
|
2460
2681
|
private nameInternal;
|
|
2461
2682
|
private pageInternal;
|
|
2462
2683
|
private paramsInternal;
|
|
@@ -2659,6 +2880,9 @@ export declare interface SafetyAttributes {
|
|
|
2659
2880
|
/** List of scores of each categories.
|
|
2660
2881
|
*/
|
|
2661
2882
|
scores?: number[];
|
|
2883
|
+
/** Internal use only.
|
|
2884
|
+
*/
|
|
2885
|
+
contentType?: string;
|
|
2662
2886
|
}
|
|
2663
2887
|
|
|
2664
2888
|
export declare enum SafetyFilterLevel {
|
|
@@ -2708,8 +2932,6 @@ export declare interface Schema {
|
|
|
2708
2932
|
default?: unknown;
|
|
2709
2933
|
/** Optional. Maximum length of the Type.STRING */
|
|
2710
2934
|
maxLength?: string;
|
|
2711
|
-
/** Optional. The title of the Schema. */
|
|
2712
|
-
title?: string;
|
|
2713
2935
|
/** Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING */
|
|
2714
2936
|
minLength?: string;
|
|
2715
2937
|
/** Optional. Minimum number of the properties for Type.OBJECT. */
|
|
@@ -2742,6 +2964,8 @@ export declare interface Schema {
|
|
|
2742
2964
|
propertyOrdering?: string[];
|
|
2743
2965
|
/** Optional. Required properties of Type.OBJECT. */
|
|
2744
2966
|
required?: string[];
|
|
2967
|
+
/** Optional. The title of the Schema. */
|
|
2968
|
+
title?: string;
|
|
2745
2969
|
/** Optional. The type of the data. */
|
|
2746
2970
|
type?: Type;
|
|
2747
2971
|
}
|
|
@@ -3007,6 +3231,8 @@ export declare interface TestTableItem {
|
|
|
3007
3231
|
hasUnion?: boolean;
|
|
3008
3232
|
/** When set to a reason string, this test will be skipped in the API mode. Use this flag for tests that can not be reproduced with the real API. E.g. a test that deletes a resource. */
|
|
3009
3233
|
skipInApiMode?: string;
|
|
3234
|
+
/** Keys to ignore when comparing the request and response. This is useful for tests that are not deterministic. */
|
|
3235
|
+
ignoreKeys?: string[];
|
|
3010
3236
|
}
|
|
3011
3237
|
|
|
3012
3238
|
/** The thinking features configuration. */
|
|
@@ -3101,6 +3327,7 @@ declare namespace types {
|
|
|
3101
3327
|
MaskReferenceMode,
|
|
3102
3328
|
ControlReferenceType,
|
|
3103
3329
|
SubjectReferenceType,
|
|
3330
|
+
MediaModality,
|
|
3104
3331
|
VideoMetadata,
|
|
3105
3332
|
CodeExecutionResult,
|
|
3106
3333
|
ExecutableCode,
|
|
@@ -3174,6 +3401,12 @@ declare namespace types {
|
|
|
3174
3401
|
ComputeTokensParameters,
|
|
3175
3402
|
TokensInfo,
|
|
3176
3403
|
ComputeTokensResponse,
|
|
3404
|
+
GenerateVideosConfig,
|
|
3405
|
+
GenerateVideosParameters,
|
|
3406
|
+
Video,
|
|
3407
|
+
GeneratedVideo,
|
|
3408
|
+
GenerateVideosResponse,
|
|
3409
|
+
GenerateVideosOperation,
|
|
3177
3410
|
CreateCachedContentConfig,
|
|
3178
3411
|
CreateCachedContentParameters,
|
|
3179
3412
|
CachedContentUsageMetadata,
|
|
@@ -3200,6 +3433,13 @@ declare namespace types {
|
|
|
3200
3433
|
CreateFileResponse,
|
|
3201
3434
|
GetFileConfig,
|
|
3202
3435
|
GetFileParameters,
|
|
3436
|
+
DeleteFileConfig,
|
|
3437
|
+
DeleteFileParameters,
|
|
3438
|
+
DeleteFileResponse,
|
|
3439
|
+
GetOperationConfig,
|
|
3440
|
+
GetOperationParameters,
|
|
3441
|
+
FetchPredictOperationConfig,
|
|
3442
|
+
FetchPredictOperationParameters,
|
|
3203
3443
|
TestTableItem,
|
|
3204
3444
|
TestTableFile,
|
|
3205
3445
|
ReplayRequest,
|
|
@@ -3236,6 +3476,7 @@ declare namespace types {
|
|
|
3236
3476
|
LiveSendClientContentParameters,
|
|
3237
3477
|
LiveSendRealtimeInputParameters,
|
|
3238
3478
|
LiveSendToolResponseParameters,
|
|
3479
|
+
OperationGetParameters,
|
|
3239
3480
|
PartUnion,
|
|
3240
3481
|
PartListUnion,
|
|
3241
3482
|
ContentUnion,
|
|
@@ -3250,9 +3491,9 @@ declare namespace types {
|
|
|
3250
3491
|
export declare interface UpdateCachedContentConfig {
|
|
3251
3492
|
/** Used to override HTTP request options. */
|
|
3252
3493
|
httpOptions?: HttpOptions;
|
|
3253
|
-
/** The TTL for this resource. The expiration time is computed: now + TTL. */
|
|
3494
|
+
/** The TTL for this resource. The expiration time is computed: now + TTL. It is a duration string, with up to nine fractional digits, terminated by 's'. Example: "3.5s". */
|
|
3254
3495
|
ttl?: string;
|
|
3255
|
-
/** Timestamp of when this resource is considered expired. */
|
|
3496
|
+
/** Timestamp of when this resource is considered expired. Uses RFC 3339 format, Example: 2014-10-02T15:01:23Z. */
|
|
3256
3497
|
expireTime?: string;
|
|
3257
3498
|
}
|
|
3258
3499
|
|
|
@@ -3339,10 +3580,12 @@ export declare interface UpscaleImageParameters {
|
|
|
3339
3580
|
config?: UpscaleImageConfig;
|
|
3340
3581
|
}
|
|
3341
3582
|
|
|
3342
|
-
/** Retrieve from Vertex AI Search datastore for grounding. See https://cloud.google.com/products/agent-builder */
|
|
3583
|
+
/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */
|
|
3343
3584
|
export declare interface VertexAISearch {
|
|
3344
|
-
/**
|
|
3585
|
+
/** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */
|
|
3345
3586
|
datastore?: string;
|
|
3587
|
+
/** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */
|
|
3588
|
+
engine?: string;
|
|
3346
3589
|
}
|
|
3347
3590
|
|
|
3348
3591
|
/** Retrieve from Vertex RAG Store for grounding. */
|
|
@@ -3365,6 +3608,16 @@ export declare interface VertexRagStoreRagResource {
|
|
|
3365
3608
|
ragFileIds?: string[];
|
|
3366
3609
|
}
|
|
3367
3610
|
|
|
3611
|
+
/** A generated video. */
|
|
3612
|
+
export declare interface Video {
|
|
3613
|
+
/** Path to another storage. */
|
|
3614
|
+
uri?: string;
|
|
3615
|
+
/** Video bytes. */
|
|
3616
|
+
videoBytes?: string;
|
|
3617
|
+
/** Video encoding, for example "video/mp4". */
|
|
3618
|
+
mimeType?: string;
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3368
3621
|
/** Metadata describes the input video content. */
|
|
3369
3622
|
export declare interface VideoMetadata {
|
|
3370
3623
|
/** Optional. The end offset of the video. */
|