@google/genai 1.4.0 → 1.5.1

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/web/web.d.ts CHANGED
@@ -456,7 +456,7 @@ export declare class Caches extends BaseModule {
456
456
  * @example
457
457
  * ```ts
458
458
  * const cachedContents = await ai.caches.list({config: {'pageSize': 2}});
459
- * for (const cachedContent of cachedContents) {
459
+ * for await (const cachedContent of cachedContents) {
460
460
  * console.log(cachedContent);
461
461
  * }
462
462
  * ```
@@ -556,6 +556,10 @@ export declare interface CallableToolConfig {
556
556
  * Specifies the model's behavior after invoking this tool.
557
557
  */
558
558
  behavior?: Behavior;
559
+ /**
560
+ * Timeout for remote calls in milliseconds. Note this timeout applies only to
561
+ * tool remote calls, and not making HTTP requests to the API. */
562
+ timeout?: number;
559
563
  }
560
564
 
561
565
  /** A response candidate generated from the model. */
@@ -2426,6 +2430,8 @@ export declare interface GenerateVideosConfig {
2426
2430
  enhancePrompt?: boolean;
2427
2431
  /** Whether to generate audio along with the video. */
2428
2432
  generateAudio?: boolean;
2433
+ /** Image to use as the last frame of generated videos. Only supported for image to video use cases. */
2434
+ lastFrame?: Image_2;
2429
2435
  }
2430
2436
 
2431
2437
  /** A video generation operation. */
@@ -2442,7 +2448,7 @@ export declare interface GenerateVideosOperation {
2442
2448
  response?: GenerateVideosResponse;
2443
2449
  }
2444
2450
 
2445
- /** Class that represents the parameters for generating an image. */
2451
+ /** Class that represents the parameters for generating videos. */
2446
2452
  export declare interface GenerateVideosParameters {
2447
2453
  /** ID of the model to use. For a list of models, see `Google models
2448
2454
  <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
@@ -2450,8 +2456,11 @@ export declare interface GenerateVideosParameters {
2450
2456
  /** The text prompt for generating the videos. Optional for image to video use cases. */
2451
2457
  prompt?: string;
2452
2458
  /** The input image for generating the videos.
2453
- Optional if prompt is provided. */
2459
+ Optional if prompt or video is provided. */
2454
2460
  image?: Image_2;
2461
+ /** The input video for video extension use cases.
2462
+ Optional if prompt or image is provided. */
2463
+ video?: Video;
2455
2464
  /** Configuration for generating videos. */
2456
2465
  config?: GenerateVideosConfig;
2457
2466
  }
@@ -5990,6 +5999,7 @@ declare namespace types {
5990
5999
  AuthConfig,
5991
6000
  GoogleMaps,
5992
6001
  UrlContext,
6002
+ VertexAISearchDataStoreSpec,
5993
6003
  VertexAISearch,
5994
6004
  VertexRagStoreRagResource,
5995
6005
  RagRetrievalConfigFilter,
@@ -6086,9 +6096,9 @@ declare namespace types {
6086
6096
  ComputeTokensParameters,
6087
6097
  TokensInfo,
6088
6098
  ComputeTokensResponse,
6099
+ Video,
6089
6100
  GenerateVideosConfig,
6090
6101
  GenerateVideosParameters,
6091
- Video,
6092
6102
  GeneratedVideo,
6093
6103
  GenerateVideosResponse,
6094
6104
  GenerateVideosOperation,
@@ -6440,6 +6450,8 @@ export declare interface UsageMetadata {
6440
6450
 
6441
6451
  /** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */
6442
6452
  export declare interface VertexAISearch {
6453
+ /** Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used. */
6454
+ dataStoreSpecs?: VertexAISearchDataStoreSpec[];
6443
6455
  /** Optional. Fully-qualified Vertex AI Search data store resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */
6444
6456
  datastore?: string;
6445
6457
  /** Optional. Fully-qualified Vertex AI Search engine resource ID. Format: `projects/{project}/locations/{location}/collections/{collection}/engines/{engine}` */
@@ -6450,6 +6462,14 @@ export declare interface VertexAISearch {
6450
6462
  maxResults?: number;
6451
6463
  }
6452
6464
 
6465
+ /** Define data stores within engine to filter on in a search call and configurations for those data stores. For more information, see https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec */
6466
+ export declare interface VertexAISearchDataStoreSpec {
6467
+ /** Full resource name of DataStore, such as Format: `projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}` */
6468
+ dataStore?: string;
6469
+ /** Optional. Filter specification to filter documents in the data store specified by data_store field. For more information on filtering, see [Filtering](https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata) */
6470
+ filter?: string;
6471
+ }
6472
+
6453
6473
  /** Retrieve from Vertex RAG Store for grounding. */
6454
6474
  export declare interface VertexRagStore {
6455
6475
  /** Optional. Deprecated. Please use rag_resources instead. */
@@ -6460,6 +6480,8 @@ export declare interface VertexRagStore {
6460
6480
  ragRetrievalConfig?: RagRetrievalConfig;
6461
6481
  /** Optional. Number of top k results to return from the selected corpora. */
6462
6482
  similarityTopK?: number;
6483
+ /** Optional. Currently only supported for Gemini Multimodal Live API. In Gemini Multimodal Live API, if `store_context` bool is specified, Gemini will leverage it to automatically memorize the interactions between the client and Gemini, and retrieve context when needed to augment the response generation for users' ongoing and future interactions. */
6484
+ storeContext?: boolean;
6463
6485
  /** Optional. Only return results with vector distance smaller than the threshold. */
6464
6486
  vectorDistanceThreshold?: number;
6465
6487
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/genai",
3
- "version": "1.4.0",
3
+ "version": "1.5.1",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.mjs",
@@ -102,6 +102,11 @@
102
102
  "peerDependencies": {
103
103
  "@modelcontextprotocol/sdk": "^1.11.0"
104
104
  },
105
+ "peerDependenciesMeta": {
106
+ "@modelcontextprotocol/sdk": {
107
+ "optional": true
108
+ }
109
+ },
105
110
  "repository": {
106
111
  "type": "git",
107
112
  "url": "https://github.com/googleapis/js-genai.git"