@google/genai 1.28.0 → 1.29.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
@@ -124,6 +124,7 @@ declare class ApiClient {
124
124
  private apiCall;
125
125
  getDefaultHeaders(): Record<string, string>;
126
126
  private getHeadersInternal;
127
+ private getFileName;
127
128
  /**
128
129
  * Uploads a file asynchronously using Gemini API only, this is not supported
129
130
  * in Vertex AI.
@@ -136,6 +137,19 @@ declare class ApiClient {
136
137
  * @throws An error if the `mimeType` is not provided and can not be inferred,
137
138
  */
138
139
  uploadFile(file: string | Blob, config?: types.UploadFileConfig): Promise<types.File>;
140
+ /**
141
+ * Uploads a file to a given file search store asynchronously using Gemini API only, this is not supported
142
+ * in Vertex AI.
143
+ *
144
+ * @param fileSearchStoreName The name of the file search store to upload the file to.
145
+ * @param file The string path to the file to be uploaded or a Blob object.
146
+ * @param config Optional parameters specified in the `UploadFileConfig`
147
+ * interface. @see {@link UploadFileConfig}
148
+ * @return A promise that resolves to a `File` object.
149
+ * @throws An error if called on a Vertex AI client.
150
+ * @throws An error if the `mimeType` is not provided and can not be inferred,
151
+ */
152
+ uploadFileToFileSearchStore(fileSearchStoreName: string, file: string | Blob, config?: types.UploadToFileSearchStoreConfig): Promise<types.UploadToFileSearchStoreOperation>;
139
153
  /**
140
154
  * Downloads a file asynchronously to the specified path.
141
155
  *
@@ -228,10 +242,16 @@ export declare interface ApiErrorInfo {
228
242
  status: number;
229
243
  }
230
244
 
231
- /** Config for authentication with API key. */
245
+ /** Config for authentication with API key. This data type is not supported in Gemini API. */
232
246
  export declare interface ApiKeyConfig {
233
- /** The API key to be used in the request directly. */
247
+ /** Optional. The name of the SecretManager secret version resource storing the API key. Format: `projects/{project}/secrets/{secrete}/versions/{version}` - If both `api_key_secret` and `api_key_string` are specified, this field takes precedence over `api_key_string`. - If specified, the `secretmanager.versions.access` permission should be granted to Vertex AI Extension Service Agent (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) on the specified resource. */
248
+ apiKeySecret?: string;
249
+ /** Optional. The API key to be used in the request directly. */
234
250
  apiKeyString?: string;
251
+ /** Optional. The location of the API key. */
252
+ httpElementLocation?: HttpElementLocation;
253
+ /** Optional. The parameter name of the API key. E.g. If the API request is "https://example.com/act?api_key=", "api_key" would be the parameter name. */
254
+ name?: string;
235
255
  }
236
256
 
237
257
  /** The API spec that the external API implements. This enum is not supported in Gemini API. */
@@ -283,7 +303,7 @@ declare interface Auth {
283
303
  addAuthHeaders(headers: Headers, url?: string): Promise<void>;
284
304
  }
285
305
 
286
- /** Auth configuration to run the extension. */
306
+ /** Auth configuration to run the extension. This data type is not supported in Gemini API. */
287
307
  export declare interface AuthConfig {
288
308
  /** Config for API key auth. */
289
309
  apiKeyConfig?: ApiKeyConfig;
@@ -544,7 +564,7 @@ export declare interface BatchJob {
544
564
  createTime?: string;
545
565
  /** Output only. Time when the Job for the first time entered the `JOB_STATE_RUNNING` state. */
546
566
  startTime?: string;
547
- /** The time when the BatchJob was completed.
567
+ /** The time when the BatchJob was completed. This field is for Vertex AI only.
548
568
  */
549
569
  endTime?: string;
550
570
  /** The time when the BatchJob was last updated.
@@ -553,12 +573,15 @@ export declare interface BatchJob {
553
573
  /** The name of the model that produces the predictions via the BatchJob.
554
574
  */
555
575
  model?: string;
556
- /** Configuration for the input data.
576
+ /** Configuration for the input data. This field is for Vertex AI only.
557
577
  */
558
578
  src?: BatchJobSource;
559
579
  /** Configuration for the output data.
560
580
  */
561
581
  dest?: BatchJobDestination;
582
+ /** Statistics on completed and failed prediction instances. This field is for Vertex AI only.
583
+ */
584
+ completionStats?: CompletionStats;
562
585
  }
563
586
 
564
587
  /** Config for `des` parameter. */
@@ -1042,6 +1065,12 @@ export declare interface Checkpoint {
1042
1065
  step?: string;
1043
1066
  }
1044
1067
 
1068
+ /** Config for telling the service how to chunk the file. */
1069
+ export declare interface ChunkingConfig {
1070
+ /** White space chunking configuration. */
1071
+ whiteSpaceConfig?: WhiteSpaceConfig;
1072
+ }
1073
+
1045
1074
  /** Source attributions for content. This data type is not supported in Gemini API. */
1046
1075
  export declare interface Citation {
1047
1076
  /** Output only. End index into the content. */
@@ -1075,6 +1104,18 @@ export declare interface CodeExecutionResult {
1075
1104
  output?: string;
1076
1105
  }
1077
1106
 
1107
+ /** Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. This data type is not supported in Gemini API. */
1108
+ export declare interface CompletionStats {
1109
+ /** Output only. The number of entities for which any error was encountered. */
1110
+ failedCount?: string;
1111
+ /** Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). */
1112
+ incompleteCount?: string;
1113
+ /** Output only. The number of entities that had been processed successfully. */
1114
+ successfulCount?: string;
1115
+ /** Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. */
1116
+ successfulForecastPointCount?: string;
1117
+ }
1118
+
1078
1119
  /** Tool to support computer use. */
1079
1120
  export declare interface ComputerUse {
1080
1121
  /** Required. The environment being operated. */
@@ -1476,6 +1517,29 @@ export declare class CreateFileResponse {
1476
1517
  sdkHttpResponse?: HttpResponse;
1477
1518
  }
1478
1519
 
1520
+ /** Optional parameters for creating a file search store. */
1521
+ export declare interface CreateFileSearchStoreConfig {
1522
+ /** Used to override HTTP request options. */
1523
+ httpOptions?: HttpOptions;
1524
+ /** Abort signal which can be used to cancel the request.
1525
+
1526
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
1527
+ operation will not cancel the request in the service. You will still
1528
+ be charged usage for any applicable operations.
1529
+ */
1530
+ abortSignal?: AbortSignal;
1531
+ /** The human-readable display name for the file search store.
1532
+ */
1533
+ displayName?: string;
1534
+ }
1535
+
1536
+ /** Config for file_search_stores.create parameters. */
1537
+ export declare interface CreateFileSearchStoreParameters {
1538
+ /** Optional parameters for creating a file search store.
1539
+ */
1540
+ config?: CreateFileSearchStoreConfig;
1541
+ }
1542
+
1479
1543
  /**
1480
1544
  * Creates a `FunctionResponsePart` object from a `base64` encoded `string`.
1481
1545
  */
@@ -1592,6 +1656,18 @@ export declare interface CreateTuningJobParametersPrivate {
1592
1656
  */
1593
1657
  export declare function createUserContent(partOrString: PartListUnion | string): Content;
1594
1658
 
1659
+ /** User provided metadata stored as key-value pairs. This data type is not supported in Vertex AI. */
1660
+ export declare interface CustomMetadata {
1661
+ /** Required. The key of the metadata to store. */
1662
+ key?: string;
1663
+ /** The numeric value of the metadata to store. */
1664
+ numericValue?: number;
1665
+ /** The StringList value of the metadata to store. */
1666
+ stringListValue?: StringList;
1667
+ /** The string value of the metadata to store. */
1668
+ stringValue?: string;
1669
+ }
1670
+
1595
1671
  /** Distribution computed over a tuning dataset. This data type is not supported in Gemini API. */
1596
1672
  export declare interface DatasetDistribution {
1597
1673
  /** Output only. Defines the histogram bucket. */
@@ -1695,6 +1771,32 @@ export declare class DeleteCachedContentResponse {
1695
1771
  sdkHttpResponse?: HttpResponse;
1696
1772
  }
1697
1773
 
1774
+ /** Config for optional parameters. */
1775
+ export declare interface DeleteDocumentConfig {
1776
+ /** Used to override HTTP request options. */
1777
+ httpOptions?: HttpOptions;
1778
+ /** Abort signal which can be used to cancel the request.
1779
+
1780
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
1781
+ operation will not cancel the request in the service. You will still
1782
+ be charged usage for any applicable operations.
1783
+ */
1784
+ abortSignal?: AbortSignal;
1785
+ /** If set to true, any `Chunk`s and objects related to this `Document` will
1786
+ also be deleted.
1787
+ */
1788
+ force?: boolean;
1789
+ }
1790
+
1791
+ /** Config for documents.delete parameters. */
1792
+ export declare interface DeleteDocumentParameters {
1793
+ /** The resource name of the Document.
1794
+ Example: fileSearchStores/file-search-store-foo/documents/documents-bar */
1795
+ name: string;
1796
+ /** Optional parameters for the request. */
1797
+ config?: DeleteDocumentConfig;
1798
+ }
1799
+
1698
1800
  /** Used to override the default configuration. */
1699
1801
  export declare interface DeleteFileConfig {
1700
1802
  /** Used to override HTTP request options. */
@@ -1722,6 +1824,32 @@ export declare class DeleteFileResponse {
1722
1824
  sdkHttpResponse?: HttpResponse;
1723
1825
  }
1724
1826
 
1827
+ /** Optional parameters for deleting a FileSearchStore. */
1828
+ export declare interface DeleteFileSearchStoreConfig {
1829
+ /** Used to override HTTP request options. */
1830
+ httpOptions?: HttpOptions;
1831
+ /** Abort signal which can be used to cancel the request.
1832
+
1833
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
1834
+ operation will not cancel the request in the service. You will still
1835
+ be charged usage for any applicable operations.
1836
+ */
1837
+ abortSignal?: AbortSignal;
1838
+ /** If set to true, any Documents and objects related to this FileSearchStore will also be deleted.
1839
+ If false (the default), a FAILED_PRECONDITION error will be returned if
1840
+ the FileSearchStore contains any Documents.
1841
+ */
1842
+ force?: boolean;
1843
+ }
1844
+
1845
+ /** Config for file_search_stores.delete parameters. */
1846
+ export declare interface DeleteFileSearchStoreParameters {
1847
+ /** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
1848
+ name: string;
1849
+ /** Optional parameters for the request. */
1850
+ config?: DeleteFileSearchStoreConfig;
1851
+ }
1852
+
1725
1853
  /** Configuration for deleting a tuned model. */
1726
1854
  export declare interface DeleteModelConfig {
1727
1855
  /** Used to override HTTP request options. */
@@ -1762,6 +1890,76 @@ export declare interface DistillationDataStats {
1762
1890
  trainingDatasetStats?: DatasetStats;
1763
1891
  }
1764
1892
 
1893
+ /** A Document is a collection of Chunks. */
1894
+ declare interface Document_2 {
1895
+ /** The resource name of the Document.
1896
+ Example: fileSearchStores/file-search-store-foo/documents/documents-bar */
1897
+ name?: string;
1898
+ /** The human-readable display name for the Document. */
1899
+ displayName?: string;
1900
+ /** The current state of the Document. */
1901
+ state?: DocumentState;
1902
+ /** The size of the Document in bytes. */
1903
+ sizeBytes?: string;
1904
+ /** The MIME type of the Document. */
1905
+ mimeType?: string;
1906
+ /** Output only. The Timestamp of when the `Document` was created. */
1907
+ createTime?: string;
1908
+ /** Optional. User provided custom metadata stored as key-value pairs used for querying. A `Document` can have a maximum of 20 `CustomMetadata`. */
1909
+ customMetadata?: CustomMetadata[];
1910
+ /** Output only. The Timestamp of when the `Document` was last updated. */
1911
+ updateTime?: string;
1912
+ }
1913
+ export { Document_2 as Document }
1914
+
1915
+ declare class Documents extends BaseModule {
1916
+ private readonly apiClient;
1917
+ constructor(apiClient: ApiClient);
1918
+ /**
1919
+ * Lists documents.
1920
+ *
1921
+ * @param params - The parameters for the list request.
1922
+ * @return - A pager of documents.
1923
+ *
1924
+ * @example
1925
+ * ```ts
1926
+ * const documents = await ai.documents.list({config: {'pageSize': 2}});
1927
+ * for await (const document of documents) {
1928
+ * console.log(document);
1929
+ * }
1930
+ * ```
1931
+ */
1932
+ list: (params: types.ListDocumentsParameters) => Promise<Pager<types.Document>>;
1933
+ /**
1934
+ * Gets a Document.
1935
+ *
1936
+ * @param params - The parameters for getting a document.
1937
+ * @return Document.
1938
+ */
1939
+ get(params: types.GetDocumentParameters): Promise<types.Document>;
1940
+ /**
1941
+ * Deletes a Document.
1942
+ *
1943
+ * @param params - The parameters for deleting a document.
1944
+ */
1945
+ delete(params: types.DeleteDocumentParameters): Promise<void>;
1946
+ /**
1947
+ * Lists all Documents in a FileSearchStore.
1948
+ *
1949
+ * @param params - The parameters for listing documents.
1950
+ * @return ListDocumentsResponse.
1951
+ */
1952
+ private listInternal;
1953
+ }
1954
+
1955
+ /** State for the lifecycle of a Document. */
1956
+ export declare enum DocumentState {
1957
+ STATE_UNSPECIFIED = "STATE_UNSPECIFIED",
1958
+ STATE_PENDING = "STATE_PENDING",
1959
+ STATE_ACTIVE = "STATE_ACTIVE",
1960
+ STATE_FAILED = "STATE_FAILED"
1961
+ }
1962
+
1765
1963
  export declare type DownloadableFileUnion = string | File_2 | GeneratedVideo | Video;
1766
1964
 
1767
1965
  declare interface Downloader {
@@ -2027,6 +2225,8 @@ export declare enum EndSensitivity {
2027
2225
  export declare interface EnterpriseWebSearch {
2028
2226
  /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
2029
2227
  excludeDomains?: string[];
2228
+ /** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. */
2229
+ blockingConfidence?: PhishBlockThreshold;
2030
2230
  }
2031
2231
 
2032
2232
  /** An entity representing the segmented area. */
@@ -2275,6 +2475,133 @@ export declare class Files extends BaseModule {
2275
2475
  delete(params: types.DeleteFileParameters): Promise<types.DeleteFileResponse>;
2276
2476
  }
2277
2477
 
2478
+ /** Tool to retrieve knowledge from the File Search Stores. */
2479
+ export declare interface FileSearch {
2480
+ /** The names of the file_search_stores to retrieve from.
2481
+ Example: `fileSearchStores/my-file-search-store-123` */
2482
+ fileSearchStoreNames?: string[];
2483
+ /** The number of file search retrieval chunks to retrieve. */
2484
+ topK?: number;
2485
+ /** Metadata filter to apply to the file search retrieval documents. See https://google.aip.dev/160 for the syntax of the filter expression. */
2486
+ metadataFilter?: string;
2487
+ }
2488
+
2489
+ /** A collection of Documents. */
2490
+ export declare interface FileSearchStore {
2491
+ /** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
2492
+ name?: string;
2493
+ /** The human-readable display name for the FileSearchStore. */
2494
+ displayName?: string;
2495
+ /** The Timestamp of when the FileSearchStore was created. */
2496
+ createTime?: string;
2497
+ /** The Timestamp of when the FileSearchStore was last updated. */
2498
+ updateTime?: string;
2499
+ /** The number of documents in the FileSearchStore that are active and ready for retrieval. */
2500
+ activeDocumentsCount?: string;
2501
+ /** The number of documents in the FileSearchStore that are being processed. */
2502
+ pendingDocumentsCount?: string;
2503
+ /** The number of documents in the FileSearchStore that have failed processing. */
2504
+ failedDocumentsCount?: string;
2505
+ /** The size of raw bytes ingested into the FileSearchStore. This is the
2506
+ total size of all the documents in the FileSearchStore. */
2507
+ sizeBytes?: string;
2508
+ }
2509
+
2510
+ declare class FileSearchStores extends BaseModule {
2511
+ private readonly apiClient;
2512
+ readonly documents: Documents;
2513
+ constructor(apiClient: ApiClient, documents?: Documents);
2514
+ /**
2515
+ * Uploads a file asynchronously to a given File Search Store.
2516
+ * This method is not available in Vertex AI.
2517
+ * Supported upload sources:
2518
+ * - Node.js: File path (string) or Blob object.
2519
+ * - Browser: Blob object (e.g., File).
2520
+ *
2521
+ * @remarks
2522
+ * The `mimeType` can be specified in the `config` parameter. If omitted:
2523
+ * - For file path (string) inputs, the `mimeType` will be inferred from the
2524
+ * file extension.
2525
+ * - For Blob object inputs, the `mimeType` will be set to the Blob's `type`
2526
+ * property.
2527
+ *
2528
+ * This section can contain multiple paragraphs and code examples.
2529
+ *
2530
+ * @param params - Optional parameters specified in the
2531
+ * `types.UploadToFileSearchStoreParameters` interface.
2532
+ * @see {@link types.UploadToFileSearchStoreParameters#config} for the optional
2533
+ * config in the parameters.
2534
+ * @return A promise that resolves to a long running operation.
2535
+ * @throws An error if called on a Vertex AI client.
2536
+ * @throws An error if the `mimeType` is not provided and can not be inferred,
2537
+ * the `mimeType` can be provided in the `params.config` parameter.
2538
+ * @throws An error occurs if a suitable upload location cannot be established.
2539
+ *
2540
+ * @example
2541
+ * The following code uploads a file to a given file search store.
2542
+ *
2543
+ * ```ts
2544
+ * const operation = await ai.fileSearchStores.upload({fileSearchStoreName: 'fileSearchStores/foo-bar', file: 'file.txt', config: {
2545
+ * mimeType: 'text/plain',
2546
+ * }});
2547
+ * console.log(operation.name);
2548
+ * ```
2549
+ */
2550
+ uploadToFileSearchStore(params: types.UploadToFileSearchStoreParameters): Promise<types.UploadToFileSearchStoreOperation>;
2551
+ /**
2552
+ * Lists file search stores.
2553
+ *
2554
+ * @param params - The parameters for the list request.
2555
+ * @return - A pager of file search stores.
2556
+ *
2557
+ * @example
2558
+ * ```ts
2559
+ * const fileSearchStores = await ai.fileSearchStores.list({config: {'pageSize': 2}});
2560
+ * for await (const fileSearchStore of fileSearchStores) {
2561
+ * console.log(fileSearchStore);
2562
+ * }
2563
+ * ```
2564
+ */
2565
+ list: (params?: types.ListFileSearchStoresParameters) => Promise<Pager<types.FileSearchStore>>;
2566
+ /**
2567
+ * Creates a File Search Store.
2568
+ *
2569
+ * @param params - The parameters for creating a File Search Store.
2570
+ * @return FileSearchStore.
2571
+ */
2572
+ create(params: types.CreateFileSearchStoreParameters): Promise<types.FileSearchStore>;
2573
+ /**
2574
+ * Gets a File Search Store.
2575
+ *
2576
+ * @param params - The parameters for getting a File Search Store.
2577
+ * @return FileSearchStore.
2578
+ */
2579
+ get(params: types.GetFileSearchStoreParameters): Promise<types.FileSearchStore>;
2580
+ /**
2581
+ * Deletes a File Search Store.
2582
+ *
2583
+ * @param params - The parameters for deleting a File Search Store.
2584
+ */
2585
+ delete(params: types.DeleteFileSearchStoreParameters): Promise<void>;
2586
+ /**
2587
+ * Lists all FileSearchStore owned by the user.
2588
+ *
2589
+ * @param params - The parameters for listing file search stores.
2590
+ * @return ListFileSearchStoresResponse.
2591
+ */
2592
+ private listInternal;
2593
+ private uploadToFileSearchStoreInternal;
2594
+ /**
2595
+ * Imports a File from File Service to a FileSearchStore.
2596
+ *
2597
+ * This is a long-running operation, see aip.dev/151
2598
+ *
2599
+ * @param params - The parameters for importing a file to a file search store.
2600
+ * @return ImportFileOperation.
2601
+ */
2602
+ importFile(params: types.ImportFileParameters): Promise<types.ImportFileOperation>;
2603
+ }
2604
+
2278
2605
  /** Source of the File. */
2279
2606
  export declare enum FileSource {
2280
2607
  SOURCE_UNSPECIFIED = "SOURCE_UNSPECIFIED",
@@ -2390,7 +2717,7 @@ export declare interface FunctionCall {
2390
2717
  id?: string;
2391
2718
  /** Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */
2392
2719
  args?: Record<string, unknown>;
2393
- /** Required. The name of the function to call. Matches [FunctionDeclaration.name]. */
2720
+ /** Optional. The name of the function to call. Matches [FunctionDeclaration.name]. */
2394
2721
  name?: string;
2395
2722
  }
2396
2723
 
@@ -2860,29 +3187,29 @@ export declare class GenerateContentResponsePromptFeedback {
2860
3187
  safetyRatings?: SafetyRating[];
2861
3188
  }
2862
3189
 
2863
- /** Usage metadata about response(s). This data type is not supported in Gemini API. */
3190
+ /** Usage metadata about the content generation request and response. This message provides a detailed breakdown of token usage and other relevant metrics. This data type is not supported in Gemini API. */
2864
3191
  export declare class GenerateContentResponseUsageMetadata {
2865
- /** Output only. List of modalities of the cached content in the request input. */
3192
+ /** Output only. A detailed breakdown of the token count for each modality in the cached content. */
2866
3193
  cacheTokensDetails?: ModalityTokenCount[];
2867
- /** Output only. Number of tokens in the cached part in the input (the cached content). */
3194
+ /** Output only. The number of tokens in the cached content that was used for this request. */
2868
3195
  cachedContentTokenCount?: number;
2869
- /** Number of tokens in the response(s). */
3196
+ /** The total number of tokens in the generated candidates. */
2870
3197
  candidatesTokenCount?: number;
2871
- /** Output only. List of modalities that were returned in the response. */
3198
+ /** Output only. A detailed breakdown of the token count for each modality in the generated candidates. */
2872
3199
  candidatesTokensDetails?: ModalityTokenCount[];
2873
- /** Number of tokens in the request. When `cached_content` is set, this is still the total effective prompt size meaning this includes the number of tokens in the cached content. */
3200
+ /** The total number of tokens in the prompt. This includes any text, images, or other media provided in the request. When `cached_content` is set, this also includes the number of tokens in the cached content. */
2874
3201
  promptTokenCount?: number;
2875
- /** Output only. List of modalities that were processed in the request input. */
3202
+ /** Output only. A detailed breakdown of the token count for each modality in the prompt. */
2876
3203
  promptTokensDetails?: ModalityTokenCount[];
2877
- /** Output only. Number of tokens present in thoughts output. */
3204
+ /** Output only. The number of tokens that were part of the model's generated "thoughts" output, if applicable. */
2878
3205
  thoughtsTokenCount?: number;
2879
- /** Output only. Number of tokens present in tool-use prompt(s). */
3206
+ /** Output only. The number of tokens in the results from tool executions, which are provided back to the model as input, if applicable. */
2880
3207
  toolUsePromptTokenCount?: number;
2881
- /** Output only. List of modalities that were processed for tool-use request inputs. */
3208
+ /** Output only. A detailed breakdown by modality of the token counts from the results of tool executions, which are provided back to the model as input. */
2882
3209
  toolUsePromptTokensDetails?: ModalityTokenCount[];
2883
- /** Total token count for prompt, response candidates, and tool-use prompts (if present). */
3210
+ /** The total number of tokens for the entire request. This is the sum of `prompt_token_count`, `candidates_token_count`, `tool_use_prompt_token_count`, and `thoughts_token_count`. */
2884
3211
  totalTokenCount?: number;
2885
- /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. */
3212
+ /** Output only. The traffic type for this request. */
2886
3213
  trafficType?: TrafficType;
2887
3214
  }
2888
3215
 
@@ -3068,7 +3395,7 @@ export declare class GenerateVideosOperation implements Operation<GenerateVideos
3068
3395
  * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
3069
3396
  * @internal
3070
3397
  */
3071
- _fromAPIResponse({ apiResponse, isVertexAI, }: OperationFromAPIResponseParameters): Operation<GenerateVideosResponse>;
3398
+ _fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<GenerateVideosResponse>;
3072
3399
  /** The full HTTP response. */
3073
3400
  sdkHttpResponse?: HttpResponse;
3074
3401
  }
@@ -3120,6 +3447,10 @@ export declare interface GenerateVideosSource {
3120
3447
  export declare interface GenerationConfig {
3121
3448
  /** Optional. Config for model selection. */
3122
3449
  modelSelectionConfig?: ModelSelectionConfig;
3450
+ /** Output schema of the generated response. This is an alternative to
3451
+ `response_schema` that accepts [JSON Schema](https://json-schema.org/).
3452
+ */
3453
+ responseJsonSchema?: unknown;
3123
3454
  /** Optional. If enabled, audio timestamp will be included in the request to the model. This field is not supported in Gemini API. */
3124
3455
  audioTimestamp?: boolean;
3125
3456
  /** Optional. Number of candidates to generate. */
@@ -3136,8 +3467,6 @@ export declare interface GenerationConfig {
3136
3467
  mediaResolution?: MediaResolution;
3137
3468
  /** Optional. Positive penalties. */
3138
3469
  presencePenalty?: number;
3139
- /** 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. */
3140
- responseJsonSchema?: unknown;
3141
3470
  /** Optional. If true, export the logprobs results in response. */
3142
3471
  responseLogprobs?: boolean;
3143
3472
  /** 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. */
@@ -3241,6 +3570,28 @@ export declare interface GetCachedContentParameters {
3241
3570
  config?: GetCachedContentConfig;
3242
3571
  }
3243
3572
 
3573
+ /** Optional Config. */
3574
+ export declare interface GetDocumentConfig {
3575
+ /** Used to override HTTP request options. */
3576
+ httpOptions?: HttpOptions;
3577
+ /** Abort signal which can be used to cancel the request.
3578
+
3579
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
3580
+ operation will not cancel the request in the service. You will still
3581
+ be charged usage for any applicable operations.
3582
+ */
3583
+ abortSignal?: AbortSignal;
3584
+ }
3585
+
3586
+ /** Parameters for documents.get. */
3587
+ export declare interface GetDocumentParameters {
3588
+ /** The resource name of the Document.
3589
+ Example: fileSearchStores/file-search-store-foo/documents/documents-bar */
3590
+ name: string;
3591
+ /** Optional parameters for the request. */
3592
+ config?: GetDocumentConfig;
3593
+ }
3594
+
3244
3595
  /** Used to override the default configuration. */
3245
3596
  export declare interface GetFileConfig {
3246
3597
  /** Used to override HTTP request options. */
@@ -3262,6 +3613,27 @@ export declare interface GetFileParameters {
3262
3613
  config?: GetFileConfig;
3263
3614
  }
3264
3615
 
3616
+ /** Optional parameters for getting a FileSearchStore. */
3617
+ export declare interface GetFileSearchStoreConfig {
3618
+ /** Used to override HTTP request options. */
3619
+ httpOptions?: HttpOptions;
3620
+ /** Abort signal which can be used to cancel the request.
3621
+
3622
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
3623
+ operation will not cancel the request in the service. You will still
3624
+ be charged usage for any applicable operations.
3625
+ */
3626
+ abortSignal?: AbortSignal;
3627
+ }
3628
+
3629
+ /** Config for file_search_stores.get parameters. */
3630
+ export declare interface GetFileSearchStoreParameters {
3631
+ /** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
3632
+ name: string;
3633
+ /** Optional parameters for the request. */
3634
+ config?: GetFileSearchStoreConfig;
3635
+ }
3636
+
3265
3637
  /** Optional parameters for models.get method. */
3266
3638
  export declare interface GetModelConfig {
3267
3639
  /** Used to override HTTP request options. */
@@ -3301,6 +3673,7 @@ export declare interface GetOperationParameters {
3301
3673
  config?: GetOperationConfig;
3302
3674
  }
3303
3675
 
3676
+ /** Optional parameters for tunings.get method. */
3304
3677
  export declare interface GetTuningJobConfig {
3305
3678
  /** Used to override HTTP request options. */
3306
3679
  httpOptions?: HttpOptions;
@@ -3370,6 +3743,7 @@ export declare class GoogleGenAI {
3370
3743
  readonly operations: Operations;
3371
3744
  readonly authTokens: Tokens;
3372
3745
  readonly tunings: Tunings;
3746
+ readonly fileSearchStores: FileSearchStores;
3373
3747
  constructor(options: GoogleGenAIOptions);
3374
3748
  }
3375
3749
 
@@ -3436,9 +3810,9 @@ export declare interface GoogleGenAIOptions {
3436
3810
  httpOptions?: HttpOptions;
3437
3811
  }
3438
3812
 
3439
- /** Tool to support Google Maps in Model. */
3813
+ /** Tool to retrieve public maps data for grounding, powered by Google. */
3440
3814
  export declare interface GoogleMaps {
3441
- /** Optional. Auth config for the Google Maps tool. */
3815
+ /** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
3442
3816
  authConfig?: AuthConfig;
3443
3817
  /** Optional. If true, include the widget context token in the response. */
3444
3818
  enableWidget?: boolean;
@@ -3458,6 +3832,8 @@ export declare interface GoogleRpcStatus {
3458
3832
  export declare interface GoogleSearch {
3459
3833
  /** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. This field is not supported in Gemini API. */
3460
3834
  excludeDomains?: string[];
3835
+ /** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
3836
+ blockingConfidence?: PhishBlockThreshold;
3461
3837
  /** Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa). This field is not supported in Vertex AI. */
3462
3838
  timeRangeFilter?: Interval;
3463
3839
  }
@@ -3494,11 +3870,11 @@ export declare interface GroundingChunkMaps {
3494
3870
  placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
3495
3871
  /** This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place. */
3496
3872
  placeId?: string;
3497
- /** Text of the chunk. */
3873
+ /** Text of the place answer. */
3498
3874
  text?: string;
3499
- /** Title of the chunk. */
3875
+ /** Title of the place. */
3500
3876
  title?: string;
3501
- /** URI reference of the chunk. */
3877
+ /** URI reference of the place. */
3502
3878
  uri?: string;
3503
3879
  }
3504
3880
 
@@ -3740,6 +4116,31 @@ export declare enum HarmSeverity {
3740
4116
  HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
3741
4117
  }
3742
4118
 
4119
+ /** The location of the API key. This enum is not supported in Gemini API. */
4120
+ export declare enum HttpElementLocation {
4121
+ HTTP_IN_UNSPECIFIED = "HTTP_IN_UNSPECIFIED",
4122
+ /**
4123
+ * Element is in the HTTP request query.
4124
+ */
4125
+ HTTP_IN_QUERY = "HTTP_IN_QUERY",
4126
+ /**
4127
+ * Element is in the HTTP request header.
4128
+ */
4129
+ HTTP_IN_HEADER = "HTTP_IN_HEADER",
4130
+ /**
4131
+ * Element is in the HTTP request path.
4132
+ */
4133
+ HTTP_IN_PATH = "HTTP_IN_PATH",
4134
+ /**
4135
+ * Element is in the HTTP request body.
4136
+ */
4137
+ HTTP_IN_BODY = "HTTP_IN_BODY",
4138
+ /**
4139
+ * Element is in the HTTP request cookie.
4140
+ */
4141
+ HTTP_IN_COOKIE = "HTTP_IN_COOKIE"
4142
+ }
4143
+
3743
4144
  /** HTTP options to be used in each of the requests. */
3744
4145
  export declare interface HttpOptions {
3745
4146
  /** The base URL for the AI platform service endpoint. */
@@ -3837,6 +4238,10 @@ export declare interface ImageConfig {
3837
4238
  /** Aspect ratio of the generated images. Supported values are
3838
4239
  "1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
3839
4240
  aspectRatio?: string;
4241
+ /** Optional. Specifies the size of generated images. Supported
4242
+ values are `1K`, `2K`, `4K`. If not specified, the model will use default
4243
+ value `1K`. */
4244
+ imageSize?: string;
3840
4245
  }
3841
4246
 
3842
4247
  /** Enum that specifies the language of the text in the prompt. */
@@ -3875,6 +4280,64 @@ export declare enum ImagePromptLanguage {
3875
4280
  es = "es"
3876
4281
  }
3877
4282
 
4283
+ /** Optional parameters for importing a file. */
4284
+ export declare interface ImportFileConfig {
4285
+ /** Used to override HTTP request options. */
4286
+ httpOptions?: HttpOptions;
4287
+ /** Abort signal which can be used to cancel the request.
4288
+
4289
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
4290
+ operation will not cancel the request in the service. You will still
4291
+ be charged usage for any applicable operations.
4292
+ */
4293
+ abortSignal?: AbortSignal;
4294
+ /** User provided custom metadata stored as key-value pairs used for querying. */
4295
+ customMetadata?: CustomMetadata[];
4296
+ /** Config for telling the service how to chunk the file. */
4297
+ chunkingConfig?: ChunkingConfig;
4298
+ }
4299
+
4300
+ /** Long-running operation for importing a file to a FileSearchStore. */
4301
+ export declare class ImportFileOperation implements Operation<ImportFileResponse> {
4302
+ /** 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}`. */
4303
+ name?: string;
4304
+ /** 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. */
4305
+ metadata?: Record<string, unknown>;
4306
+ /** 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. */
4307
+ done?: boolean;
4308
+ /** The error result of the operation in case of failure or cancellation. */
4309
+ error?: Record<string, unknown>;
4310
+ /** The result of the ImportFile operation, available when the operation is done. */
4311
+ response?: ImportFileResponse;
4312
+ /**
4313
+ * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
4314
+ * @internal
4315
+ */
4316
+ _fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<ImportFileResponse>;
4317
+ /** The full HTTP response. */
4318
+ sdkHttpResponse?: HttpResponse;
4319
+ }
4320
+
4321
+ /** Config for file_search_stores.import_file parameters. */
4322
+ export declare interface ImportFileParameters {
4323
+ /** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
4324
+ fileSearchStoreName: string;
4325
+ /** The name of the File API File to import. Example: `files/abc-123` */
4326
+ fileName: string;
4327
+ /** Optional parameters for the request. */
4328
+ config?: ImportFileConfig;
4329
+ }
4330
+
4331
+ /** Response for ImportFile to import a File API file with a file search store. */
4332
+ export declare class ImportFileResponse {
4333
+ /** Used to retain the full HTTP response. */
4334
+ sdkHttpResponse?: HttpResponse;
4335
+ /** The name of the FileSearchStore containing Documents. */
4336
+ parent?: string;
4337
+ /** The identifier for the Document imported. */
4338
+ documentName?: string;
4339
+ }
4340
+
3878
4341
  /** Config for `inlined_embedding_responses` parameter. */
3879
4342
  export declare class InlinedEmbedContentResponse {
3880
4343
  /** The response to the request.
@@ -4065,7 +4528,38 @@ export declare class ListCachedContentsResponse {
4065
4528
  cachedContents?: CachedContent[];
4066
4529
  }
4067
4530
 
4068
- /** Used to override the default configuration. */
4531
+ /** Config for optional parameters. */
4532
+ export declare interface ListDocumentsConfig {
4533
+ /** Used to override HTTP request options. */
4534
+ httpOptions?: HttpOptions;
4535
+ /** Abort signal which can be used to cancel the request.
4536
+
4537
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
4538
+ operation will not cancel the request in the service. You will still
4539
+ be charged usage for any applicable operations.
4540
+ */
4541
+ abortSignal?: AbortSignal;
4542
+ pageSize?: number;
4543
+ pageToken?: string;
4544
+ }
4545
+
4546
+ /** Config for documents.list parameters. */
4547
+ export declare interface ListDocumentsParameters {
4548
+ /** The resource name of the FileSearchStores. Example: `fileSearchStore/file-search-store-foo` */
4549
+ parent: string;
4550
+ config?: ListDocumentsConfig;
4551
+ }
4552
+
4553
+ /** Config for documents.list return value. */
4554
+ export declare class ListDocumentsResponse {
4555
+ /** Used to retain the full HTTP response. */
4556
+ sdkHttpResponse?: HttpResponse;
4557
+ /** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages. */
4558
+ nextPageToken?: string;
4559
+ /** The returned `Document`s. */
4560
+ documents?: Document_2[];
4561
+ }
4562
+
4069
4563
  export declare interface ListFilesConfig {
4070
4564
  /** Used to override HTTP request options. */
4071
4565
  httpOptions?: HttpOptions;
@@ -4080,6 +4574,36 @@ export declare interface ListFilesConfig {
4080
4574
  pageToken?: string;
4081
4575
  }
4082
4576
 
4577
+ /** Optional parameters for listing FileSearchStore. */
4578
+ export declare interface ListFileSearchStoresConfig {
4579
+ /** Used to override HTTP request options. */
4580
+ httpOptions?: HttpOptions;
4581
+ /** Abort signal which can be used to cancel the request.
4582
+
4583
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
4584
+ operation will not cancel the request in the service. You will still
4585
+ be charged usage for any applicable operations.
4586
+ */
4587
+ abortSignal?: AbortSignal;
4588
+ pageSize?: number;
4589
+ pageToken?: string;
4590
+ }
4591
+
4592
+ /** Config for file_search_stores.list parameters. */
4593
+ export declare interface ListFileSearchStoresParameters {
4594
+ /** Optional parameters for the list request. */
4595
+ config?: ListFileSearchStoresConfig;
4596
+ }
4597
+
4598
+ /** Config for file_search_stores.list return value. */
4599
+ export declare class ListFileSearchStoresResponse {
4600
+ /** Used to retain the full HTTP response. */
4601
+ sdkHttpResponse?: HttpResponse;
4602
+ nextPageToken?: string;
4603
+ /** The returned file search stores. */
4604
+ fileSearchStores?: FileSearchStore[];
4605
+ }
4606
+
4083
4607
  /** Generates the parameters for the list method. */
4084
4608
  export declare interface ListFilesParameters {
4085
4609
  /** Used to override the default configuration. */
@@ -5113,6 +5637,28 @@ export declare interface Model {
5113
5637
  defaultCheckpointId?: string;
5114
5638
  /** The checkpoints of the model. */
5115
5639
  checkpoints?: Checkpoint[];
5640
+ /** Temperature value used for sampling set when the dataset was saved.
5641
+ This value is used to tune the degree of randomness. */
5642
+ temperature?: number;
5643
+ /** The maximum temperature value used for sampling set when the
5644
+ dataset was saved. This value is used to tune the degree of randomness. */
5645
+ maxTemperature?: number;
5646
+ /** Optional. Specifies the nucleus sampling threshold. The model
5647
+ considers only the smallest set of tokens whose cumulative probability is
5648
+ at least `top_p`. This helps generate more diverse and less repetitive
5649
+ responses. For example, a `top_p` of 0.9 means the model considers tokens
5650
+ until the cumulative probability of the tokens to select from reaches 0.9.
5651
+ It's recommended to adjust either temperature or `top_p`, but not both. */
5652
+ topP?: number;
5653
+ /** Optional. Specifies the top-k sampling threshold. The model
5654
+ considers only the top k most probable tokens for the next token. This can
5655
+ be useful for generating more coherent and less random text. For example,
5656
+ a `top_k` of 40 means the model will choose the next word from the 40 most
5657
+ likely words. */
5658
+ topK?: number;
5659
+ /** Whether the model supports thinking features. If true, thoughts are
5660
+ returned only if the model supports thought and thoughts are available. */
5661
+ thinking?: boolean;
5116
5662
  }
5117
5663
 
5118
5664
  export declare class Models extends BaseModule {
@@ -5534,7 +6080,7 @@ export declare interface Operation<T> {
5534
6080
  * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
5535
6081
  * @internal
5536
6082
  */
5537
- _fromAPIResponse({ apiResponse, isVertexAI, }: OperationFromAPIResponseParameters): Operation<T>;
6083
+ _fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<T>;
5538
6084
  }
5539
6085
 
5540
6086
  /** Parameters of the fromAPIResponse method of the Operation class. */
@@ -5542,7 +6088,7 @@ export declare interface OperationFromAPIResponseParameters {
5542
6088
  /** The API response to be converted to an Operation. */
5543
6089
  apiResponse: Record<string, unknown>;
5544
6090
  /** Whether the API response is from Vertex AI. */
5545
- isVertexAI: boolean;
6091
+ _isVertexAI: boolean;
5546
6092
  }
5547
6093
 
5548
6094
  /** Parameters for the get method of the operations module. */
@@ -5600,7 +6146,7 @@ export declare enum PagedItem {
5600
6146
  PAGED_ITEM_TUNING_JOBS = "tuningJobs",
5601
6147
  PAGED_ITEM_FILES = "files",
5602
6148
  PAGED_ITEM_CACHED_CONTENTS = "cachedContents",
5603
- PAGED_ITEM_RAG_STORES = "ragStores",
6149
+ PAGED_ITEM_FILE_SEARCH_STORES = "fileSearchStores",
5604
6150
  PAGED_ITEM_DOCUMENTS = "documents"
5605
6151
  }
5606
6152
 
@@ -5620,7 +6166,7 @@ declare interface PagedItemResponse<T> {
5620
6166
  tuningJobs?: T[];
5621
6167
  files?: T[];
5622
6168
  cachedContents?: T[];
5623
- ragStores?: T[];
6169
+ fileSearchStores?: T[];
5624
6170
  documents?: T[];
5625
6171
  }
5626
6172
 
@@ -5785,6 +6331,38 @@ export declare enum PersonGeneration {
5785
6331
  ALLOW_ALL = "ALLOW_ALL"
5786
6332
  }
5787
6333
 
6334
+ /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
6335
+ export declare enum PhishBlockThreshold {
6336
+ /**
6337
+ * Defaults to unspecified.
6338
+ */
6339
+ PHISH_BLOCK_THRESHOLD_UNSPECIFIED = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED",
6340
+ /**
6341
+ * Blocks Low and above confidence URL that is risky.
6342
+ */
6343
+ BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
6344
+ /**
6345
+ * Blocks Medium and above confidence URL that is risky.
6346
+ */
6347
+ BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
6348
+ /**
6349
+ * Blocks High and above confidence URL that is risky.
6350
+ */
6351
+ BLOCK_HIGH_AND_ABOVE = "BLOCK_HIGH_AND_ABOVE",
6352
+ /**
6353
+ * Blocks Higher and above confidence URL that is risky.
6354
+ */
6355
+ BLOCK_HIGHER_AND_ABOVE = "BLOCK_HIGHER_AND_ABOVE",
6356
+ /**
6357
+ * Blocks Very high and above confidence URL that is risky.
6358
+ */
6359
+ BLOCK_VERY_HIGH_AND_ABOVE = "BLOCK_VERY_HIGH_AND_ABOVE",
6360
+ /**
6361
+ * Blocks Extremely high confidence URL that is risky.
6362
+ */
6363
+ BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
6364
+ }
6365
+
5788
6366
  /** The configuration for the prebuilt speaker to use. */
5789
6367
  export declare interface PrebuiltVoiceConfig {
5790
6368
  /** The name of the preset voice to use. */
@@ -5825,6 +6403,8 @@ export declare interface PreferenceOptimizationHyperParameters {
5825
6403
 
5826
6404
  /** Preference optimization tuning spec for tuning. */
5827
6405
  export declare interface PreferenceOptimizationSpec {
6406
+ /** Optional. If set to true, disable intermediate checkpoints for Preference Optimization and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for Preference Optimization. Default is false. */
6407
+ exportLastCheckpointOnly?: boolean;
5828
6408
  /** Optional. Hyperparameters for Preference Optimization. */
5829
6409
  hyperParameters?: PreferenceOptimizationHyperParameters;
5830
6410
  /** Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
@@ -6547,11 +7127,11 @@ export declare interface SlidingWindow {
6547
7127
  targetTokens?: string;
6548
7128
  }
6549
7129
 
6550
- /** The configuration for a single speaker in a multi speaker setup. This data type is not supported in Vertex AI. */
7130
+ /** Configuration for a single speaker in a multi speaker setup. */
6551
7131
  export declare interface SpeakerVoiceConfig {
6552
- /** Required. The name of the speaker to use. Should be the same as in the prompt. */
7132
+ /** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
6553
7133
  speaker?: string;
6554
- /** Required. The configuration for the voice to use. */
7134
+ /** Required. The configuration for the voice of this speaker. */
6555
7135
  voiceConfig?: VoiceConfig;
6556
7136
  }
6557
7137
 
@@ -6583,6 +7163,12 @@ export declare enum StartSensitivity {
6583
7163
  START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
6584
7164
  }
6585
7165
 
7166
+ /** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
7167
+ export declare interface StringList {
7168
+ /** The string values of the metadata to store. */
7169
+ values?: string[];
7170
+ }
7171
+
6586
7172
  /** Configuration for a Style reference image. */
6587
7173
  export declare interface StyleReferenceConfig {
6588
7174
  /** A text description of the style to use for the generated image. */
@@ -6874,19 +7460,20 @@ export declare interface Tool {
6874
7460
  functionDeclarations?: FunctionDeclaration[];
6875
7461
  /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. This field is not supported in Gemini API. */
6876
7462
  retrieval?: Retrieval;
6877
- /** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */
7463
+ /** Optional. Specialized retrieval tool that is powered by Google Search. */
6878
7464
  googleSearchRetrieval?: GoogleSearchRetrieval;
6879
- /** Optional. Google Maps tool type. Specialized retrieval tool
6880
- that is powered by Google Maps. */
6881
- googleMaps?: GoogleMaps;
6882
7465
  /** Optional. Tool to support the model interacting directly with the
6883
7466
  computer. If enabled, it automatically populates computer-use specific
6884
7467
  Function Declarations. */
6885
7468
  computerUse?: ComputerUse;
7469
+ /** Optional. Tool to retrieve knowledge from the File Search Stores. */
7470
+ fileSearch?: FileSearch;
6886
7471
  /** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
6887
7472
  codeExecution?: ToolCodeExecution;
6888
7473
  /** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
6889
7474
  enterpriseWebSearch?: EnterpriseWebSearch;
7475
+ /** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
7476
+ googleMaps?: GoogleMaps;
6890
7477
  /** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
6891
7478
  googleSearch?: GoogleSearch;
6892
7479
  /** Optional. Tool to support URL context retrieval. */
@@ -6911,14 +7498,14 @@ export declare type ToolListUnion = ToolUnion[];
6911
7498
 
6912
7499
  export declare type ToolUnion = Tool | CallableTool;
6913
7500
 
6914
- /** Output only. Traffic type. This shows whether a request consumes Pay-As-You-Go or Provisioned Throughput quota. This enum is not supported in Gemini API. */
7501
+ /** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
6915
7502
  export declare enum TrafficType {
6916
7503
  /**
6917
7504
  * Unspecified request traffic type.
6918
7505
  */
6919
7506
  TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED",
6920
7507
  /**
6921
- * Type for Pay-As-You-Go traffic.
7508
+ * The request was processed using Pay-As-You-Go quota.
6922
7509
  */
6923
7510
  ON_DEMAND = "ON_DEMAND",
6924
7511
  /**
@@ -7059,7 +7646,7 @@ export declare interface TuningJob {
7059
7646
  pipelineJob?: string;
7060
7647
  /** 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. */
7061
7648
  serviceAccount?: string;
7062
- /** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
7649
+ /** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. For continuous tuning, tuned_model_display_name will by default use the same display name as the pre-tuned model. If a new display name is provided, the tuning job will create a new model instead of a new version. */
7063
7650
  tunedModelDisplayName?: string;
7064
7651
  /** Tuning Spec for Veo Tuning. */
7065
7652
  veoTuningSpec?: VeoTuningSpec;
@@ -7171,7 +7758,11 @@ export declare enum TuningTask {
7171
7758
  /**
7172
7759
  * Tuning task for text to video.
7173
7760
  */
7174
- TUNING_TASK_T2V = "TUNING_TASK_T2V"
7761
+ TUNING_TASK_T2V = "TUNING_TASK_T2V",
7762
+ /**
7763
+ * Tuning task for reference to video.
7764
+ */
7765
+ TUNING_TASK_R2V = "TUNING_TASK_R2V"
7175
7766
  }
7176
7767
 
7177
7768
  export declare interface TuningValidationDataset {
@@ -7271,8 +7862,10 @@ declare namespace types {
7271
7862
  FunctionResponseScheduling,
7272
7863
  Type,
7273
7864
  Mode,
7274
- AuthType,
7275
7865
  ApiSpec,
7866
+ AuthType,
7867
+ HttpElementLocation,
7868
+ PhishBlockThreshold,
7276
7869
  HarmCategory,
7277
7870
  HarmBlockMethod,
7278
7871
  HarmBlockThreshold,
@@ -7305,6 +7898,7 @@ declare namespace types {
7305
7898
  VideoGenerationMaskMode,
7306
7899
  VideoCompressionQuality,
7307
7900
  TuningMethod,
7901
+ DocumentState,
7308
7902
  FileState,
7309
7903
  FileSource,
7310
7904
  TurnCompleteReason,
@@ -7334,16 +7928,16 @@ declare namespace types {
7334
7928
  FunctionDeclaration,
7335
7929
  DynamicRetrievalConfig,
7336
7930
  GoogleSearchRetrieval,
7931
+ ComputerUse,
7932
+ FileSearch,
7933
+ ApiAuthApiKeyConfig,
7934
+ ApiAuth,
7337
7935
  ApiKeyConfig,
7338
7936
  AuthConfigGoogleServiceAccountConfig,
7339
7937
  AuthConfigHttpBasicAuthConfig,
7340
7938
  AuthConfigOauthConfig,
7341
7939
  AuthConfigOidcConfig,
7342
7940
  AuthConfig,
7343
- GoogleMaps,
7344
- ComputerUse,
7345
- ApiAuthApiKeyConfig,
7346
- ApiAuth,
7347
7941
  ExternalApiElasticSearchParams,
7348
7942
  ExternalApiSimpleSearchParams,
7349
7943
  ExternalApi,
@@ -7360,6 +7954,7 @@ declare namespace types {
7360
7954
  Retrieval,
7361
7955
  ToolCodeExecution,
7362
7956
  EnterpriseWebSearch,
7957
+ GoogleMaps,
7363
7958
  Interval,
7364
7959
  GoogleSearch,
7365
7960
  UrlContext,
@@ -7529,6 +8124,35 @@ declare namespace types {
7529
8124
  ListCachedContentsConfig,
7530
8125
  ListCachedContentsParameters,
7531
8126
  ListCachedContentsResponse,
8127
+ GetDocumentConfig,
8128
+ GetDocumentParameters,
8129
+ StringList,
8130
+ CustomMetadata,
8131
+ Document_2 as Document,
8132
+ DeleteDocumentConfig,
8133
+ DeleteDocumentParameters,
8134
+ ListDocumentsConfig,
8135
+ ListDocumentsParameters,
8136
+ ListDocumentsResponse,
8137
+ CreateFileSearchStoreConfig,
8138
+ CreateFileSearchStoreParameters,
8139
+ FileSearchStore,
8140
+ GetFileSearchStoreConfig,
8141
+ GetFileSearchStoreParameters,
8142
+ DeleteFileSearchStoreConfig,
8143
+ DeleteFileSearchStoreParameters,
8144
+ ListFileSearchStoresConfig,
8145
+ ListFileSearchStoresParameters,
8146
+ ListFileSearchStoresResponse,
8147
+ WhiteSpaceConfig,
8148
+ ChunkingConfig,
8149
+ UploadToFileSearchStoreConfig,
8150
+ UploadToFileSearchStoreParameters,
8151
+ UploadToFileSearchStoreResumableResponse,
8152
+ ImportFileConfig,
8153
+ ImportFileParameters,
8154
+ ImportFileResponse,
8155
+ ImportFileOperation,
7532
8156
  ListFilesConfig,
7533
8157
  ListFilesParameters,
7534
8158
  FileStatus,
@@ -7551,6 +8175,7 @@ declare namespace types {
7551
8175
  BatchJobDestination,
7552
8176
  CreateBatchJobConfig,
7553
8177
  CreateBatchJobParameters,
8178
+ CompletionStats,
7554
8179
  BatchJob,
7555
8180
  EmbedContentBatch,
7556
8181
  EmbeddingsBatchJobSource,
@@ -7643,6 +8268,8 @@ declare namespace types {
7643
8268
  CreateAuthTokenParameters,
7644
8269
  OperationGetParameters,
7645
8270
  CreateTuningJobParameters,
8271
+ UploadToFileSearchStoreResponse,
8272
+ UploadToFileSearchStoreOperation,
7646
8273
  BlobImageUnion,
7647
8274
  PartUnion,
7648
8275
  PartListUnion,
@@ -7718,6 +8345,17 @@ declare interface Uploader {
7718
8345
  * @return A Promise that resolves to types.File.
7719
8346
  */
7720
8347
  upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<File_2>;
8348
+ /**
8349
+ * Uploads a file to file search store via the given upload url.
8350
+ *
8351
+ * @param file The file to upload. file is in string type or a Blob.
8352
+ * @param uploadUrl The upload URL as a string is where the file will be
8353
+ * uploaded to. The uploadUrl must be a url that was returned by the
8354
+ * https://generativelanguage.googleapis.com/upload/v1beta/{file_search_store_name}:uploadToFileSearchStore endpoint
8355
+ * @param apiClient The ApiClient to use for uploading.
8356
+ * @return A Promise that resolves to types.UploadToFileSearchStoreOperation.
8357
+ */
8358
+ uploadToFileSearchStore(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<UploadToFileSearchStoreOperation>;
7721
8359
  /**
7722
8360
  * Returns the file's mimeType and the size of a given file. If the file is a
7723
8361
  * string path, the file type is determined by the file extension. If the
@@ -7756,6 +8394,82 @@ export declare interface UploadFileParameters {
7756
8394
  config?: UploadFileConfig;
7757
8395
  }
7758
8396
 
8397
+ /** Optional parameters for uploading a file to a FileSearchStore. */
8398
+ export declare interface UploadToFileSearchStoreConfig {
8399
+ /** Used to override HTTP request options. */
8400
+ httpOptions?: HttpOptions;
8401
+ /** Abort signal which can be used to cancel the request.
8402
+
8403
+ NOTE: AbortSignal is a client-only operation. Using it to cancel an
8404
+ operation will not cancel the request in the service. You will still
8405
+ be charged usage for any applicable operations.
8406
+ */
8407
+ abortSignal?: AbortSignal;
8408
+ /** MIME type of the file to be uploaded. If not provided, it will be inferred from the file extension. */
8409
+ mimeType?: string;
8410
+ /** Display name of the created document. */
8411
+ displayName?: string;
8412
+ /** User provided custom metadata stored as key-value pairs used for querying. */
8413
+ customMetadata?: CustomMetadata[];
8414
+ /** Config for telling the service how to chunk the file. */
8415
+ chunkingConfig?: ChunkingConfig;
8416
+ }
8417
+
8418
+ /** Long-running operation for uploading a file to a FileSearchStore. */
8419
+ export declare class UploadToFileSearchStoreOperation implements Operation<UploadToFileSearchStoreResponse> {
8420
+ /** 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}`. */
8421
+ name?: string;
8422
+ /** 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. */
8423
+ metadata?: Record<string, unknown>;
8424
+ /** 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. */
8425
+ done?: boolean;
8426
+ /** The error result of the operation in case of failure or cancellation. */
8427
+ error?: Record<string, unknown>;
8428
+ /** The result of the UploadToFileSearchStore operation, available when the operation is done. */
8429
+ response?: UploadToFileSearchStoreResponse;
8430
+ /**
8431
+ * Instantiates an Operation of the same type as the one being called with the fields set from the API response.
8432
+ * @internal
8433
+ */
8434
+ _fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<UploadToFileSearchStoreResponse>;
8435
+ /** The full HTTP response. */
8436
+ sdkHttpResponse?: HttpResponse;
8437
+ }
8438
+
8439
+ /** Generates the parameters for the private _upload_to_file_search_store method. */
8440
+ export declare interface UploadToFileSearchStoreParameters {
8441
+ /** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
8442
+ fileSearchStoreName: string;
8443
+ /** Used to override the default configuration. */
8444
+ config?: UploadToFileSearchStoreConfig;
8445
+ }
8446
+
8447
+ /** Parameters for the upload file to file search store method. */
8448
+ export declare interface UploadToFileSearchStoreParameters {
8449
+ /** The name of the file search store to upload. */
8450
+ fileSearchStoreName: string;
8451
+ /** The string path to the file to be uploaded or a Blob object. */
8452
+ file: string | globalThis.Blob;
8453
+ /** Configuration that contains optional parameters. */
8454
+ config?: UploadToFileSearchStoreConfig;
8455
+ }
8456
+
8457
+ /** The response when long-running operation for uploading a file to a FileSearchStore complete. */
8458
+ export declare class UploadToFileSearchStoreResponse {
8459
+ /** Used to retain the full HTTP response. */
8460
+ sdkHttpResponse?: HttpResponse;
8461
+ /** The name of the FileSearchStore containing Documents. */
8462
+ parent?: string;
8463
+ /** The identifier for the Document imported. */
8464
+ documentName?: string;
8465
+ }
8466
+
8467
+ /** Response for the resumable upload method. */
8468
+ export declare class UploadToFileSearchStoreResumableResponse {
8469
+ /** Used to retain the full HTTP response. */
8470
+ sdkHttpResponse?: HttpResponse;
8471
+ }
8472
+
7759
8473
  /** Configuration for upscaling an image.
7760
8474
 
7761
8475
  For more information on this configuration, refer to
@@ -8101,4 +8815,12 @@ export declare interface WeightedPrompt {
8101
8815
  weight?: number;
8102
8816
  }
8103
8817
 
8818
+ /** Configuration for a white space chunking algorithm. */
8819
+ export declare interface WhiteSpaceConfig {
8820
+ /** Maximum number of tokens per chunk. */
8821
+ maxTokensPerChunk?: number;
8822
+ /** Maximum number of overlapping tokens between two adjacent chunks. */
8823
+ maxOverlapTokens?: number;
8824
+ }
8825
+
8104
8826
  export { }