@google/genai 1.47.0 → 1.49.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/web/web.d.ts CHANGED
@@ -465,6 +465,10 @@ export declare interface AudioChunk {
465
465
  */
466
466
  declare interface AudioContent {
467
467
  type: 'audio';
468
+ /**
469
+ * The number of audio channels.
470
+ */
471
+ channels?: number;
468
472
  /**
469
473
  * The audio content.
470
474
  */
@@ -472,7 +476,11 @@ declare interface AudioContent {
472
476
  /**
473
477
  * The mime type of the audio.
474
478
  */
475
- mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a';
479
+ mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a' | 'audio/l16';
480
+ /**
481
+ * The sample rate of the audio.
482
+ */
483
+ rate?: number;
476
484
  /**
477
485
  * The URI of the audio.
478
486
  */
@@ -653,24 +661,26 @@ declare interface BaseCreateAgentInteractionParams {
653
661
  */
654
662
  previous_interaction_id?: string;
655
663
  /**
656
- * Body param: Enforces that the generated response is a JSON object that complies with
657
- * the JSON schema specified in this field.
664
+ * Body param: Enforces that the generated response is a JSON object that complies
665
+ * with the JSON schema specified in this field.
658
666
  */
659
667
  response_format?: unknown;
660
668
  /**
661
- * Body param: The mime type of the response. This is required if response_format is set.
669
+ * Body param: The mime type of the response. This is required if response_format
670
+ * is set.
662
671
  */
663
672
  response_mime_type?: string;
664
673
  /**
665
674
  * Body param: The requested modalities of the response (TEXT, IMAGE, AUDIO).
666
675
  */
667
- response_modalities?: Array<'text' | 'image' | 'audio'>;
676
+ response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
668
677
  /**
669
678
  * Body param: The service tier for the interaction.
670
679
  */
671
680
  service_tier?: 'flex' | 'standard' | 'priority';
672
681
  /**
673
- * Body param: Input only. Whether to store the response and request for later retrieval.
682
+ * Body param: Input only. Whether to store the response and request for later
683
+ * retrieval.
674
684
  */
675
685
  store?: boolean;
676
686
  /**
@@ -713,24 +723,26 @@ declare interface BaseCreateModelInteractionParams {
713
723
  */
714
724
  previous_interaction_id?: string;
715
725
  /**
716
- * Body param: Enforces that the generated response is a JSON object that complies with
717
- * the JSON schema specified in this field.
726
+ * Body param: Enforces that the generated response is a JSON object that complies
727
+ * with the JSON schema specified in this field.
718
728
  */
719
729
  response_format?: unknown;
720
730
  /**
721
- * Body param: The mime type of the response. This is required if response_format is set.
731
+ * Body param: The mime type of the response. This is required if response_format
732
+ * is set.
722
733
  */
723
734
  response_mime_type?: string;
724
735
  /**
725
736
  * Body param: The requested modalities of the response (TEXT, IMAGE, AUDIO).
726
737
  */
727
- response_modalities?: Array<'text' | 'image' | 'audio'>;
738
+ response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
728
739
  /**
729
740
  * Body param: The service tier for the interaction.
730
741
  */
731
742
  service_tier?: 'flex' | 'standard' | 'priority';
732
743
  /**
733
- * Body param: Input only. Whether to store the response and request for later retrieval.
744
+ * Body param: Input only. Whether to store the response and request for later
745
+ * retrieval.
734
746
  */
735
747
  store?: boolean;
736
748
  /**
@@ -868,7 +880,8 @@ declare class BaseInteractions extends APIResource {
868
880
  */
869
881
  delete(id: string, params?: InteractionDeleteParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
870
882
  /**
871
- * Cancels an interaction by id. This only applies to background interactions that are still running.
883
+ * Cancels an interaction by id. This only applies to background interactions that
884
+ * are still running.
872
885
  *
873
886
  * @example
874
887
  * ```ts
@@ -879,7 +892,8 @@ declare class BaseInteractions extends APIResource {
879
892
  */
880
893
  cancel(id: string, params?: InteractionCancelParams | null | undefined, options?: RequestOptions): APIPromise<Interaction>;
881
894
  /**
882
- * Retrieves the full details of a single interaction based on its `Interaction.id`.
895
+ * Retrieves the full details of a single interaction based on its
896
+ * `Interaction.id`.
883
897
  *
884
898
  * @example
885
899
  * ```ts
@@ -1665,7 +1679,7 @@ declare interface ClientOptions {
1665
1679
  /**
1666
1680
  * The adapter to the parent API client instance (for accessing auth, project, location)
1667
1681
  */
1668
- clientAdapter: GeminiNextGenAPIClientAdapter;
1682
+ clientAdapter?: GeminiNextGenAPIClientAdapter | undefined;
1669
1683
  }
1670
1684
 
1671
1685
  /**
@@ -1824,12 +1838,11 @@ declare interface ContentDelta {
1824
1838
  /**
1825
1839
  * The delta content data for a content block.
1826
1840
  */
1827
- delta: ContentDelta.Text | ContentDelta.Image | ContentDelta.Audio | ContentDelta.Document | ContentDelta.Video | ContentDelta.ThoughtSummary | ContentDelta.ThoughtSignature | ContentDelta.FunctionCall | ContentDelta.CodeExecutionCall | ContentDelta.URLContextCall | ContentDelta.GoogleSearchCall | ContentDelta.MCPServerToolCall | ContentDelta.FileSearchCall | ContentDelta.GoogleMapsCall | ContentDelta.FunctionResult | ContentDelta.CodeExecutionResult | ContentDelta.URLContextResult | ContentDelta.GoogleSearchResult | ContentDelta.MCPServerToolResult | ContentDelta.FileSearchResult | ContentDelta.GoogleMapsResult;
1841
+ delta: ContentDelta.Text | ContentDelta.Image | ContentDelta.Audio | ContentDelta.Document | ContentDelta.Video | ContentDelta.ThoughtSummary | ContentDelta.ThoughtSignature | ContentDelta.FunctionCall | ContentDelta.CodeExecutionCall | ContentDelta.URLContextCall | ContentDelta.GoogleSearchCall | ContentDelta.MCPServerToolCall | ContentDelta.FileSearchCall | ContentDelta.GoogleMapsCall | ContentDelta.FunctionResult | ContentDelta.CodeExecutionResult | ContentDelta.URLContextResult | ContentDelta.GoogleSearchResult | ContentDelta.MCPServerToolResult | ContentDelta.FileSearchResult | ContentDelta.GoogleMapsResult | ContentDelta.TextAnnotation;
1828
1842
  event_type: 'content.delta';
1829
1843
  index: number;
1830
1844
  /**
1831
- * The event_id token to be used to resume the interaction stream, from
1832
- * this event.
1845
+ * The event_id token to be used to resume the interaction stream, from this event.
1833
1846
  */
1834
1847
  event_id?: string;
1835
1848
  }
@@ -1838,10 +1851,6 @@ declare namespace ContentDelta {
1838
1851
  interface Text {
1839
1852
  text: string;
1840
1853
  type: 'text';
1841
- /**
1842
- * Citation information for model-generated content.
1843
- */
1844
- annotations?: Array<InteractionsAPI.Annotation>;
1845
1854
  }
1846
1855
  interface Image {
1847
1856
  type: 'image';
@@ -1855,8 +1864,16 @@ declare namespace ContentDelta {
1855
1864
  }
1856
1865
  interface Audio {
1857
1866
  type: 'audio';
1867
+ /**
1868
+ * The number of audio channels.
1869
+ */
1870
+ channels?: number;
1858
1871
  data?: string;
1859
- mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a';
1872
+ mime_type?: 'audio/wav' | 'audio/mp3' | 'audio/aiff' | 'audio/aac' | 'audio/ogg' | 'audio/flac' | 'audio/mpeg' | 'audio/m4a' | 'audio/l16';
1873
+ /**
1874
+ * The sample rate of the audio.
1875
+ */
1876
+ rate?: number;
1860
1877
  uri?: string;
1861
1878
  }
1862
1879
  interface Document {
@@ -2096,6 +2113,13 @@ declare namespace ContentDelta {
2096
2113
  */
2097
2114
  signature?: string;
2098
2115
  }
2116
+ interface TextAnnotation {
2117
+ type: 'text_annotation';
2118
+ /**
2119
+ * Citation information for model-generated content.
2120
+ */
2121
+ annotations?: Array<InteractionsAPI.Annotation>;
2122
+ }
2099
2123
  }
2100
2124
 
2101
2125
  /** The embedding generated from an input content. */
@@ -2146,8 +2170,7 @@ declare interface ContentStart {
2146
2170
  event_type: 'content.start';
2147
2171
  index: number;
2148
2172
  /**
2149
- * The event_id token to be used to resume the interaction stream, from
2150
- * this event.
2173
+ * The event_id token to be used to resume the interaction stream, from this event.
2151
2174
  */
2152
2175
  event_id?: string;
2153
2176
  }
@@ -2156,8 +2179,7 @@ declare interface ContentStop {
2156
2179
  event_type: 'content.stop';
2157
2180
  index: number;
2158
2181
  /**
2159
- * The event_id token to be used to resume the interaction stream, from
2160
- * this event.
2182
+ * The event_id token to be used to resume the interaction stream, from this event.
2161
2183
  */
2162
2184
  event_id?: string;
2163
2185
  }
@@ -3396,8 +3418,7 @@ declare interface ErrorEvent_2 {
3396
3418
  */
3397
3419
  error?: ErrorEvent_2.Error;
3398
3420
  /**
3399
- * The event_id token to be used to resume the interaction stream, from
3400
- * this event.
3421
+ * The event_id token to be used to resume the interaction stream, from this event.
3401
3422
  */
3402
3423
  event_id?: string;
3403
3424
  }
@@ -4467,7 +4488,7 @@ export declare interface GenerateContentConfig {
4467
4488
  service. If supplied, safety_settings must not be supplied.
4468
4489
  */
4469
4490
  modelArmorConfig?: ModelArmorConfig;
4470
- /** The service tier to use for the request. For example, SERVICE_TIER_FLEX. */
4491
+ /** The service tier to use for the request. For example, ServiceTier.FLEX. */
4471
4492
  serviceTier?: ServiceTier;
4472
4493
  }
4473
4494
 
@@ -5381,8 +5402,8 @@ declare namespace GoogleMapsResult {
5381
5402
  */
5382
5403
  place_id?: string;
5383
5404
  /**
5384
- * Snippets of reviews that are used to generate answers about the
5385
- * features of a given place in Google Maps.
5405
+ * Snippets of reviews that are used to generate answers about the features of a
5406
+ * given place in Google Maps.
5386
5407
  */
5387
5408
  review_snippets?: Array<Place.ReviewSnippet>;
5388
5409
  /**
@@ -5392,8 +5413,8 @@ declare namespace GoogleMapsResult {
5392
5413
  }
5393
5414
  namespace Place {
5394
5415
  /**
5395
- * Encapsulates a snippet of a user review that answers a question about
5396
- * the features of a specific place in Google Maps.
5416
+ * Encapsulates a snippet of a user review that answers a question about the
5417
+ * features of a specific place in Google Maps.
5397
5418
  */
5398
5419
  interface ReviewSnippet {
5399
5420
  /**
@@ -5479,7 +5500,7 @@ declare interface GoogleSearchCallContent {
5479
5500
  /**
5480
5501
  * The type of search grounding enabled.
5481
5502
  */
5482
- search_type?: 'web_search' | 'image_search';
5503
+ search_type?: 'web_search' | 'image_search' | 'enterprise_web_search';
5483
5504
  /**
5484
5505
  * A signature hash for backend validation.
5485
5506
  */
@@ -6225,8 +6246,8 @@ declare interface Interaction {
6225
6246
  */
6226
6247
  id: string;
6227
6248
  /**
6228
- * Required. Output only. The time at which the response was created in ISO 8601 format
6229
- * (YYYY-MM-DDThh:mm:ssZ).
6249
+ * Required. Output only. The time at which the response was created in ISO 8601
6250
+ * format (YYYY-MM-DDThh:mm:ssZ).
6230
6251
  */
6231
6252
  created: string;
6232
6253
  /**
@@ -6234,8 +6255,8 @@ declare interface Interaction {
6234
6255
  */
6235
6256
  status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
6236
6257
  /**
6237
- * Required. Output only. The time at which the response was last updated in ISO 8601 format
6238
- * (YYYY-MM-DDThh:mm:ssZ).
6258
+ * Required. Output only. The time at which the response was last updated in ISO
6259
+ * 8601 format (YYYY-MM-DDThh:mm:ssZ).
6239
6260
  */
6240
6261
  updated: string;
6241
6262
  /**
@@ -6263,8 +6284,8 @@ declare interface Interaction {
6263
6284
  */
6264
6285
  previous_interaction_id?: string;
6265
6286
  /**
6266
- * Enforces that the generated response is a JSON object that complies with
6267
- * the JSON schema specified in this field.
6287
+ * Enforces that the generated response is a JSON object that complies with the
6288
+ * JSON schema specified in this field.
6268
6289
  */
6269
6290
  response_format?: unknown;
6270
6291
  /**
@@ -6274,7 +6295,7 @@ declare interface Interaction {
6274
6295
  /**
6275
6296
  * The requested modalities of the response (TEXT, IMAGE, AUDIO).
6276
6297
  */
6277
- response_modalities?: Array<'text' | 'image' | 'audio'>;
6298
+ response_modalities?: Array<'text' | 'image' | 'audio' | 'video' | 'document'>;
6278
6299
  /**
6279
6300
  * Output only. The role of the interaction.
6280
6301
  */
@@ -6307,13 +6328,12 @@ declare interface InteractionCancelParams {
6307
6328
  declare interface InteractionCompleteEvent {
6308
6329
  event_type: 'interaction.complete';
6309
6330
  /**
6310
- * Required. The completed interaction with empty outputs to reduce the payload size.
6311
- * Use the preceding ContentDelta events for the actual output.
6331
+ * Required. The completed interaction with empty outputs to reduce the payload
6332
+ * size. Use the preceding ContentDelta events for the actual output.
6312
6333
  */
6313
6334
  interaction: Interaction;
6314
6335
  /**
6315
- * The event_id token to be used to resume the interaction stream, from
6316
- * this event.
6336
+ * The event_id token to be used to resume the interaction stream, from this event.
6317
6337
  */
6318
6338
  event_id?: string;
6319
6339
  }
@@ -6346,25 +6366,30 @@ declare interface InteractionGetParamsBase {
6346
6366
  */
6347
6367
  include_input?: boolean;
6348
6368
  /**
6349
- * Query param: Optional. If set, resumes the interaction stream from the next chunk after the event marked by the event id. Can only be used if `stream` is true.
6369
+ * Query param: Optional. If set, resumes the interaction stream from the next
6370
+ * chunk after the event marked by the event id. Can only be used if `stream` is
6371
+ * true.
6350
6372
  */
6351
6373
  last_event_id?: string;
6352
6374
  /**
6353
- * Query param: If set to true, the generated content will be streamed incrementally.
6375
+ * Query param: If set to true, the generated content will be streamed
6376
+ * incrementally.
6354
6377
  */
6355
6378
  stream?: boolean;
6356
6379
  }
6357
6380
 
6358
6381
  declare interface InteractionGetParamsNonStreaming extends InteractionGetParamsBase {
6359
6382
  /**
6360
- * Query param: If set to true, the generated content will be streamed incrementally.
6383
+ * Query param: If set to true, the generated content will be streamed
6384
+ * incrementally.
6361
6385
  */
6362
6386
  stream?: false;
6363
6387
  }
6364
6388
 
6365
6389
  declare interface InteractionGetParamsStreaming extends InteractionGetParamsBase {
6366
6390
  /**
6367
- * Query param: If set to true, the generated content will be streamed incrementally.
6391
+ * Query param: If set to true, the generated content will be streamed
6392
+ * incrementally.
6368
6393
  */
6369
6394
  stream: true;
6370
6395
  }
@@ -6461,8 +6486,7 @@ declare interface InteractionStartEvent {
6461
6486
  */
6462
6487
  interaction: Interaction;
6463
6488
  /**
6464
- * The event_id token to be used to resume the interaction stream, from
6465
- * this event.
6489
+ * The event_id token to be used to resume the interaction stream, from this event.
6466
6490
  */
6467
6491
  event_id?: string;
6468
6492
  }
@@ -6472,8 +6496,7 @@ declare interface InteractionStatusUpdate {
6472
6496
  interaction_id: string;
6473
6497
  status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
6474
6498
  /**
6475
- * The event_id token to be used to resume the interaction stream, from
6476
- * this event.
6499
+ * The event_id token to be used to resume the interaction stream, from this event.
6477
6500
  */
6478
6501
  event_id?: string;
6479
6502
  }
@@ -7864,7 +7887,8 @@ export declare interface Model {
7864
7887
  }
7865
7888
 
7866
7889
  /**
7867
- * The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
7890
+ * The model that will complete your prompt.\n\nSee
7891
+ * [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
7868
7892
  */
7869
7893
  declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
7870
7894
 
@@ -8127,29 +8151,15 @@ export declare class Models extends BaseModule {
8127
8151
  /**
8128
8152
  * Recontextualizes an image.
8129
8153
  *
8130
- * There are two types of recontextualization currently supported:
8131
- * 1) Imagen Product Recontext - Generate images of products in new scenes
8132
- * and contexts.
8133
- * 2) Virtual Try-On: Generate images of persons modeling fashion products.
8154
+ * There is one type of recontextualization currently supported:
8155
+ * 1) Virtual Try-On: Generate images of persons modeling fashion products.
8134
8156
  *
8135
8157
  * @param params - The parameters for recontextualizing an image.
8136
8158
  * @return The response from the API.
8137
8159
  *
8138
8160
  * @example
8139
8161
  * ```ts
8140
- * const response1 = await ai.models.recontextImage({
8141
- * model: 'imagen-product-recontext-preview-06-30',
8142
- * source: {
8143
- * prompt: 'In a modern kitchen setting.',
8144
- * productImages: [productImage],
8145
- * },
8146
- * config: {
8147
- * numberOfImages: 1,
8148
- * },
8149
- * });
8150
- * console.log(response1?.generatedImages?.[0]?.image?.imageBytes);
8151
- *
8152
- * const response2 = await ai.models.recontextImage({
8162
+ * const response = await ai.models.recontextImage({
8153
8163
  * model: 'virtual-try-on-001',
8154
8164
  * source: {
8155
8165
  * personImage: personImage,
@@ -8159,7 +8169,7 @@ export declare class Models extends BaseModule {
8159
8169
  * numberOfImages: 1,
8160
8170
  * },
8161
8171
  * });
8162
- * console.log(response2?.generatedImages?.[0]?.image?.imageBytes);
8172
+ * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
8163
8173
  * ```
8164
8174
  */
8165
8175
  recontextImage(params: types.RecontextImageParameters): Promise<types.RecontextImageResponse>;
@@ -8818,8 +8828,8 @@ declare interface PlaceCitation {
8818
8828
  */
8819
8829
  place_id?: string;
8820
8830
  /**
8821
- * Snippets of reviews that are used to generate answers about the
8822
- * features of a given place in Google Maps.
8831
+ * Snippets of reviews that are used to generate answers about the features of a
8832
+ * given place in Google Maps.
8823
8833
  */
8824
8834
  review_snippets?: Array<PlaceCitation.ReviewSnippet>;
8825
8835
  /**
@@ -8836,8 +8846,8 @@ declare interface PlaceCitation {
8836
8846
 
8837
8847
  declare namespace PlaceCitation {
8838
8848
  /**
8839
- * Encapsulates a snippet of a user review that answers a question about
8840
- * the features of a specific place in Google Maps.
8849
+ * Encapsulates a snippet of a user review that answers a question about the
8850
+ * features of a specific place in Google Maps.
8841
8851
  */
8842
8852
  interface ReviewSnippet {
8843
8853
  /**
@@ -9653,19 +9663,19 @@ export declare enum ServiceTier {
9653
9663
  /**
9654
9664
  * Default service tier, which is standard.
9655
9665
  */
9656
- SERVICE_TIER_UNSPECIFIED = "SERVICE_TIER_UNSPECIFIED",
9666
+ UNSPECIFIED = "unspecified",
9657
9667
  /**
9658
9668
  * Flex service tier.
9659
9669
  */
9660
- SERVICE_TIER_FLEX = "SERVICE_TIER_FLEX",
9670
+ FLEX = "flex",
9661
9671
  /**
9662
9672
  * Standard service tier.
9663
9673
  */
9664
- SERVICE_TIER_STANDARD = "SERVICE_TIER_STANDARD",
9674
+ STANDARD = "standard",
9665
9675
  /**
9666
9676
  * Priority service tier.
9667
9677
  */
9668
- SERVICE_TIER_PRIORITY = "SERVICE_TIER_PRIORITY"
9678
+ PRIORITY = "priority"
9669
9679
  }
9670
9680
 
9671
9681
  /**
@@ -10325,7 +10335,7 @@ export declare interface Tool {
10325
10335
  /**
10326
10336
  * A tool that can be used by the model.
10327
10337
  */
10328
- declare type Tool_2 = Function_2 | Tool_2.CodeExecution | Tool_2.URLContext | Tool_2.ComputerUse | Tool_2.MCPServer | Tool_2.GoogleSearch | Tool_2.FileSearch | Tool_2.GoogleMaps;
10338
+ declare type Tool_2 = Function_2 | Tool_2.CodeExecution | Tool_2.URLContext | Tool_2.ComputerUse | Tool_2.MCPServer | Tool_2.GoogleSearch | Tool_2.FileSearch | Tool_2.GoogleMaps | Tool_2.Retrieval;
10329
10339
 
10330
10340
  declare namespace Tool_2 {
10331
10341
  /**
@@ -10374,8 +10384,7 @@ declare namespace Tool_2 {
10374
10384
  */
10375
10385
  name?: string;
10376
10386
  /**
10377
- * The full URL for the MCPServer endpoint.
10378
- * Example: "https://api.example.com/mcp"
10387
+ * The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
10379
10388
  */
10380
10389
  url?: string;
10381
10390
  }
@@ -10387,7 +10396,7 @@ declare namespace Tool_2 {
10387
10396
  /**
10388
10397
  * The types of search grounding to enable.
10389
10398
  */
10390
- search_types?: Array<'web_search' | 'image_search'>;
10399
+ search_types?: Array<'web_search' | 'image_search' | 'enterprise_web_search'>;
10391
10400
  }
10392
10401
  /**
10393
10402
  * A tool that can be used by the model to search files.
@@ -10426,6 +10435,35 @@ declare namespace Tool_2 {
10426
10435
  */
10427
10436
  longitude?: number;
10428
10437
  }
10438
+ /**
10439
+ * A tool that can be used by the model to retrieve files.
10440
+ */
10441
+ interface Retrieval {
10442
+ type: 'retrieval';
10443
+ /**
10444
+ * The types of file retrieval to enable.
10445
+ */
10446
+ retrieval_types?: Array<'vertex_ai_search'>;
10447
+ /**
10448
+ * Used to specify configuration for VertexAISearch.
10449
+ */
10450
+ vertex_ai_search_config?: Retrieval.VertexAISearchConfig;
10451
+ }
10452
+ namespace Retrieval {
10453
+ /**
10454
+ * Used to specify configuration for VertexAISearch.
10455
+ */
10456
+ interface VertexAISearchConfig {
10457
+ /**
10458
+ * Optional. Used to specify Vertex AI Search datastores.
10459
+ */
10460
+ datastores?: Array<string>;
10461
+ /**
10462
+ * Optional. Used to specify Vertex AI Search engine.
10463
+ */
10464
+ engine?: string;
10465
+ }
10466
+ }
10429
10467
  }
10430
10468
 
10431
10469
  /** A predicted server-side `ToolCall` returned from the model.
@@ -10866,8 +10904,7 @@ export declare interface TuningValidationDataset {
10866
10904
  declare interface Turn {
10867
10905
  content?: Array<Content_2> | string;
10868
10906
  /**
10869
- * The originator of this turn. Must be user for input or model for
10870
- * model output.
10907
+ * The originator of this turn. Must be user for input or model for model output.
10871
10908
  */
10872
10909
  role?: string;
10873
10910
  }
@@ -11916,7 +11953,7 @@ declare namespace Usage {
11916
11953
  /**
11917
11954
  * The modality associated with the token count.
11918
11955
  */
11919
- modality?: 'text' | 'image' | 'audio';
11956
+ modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
11920
11957
  /**
11921
11958
  * Number of tokens for the modality.
11922
11959
  */
@@ -11929,7 +11966,7 @@ declare namespace Usage {
11929
11966
  /**
11930
11967
  * The modality associated with the token count.
11931
11968
  */
11932
- modality?: 'text' | 'image' | 'audio';
11969
+ modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
11933
11970
  /**
11934
11971
  * Number of tokens for the modality.
11935
11972
  */
@@ -11942,7 +11979,7 @@ declare namespace Usage {
11942
11979
  /**
11943
11980
  * The modality associated with the token count.
11944
11981
  */
11945
- modality?: 'text' | 'image' | 'audio';
11982
+ modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
11946
11983
  /**
11947
11984
  * Number of tokens for the modality.
11948
11985
  */
@@ -11955,7 +11992,7 @@ declare namespace Usage {
11955
11992
  /**
11956
11993
  * The modality associated with the token count.
11957
11994
  */
11958
- modality?: 'text' | 'image' | 'audio';
11995
+ modality?: 'text' | 'image' | 'audio' | 'video' | 'document';
11959
11996
  /**
11960
11997
  * Number of tokens for the modality.
11961
11998
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/genai",
3
- "version": "1.47.0",
3
+ "version": "1.49.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.mjs",