@google/genai 1.16.0 → 1.18.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
@@ -437,6 +437,22 @@ export declare class Batches extends BaseModule {
437
437
  * ```
438
438
  */
439
439
  create: (params: types.CreateBatchJobParameters) => Promise<types.BatchJob>;
440
+ /**
441
+ * **Experimental** Creates an embedding batch job.
442
+ *
443
+ * @param params - The parameters for create embedding batch job request.
444
+ * @return The created batch job.
445
+ *
446
+ * @example
447
+ * ```ts
448
+ * const response = await ai.batches.createEmbeddings({
449
+ * model: 'text-embedding-004',
450
+ * src: {fileName: 'files/my_embedding_input'},
451
+ * });
452
+ * console.log(response);
453
+ * ```
454
+ */
455
+ createEmbeddings: (params: types.CreateEmbeddingsBatchJobParameters) => Promise<types.BatchJob>;
440
456
  /**
441
457
  * Lists batch job configurations.
442
458
  *
@@ -452,6 +468,11 @@ export declare class Batches extends BaseModule {
452
468
  * ```
453
469
  */
454
470
  list: (params?: types.ListBatchJobsParameters) => Promise<Pager<types.BatchJob>>;
471
+ private createInlinedGenerateContentRequest;
472
+ private createInlinedEmbedContentRequest;
473
+ private getGcsUri;
474
+ private getBigqueryUri;
475
+ private formatDestination;
455
476
  /**
456
477
  * Internal method to create batch job.
457
478
  *
@@ -460,6 +481,14 @@ export declare class Batches extends BaseModule {
460
481
  *
461
482
  */
462
483
  private createInternal;
484
+ /**
485
+ * Internal method to create batch job.
486
+ *
487
+ * @param params - The parameters for create batch job request.
488
+ * @return The created batch job.
489
+ *
490
+ */
491
+ private createEmbeddingsInternal;
463
492
  /**
464
493
  * Gets batch job configurations.
465
494
  *
@@ -558,6 +587,11 @@ export declare interface BatchJobDestination {
558
587
  the input requests.
559
588
  */
560
589
  inlinedResponses?: InlinedResponse[];
590
+ /** The responses to the requests in the batch. Returned when the batch was
591
+ built using inlined requests. The responses will be in the same order as
592
+ the input requests.
593
+ */
594
+ inlinedEmbedContentResponses?: InlinedEmbedContentResponse[];
561
595
  }
562
596
 
563
597
  export declare type BatchJobDestinationUnion = BatchJobDestination | string;
@@ -1351,6 +1385,35 @@ export declare interface CreateChatParameters {
1351
1385
  history?: Content[];
1352
1386
  }
1353
1387
 
1388
+ /** Config for optional parameters. */
1389
+ export declare interface CreateEmbeddingsBatchJobConfig {
1390
+ /** Used to override HTTP request options. */
1391
+ httpOptions?: HttpOptions;
1392
+ /** Abort signal which can be used to cancel the request.
1393
+
1394
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
1395
+ operation will not cancel the request in the service. You will still
1396
+ be charged usage for any applicable operations.
1397
+ */
1398
+ abortSignal?: AbortSignal;
1399
+ /** The user-defined name of this BatchJob.
1400
+ */
1401
+ displayName?: string;
1402
+ }
1403
+
1404
+ /** Config for batches.create parameters. */
1405
+ export declare interface CreateEmbeddingsBatchJobParameters {
1406
+ /** The name of the model to produces the predictions via the BatchJob.
1407
+ */
1408
+ model?: string;
1409
+ /** input data to run batch job".
1410
+ */
1411
+ src: EmbeddingsBatchJobSource;
1412
+ /** Optional parameters for creating a BatchJob.
1413
+ */
1414
+ config?: CreateEmbeddingsBatchJobConfig;
1415
+ }
1416
+
1354
1417
  /** Used to override the default configuration. */
1355
1418
  export declare interface CreateFileConfig {
1356
1419
  /** Used to override HTTP request options. */
@@ -1720,54 +1783,40 @@ export declare interface EditImageConfig {
1720
1783
  be charged usage for any applicable operations.
1721
1784
  */
1722
1785
  abortSignal?: AbortSignal;
1723
- /** Cloud Storage URI used to store the generated images.
1724
- */
1786
+ /** Cloud Storage URI used to store the generated images. */
1725
1787
  outputGcsUri?: string;
1726
- /** Description of what to discourage in the generated images.
1727
- */
1788
+ /** Description of what to discourage in the generated images. */
1728
1789
  negativePrompt?: string;
1729
- /** Number of images to generate.
1730
- */
1790
+ /** Number of images to generate. */
1731
1791
  numberOfImages?: number;
1732
1792
  /** Aspect ratio of the generated images. Supported values are
1733
- "1:1", "3:4", "4:3", "9:16", and "16:9".
1734
- */
1793
+ "1:1", "3:4", "4:3", "9:16", and "16:9". */
1735
1794
  aspectRatio?: string;
1736
1795
  /** Controls how much the model adheres to the text prompt. Large
1737
1796
  values increase output and prompt alignment, but may compromise image
1738
- quality.
1739
- */
1797
+ quality. */
1740
1798
  guidanceScale?: number;
1741
1799
  /** Random seed for image generation. This is not available when
1742
- ``add_watermark`` is set to true.
1743
- */
1800
+ ``add_watermark`` is set to true. */
1744
1801
  seed?: number;
1745
- /** Filter level for safety filtering.
1746
- */
1802
+ /** Filter level for safety filtering. */
1747
1803
  safetyFilterLevel?: SafetyFilterLevel;
1748
- /** Allows generation of people by the model.
1749
- */
1804
+ /** Allows generation of people by the model. */
1750
1805
  personGeneration?: PersonGeneration;
1751
1806
  /** Whether to report the safety scores of each generated image and
1752
- the positive prompt in the response.
1753
- */
1807
+ the positive prompt in the response. */
1754
1808
  includeSafetyAttributes?: boolean;
1755
1809
  /** Whether to include the Responsible AI filter reason if the image
1756
- is filtered out of the response.
1757
- */
1810
+ is filtered out of the response. */
1758
1811
  includeRaiReason?: boolean;
1759
- /** Language of the text in the prompt.
1760
- */
1812
+ /** Language of the text in the prompt. */
1761
1813
  language?: ImagePromptLanguage;
1762
- /** MIME type of the generated image.
1763
- */
1814
+ /** MIME type of the generated image. */
1764
1815
  outputMimeType?: string;
1765
1816
  /** Compression quality of the generated image (for ``image/jpeg``
1766
- only).
1767
- */
1817
+ only). */
1768
1818
  outputCompressionQuality?: number;
1769
- /** Whether to add a watermark to the generated images.
1770
- */
1819
+ /** Whether to add a watermark to the generated images. */
1771
1820
  addWatermark?: boolean;
1772
1821
  /** Describes the editing mode for the request. */
1773
1822
  editMode?: EditMode;
@@ -1796,7 +1845,7 @@ export declare class EditImageResponse {
1796
1845
  generatedImages?: GeneratedImage[];
1797
1846
  }
1798
1847
 
1799
- /** Enum representing the Imagen 3 Edit mode. */
1848
+ /** Enum representing the editing mode. */
1800
1849
  export declare enum EditMode {
1801
1850
  EDIT_MODE_DEFAULT = "EDIT_MODE_DEFAULT",
1802
1851
  EDIT_MODE_INPAINT_REMOVAL = "EDIT_MODE_INPAINT_REMOVAL",
@@ -1808,6 +1857,16 @@ export declare enum EditMode {
1808
1857
  EDIT_MODE_PRODUCT_IMAGE = "EDIT_MODE_PRODUCT_IMAGE"
1809
1858
  }
1810
1859
 
1860
+ /** Parameters for the embed_content method. */
1861
+ export declare interface EmbedContentBatch {
1862
+ /** The content to embed. Only the `parts.text` fields will be counted.
1863
+ */
1864
+ contents?: ContentListUnion;
1865
+ /** Configuration that contains optional parameters.
1866
+ */
1867
+ config?: EmbedContentConfig;
1868
+ }
1869
+
1811
1870
  /** Optional parameters for the embed_content method. */
1812
1871
  export declare interface EmbedContentConfig {
1813
1872
  /** Used to override HTTP request options. */
@@ -1876,6 +1935,16 @@ export declare class EmbedContentResponse {
1876
1935
  metadata?: EmbedContentMetadata;
1877
1936
  }
1878
1937
 
1938
+ export declare interface EmbeddingsBatchJobSource {
1939
+ /** The Gemini Developer API's file resource name of the input data
1940
+ (e.g. "files/12345").
1941
+ */
1942
+ fileName?: string;
1943
+ /** The Gemini Developer API's inlined input data to run batch job.
1944
+ */
1945
+ inlinedRequests?: EmbedContentBatch;
1946
+ }
1947
+
1879
1948
  /** Represents a customer-managed encryption key spec that can be applied to a top-level resource. */
1880
1949
  export declare interface EncryptionSpec {
1881
1950
  /** Required. The Cloud KMS resource identifier of the customer managed encryption key used to protect a resource. Has the form: `projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key`. The key needs to be in the same region as where the compute resource is created. */
@@ -2724,20 +2793,16 @@ export declare class GenerateContentResponseUsageMetadata {
2724
2793
 
2725
2794
  /** An output image. */
2726
2795
  export declare interface GeneratedImage {
2727
- /** The output image data.
2728
- */
2796
+ /** The output image data. */
2729
2797
  image?: Image_2;
2730
2798
  /** Responsible AI filter reason if the image is filtered out of the
2731
- response.
2732
- */
2799
+ response. */
2733
2800
  raiFilteredReason?: string;
2734
2801
  /** Safety attributes of the image. Lists of RAI categories and their
2735
- scores of each content.
2736
- */
2802
+ scores of each content. */
2737
2803
  safetyAttributes?: SafetyAttributes;
2738
2804
  /** The rewritten prompt used for the image generation if the prompt
2739
- enhancer is enabled.
2740
- */
2805
+ enhancer is enabled. */
2741
2806
  enhancedPrompt?: string;
2742
2807
  }
2743
2808
 
@@ -2766,61 +2831,45 @@ export declare interface GenerateImagesConfig {
2766
2831
  be charged usage for any applicable operations.
2767
2832
  */
2768
2833
  abortSignal?: AbortSignal;
2769
- /** Cloud Storage URI used to store the generated images.
2770
- */
2834
+ /** Cloud Storage URI used to store the generated images. */
2771
2835
  outputGcsUri?: string;
2772
- /** Description of what to discourage in the generated images.
2773
- */
2836
+ /** Description of what to discourage in the generated images. */
2774
2837
  negativePrompt?: string;
2775
- /** Number of images to generate.
2776
- */
2838
+ /** Number of images to generate. */
2777
2839
  numberOfImages?: number;
2778
2840
  /** Aspect ratio of the generated images. Supported values are
2779
- "1:1", "3:4", "4:3", "9:16", and "16:9".
2780
- */
2841
+ "1:1", "3:4", "4:3", "9:16", and "16:9". */
2781
2842
  aspectRatio?: string;
2782
2843
  /** Controls how much the model adheres to the text prompt. Large
2783
2844
  values increase output and prompt alignment, but may compromise image
2784
- quality.
2785
- */
2845
+ quality. */
2786
2846
  guidanceScale?: number;
2787
2847
  /** Random seed for image generation. This is not available when
2788
- ``add_watermark`` is set to true.
2789
- */
2848
+ ``add_watermark`` is set to true. */
2790
2849
  seed?: number;
2791
- /** Filter level for safety filtering.
2792
- */
2850
+ /** Filter level for safety filtering. */
2793
2851
  safetyFilterLevel?: SafetyFilterLevel;
2794
- /** Allows generation of people by the model.
2795
- */
2852
+ /** Allows generation of people by the model. */
2796
2853
  personGeneration?: PersonGeneration;
2797
2854
  /** Whether to report the safety scores of each generated image and
2798
- the positive prompt in the response.
2799
- */
2855
+ the positive prompt in the response. */
2800
2856
  includeSafetyAttributes?: boolean;
2801
2857
  /** Whether to include the Responsible AI filter reason if the image
2802
- is filtered out of the response.
2803
- */
2858
+ is filtered out of the response. */
2804
2859
  includeRaiReason?: boolean;
2805
- /** Language of the text in the prompt.
2806
- */
2860
+ /** Language of the text in the prompt. */
2807
2861
  language?: ImagePromptLanguage;
2808
- /** MIME type of the generated image.
2809
- */
2862
+ /** MIME type of the generated image. */
2810
2863
  outputMimeType?: string;
2811
2864
  /** Compression quality of the generated image (for ``image/jpeg``
2812
- only).
2813
- */
2865
+ only). */
2814
2866
  outputCompressionQuality?: number;
2815
- /** Whether to add a watermark to the generated images.
2816
- */
2867
+ /** Whether to add a watermark to the generated images. */
2817
2868
  addWatermark?: boolean;
2818
2869
  /** The size of the largest dimension of the generated image.
2819
- Supported sizes are 1K and 2K (not supported for Imagen 3 models).
2820
- */
2870
+ Supported sizes are 1K and 2K (not supported for Imagen 3 models). */
2821
2871
  imageSize?: string;
2822
- /** Whether to use the prompt rewriting logic.
2823
- */
2872
+ /** Whether to use the prompt rewriting logic. */
2824
2873
  enhancePrompt?: boolean;
2825
2874
  }
2826
2875
 
@@ -2841,12 +2890,10 @@ export declare interface GenerateImagesParameters {
2841
2890
  export declare class GenerateImagesResponse {
2842
2891
  /** Used to retain the full HTTP response. */
2843
2892
  sdkHttpResponse?: HttpResponse;
2844
- /** List of generated images.
2845
- */
2893
+ /** List of generated images. */
2846
2894
  generatedImages?: GeneratedImage[];
2847
2895
  /** Safety attributes of the positive prompt. Only populated if
2848
- ``include_safety_attributes`` is set to True.
2849
- */
2896
+ ``include_safety_attributes`` is set to True. */
2850
2897
  positivePromptSafetyAttributes?: SafetyAttributes;
2851
2898
  }
2852
2899
 
@@ -2869,23 +2916,32 @@ export declare interface GenerateVideosConfig {
2869
2916
  fps?: number;
2870
2917
  /** Duration of the clip for video generation in seconds. */
2871
2918
  durationSeconds?: number;
2872
- /** 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. */
2919
+ /** The RNG seed. If RNG seed is exactly same for each request with
2920
+ unchanged inputs, the prediction results will be consistent. Otherwise,
2921
+ a random RNG seed will be used each time to produce a different
2922
+ result. */
2873
2923
  seed?: number;
2874
- /** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */
2924
+ /** The aspect ratio for the generated video. 16:9 (landscape) and
2925
+ 9:16 (portrait) are supported. */
2875
2926
  aspectRatio?: string;
2876
- /** The resolution for the generated video. 720p and 1080p are supported. */
2927
+ /** The resolution for the generated video. 720p and 1080p are
2928
+ supported. */
2877
2929
  resolution?: string;
2878
- /** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */
2930
+ /** Whether allow to generate person videos, and restrict to specific
2931
+ ages. Supported values are: dont_allow, allow_adult. */
2879
2932
  personGeneration?: string;
2880
- /** The pubsub topic where to publish the video generation progress. */
2933
+ /** The pubsub topic where to publish the video generation
2934
+ progress. */
2881
2935
  pubsubTopic?: string;
2882
- /** Optional field in addition to the text content. Negative prompts can be explicitly stated here to help generate the video. */
2936
+ /** Explicitly state what should not be included in the generated
2937
+ videos. */
2883
2938
  negativePrompt?: string;
2884
2939
  /** Whether to use the prompt rewriting logic. */
2885
2940
  enhancePrompt?: boolean;
2886
2941
  /** Whether to generate audio along with the video. */
2887
2942
  generateAudio?: boolean;
2888
- /** Image to use as the last frame of generated videos. Only supported for image to video use cases. */
2943
+ /** Image to use as the last frame of generated videos.
2944
+ Only supported for image to video use cases. */
2889
2945
  lastFrame?: Image_2;
2890
2946
  /** The images to use as the references to generate the videos.
2891
2947
  If this field is provided, the text prompt field must also be provided.
@@ -2923,13 +2979,14 @@ export declare interface GenerateVideosParameters {
2923
2979
  /** ID of the model to use. For a list of models, see `Google models
2924
2980
  <https://cloud.google.com/vertex-ai/generative-ai/docs/learn/models>`_. */
2925
2981
  model: string;
2926
- /** The text prompt for generating the videos. Optional for image to video use cases. */
2982
+ /** The text prompt for generating the videos.
2983
+ Optional if image or video is provided. */
2927
2984
  prompt?: string;
2928
2985
  /** The input image for generating the videos.
2929
- Optional if prompt or video is provided. */
2986
+ Optional if prompt is provided. Not allowed if video is provided. */
2930
2987
  image?: Image_2;
2931
2988
  /** The input video for video extension use cases.
2932
- Optional if prompt or image is provided. */
2989
+ Optional if prompt is provided. Not allowed if image is provided. */
2933
2990
  video?: Video;
2934
2991
  /** A set of source input(s) for video generation. */
2935
2992
  source?: GenerateVideosSource;
@@ -2953,10 +3010,10 @@ export declare interface GenerateVideosSource {
2953
3010
  Optional if image or video is provided. */
2954
3011
  prompt?: string;
2955
3012
  /** The input image for generating the videos.
2956
- Optional if prompt or video is provided. */
3013
+ Optional if prompt is provided. Not allowed if video is provided. */
2957
3014
  image?: Image_2;
2958
3015
  /** The input video for video extension use cases.
2959
- Optional if prompt or image is provided. */
3016
+ Optional if prompt is provided. Not allowed if image is provided. */
2960
3017
  video?: Video;
2961
3018
  }
2962
3019
 
@@ -3646,12 +3703,10 @@ export declare class HttpResponse {
3646
3703
  /** An image. */
3647
3704
  declare interface Image_2 {
3648
3705
  /** The Cloud Storage URI of the image. ``Image`` can contain a value
3649
- for this field or the ``image_bytes`` field but not both.
3650
- */
3706
+ for this field or the ``image_bytes`` field but not both. */
3651
3707
  gcsUri?: string;
3652
3708
  /** The image bytes data. ``Image`` can contain a value for this field
3653
3709
  or the ``gcs_uri`` field but not both.
3654
-
3655
3710
  * @remarks Encoded as base64 string. */
3656
3711
  imageBytes?: string;
3657
3712
  /** The MIME type of the image. */
@@ -3695,6 +3750,16 @@ export declare enum ImagePromptLanguage {
3695
3750
  es = "es"
3696
3751
  }
3697
3752
 
3753
+ /** Config for `inlined_embedding_responses` parameter. */
3754
+ export declare class InlinedEmbedContentResponse {
3755
+ /** The response to the request.
3756
+ */
3757
+ response?: SingleEmbedContentResponse;
3758
+ /** The error encountered while processing the request.
3759
+ */
3760
+ error?: JobError;
3761
+ }
3762
+
3698
3763
  /** Config for inlined request. */
3699
3764
  export declare interface InlinedRequest {
3700
3765
  /** ID of the model to use. For a list of models, see `Google models
@@ -5142,26 +5207,16 @@ export declare class Models extends BaseModule {
5142
5207
  */
5143
5208
  embedContent(params: types.EmbedContentParameters): Promise<types.EmbedContentResponse>;
5144
5209
  /**
5145
- * Generates an image based on a text description and configuration.
5146
- *
5147
- * @param params - The parameters for generating images.
5148
- * @return The response from the API.
5149
- *
5150
- * @example
5151
- * ```ts
5152
- * const response = await ai.models.generateImages({
5153
- * model: 'imagen-3.0-generate-002',
5154
- * prompt: 'Robot holding a red skateboard',
5155
- * config: {
5156
- * numberOfImages: 1,
5157
- * includeRaiReason: true,
5158
- * },
5159
- * });
5160
- * console.log(response?.generatedImages?.[0]?.image?.imageBytes);
5161
- * ```
5210
+ * Private method for generating images.
5162
5211
  */
5163
5212
  private generateImagesInternal;
5213
+ /**
5214
+ * Private method for editing an image.
5215
+ */
5164
5216
  private editImageInternal;
5217
+ /**
5218
+ * Private method for upscaling an image.
5219
+ */
5165
5220
  private upscaleImageInternal;
5166
5221
  /**
5167
5222
  * Recontextualizes an image.
@@ -5300,27 +5355,7 @@ export declare class Models extends BaseModule {
5300
5355
  */
5301
5356
  computeTokens(params: types.ComputeTokensParameters): Promise<types.ComputeTokensResponse>;
5302
5357
  /**
5303
- * Generates videos based on a text description and configuration.
5304
- *
5305
- * @param params - The parameters for generating videos.
5306
- * @return A Promise<GenerateVideosOperation> which allows you to track the progress and eventually retrieve the generated videos using the operations.get method.
5307
- *
5308
- * @example
5309
- * ```ts
5310
- * const operation = await ai.models.generateVideos({
5311
- * model: 'veo-2.0-generate-001',
5312
- * prompt: 'A neon hologram of a cat driving at top speed',
5313
- * config: {
5314
- * numberOfVideos: 1
5315
- * });
5316
- *
5317
- * while (!operation.done) {
5318
- * await new Promise(resolve => setTimeout(resolve, 10000));
5319
- * operation = await ai.operations.getVideosOperation({operation: operation});
5320
- * }
5321
- *
5322
- * console.log(operation.response?.generatedVideos?.[0]?.video?.uri);
5323
- * ```
5358
+ * Private method for generating videos.
5324
5359
  */
5325
5360
  private generateVideosInternal;
5326
5361
  }
@@ -5579,12 +5614,14 @@ export declare interface Part {
5579
5614
  /** An opaque signature for the thought so it can be reused in subsequent requests.
5580
5615
  * @remarks Encoded as base64 string. */
5581
5616
  thoughtSignature?: string;
5617
+ /** A predicted [FunctionCall] returned from the model that contains a string
5618
+ representing the [FunctionDeclaration.name] and a structured JSON object
5619
+ containing the parameters and their values. */
5620
+ functionCall?: FunctionCall;
5582
5621
  /** Optional. Result of executing the [ExecutableCode]. */
5583
5622
  codeExecutionResult?: CodeExecutionResult;
5584
5623
  /** Optional. Code generated by the model that is meant to be executed. */
5585
5624
  executableCode?: ExecutableCode;
5586
- /** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */
5587
- functionCall?: FunctionCall;
5588
5625
  /** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */
5589
5626
  functionResponse?: FunctionResponse;
5590
5627
  /** Optional. Text part (can be code). */
@@ -5908,14 +5945,11 @@ export declare interface RetrievalMetadata {
5908
5945
 
5909
5946
  /** Safety attributes of a GeneratedImage or the user-provided prompt. */
5910
5947
  export declare interface SafetyAttributes {
5911
- /** List of RAI categories.
5912
- */
5948
+ /** List of RAI categories. */
5913
5949
  categories?: string[];
5914
- /** List of scores of each categories.
5915
- */
5950
+ /** List of scores of each categories. */
5916
5951
  scores?: number[];
5917
- /** Internal use only.
5918
- */
5952
+ /** Internal use only. */
5919
5953
  contentType?: string;
5920
5954
  }
5921
5955
 
@@ -6345,6 +6379,16 @@ export declare interface SessionResumptionConfig {
6345
6379
  */
6346
6380
  export declare function setDefaultBaseUrls(baseUrlParams: BaseUrlParameters): void;
6347
6381
 
6382
+ /** Config for `response` parameter. */
6383
+ export declare class SingleEmbedContentResponse {
6384
+ /** The response to the request.
6385
+ */
6386
+ embedding?: ContentEmbedding;
6387
+ /** The error encountered while processing the request.
6388
+ */
6389
+ tokenCount?: string;
6390
+ }
6391
+
6348
6392
  /** Context window will be truncated by keeping only suffix of it.
6349
6393
 
6350
6394
  Context window will always be cut at start of USER role turn. System
@@ -7079,9 +7123,9 @@ declare namespace types {
7079
7123
  VideoMetadata,
7080
7124
  Blob_2 as Blob,
7081
7125
  FileData,
7126
+ FunctionCall,
7082
7127
  CodeExecutionResult,
7083
7128
  ExecutableCode,
7084
- FunctionCall,
7085
7129
  FunctionResponse,
7086
7130
  Part,
7087
7131
  Content,
@@ -7297,10 +7341,16 @@ declare namespace types {
7297
7341
  BatchJobSource,
7298
7342
  JobError,
7299
7343
  InlinedResponse,
7344
+ SingleEmbedContentResponse,
7345
+ InlinedEmbedContentResponse,
7300
7346
  BatchJobDestination,
7301
7347
  CreateBatchJobConfig,
7302
7348
  CreateBatchJobParameters,
7303
7349
  BatchJob,
7350
+ EmbedContentBatch,
7351
+ EmbeddingsBatchJobSource,
7352
+ CreateEmbeddingsBatchJobConfig,
7353
+ CreateEmbeddingsBatchJobParameters,
7304
7354
  GetBatchJobConfig,
7305
7355
  GetBatchJobParameters,
7306
7356
  CancelBatchJobConfig,
@@ -7522,8 +7572,8 @@ export declare interface UpscaleImageConfig {
7522
7572
  includeRaiReason?: boolean;
7523
7573
  /** The image format that the output should be saved as. */
7524
7574
  outputMimeType?: string;
7525
- /** The level of compression if the ``output_mime_type`` is
7526
- ``image/jpeg``. */
7575
+ /** The level of compression. Only applicable if the
7576
+ ``output_mime_type`` is ``image/jpeg``. */
7527
7577
  outputCompressionQuality?: number;
7528
7578
  /** Whether to add an image enhancing step before upscaling.
7529
7579
  It is expected to suppress the noise and JPEG compression artifacts
@@ -7677,7 +7727,7 @@ export declare interface Video {
7677
7727
  /** Video bytes.
7678
7728
  * @remarks Encoded as base64 string. */
7679
7729
  videoBytes?: string;
7680
- /** Video encoding, for example "video/mp4". */
7730
+ /** Video encoding, for example ``video/mp4``. */
7681
7731
  mimeType?: string;
7682
7732
  }
7683
7733
 
@@ -7697,8 +7747,7 @@ export declare enum VideoCompressionQuality {
7697
7747
 
7698
7748
  /** A reference image for video generation. */
7699
7749
  export declare interface VideoGenerationReferenceImage {
7700
- /** The reference image.
7701
- */
7750
+ /** The reference image. */
7702
7751
  image?: Image_2;
7703
7752
  /** The type of the reference image, which defines how the reference
7704
7753
  image will be used to generate the video. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/genai",
3
- "version": "1.16.0",
3
+ "version": "1.18.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.mjs",