@google/genai 1.27.0 → 1.29.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/README.md +4 -4
- package/dist/genai.d.ts +898 -166
- package/dist/index.cjs +1815 -573
- package/dist/index.mjs +1809 -574
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +1927 -655
- package/dist/node/index.mjs +1922 -657
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +898 -166
- package/dist/web/index.mjs +1876 -643
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +898 -166
- package/package.json +12 -7
package/dist/node/node.d.ts
CHANGED
|
@@ -32,7 +32,7 @@ export declare enum ActivityHandling {
|
|
|
32
32
|
export declare interface ActivityStart {
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
/**
|
|
35
|
+
/** Adapter size for tuning. This enum is not supported in Gemini API. */
|
|
36
36
|
export declare enum AdapterSize {
|
|
37
37
|
/**
|
|
38
38
|
* Adapter size is unspecified.
|
|
@@ -114,35 +114,49 @@ declare class ApiClient {
|
|
|
114
114
|
setBaseUrl(url: string): void;
|
|
115
115
|
private constructUrl;
|
|
116
116
|
private shouldPrependVertexProjectPath;
|
|
117
|
-
request(request: HttpRequest): Promise<HttpResponse>;
|
|
117
|
+
request(request: HttpRequest): Promise<types.HttpResponse>;
|
|
118
118
|
private patchHttpOptions;
|
|
119
|
-
requestStream(request: HttpRequest): Promise<AsyncGenerator<HttpResponse>>;
|
|
119
|
+
requestStream(request: HttpRequest): Promise<AsyncGenerator<types.HttpResponse>>;
|
|
120
120
|
private includeExtraHttpOptionsToRequestInit;
|
|
121
121
|
private unaryApiCall;
|
|
122
122
|
private streamApiCall;
|
|
123
|
-
processStreamResponse(response: Response): AsyncGenerator<HttpResponse>;
|
|
123
|
+
processStreamResponse(response: Response): AsyncGenerator<types.HttpResponse>;
|
|
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.
|
|
130
131
|
*
|
|
131
132
|
* @param file The string path to the file to be uploaded or a Blob object.
|
|
132
133
|
* @param config Optional parameters specified in the `UploadFileConfig`
|
|
134
|
+
* interface. @see {@link types.UploadFileConfig}
|
|
135
|
+
* @return A promise that resolves to a `File` object.
|
|
136
|
+
* @throws An error if called on a Vertex AI client.
|
|
137
|
+
* @throws An error if the `mimeType` is not provided and can not be inferred,
|
|
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`
|
|
133
147
|
* interface. @see {@link UploadFileConfig}
|
|
134
148
|
* @return A promise that resolves to a `File` object.
|
|
135
149
|
* @throws An error if called on a Vertex AI client.
|
|
136
150
|
* @throws An error if the `mimeType` is not provided and can not be inferred,
|
|
137
151
|
*/
|
|
138
|
-
|
|
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
|
*
|
|
142
156
|
* @params params - The parameters for the download request, see {@link
|
|
143
|
-
* DownloadFileParameters}
|
|
157
|
+
* types.DownloadFileParameters}
|
|
144
158
|
*/
|
|
145
|
-
downloadFile(params: DownloadFileParameters): Promise<void>;
|
|
159
|
+
downloadFile(params: types.DownloadFileParameters): Promise<void>;
|
|
146
160
|
private fetchUploadUrl;
|
|
147
161
|
}
|
|
148
162
|
|
|
@@ -195,7 +209,7 @@ declare interface ApiClientInitOptions {
|
|
|
195
209
|
/**
|
|
196
210
|
* Optional. A set of customizable configuration for HTTP requests.
|
|
197
211
|
*/
|
|
198
|
-
httpOptions?: HttpOptions;
|
|
212
|
+
httpOptions?: types.HttpOptions;
|
|
199
213
|
/**
|
|
200
214
|
* Optional. An extra string to append at the end of the User-Agent header.
|
|
201
215
|
*
|
|
@@ -228,13 +242,19 @@ 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
|
|
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
|
-
/** The API spec that the external API implements. */
|
|
257
|
+
/** The API spec that the external API implements. This enum is not supported in Gemini API. */
|
|
238
258
|
export declare enum ApiSpec {
|
|
239
259
|
/**
|
|
240
260
|
* Unspecified API spec. This value should not be used.
|
|
@@ -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;
|
|
@@ -333,7 +353,7 @@ export declare interface AuthToken {
|
|
|
333
353
|
name?: string;
|
|
334
354
|
}
|
|
335
355
|
|
|
336
|
-
/** Type of auth scheme. */
|
|
356
|
+
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
337
357
|
export declare enum AuthType {
|
|
338
358
|
AUTH_TYPE_UNSPECIFIED = "AUTH_TYPE_UNSPECIFIED",
|
|
339
359
|
/**
|
|
@@ -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. */
|
|
@@ -635,11 +658,11 @@ export declare enum Behavior {
|
|
|
635
658
|
|
|
636
659
|
/** Content blob. */
|
|
637
660
|
declare interface Blob_2 {
|
|
638
|
-
/** Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is not currently used in the Gemini GenerateContent calls. */
|
|
639
|
-
displayName?: string;
|
|
640
661
|
/** Required. Raw bytes.
|
|
641
662
|
* @remarks Encoded as base64 string. */
|
|
642
663
|
data?: string;
|
|
664
|
+
/** Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API. */
|
|
665
|
+
displayName?: string;
|
|
643
666
|
/** Required. The IANA standard MIME type of the source data. */
|
|
644
667
|
mimeType?: string;
|
|
645
668
|
}
|
|
@@ -896,8 +919,6 @@ export declare interface Candidate {
|
|
|
896
919
|
If empty, the model has not stopped generating the tokens.
|
|
897
920
|
*/
|
|
898
921
|
finishReason?: FinishReason;
|
|
899
|
-
/** Metadata related to url context retrieval tool. */
|
|
900
|
-
urlContextMetadata?: UrlContextMetadata;
|
|
901
922
|
/** Output only. Average log probability score of the candidate. */
|
|
902
923
|
avgLogprobs?: number;
|
|
903
924
|
/** Output only. Metadata specifies sources used to ground generated content. */
|
|
@@ -908,6 +929,8 @@ export declare interface Candidate {
|
|
|
908
929
|
logprobsResult?: LogprobsResult;
|
|
909
930
|
/** Output only. List of ratings for the safety of a response candidate. There is at most one rating per category. */
|
|
910
931
|
safetyRatings?: SafetyRating[];
|
|
932
|
+
/** Output only. Metadata related to url context retrieval tool. */
|
|
933
|
+
urlContextMetadata?: UrlContextMetadata;
|
|
911
934
|
}
|
|
912
935
|
|
|
913
936
|
/**
|
|
@@ -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. */
|
|
@@ -1125,9 +1166,7 @@ export declare interface Content {
|
|
|
1125
1166
|
/** List of parts that constitute a single message. Each part may have
|
|
1126
1167
|
a different IANA MIME type. */
|
|
1127
1168
|
parts?: Part[];
|
|
1128
|
-
/** Optional. The producer of the content. Must be either 'user' or
|
|
1129
|
-
'model'. Useful to set for multi-turn conversations, otherwise can be
|
|
1130
|
-
empty. If role is not specified, SDK will determine the role. */
|
|
1169
|
+
/** Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset. */
|
|
1131
1170
|
role?: string;
|
|
1132
1171
|
}
|
|
1133
1172
|
|
|
@@ -1478,6 +1517,29 @@ export declare class CreateFileResponse {
|
|
|
1478
1517
|
sdkHttpResponse?: HttpResponse;
|
|
1479
1518
|
}
|
|
1480
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
|
+
|
|
1481
1543
|
/**
|
|
1482
1544
|
* Creates a `FunctionResponsePart` object from a `base64` encoded `string`.
|
|
1483
1545
|
*/
|
|
@@ -1528,7 +1590,7 @@ export declare function createPartFromText(text: string): Part;
|
|
|
1528
1590
|
*/
|
|
1529
1591
|
export declare function createPartFromUri(uri: string, mimeType: string): Part;
|
|
1530
1592
|
|
|
1531
|
-
/**
|
|
1593
|
+
/** Fine-tuning job creation request - optional fields. */
|
|
1532
1594
|
export declare interface CreateTuningJobConfig {
|
|
1533
1595
|
/** Used to override HTTP request options. */
|
|
1534
1596
|
httpOptions?: HttpOptions;
|
|
@@ -1539,6 +1601,8 @@ export declare interface CreateTuningJobConfig {
|
|
|
1539
1601
|
be charged usage for any applicable operations.
|
|
1540
1602
|
*/
|
|
1541
1603
|
abortSignal?: AbortSignal;
|
|
1604
|
+
/** The method to use for tuning (SUPERVISED_FINE_TUNING or PREFERENCE_TUNING). If not set, the default method (SFT) will be used. */
|
|
1605
|
+
method?: TuningMethod;
|
|
1542
1606
|
/** Validation dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
1543
1607
|
validationDataset?: TuningValidationDataset;
|
|
1544
1608
|
/** The display name of the tuned Model. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
|
|
@@ -1549,7 +1613,7 @@ export declare interface CreateTuningJobConfig {
|
|
|
1549
1613
|
epochCount?: number;
|
|
1550
1614
|
/** Multiplier for adjusting the default learning rate. */
|
|
1551
1615
|
learningRateMultiplier?: number;
|
|
1552
|
-
/** If set to true, disable intermediate checkpoints
|
|
1616
|
+
/** If set to true, disable intermediate checkpoints and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints. */
|
|
1553
1617
|
exportLastCheckpointOnly?: boolean;
|
|
1554
1618
|
/** The optional checkpoint id of the pre-tuned model to use for tuning, if applicable. */
|
|
1555
1619
|
preTunedModelCheckpointId?: string;
|
|
@@ -1561,9 +1625,11 @@ export declare interface CreateTuningJobConfig {
|
|
|
1561
1625
|
learningRate?: number;
|
|
1562
1626
|
/** Optional. The labels with user-defined metadata to organize TuningJob and generated resources such as Model and Endpoint. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information and examples of labels. */
|
|
1563
1627
|
labels?: Record<string, string>;
|
|
1628
|
+
/** Weight for KL Divergence regularization, Preference Optimization tuning only. */
|
|
1629
|
+
beta?: number;
|
|
1564
1630
|
}
|
|
1565
1631
|
|
|
1566
|
-
/**
|
|
1632
|
+
/** Fine-tuning job creation parameters - optional fields. */
|
|
1567
1633
|
export declare interface CreateTuningJobParameters {
|
|
1568
1634
|
/** The base model that is being tuned, e.g., "gemini-2.5-flash". */
|
|
1569
1635
|
baseModel: string;
|
|
@@ -1573,7 +1639,7 @@ export declare interface CreateTuningJobParameters {
|
|
|
1573
1639
|
config?: CreateTuningJobConfig;
|
|
1574
1640
|
}
|
|
1575
1641
|
|
|
1576
|
-
/**
|
|
1642
|
+
/** Fine-tuning job creation parameters - optional fields. */
|
|
1577
1643
|
export declare interface CreateTuningJobParametersPrivate {
|
|
1578
1644
|
/** The base model that is being tuned, e.g., "gemini-2.5-flash". */
|
|
1579
1645
|
baseModel?: string;
|
|
@@ -1590,6 +1656,18 @@ export declare interface CreateTuningJobParametersPrivate {
|
|
|
1590
1656
|
*/
|
|
1591
1657
|
export declare function createUserContent(partOrString: PartListUnion | string): Content;
|
|
1592
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
|
+
|
|
1593
1671
|
/** Distribution computed over a tuning dataset. This data type is not supported in Gemini API. */
|
|
1594
1672
|
export declare interface DatasetDistribution {
|
|
1595
1673
|
/** Output only. Defines the histogram bucket. */
|
|
@@ -1693,6 +1771,32 @@ export declare class DeleteCachedContentResponse {
|
|
|
1693
1771
|
sdkHttpResponse?: HttpResponse;
|
|
1694
1772
|
}
|
|
1695
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
|
+
|
|
1696
1800
|
/** Used to override the default configuration. */
|
|
1697
1801
|
export declare interface DeleteFileConfig {
|
|
1698
1802
|
/** Used to override HTTP request options. */
|
|
@@ -1720,6 +1824,32 @@ export declare class DeleteFileResponse {
|
|
|
1720
1824
|
sdkHttpResponse?: HttpResponse;
|
|
1721
1825
|
}
|
|
1722
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
|
+
|
|
1723
1853
|
/** Configuration for deleting a tuned model. */
|
|
1724
1854
|
export declare interface DeleteModelConfig {
|
|
1725
1855
|
/** Used to override HTTP request options. */
|
|
@@ -1760,6 +1890,76 @@ export declare interface DistillationDataStats {
|
|
|
1760
1890
|
trainingDatasetStats?: DatasetStats;
|
|
1761
1891
|
}
|
|
1762
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
|
+
|
|
1763
1963
|
export declare type DownloadableFileUnion = string | File_2 | GeneratedVideo | Video;
|
|
1764
1964
|
|
|
1765
1965
|
declare interface Downloader {
|
|
@@ -2021,10 +2221,12 @@ export declare enum EndSensitivity {
|
|
|
2021
2221
|
END_SENSITIVITY_LOW = "END_SENSITIVITY_LOW"
|
|
2022
2222
|
}
|
|
2023
2223
|
|
|
2024
|
-
/** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. */
|
|
2224
|
+
/** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. This data type is not supported in Gemini API. */
|
|
2025
2225
|
export declare interface EnterpriseWebSearch {
|
|
2026
2226
|
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
|
|
2027
2227
|
excludeDomains?: string[];
|
|
2228
|
+
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. */
|
|
2229
|
+
blockingConfidence?: PhishBlockThreshold;
|
|
2028
2230
|
}
|
|
2029
2231
|
|
|
2030
2232
|
/** An entity representing the segmented area. */
|
|
@@ -2149,7 +2351,7 @@ export { File_2 as File }
|
|
|
2149
2351
|
|
|
2150
2352
|
/** URI based data. */
|
|
2151
2353
|
export declare interface FileData {
|
|
2152
|
-
/** Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. It is
|
|
2354
|
+
/** Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API. */
|
|
2153
2355
|
displayName?: string;
|
|
2154
2356
|
/** Required. URI. */
|
|
2155
2357
|
fileUri?: string;
|
|
@@ -2273,6 +2475,133 @@ export declare class Files extends BaseModule {
|
|
|
2273
2475
|
delete(params: types.DeleteFileParameters): Promise<types.DeleteFileResponse>;
|
|
2274
2476
|
}
|
|
2275
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
|
+
|
|
2276
2605
|
/** Source of the File. */
|
|
2277
2606
|
export declare enum FileSource {
|
|
2278
2607
|
SOURCE_UNSPECIFIED = "SOURCE_UNSPECIFIED",
|
|
@@ -2388,7 +2717,7 @@ export declare interface FunctionCall {
|
|
|
2388
2717
|
id?: string;
|
|
2389
2718
|
/** Optional. The function parameters and values in JSON object format. See [FunctionDeclaration.parameters] for parameter details. */
|
|
2390
2719
|
args?: Record<string, unknown>;
|
|
2391
|
-
/**
|
|
2720
|
+
/** Optional. The name of the function to call. Matches [FunctionDeclaration.name]. */
|
|
2392
2721
|
name?: string;
|
|
2393
2722
|
}
|
|
2394
2723
|
|
|
@@ -2858,29 +3187,29 @@ export declare class GenerateContentResponsePromptFeedback {
|
|
|
2858
3187
|
safetyRatings?: SafetyRating[];
|
|
2859
3188
|
}
|
|
2860
3189
|
|
|
2861
|
-
/** Usage metadata about response
|
|
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. */
|
|
2862
3191
|
export declare class GenerateContentResponseUsageMetadata {
|
|
2863
|
-
/** Output only.
|
|
3192
|
+
/** Output only. A detailed breakdown of the token count for each modality in the cached content. */
|
|
2864
3193
|
cacheTokensDetails?: ModalityTokenCount[];
|
|
2865
|
-
/** Output only.
|
|
3194
|
+
/** Output only. The number of tokens in the cached content that was used for this request. */
|
|
2866
3195
|
cachedContentTokenCount?: number;
|
|
2867
|
-
/**
|
|
3196
|
+
/** The total number of tokens in the generated candidates. */
|
|
2868
3197
|
candidatesTokenCount?: number;
|
|
2869
|
-
/** Output only.
|
|
3198
|
+
/** Output only. A detailed breakdown of the token count for each modality in the generated candidates. */
|
|
2870
3199
|
candidatesTokensDetails?: ModalityTokenCount[];
|
|
2871
|
-
/**
|
|
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. */
|
|
2872
3201
|
promptTokenCount?: number;
|
|
2873
|
-
/** Output only.
|
|
3202
|
+
/** Output only. A detailed breakdown of the token count for each modality in the prompt. */
|
|
2874
3203
|
promptTokensDetails?: ModalityTokenCount[];
|
|
2875
|
-
/** Output only.
|
|
3204
|
+
/** Output only. The number of tokens that were part of the model's generated "thoughts" output, if applicable. */
|
|
2876
3205
|
thoughtsTokenCount?: number;
|
|
2877
|
-
/** Output only.
|
|
3206
|
+
/** Output only. The number of tokens in the results from tool executions, which are provided back to the model as input, if applicable. */
|
|
2878
3207
|
toolUsePromptTokenCount?: number;
|
|
2879
|
-
/** Output only.
|
|
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. */
|
|
2880
3209
|
toolUsePromptTokensDetails?: ModalityTokenCount[];
|
|
2881
|
-
/**
|
|
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`. */
|
|
2882
3211
|
totalTokenCount?: number;
|
|
2883
|
-
/** Output only.
|
|
3212
|
+
/** Output only. The traffic type for this request. */
|
|
2884
3213
|
trafficType?: TrafficType;
|
|
2885
3214
|
}
|
|
2886
3215
|
|
|
@@ -3066,7 +3395,7 @@ export declare class GenerateVideosOperation implements Operation<GenerateVideos
|
|
|
3066
3395
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
3067
3396
|
* @internal
|
|
3068
3397
|
*/
|
|
3069
|
-
_fromAPIResponse({ apiResponse,
|
|
3398
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<GenerateVideosResponse>;
|
|
3070
3399
|
/** The full HTTP response. */
|
|
3071
3400
|
sdkHttpResponse?: HttpResponse;
|
|
3072
3401
|
}
|
|
@@ -3118,6 +3447,10 @@ export declare interface GenerateVideosSource {
|
|
|
3118
3447
|
export declare interface GenerationConfig {
|
|
3119
3448
|
/** Optional. Config for model selection. */
|
|
3120
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;
|
|
3121
3454
|
/** Optional. If enabled, audio timestamp will be included in the request to the model. This field is not supported in Gemini API. */
|
|
3122
3455
|
audioTimestamp?: boolean;
|
|
3123
3456
|
/** Optional. Number of candidates to generate. */
|
|
@@ -3134,8 +3467,6 @@ export declare interface GenerationConfig {
|
|
|
3134
3467
|
mediaResolution?: MediaResolution;
|
|
3135
3468
|
/** Optional. Positive penalties. */
|
|
3136
3469
|
presencePenalty?: number;
|
|
3137
|
-
/** 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. */
|
|
3138
|
-
responseJsonSchema?: unknown;
|
|
3139
3470
|
/** Optional. If true, export the logprobs results in response. */
|
|
3140
3471
|
responseLogprobs?: boolean;
|
|
3141
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. */
|
|
@@ -3239,6 +3570,28 @@ export declare interface GetCachedContentParameters {
|
|
|
3239
3570
|
config?: GetCachedContentConfig;
|
|
3240
3571
|
}
|
|
3241
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
|
+
|
|
3242
3595
|
/** Used to override the default configuration. */
|
|
3243
3596
|
export declare interface GetFileConfig {
|
|
3244
3597
|
/** Used to override HTTP request options. */
|
|
@@ -3260,6 +3613,27 @@ export declare interface GetFileParameters {
|
|
|
3260
3613
|
config?: GetFileConfig;
|
|
3261
3614
|
}
|
|
3262
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
|
+
|
|
3263
3637
|
/** Optional parameters for models.get method. */
|
|
3264
3638
|
export declare interface GetModelConfig {
|
|
3265
3639
|
/** Used to override HTTP request options. */
|
|
@@ -3299,6 +3673,7 @@ export declare interface GetOperationParameters {
|
|
|
3299
3673
|
config?: GetOperationConfig;
|
|
3300
3674
|
}
|
|
3301
3675
|
|
|
3676
|
+
/** Optional parameters for tunings.get method. */
|
|
3302
3677
|
export declare interface GetTuningJobConfig {
|
|
3303
3678
|
/** Used to override HTTP request options. */
|
|
3304
3679
|
httpOptions?: HttpOptions;
|
|
@@ -3375,6 +3750,7 @@ export declare class GoogleGenAI {
|
|
|
3375
3750
|
readonly operations: Operations;
|
|
3376
3751
|
readonly authTokens: Tokens;
|
|
3377
3752
|
readonly tunings: Tunings;
|
|
3753
|
+
readonly fileSearchStores: FileSearchStores;
|
|
3378
3754
|
constructor(options: GoogleGenAIOptions);
|
|
3379
3755
|
}
|
|
3380
3756
|
|
|
@@ -3441,9 +3817,9 @@ export declare interface GoogleGenAIOptions {
|
|
|
3441
3817
|
httpOptions?: HttpOptions;
|
|
3442
3818
|
}
|
|
3443
3819
|
|
|
3444
|
-
/** Tool to
|
|
3820
|
+
/** Tool to retrieve public maps data for grounding, powered by Google. */
|
|
3445
3821
|
export declare interface GoogleMaps {
|
|
3446
|
-
/**
|
|
3822
|
+
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
3447
3823
|
authConfig?: AuthConfig;
|
|
3448
3824
|
/** Optional. If true, include the widget context token in the response. */
|
|
3449
3825
|
enableWidget?: boolean;
|
|
@@ -3459,14 +3835,14 @@ export declare interface GoogleRpcStatus {
|
|
|
3459
3835
|
message?: string;
|
|
3460
3836
|
}
|
|
3461
3837
|
|
|
3462
|
-
/** Tool to support Google Search in Model. Powered by Google. */
|
|
3838
|
+
/** GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
3463
3839
|
export declare interface GoogleSearch {
|
|
3464
|
-
/** Optional. Filter search results to a specific time range.
|
|
3465
|
-
If customers set a start time, they must set an end time (and vice versa).
|
|
3466
|
-
*/
|
|
3467
|
-
timeRangeFilter?: Interval;
|
|
3468
3840
|
/** 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. */
|
|
3469
3841
|
excludeDomains?: string[];
|
|
3842
|
+
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
|
|
3843
|
+
blockingConfidence?: PhishBlockThreshold;
|
|
3844
|
+
/** 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. */
|
|
3845
|
+
timeRangeFilter?: Interval;
|
|
3470
3846
|
}
|
|
3471
3847
|
|
|
3472
3848
|
/** Tool to retrieve public web data for grounding, powered by Google. */
|
|
@@ -3501,11 +3877,11 @@ export declare interface GroundingChunkMaps {
|
|
|
3501
3877
|
placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
|
|
3502
3878
|
/** This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place. */
|
|
3503
3879
|
placeId?: string;
|
|
3504
|
-
/** Text of the
|
|
3880
|
+
/** Text of the place answer. */
|
|
3505
3881
|
text?: string;
|
|
3506
|
-
/** Title of the
|
|
3882
|
+
/** Title of the place. */
|
|
3507
3883
|
title?: string;
|
|
3508
|
-
/** URI reference of the
|
|
3884
|
+
/** URI reference of the place. */
|
|
3509
3885
|
uri?: string;
|
|
3510
3886
|
}
|
|
3511
3887
|
|
|
@@ -3607,7 +3983,7 @@ export declare interface GroundingSupport {
|
|
|
3607
3983
|
segment?: Segment;
|
|
3608
3984
|
}
|
|
3609
3985
|
|
|
3610
|
-
/**
|
|
3986
|
+
/** Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This enum is not supported in Gemini API. */
|
|
3611
3987
|
export declare enum HarmBlockMethod {
|
|
3612
3988
|
/**
|
|
3613
3989
|
* The harm block method is unspecified.
|
|
@@ -3623,7 +3999,7 @@ export declare enum HarmBlockMethod {
|
|
|
3623
3999
|
PROBABILITY = "PROBABILITY"
|
|
3624
4000
|
}
|
|
3625
4001
|
|
|
3626
|
-
/**
|
|
4002
|
+
/** The harm block threshold. */
|
|
3627
4003
|
export declare enum HarmBlockThreshold {
|
|
3628
4004
|
/**
|
|
3629
4005
|
* Unspecified harm block threshold.
|
|
@@ -3651,7 +4027,7 @@ export declare enum HarmBlockThreshold {
|
|
|
3651
4027
|
OFF = "OFF"
|
|
3652
4028
|
}
|
|
3653
4029
|
|
|
3654
|
-
/**
|
|
4030
|
+
/** Harm category. */
|
|
3655
4031
|
export declare enum HarmCategory {
|
|
3656
4032
|
/**
|
|
3657
4033
|
* The harm category is unspecified.
|
|
@@ -3723,7 +4099,7 @@ export declare enum HarmProbability {
|
|
|
3723
4099
|
HIGH = "HIGH"
|
|
3724
4100
|
}
|
|
3725
4101
|
|
|
3726
|
-
/** Output only. Harm severity levels in the content. */
|
|
4102
|
+
/** Output only. Harm severity levels in the content. This enum is not supported in Gemini API. */
|
|
3727
4103
|
export declare enum HarmSeverity {
|
|
3728
4104
|
/**
|
|
3729
4105
|
* Harm severity unspecified.
|
|
@@ -3747,6 +4123,31 @@ export declare enum HarmSeverity {
|
|
|
3747
4123
|
HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
|
|
3748
4124
|
}
|
|
3749
4125
|
|
|
4126
|
+
/** The location of the API key. This enum is not supported in Gemini API. */
|
|
4127
|
+
export declare enum HttpElementLocation {
|
|
4128
|
+
HTTP_IN_UNSPECIFIED = "HTTP_IN_UNSPECIFIED",
|
|
4129
|
+
/**
|
|
4130
|
+
* Element is in the HTTP request query.
|
|
4131
|
+
*/
|
|
4132
|
+
HTTP_IN_QUERY = "HTTP_IN_QUERY",
|
|
4133
|
+
/**
|
|
4134
|
+
* Element is in the HTTP request header.
|
|
4135
|
+
*/
|
|
4136
|
+
HTTP_IN_HEADER = "HTTP_IN_HEADER",
|
|
4137
|
+
/**
|
|
4138
|
+
* Element is in the HTTP request path.
|
|
4139
|
+
*/
|
|
4140
|
+
HTTP_IN_PATH = "HTTP_IN_PATH",
|
|
4141
|
+
/**
|
|
4142
|
+
* Element is in the HTTP request body.
|
|
4143
|
+
*/
|
|
4144
|
+
HTTP_IN_BODY = "HTTP_IN_BODY",
|
|
4145
|
+
/**
|
|
4146
|
+
* Element is in the HTTP request cookie.
|
|
4147
|
+
*/
|
|
4148
|
+
HTTP_IN_COOKIE = "HTTP_IN_COOKIE"
|
|
4149
|
+
}
|
|
4150
|
+
|
|
3750
4151
|
/** HTTP options to be used in each of the requests. */
|
|
3751
4152
|
export declare interface HttpOptions {
|
|
3752
4153
|
/** The base URL for the AI platform service endpoint. */
|
|
@@ -3806,7 +4207,7 @@ declare interface HttpRequest {
|
|
|
3806
4207
|
/**
|
|
3807
4208
|
* Optional set of customizable configuration for HTTP requests.
|
|
3808
4209
|
*/
|
|
3809
|
-
httpOptions?: HttpOptions;
|
|
4210
|
+
httpOptions?: types.HttpOptions;
|
|
3810
4211
|
/**
|
|
3811
4212
|
* Optional abort signal which can be used to cancel the request.
|
|
3812
4213
|
*/
|
|
@@ -3844,6 +4245,10 @@ export declare interface ImageConfig {
|
|
|
3844
4245
|
/** Aspect ratio of the generated images. Supported values are
|
|
3845
4246
|
"1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
|
|
3846
4247
|
aspectRatio?: string;
|
|
4248
|
+
/** Optional. Specifies the size of generated images. Supported
|
|
4249
|
+
values are `1K`, `2K`, `4K`. If not specified, the model will use default
|
|
4250
|
+
value `1K`. */
|
|
4251
|
+
imageSize?: string;
|
|
3847
4252
|
}
|
|
3848
4253
|
|
|
3849
4254
|
/** Enum that specifies the language of the text in the prompt. */
|
|
@@ -3882,6 +4287,64 @@ export declare enum ImagePromptLanguage {
|
|
|
3882
4287
|
es = "es"
|
|
3883
4288
|
}
|
|
3884
4289
|
|
|
4290
|
+
/** Optional parameters for importing a file. */
|
|
4291
|
+
export declare interface ImportFileConfig {
|
|
4292
|
+
/** Used to override HTTP request options. */
|
|
4293
|
+
httpOptions?: HttpOptions;
|
|
4294
|
+
/** Abort signal which can be used to cancel the request.
|
|
4295
|
+
|
|
4296
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4297
|
+
operation will not cancel the request in the service. You will still
|
|
4298
|
+
be charged usage for any applicable operations.
|
|
4299
|
+
*/
|
|
4300
|
+
abortSignal?: AbortSignal;
|
|
4301
|
+
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
4302
|
+
customMetadata?: CustomMetadata[];
|
|
4303
|
+
/** Config for telling the service how to chunk the file. */
|
|
4304
|
+
chunkingConfig?: ChunkingConfig;
|
|
4305
|
+
}
|
|
4306
|
+
|
|
4307
|
+
/** Long-running operation for importing a file to a FileSearchStore. */
|
|
4308
|
+
export declare class ImportFileOperation implements Operation<ImportFileResponse> {
|
|
4309
|
+
/** 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}`. */
|
|
4310
|
+
name?: string;
|
|
4311
|
+
/** 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. */
|
|
4312
|
+
metadata?: Record<string, unknown>;
|
|
4313
|
+
/** 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. */
|
|
4314
|
+
done?: boolean;
|
|
4315
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
4316
|
+
error?: Record<string, unknown>;
|
|
4317
|
+
/** The result of the ImportFile operation, available when the operation is done. */
|
|
4318
|
+
response?: ImportFileResponse;
|
|
4319
|
+
/**
|
|
4320
|
+
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
4321
|
+
* @internal
|
|
4322
|
+
*/
|
|
4323
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<ImportFileResponse>;
|
|
4324
|
+
/** The full HTTP response. */
|
|
4325
|
+
sdkHttpResponse?: HttpResponse;
|
|
4326
|
+
}
|
|
4327
|
+
|
|
4328
|
+
/** Config for file_search_stores.import_file parameters. */
|
|
4329
|
+
export declare interface ImportFileParameters {
|
|
4330
|
+
/** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
|
|
4331
|
+
fileSearchStoreName: string;
|
|
4332
|
+
/** The name of the File API File to import. Example: `files/abc-123` */
|
|
4333
|
+
fileName: string;
|
|
4334
|
+
/** Optional parameters for the request. */
|
|
4335
|
+
config?: ImportFileConfig;
|
|
4336
|
+
}
|
|
4337
|
+
|
|
4338
|
+
/** Response for ImportFile to import a File API file with a file search store. */
|
|
4339
|
+
export declare class ImportFileResponse {
|
|
4340
|
+
/** Used to retain the full HTTP response. */
|
|
4341
|
+
sdkHttpResponse?: HttpResponse;
|
|
4342
|
+
/** The name of the FileSearchStore containing Documents. */
|
|
4343
|
+
parent?: string;
|
|
4344
|
+
/** The identifier for the Document imported. */
|
|
4345
|
+
documentName?: string;
|
|
4346
|
+
}
|
|
4347
|
+
|
|
3885
4348
|
/** Config for `inlined_embedding_responses` parameter. */
|
|
3886
4349
|
export declare class InlinedEmbedContentResponse {
|
|
3887
4350
|
/** The response to the request.
|
|
@@ -3917,17 +4380,12 @@ export declare class InlinedResponse {
|
|
|
3917
4380
|
error?: JobError;
|
|
3918
4381
|
}
|
|
3919
4382
|
|
|
3920
|
-
/** Represents a time interval, encoded as a start
|
|
3921
|
-
|
|
3922
|
-
The start time must be less than or equal to the end time.
|
|
3923
|
-
When the start equals the end time, the interval is an empty interval.
|
|
3924
|
-
(matches no time)
|
|
3925
|
-
When both start and end are unspecified, the interval matches any time. */
|
|
4383
|
+
/** Represents a time interval, encoded as a Timestamp start (inclusive) and a Timestamp end (exclusive). The start must be less than or equal to the end. When the start equals the end, the interval is empty (matches no time). When both start and end are unspecified, the interval matches any time. */
|
|
3926
4384
|
export declare interface Interval {
|
|
3927
|
-
/**
|
|
3928
|
-
startTime?: string;
|
|
3929
|
-
/** The end time of the interval. */
|
|
4385
|
+
/** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
|
|
3930
4386
|
endTime?: string;
|
|
4387
|
+
/** Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. */
|
|
4388
|
+
startTime?: string;
|
|
3931
4389
|
}
|
|
3932
4390
|
|
|
3933
4391
|
/** Job error. */
|
|
@@ -3992,7 +4450,7 @@ export declare enum JobState {
|
|
|
3992
4450
|
JOB_STATE_PARTIALLY_SUCCEEDED = "JOB_STATE_PARTIALLY_SUCCEEDED"
|
|
3993
4451
|
}
|
|
3994
4452
|
|
|
3995
|
-
/**
|
|
4453
|
+
/** Programming language of the `code`. */
|
|
3996
4454
|
export declare enum Language {
|
|
3997
4455
|
/**
|
|
3998
4456
|
* Unspecified language. This value should not be used.
|
|
@@ -4077,7 +4535,38 @@ export declare class ListCachedContentsResponse {
|
|
|
4077
4535
|
cachedContents?: CachedContent[];
|
|
4078
4536
|
}
|
|
4079
4537
|
|
|
4080
|
-
/**
|
|
4538
|
+
/** Config for optional parameters. */
|
|
4539
|
+
export declare interface ListDocumentsConfig {
|
|
4540
|
+
/** Used to override HTTP request options. */
|
|
4541
|
+
httpOptions?: HttpOptions;
|
|
4542
|
+
/** Abort signal which can be used to cancel the request.
|
|
4543
|
+
|
|
4544
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4545
|
+
operation will not cancel the request in the service. You will still
|
|
4546
|
+
be charged usage for any applicable operations.
|
|
4547
|
+
*/
|
|
4548
|
+
abortSignal?: AbortSignal;
|
|
4549
|
+
pageSize?: number;
|
|
4550
|
+
pageToken?: string;
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
/** Config for documents.list parameters. */
|
|
4554
|
+
export declare interface ListDocumentsParameters {
|
|
4555
|
+
/** The resource name of the FileSearchStores. Example: `fileSearchStore/file-search-store-foo` */
|
|
4556
|
+
parent: string;
|
|
4557
|
+
config?: ListDocumentsConfig;
|
|
4558
|
+
}
|
|
4559
|
+
|
|
4560
|
+
/** Config for documents.list return value. */
|
|
4561
|
+
export declare class ListDocumentsResponse {
|
|
4562
|
+
/** Used to retain the full HTTP response. */
|
|
4563
|
+
sdkHttpResponse?: HttpResponse;
|
|
4564
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages. */
|
|
4565
|
+
nextPageToken?: string;
|
|
4566
|
+
/** The returned `Document`s. */
|
|
4567
|
+
documents?: Document_2[];
|
|
4568
|
+
}
|
|
4569
|
+
|
|
4081
4570
|
export declare interface ListFilesConfig {
|
|
4082
4571
|
/** Used to override HTTP request options. */
|
|
4083
4572
|
httpOptions?: HttpOptions;
|
|
@@ -4092,6 +4581,36 @@ export declare interface ListFilesConfig {
|
|
|
4092
4581
|
pageToken?: string;
|
|
4093
4582
|
}
|
|
4094
4583
|
|
|
4584
|
+
/** Optional parameters for listing FileSearchStore. */
|
|
4585
|
+
export declare interface ListFileSearchStoresConfig {
|
|
4586
|
+
/** Used to override HTTP request options. */
|
|
4587
|
+
httpOptions?: HttpOptions;
|
|
4588
|
+
/** Abort signal which can be used to cancel the request.
|
|
4589
|
+
|
|
4590
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4591
|
+
operation will not cancel the request in the service. You will still
|
|
4592
|
+
be charged usage for any applicable operations.
|
|
4593
|
+
*/
|
|
4594
|
+
abortSignal?: AbortSignal;
|
|
4595
|
+
pageSize?: number;
|
|
4596
|
+
pageToken?: string;
|
|
4597
|
+
}
|
|
4598
|
+
|
|
4599
|
+
/** Config for file_search_stores.list parameters. */
|
|
4600
|
+
export declare interface ListFileSearchStoresParameters {
|
|
4601
|
+
/** Optional parameters for the list request. */
|
|
4602
|
+
config?: ListFileSearchStoresConfig;
|
|
4603
|
+
}
|
|
4604
|
+
|
|
4605
|
+
/** Config for file_search_stores.list return value. */
|
|
4606
|
+
export declare class ListFileSearchStoresResponse {
|
|
4607
|
+
/** Used to retain the full HTTP response. */
|
|
4608
|
+
sdkHttpResponse?: HttpResponse;
|
|
4609
|
+
nextPageToken?: string;
|
|
4610
|
+
/** The returned file search stores. */
|
|
4611
|
+
fileSearchStores?: FileSearchStore[];
|
|
4612
|
+
}
|
|
4613
|
+
|
|
4095
4614
|
/** Generates the parameters for the list method. */
|
|
4096
4615
|
export declare interface ListFilesParameters {
|
|
4097
4616
|
/** Used to override the default configuration. */
|
|
@@ -5501,9 +6020,9 @@ export declare interface ModelSelectionConfig {
|
|
|
5501
6020
|
featureSelectionPreference?: FeatureSelectionPreference;
|
|
5502
6021
|
}
|
|
5503
6022
|
|
|
5504
|
-
/** The configuration for the multi-speaker setup. */
|
|
6023
|
+
/** The configuration for the multi-speaker setup. This data type is not supported in Vertex AI. */
|
|
5505
6024
|
export declare interface MultiSpeakerVoiceConfig {
|
|
5506
|
-
/**
|
|
6025
|
+
/** Required. All the enabled speaker voices. */
|
|
5507
6026
|
speakerVoiceConfigs?: SpeakerVoiceConfig[];
|
|
5508
6027
|
}
|
|
5509
6028
|
|
|
@@ -5546,7 +6065,7 @@ export declare interface Operation<T> {
|
|
|
5546
6065
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
5547
6066
|
* @internal
|
|
5548
6067
|
*/
|
|
5549
|
-
_fromAPIResponse({ apiResponse,
|
|
6068
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<T>;
|
|
5550
6069
|
}
|
|
5551
6070
|
|
|
5552
6071
|
/** Parameters of the fromAPIResponse method of the Operation class. */
|
|
@@ -5554,7 +6073,7 @@ export declare interface OperationFromAPIResponseParameters {
|
|
|
5554
6073
|
/** The API response to be converted to an Operation. */
|
|
5555
6074
|
apiResponse: Record<string, unknown>;
|
|
5556
6075
|
/** Whether the API response is from Vertex AI. */
|
|
5557
|
-
|
|
6076
|
+
_isVertexAI: boolean;
|
|
5558
6077
|
}
|
|
5559
6078
|
|
|
5560
6079
|
/** Parameters for the get method of the operations module. */
|
|
@@ -5586,7 +6105,7 @@ export declare class Operations extends BaseModule {
|
|
|
5586
6105
|
private fetchPredictVideosOperationInternal;
|
|
5587
6106
|
}
|
|
5588
6107
|
|
|
5589
|
-
/**
|
|
6108
|
+
/** Outcome of the code execution. */
|
|
5590
6109
|
export declare enum Outcome {
|
|
5591
6110
|
/**
|
|
5592
6111
|
* Unspecified status. This value should not be used.
|
|
@@ -5611,10 +6130,13 @@ export declare enum PagedItem {
|
|
|
5611
6130
|
PAGED_ITEM_MODELS = "models",
|
|
5612
6131
|
PAGED_ITEM_TUNING_JOBS = "tuningJobs",
|
|
5613
6132
|
PAGED_ITEM_FILES = "files",
|
|
5614
|
-
PAGED_ITEM_CACHED_CONTENTS = "cachedContents"
|
|
6133
|
+
PAGED_ITEM_CACHED_CONTENTS = "cachedContents",
|
|
6134
|
+
PAGED_ITEM_FILE_SEARCH_STORES = "fileSearchStores",
|
|
6135
|
+
PAGED_ITEM_DOCUMENTS = "documents"
|
|
5615
6136
|
}
|
|
5616
6137
|
|
|
5617
6138
|
declare interface PagedItemConfig {
|
|
6139
|
+
parent?: string;
|
|
5618
6140
|
config?: {
|
|
5619
6141
|
pageToken?: string;
|
|
5620
6142
|
pageSize?: number;
|
|
@@ -5629,6 +6151,8 @@ declare interface PagedItemResponse<T> {
|
|
|
5629
6151
|
tuningJobs?: T[];
|
|
5630
6152
|
files?: T[];
|
|
5631
6153
|
cachedContents?: T[];
|
|
6154
|
+
fileSearchStores?: T[];
|
|
6155
|
+
documents?: T[];
|
|
5632
6156
|
}
|
|
5633
6157
|
|
|
5634
6158
|
/**
|
|
@@ -5737,17 +6261,6 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
5737
6261
|
of content being conveyed. Using multiple fields within the same `Part`
|
|
5738
6262
|
instance is considered invalid. */
|
|
5739
6263
|
export declare interface Part {
|
|
5740
|
-
/** Metadata for a given video. */
|
|
5741
|
-
videoMetadata?: VideoMetadata;
|
|
5742
|
-
/** Indicates if the part is thought from the model. */
|
|
5743
|
-
thought?: boolean;
|
|
5744
|
-
/** Optional. Inlined bytes data. */
|
|
5745
|
-
inlineData?: Blob_2;
|
|
5746
|
-
/** Optional. URI based data. */
|
|
5747
|
-
fileData?: FileData;
|
|
5748
|
-
/** An opaque signature for the thought so it can be reused in subsequent requests.
|
|
5749
|
-
* @remarks Encoded as base64 string. */
|
|
5750
|
-
thoughtSignature?: string;
|
|
5751
6264
|
/** A predicted [FunctionCall] returned from the model that contains a string
|
|
5752
6265
|
representing the [FunctionDeclaration.name] and a structured JSON object
|
|
5753
6266
|
containing the parameters and their values. */
|
|
@@ -5756,10 +6269,21 @@ export declare interface Part {
|
|
|
5756
6269
|
codeExecutionResult?: CodeExecutionResult;
|
|
5757
6270
|
/** Optional. Code generated by the model that is meant to be executed. */
|
|
5758
6271
|
executableCode?: ExecutableCode;
|
|
6272
|
+
/** Optional. URI based data. */
|
|
6273
|
+
fileData?: FileData;
|
|
5759
6274
|
/** 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. */
|
|
5760
6275
|
functionResponse?: FunctionResponse;
|
|
6276
|
+
/** Optional. Inlined bytes data. */
|
|
6277
|
+
inlineData?: Blob_2;
|
|
5761
6278
|
/** Optional. Text part (can be code). */
|
|
5762
6279
|
text?: string;
|
|
6280
|
+
/** Optional. Indicates if the part is thought from the model. */
|
|
6281
|
+
thought?: boolean;
|
|
6282
|
+
/** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
|
|
6283
|
+
* @remarks Encoded as base64 string. */
|
|
6284
|
+
thoughtSignature?: string;
|
|
6285
|
+
/** Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. */
|
|
6286
|
+
videoMetadata?: VideoMetadata;
|
|
5763
6287
|
}
|
|
5764
6288
|
|
|
5765
6289
|
export declare type PartListUnion = PartUnion[] | PartUnion;
|
|
@@ -5792,9 +6316,41 @@ export declare enum PersonGeneration {
|
|
|
5792
6316
|
ALLOW_ALL = "ALLOW_ALL"
|
|
5793
6317
|
}
|
|
5794
6318
|
|
|
6319
|
+
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
6320
|
+
export declare enum PhishBlockThreshold {
|
|
6321
|
+
/**
|
|
6322
|
+
* Defaults to unspecified.
|
|
6323
|
+
*/
|
|
6324
|
+
PHISH_BLOCK_THRESHOLD_UNSPECIFIED = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
6325
|
+
/**
|
|
6326
|
+
* Blocks Low and above confidence URL that is risky.
|
|
6327
|
+
*/
|
|
6328
|
+
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
|
|
6329
|
+
/**
|
|
6330
|
+
* Blocks Medium and above confidence URL that is risky.
|
|
6331
|
+
*/
|
|
6332
|
+
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
|
|
6333
|
+
/**
|
|
6334
|
+
* Blocks High and above confidence URL that is risky.
|
|
6335
|
+
*/
|
|
6336
|
+
BLOCK_HIGH_AND_ABOVE = "BLOCK_HIGH_AND_ABOVE",
|
|
6337
|
+
/**
|
|
6338
|
+
* Blocks Higher and above confidence URL that is risky.
|
|
6339
|
+
*/
|
|
6340
|
+
BLOCK_HIGHER_AND_ABOVE = "BLOCK_HIGHER_AND_ABOVE",
|
|
6341
|
+
/**
|
|
6342
|
+
* Blocks Very high and above confidence URL that is risky.
|
|
6343
|
+
*/
|
|
6344
|
+
BLOCK_VERY_HIGH_AND_ABOVE = "BLOCK_VERY_HIGH_AND_ABOVE",
|
|
6345
|
+
/**
|
|
6346
|
+
* Blocks Extremely high confidence URL that is risky.
|
|
6347
|
+
*/
|
|
6348
|
+
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
6349
|
+
}
|
|
6350
|
+
|
|
5795
6351
|
/** The configuration for the prebuilt speaker to use. */
|
|
5796
6352
|
export declare interface PrebuiltVoiceConfig {
|
|
5797
|
-
/** The name of the
|
|
6353
|
+
/** The name of the preset voice to use. */
|
|
5798
6354
|
voiceName?: string;
|
|
5799
6355
|
}
|
|
5800
6356
|
|
|
@@ -5818,6 +6374,30 @@ export declare interface PreferenceOptimizationDataStats {
|
|
|
5818
6374
|
userOutputTokenDistribution?: DatasetDistribution;
|
|
5819
6375
|
}
|
|
5820
6376
|
|
|
6377
|
+
/** Hyperparameters for Preference Optimization. This data type is not supported in Gemini API. */
|
|
6378
|
+
export declare interface PreferenceOptimizationHyperParameters {
|
|
6379
|
+
/** Optional. Adapter size for preference optimization. */
|
|
6380
|
+
adapterSize?: AdapterSize;
|
|
6381
|
+
/** Optional. Weight for KL Divergence regularization. */
|
|
6382
|
+
beta?: number;
|
|
6383
|
+
/** Optional. Number of complete passes the model makes over the entire training dataset during training. */
|
|
6384
|
+
epochCount?: string;
|
|
6385
|
+
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
6386
|
+
learningRateMultiplier?: number;
|
|
6387
|
+
}
|
|
6388
|
+
|
|
6389
|
+
/** Preference optimization tuning spec for tuning. */
|
|
6390
|
+
export declare interface PreferenceOptimizationSpec {
|
|
6391
|
+
/** 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. */
|
|
6392
|
+
exportLastCheckpointOnly?: boolean;
|
|
6393
|
+
/** Optional. Hyperparameters for Preference Optimization. */
|
|
6394
|
+
hyperParameters?: PreferenceOptimizationHyperParameters;
|
|
6395
|
+
/** Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
|
|
6396
|
+
trainingDatasetUri?: string;
|
|
6397
|
+
/** Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
|
|
6398
|
+
validationDatasetUri?: string;
|
|
6399
|
+
}
|
|
6400
|
+
|
|
5821
6401
|
/** A pre-tuned model for continuous tuning. This data type is not supported in Gemini API. */
|
|
5822
6402
|
export declare interface PreTunedModel {
|
|
5823
6403
|
/** Output only. The name of the base model this PreTunedModel was tuned from. */
|
|
@@ -6101,13 +6681,13 @@ export declare interface SafetyRating {
|
|
|
6101
6681
|
blocked?: boolean;
|
|
6102
6682
|
/** Output only. Harm category. */
|
|
6103
6683
|
category?: HarmCategory;
|
|
6104
|
-
/** Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold. */
|
|
6684
|
+
/** Output only. The overwritten threshold for the safety category of Gemini 2.0 image out. If minors are detected in the output image, the threshold of each safety category will be overwritten if user sets a lower threshold. This field is not supported in Gemini API. */
|
|
6105
6685
|
overwrittenThreshold?: HarmBlockThreshold;
|
|
6106
6686
|
/** Output only. Harm probability levels in the content. */
|
|
6107
6687
|
probability?: HarmProbability;
|
|
6108
6688
|
/** Output only. Harm probability score. This field is not supported in Gemini API. */
|
|
6109
6689
|
probabilityScore?: number;
|
|
6110
|
-
/** Output only. Harm severity levels in the content. */
|
|
6690
|
+
/** Output only. Harm severity levels in the content. This field is not supported in Gemini API. */
|
|
6111
6691
|
severity?: HarmSeverity;
|
|
6112
6692
|
/** Output only. Harm severity score. This field is not supported in Gemini API. */
|
|
6113
6693
|
severityScore?: number;
|
|
@@ -6115,11 +6695,10 @@ export declare interface SafetyRating {
|
|
|
6115
6695
|
|
|
6116
6696
|
/** Safety settings. */
|
|
6117
6697
|
export declare interface SafetySetting {
|
|
6118
|
-
/** Determines if the harm block method uses probability or probability
|
|
6119
|
-
and severity scores. */
|
|
6120
|
-
method?: HarmBlockMethod;
|
|
6121
6698
|
/** Required. Harm category. */
|
|
6122
6699
|
category?: HarmCategory;
|
|
6700
|
+
/** Optional. Specify if the threshold is used for probability or severity score. If not specified, the threshold is used for probability score. This field is not supported in Gemini API. */
|
|
6701
|
+
method?: HarmBlockMethod;
|
|
6123
6702
|
/** Required. The harm block threshold. */
|
|
6124
6703
|
threshold?: HarmBlockThreshold;
|
|
6125
6704
|
}
|
|
@@ -6533,28 +7112,22 @@ export declare interface SlidingWindow {
|
|
|
6533
7112
|
targetTokens?: string;
|
|
6534
7113
|
}
|
|
6535
7114
|
|
|
6536
|
-
/**
|
|
7115
|
+
/** Configuration for a single speaker in a multi speaker setup. */
|
|
6537
7116
|
export declare interface SpeakerVoiceConfig {
|
|
6538
|
-
/** The name of the speaker
|
|
6539
|
-
prompt. */
|
|
7117
|
+
/** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
|
|
6540
7118
|
speaker?: string;
|
|
6541
|
-
/** The configuration for the voice
|
|
7119
|
+
/** Required. The configuration for the voice of this speaker. */
|
|
6542
7120
|
voiceConfig?: VoiceConfig;
|
|
6543
7121
|
}
|
|
6544
7122
|
|
|
6545
|
-
/** The speech generation
|
|
7123
|
+
/** The speech generation config. */
|
|
6546
7124
|
export declare interface SpeechConfig {
|
|
6547
|
-
/**
|
|
6548
|
-
|
|
7125
|
+
/** Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization. */
|
|
7126
|
+
languageCode?: string;
|
|
7127
|
+
/** The configuration for the speaker to use. */
|
|
6549
7128
|
voiceConfig?: VoiceConfig;
|
|
6550
|
-
/** The configuration for the multi-speaker setup.
|
|
6551
|
-
It is mutually exclusive with the voice_config field.
|
|
6552
|
-
*/
|
|
7129
|
+
/** Optional. The configuration for the multi-speaker setup. It is mutually exclusive with the voice_config field. This field is not supported in Vertex AI. */
|
|
6553
7130
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
6554
|
-
/** Language code (ISO 639. e.g. en-US) for the speech synthesization.
|
|
6555
|
-
Only available for Live API.
|
|
6556
|
-
*/
|
|
6557
|
-
languageCode?: string;
|
|
6558
7131
|
}
|
|
6559
7132
|
|
|
6560
7133
|
export declare type SpeechConfigUnion = SpeechConfig | string;
|
|
@@ -6575,6 +7148,12 @@ export declare enum StartSensitivity {
|
|
|
6575
7148
|
START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
|
|
6576
7149
|
}
|
|
6577
7150
|
|
|
7151
|
+
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
7152
|
+
export declare interface StringList {
|
|
7153
|
+
/** The string values of the metadata to store. */
|
|
7154
|
+
values?: string[];
|
|
7155
|
+
}
|
|
7156
|
+
|
|
6578
7157
|
/** Configuration for a Style reference image. */
|
|
6579
7158
|
export declare interface StyleReferenceConfig {
|
|
6580
7159
|
/** A text description of the style to use for the generated image. */
|
|
@@ -6710,7 +7289,7 @@ export declare interface SupervisedTuningDataStats {
|
|
|
6710
7289
|
userOutputTokenDistribution?: SupervisedTuningDatasetDistribution;
|
|
6711
7290
|
}
|
|
6712
7291
|
|
|
6713
|
-
/**
|
|
7292
|
+
/** Supervised tuning spec for tuning. */
|
|
6714
7293
|
export declare interface SupervisedTuningSpec {
|
|
6715
7294
|
/** Optional. If set to true, disable intermediate checkpoints for SFT and only the last checkpoint will be exported. Otherwise, enable intermediate checkpoints for SFT. Default is false. */
|
|
6716
7295
|
exportLastCheckpointOnly?: boolean;
|
|
@@ -6866,25 +7445,24 @@ export declare interface Tool {
|
|
|
6866
7445
|
functionDeclarations?: FunctionDeclaration[];
|
|
6867
7446
|
/** 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. */
|
|
6868
7447
|
retrieval?: Retrieval;
|
|
6869
|
-
/** Optional.
|
|
6870
|
-
that is powered by Google Search. */
|
|
6871
|
-
googleSearch?: GoogleSearch;
|
|
6872
|
-
/** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */
|
|
7448
|
+
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
6873
7449
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
6874
|
-
/** Optional. Enterprise web search tool type. Specialized retrieval
|
|
6875
|
-
tool that is powered by Vertex AI Search and Sec4 compliance. */
|
|
6876
|
-
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
6877
|
-
/** Optional. Google Maps tool type. Specialized retrieval tool
|
|
6878
|
-
that is powered by Google Maps. */
|
|
6879
|
-
googleMaps?: GoogleMaps;
|
|
6880
|
-
/** Optional. Tool to support URL context retrieval. */
|
|
6881
|
-
urlContext?: UrlContext;
|
|
6882
7450
|
/** Optional. Tool to support the model interacting directly with the
|
|
6883
7451
|
computer. If enabled, it automatically populates computer-use specific
|
|
6884
7452
|
Function Declarations. */
|
|
6885
7453
|
computerUse?: ComputerUse;
|
|
7454
|
+
/** Optional. Tool to retrieve knowledge from the File Search Stores. */
|
|
7455
|
+
fileSearch?: FileSearch;
|
|
6886
7456
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
6887
7457
|
codeExecution?: ToolCodeExecution;
|
|
7458
|
+
/** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
|
|
7459
|
+
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
7460
|
+
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
7461
|
+
googleMaps?: GoogleMaps;
|
|
7462
|
+
/** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
7463
|
+
googleSearch?: GoogleSearch;
|
|
7464
|
+
/** Optional. Tool to support URL context retrieval. */
|
|
7465
|
+
urlContext?: UrlContext;
|
|
6888
7466
|
}
|
|
6889
7467
|
|
|
6890
7468
|
/** Tool that executes code generated by the model, and automatically returns the result to the model. See also [ExecutableCode]and [CodeExecutionResult] which are input and output to this tool. This data type is not supported in Gemini API. */
|
|
@@ -6905,14 +7483,14 @@ export declare type ToolListUnion = ToolUnion[];
|
|
|
6905
7483
|
|
|
6906
7484
|
export declare type ToolUnion = Tool | CallableTool;
|
|
6907
7485
|
|
|
6908
|
-
/** Output only.
|
|
7486
|
+
/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
|
|
6909
7487
|
export declare enum TrafficType {
|
|
6910
7488
|
/**
|
|
6911
7489
|
* Unspecified request traffic type.
|
|
6912
7490
|
*/
|
|
6913
7491
|
TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED",
|
|
6914
7492
|
/**
|
|
6915
|
-
*
|
|
7493
|
+
* The request was processed using Pay-As-You-Go quota.
|
|
6916
7494
|
*/
|
|
6917
7495
|
ON_DEMAND = "ON_DEMAND",
|
|
6918
7496
|
/**
|
|
@@ -7033,6 +7611,8 @@ export declare interface TuningJob {
|
|
|
7033
7611
|
preTunedModel?: PreTunedModel;
|
|
7034
7612
|
/** Tuning Spec for Supervised Fine Tuning. */
|
|
7035
7613
|
supervisedTuningSpec?: SupervisedTuningSpec;
|
|
7614
|
+
/** Tuning Spec for Preference Optimization. */
|
|
7615
|
+
preferenceOptimizationSpec?: PreferenceOptimizationSpec;
|
|
7036
7616
|
/** Output only. The tuning data statistics associated with this TuningJob. */
|
|
7037
7617
|
tuningDataStats?: TuningDataStats;
|
|
7038
7618
|
/** Customer-managed encryption key options for a TuningJob. If this is set, then all resources created by the TuningJob will be encrypted with the provided encryption key. */
|
|
@@ -7051,13 +7631,25 @@ export declare interface TuningJob {
|
|
|
7051
7631
|
pipelineJob?: string;
|
|
7052
7632
|
/** 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. */
|
|
7053
7633
|
serviceAccount?: string;
|
|
7054
|
-
/** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
|
|
7634
|
+
/** 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. */
|
|
7055
7635
|
tunedModelDisplayName?: string;
|
|
7056
7636
|
/** Tuning Spec for Veo Tuning. */
|
|
7057
7637
|
veoTuningSpec?: VeoTuningSpec;
|
|
7058
7638
|
}
|
|
7059
7639
|
|
|
7060
|
-
/**
|
|
7640
|
+
/** Enum representing the tuning method. */
|
|
7641
|
+
export declare enum TuningMethod {
|
|
7642
|
+
/**
|
|
7643
|
+
* Supervised fine tuning.
|
|
7644
|
+
*/
|
|
7645
|
+
SUPERVISED_FINE_TUNING = "SUPERVISED_FINE_TUNING",
|
|
7646
|
+
/**
|
|
7647
|
+
* Preference optimization tuning.
|
|
7648
|
+
*/
|
|
7649
|
+
PREFERENCE_TUNING = "PREFERENCE_TUNING"
|
|
7650
|
+
}
|
|
7651
|
+
|
|
7652
|
+
/** Tuning mode. This enum is not supported in Gemini API. */
|
|
7061
7653
|
export declare enum TuningMode {
|
|
7062
7654
|
/**
|
|
7063
7655
|
* Tuning mode is unspecified.
|
|
@@ -7138,7 +7730,7 @@ declare class Tunings extends BaseModule {
|
|
|
7138
7730
|
private tuneMldevInternal;
|
|
7139
7731
|
}
|
|
7140
7732
|
|
|
7141
|
-
/**
|
|
7733
|
+
/** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
|
|
7142
7734
|
export declare enum TuningTask {
|
|
7143
7735
|
/**
|
|
7144
7736
|
* Default value. This value is unused.
|
|
@@ -7151,7 +7743,11 @@ export declare enum TuningTask {
|
|
|
7151
7743
|
/**
|
|
7152
7744
|
* Tuning task for text to video.
|
|
7153
7745
|
*/
|
|
7154
|
-
TUNING_TASK_T2V = "TUNING_TASK_T2V"
|
|
7746
|
+
TUNING_TASK_T2V = "TUNING_TASK_T2V",
|
|
7747
|
+
/**
|
|
7748
|
+
* Tuning task for reference to video.
|
|
7749
|
+
*/
|
|
7750
|
+
TUNING_TASK_R2V = "TUNING_TASK_R2V"
|
|
7155
7751
|
}
|
|
7156
7752
|
|
|
7157
7753
|
export declare interface TuningValidationDataset {
|
|
@@ -7197,7 +7793,7 @@ export declare enum TurnCoverage {
|
|
|
7197
7793
|
TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
|
|
7198
7794
|
}
|
|
7199
7795
|
|
|
7200
|
-
/**
|
|
7796
|
+
/** The type of the data. */
|
|
7201
7797
|
export declare enum Type {
|
|
7202
7798
|
/**
|
|
7203
7799
|
* Not specified, should not be used.
|
|
@@ -7250,23 +7846,25 @@ declare namespace types {
|
|
|
7250
7846
|
Language,
|
|
7251
7847
|
FunctionResponseScheduling,
|
|
7252
7848
|
Type,
|
|
7849
|
+
Mode,
|
|
7850
|
+
ApiSpec,
|
|
7851
|
+
AuthType,
|
|
7852
|
+
HttpElementLocation,
|
|
7853
|
+
PhishBlockThreshold,
|
|
7253
7854
|
HarmCategory,
|
|
7254
7855
|
HarmBlockMethod,
|
|
7255
7856
|
HarmBlockThreshold,
|
|
7256
|
-
Mode,
|
|
7257
|
-
AuthType,
|
|
7258
|
-
ApiSpec,
|
|
7259
|
-
UrlRetrievalStatus,
|
|
7260
7857
|
FinishReason,
|
|
7261
7858
|
HarmProbability,
|
|
7262
7859
|
HarmSeverity,
|
|
7860
|
+
UrlRetrievalStatus,
|
|
7263
7861
|
BlockedReason,
|
|
7264
7862
|
TrafficType,
|
|
7265
7863
|
Modality,
|
|
7266
7864
|
MediaResolution,
|
|
7267
|
-
JobState,
|
|
7268
7865
|
TuningMode,
|
|
7269
7866
|
AdapterSize,
|
|
7867
|
+
JobState,
|
|
7270
7868
|
TuningTask,
|
|
7271
7869
|
FeatureSelectionPreference,
|
|
7272
7870
|
Behavior,
|
|
@@ -7284,6 +7882,8 @@ declare namespace types {
|
|
|
7284
7882
|
VideoGenerationReferenceType,
|
|
7285
7883
|
VideoGenerationMaskMode,
|
|
7286
7884
|
VideoCompressionQuality,
|
|
7885
|
+
TuningMethod,
|
|
7886
|
+
DocumentState,
|
|
7287
7887
|
FileState,
|
|
7288
7888
|
FileSource,
|
|
7289
7889
|
TurnCompleteReason,
|
|
@@ -7295,39 +7895,34 @@ declare namespace types {
|
|
|
7295
7895
|
Scale,
|
|
7296
7896
|
MusicGenerationMode,
|
|
7297
7897
|
LiveMusicPlaybackControl,
|
|
7298
|
-
VideoMetadata,
|
|
7299
|
-
Blob_2 as Blob,
|
|
7300
|
-
FileData,
|
|
7301
7898
|
FunctionCall,
|
|
7302
7899
|
CodeExecutionResult,
|
|
7303
7900
|
ExecutableCode,
|
|
7901
|
+
FileData,
|
|
7304
7902
|
FunctionResponseBlob,
|
|
7305
7903
|
FunctionResponseFileData,
|
|
7306
7904
|
FunctionResponsePart,
|
|
7307
7905
|
FunctionResponse,
|
|
7906
|
+
Blob_2 as Blob,
|
|
7907
|
+
VideoMetadata,
|
|
7308
7908
|
Part,
|
|
7309
7909
|
Content,
|
|
7310
7910
|
HttpOptions,
|
|
7311
7911
|
Schema,
|
|
7312
7912
|
ModelSelectionConfig,
|
|
7313
|
-
SafetySetting,
|
|
7314
7913
|
FunctionDeclaration,
|
|
7315
|
-
Interval,
|
|
7316
|
-
GoogleSearch,
|
|
7317
7914
|
DynamicRetrievalConfig,
|
|
7318
7915
|
GoogleSearchRetrieval,
|
|
7319
|
-
|
|
7916
|
+
ComputerUse,
|
|
7917
|
+
FileSearch,
|
|
7918
|
+
ApiAuthApiKeyConfig,
|
|
7919
|
+
ApiAuth,
|
|
7320
7920
|
ApiKeyConfig,
|
|
7321
7921
|
AuthConfigGoogleServiceAccountConfig,
|
|
7322
7922
|
AuthConfigHttpBasicAuthConfig,
|
|
7323
7923
|
AuthConfigOauthConfig,
|
|
7324
7924
|
AuthConfigOidcConfig,
|
|
7325
7925
|
AuthConfig,
|
|
7326
|
-
GoogleMaps,
|
|
7327
|
-
UrlContext,
|
|
7328
|
-
ComputerUse,
|
|
7329
|
-
ApiAuthApiKeyConfig,
|
|
7330
|
-
ApiAuth,
|
|
7331
7926
|
ExternalApiElasticSearchParams,
|
|
7332
7927
|
ExternalApiSimpleSearchParams,
|
|
7333
7928
|
ExternalApi,
|
|
@@ -7343,22 +7938,23 @@ declare namespace types {
|
|
|
7343
7938
|
VertexRagStore,
|
|
7344
7939
|
Retrieval,
|
|
7345
7940
|
ToolCodeExecution,
|
|
7941
|
+
EnterpriseWebSearch,
|
|
7942
|
+
GoogleMaps,
|
|
7943
|
+
Interval,
|
|
7944
|
+
GoogleSearch,
|
|
7945
|
+
UrlContext,
|
|
7346
7946
|
Tool,
|
|
7347
7947
|
FunctionCallingConfig,
|
|
7348
7948
|
LatLng,
|
|
7349
7949
|
RetrievalConfig,
|
|
7350
7950
|
ToolConfig,
|
|
7351
|
-
PrebuiltVoiceConfig,
|
|
7352
|
-
VoiceConfig,
|
|
7353
|
-
SpeakerVoiceConfig,
|
|
7354
|
-
MultiSpeakerVoiceConfig,
|
|
7355
|
-
SpeechConfig,
|
|
7356
7951
|
AutomaticFunctionCallingConfig,
|
|
7357
7952
|
ThinkingConfig,
|
|
7358
7953
|
ImageConfig,
|
|
7359
7954
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
7360
7955
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
7361
7956
|
GenerationConfigRoutingConfig,
|
|
7957
|
+
SafetySetting,
|
|
7362
7958
|
GenerateContentConfig,
|
|
7363
7959
|
GenerateContentParameters,
|
|
7364
7960
|
HttpResponse,
|
|
@@ -7366,8 +7962,6 @@ declare namespace types {
|
|
|
7366
7962
|
GoogleTypeDate,
|
|
7367
7963
|
Citation,
|
|
7368
7964
|
CitationMetadata,
|
|
7369
|
-
UrlMetadata,
|
|
7370
|
-
UrlContextMetadata,
|
|
7371
7965
|
GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
|
|
7372
7966
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
|
|
7373
7967
|
GroundingChunkMapsPlaceAnswerSources,
|
|
@@ -7387,6 +7981,8 @@ declare namespace types {
|
|
|
7387
7981
|
LogprobsResultTopCandidates,
|
|
7388
7982
|
LogprobsResult,
|
|
7389
7983
|
SafetyRating,
|
|
7984
|
+
UrlMetadata,
|
|
7985
|
+
UrlContextMetadata,
|
|
7390
7986
|
Candidate,
|
|
7391
7987
|
GenerateContentResponsePromptFeedback,
|
|
7392
7988
|
ModalityTokenCount,
|
|
@@ -7439,6 +8035,11 @@ declare namespace types {
|
|
|
7439
8035
|
DeleteModelConfig,
|
|
7440
8036
|
DeleteModelParameters,
|
|
7441
8037
|
DeleteModelResponse,
|
|
8038
|
+
PrebuiltVoiceConfig,
|
|
8039
|
+
VoiceConfig,
|
|
8040
|
+
SpeakerVoiceConfig,
|
|
8041
|
+
MultiSpeakerVoiceConfig,
|
|
8042
|
+
SpeechConfig,
|
|
7442
8043
|
GenerationConfig,
|
|
7443
8044
|
CountTokensConfig,
|
|
7444
8045
|
CountTokensParameters,
|
|
@@ -7461,10 +8062,12 @@ declare namespace types {
|
|
|
7461
8062
|
GetTuningJobParameters,
|
|
7462
8063
|
TunedModelCheckpoint,
|
|
7463
8064
|
TunedModel,
|
|
7464
|
-
GoogleRpcStatus,
|
|
7465
|
-
PreTunedModel,
|
|
7466
8065
|
SupervisedHyperParameters,
|
|
7467
8066
|
SupervisedTuningSpec,
|
|
8067
|
+
PreferenceOptimizationHyperParameters,
|
|
8068
|
+
PreferenceOptimizationSpec,
|
|
8069
|
+
GoogleRpcStatus,
|
|
8070
|
+
PreTunedModel,
|
|
7468
8071
|
DatasetDistributionDistributionBucket,
|
|
7469
8072
|
DatasetDistribution,
|
|
7470
8073
|
DatasetStats,
|
|
@@ -7506,6 +8109,35 @@ declare namespace types {
|
|
|
7506
8109
|
ListCachedContentsConfig,
|
|
7507
8110
|
ListCachedContentsParameters,
|
|
7508
8111
|
ListCachedContentsResponse,
|
|
8112
|
+
GetDocumentConfig,
|
|
8113
|
+
GetDocumentParameters,
|
|
8114
|
+
StringList,
|
|
8115
|
+
CustomMetadata,
|
|
8116
|
+
Document_2 as Document,
|
|
8117
|
+
DeleteDocumentConfig,
|
|
8118
|
+
DeleteDocumentParameters,
|
|
8119
|
+
ListDocumentsConfig,
|
|
8120
|
+
ListDocumentsParameters,
|
|
8121
|
+
ListDocumentsResponse,
|
|
8122
|
+
CreateFileSearchStoreConfig,
|
|
8123
|
+
CreateFileSearchStoreParameters,
|
|
8124
|
+
FileSearchStore,
|
|
8125
|
+
GetFileSearchStoreConfig,
|
|
8126
|
+
GetFileSearchStoreParameters,
|
|
8127
|
+
DeleteFileSearchStoreConfig,
|
|
8128
|
+
DeleteFileSearchStoreParameters,
|
|
8129
|
+
ListFileSearchStoresConfig,
|
|
8130
|
+
ListFileSearchStoresParameters,
|
|
8131
|
+
ListFileSearchStoresResponse,
|
|
8132
|
+
WhiteSpaceConfig,
|
|
8133
|
+
ChunkingConfig,
|
|
8134
|
+
UploadToFileSearchStoreConfig,
|
|
8135
|
+
UploadToFileSearchStoreParameters,
|
|
8136
|
+
UploadToFileSearchStoreResumableResponse,
|
|
8137
|
+
ImportFileConfig,
|
|
8138
|
+
ImportFileParameters,
|
|
8139
|
+
ImportFileResponse,
|
|
8140
|
+
ImportFileOperation,
|
|
7509
8141
|
ListFilesConfig,
|
|
7510
8142
|
ListFilesParameters,
|
|
7511
8143
|
FileStatus,
|
|
@@ -7528,6 +8160,7 @@ declare namespace types {
|
|
|
7528
8160
|
BatchJobDestination,
|
|
7529
8161
|
CreateBatchJobConfig,
|
|
7530
8162
|
CreateBatchJobParameters,
|
|
8163
|
+
CompletionStats,
|
|
7531
8164
|
BatchJob,
|
|
7532
8165
|
EmbedContentBatch,
|
|
7533
8166
|
EmbeddingsBatchJobSource,
|
|
@@ -7620,6 +8253,8 @@ declare namespace types {
|
|
|
7620
8253
|
CreateAuthTokenParameters,
|
|
7621
8254
|
OperationGetParameters,
|
|
7622
8255
|
CreateTuningJobParameters,
|
|
8256
|
+
UploadToFileSearchStoreResponse,
|
|
8257
|
+
UploadToFileSearchStoreOperation,
|
|
7623
8258
|
BlobImageUnion,
|
|
7624
8259
|
PartUnion,
|
|
7625
8260
|
PartListUnion,
|
|
@@ -7695,6 +8330,17 @@ declare interface Uploader {
|
|
|
7695
8330
|
* @return A Promise that resolves to types.File.
|
|
7696
8331
|
*/
|
|
7697
8332
|
upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<File_2>;
|
|
8333
|
+
/**
|
|
8334
|
+
* Uploads a file to file search store via the given upload url.
|
|
8335
|
+
*
|
|
8336
|
+
* @param file The file to upload. file is in string type or a Blob.
|
|
8337
|
+
* @param uploadUrl The upload URL as a string is where the file will be
|
|
8338
|
+
* uploaded to. The uploadUrl must be a url that was returned by the
|
|
8339
|
+
* https://generativelanguage.googleapis.com/upload/v1beta/{file_search_store_name}:uploadToFileSearchStore endpoint
|
|
8340
|
+
* @param apiClient The ApiClient to use for uploading.
|
|
8341
|
+
* @return A Promise that resolves to types.UploadToFileSearchStoreOperation.
|
|
8342
|
+
*/
|
|
8343
|
+
uploadToFileSearchStore(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<UploadToFileSearchStoreOperation>;
|
|
7698
8344
|
/**
|
|
7699
8345
|
* Returns the file's mimeType and the size of a given file. If the file is a
|
|
7700
8346
|
* string path, the file type is determined by the file extension. If the
|
|
@@ -7733,6 +8379,82 @@ export declare interface UploadFileParameters {
|
|
|
7733
8379
|
config?: UploadFileConfig;
|
|
7734
8380
|
}
|
|
7735
8381
|
|
|
8382
|
+
/** Optional parameters for uploading a file to a FileSearchStore. */
|
|
8383
|
+
export declare interface UploadToFileSearchStoreConfig {
|
|
8384
|
+
/** Used to override HTTP request options. */
|
|
8385
|
+
httpOptions?: HttpOptions;
|
|
8386
|
+
/** Abort signal which can be used to cancel the request.
|
|
8387
|
+
|
|
8388
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
8389
|
+
operation will not cancel the request in the service. You will still
|
|
8390
|
+
be charged usage for any applicable operations.
|
|
8391
|
+
*/
|
|
8392
|
+
abortSignal?: AbortSignal;
|
|
8393
|
+
/** MIME type of the file to be uploaded. If not provided, it will be inferred from the file extension. */
|
|
8394
|
+
mimeType?: string;
|
|
8395
|
+
/** Display name of the created document. */
|
|
8396
|
+
displayName?: string;
|
|
8397
|
+
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
8398
|
+
customMetadata?: CustomMetadata[];
|
|
8399
|
+
/** Config for telling the service how to chunk the file. */
|
|
8400
|
+
chunkingConfig?: ChunkingConfig;
|
|
8401
|
+
}
|
|
8402
|
+
|
|
8403
|
+
/** Long-running operation for uploading a file to a FileSearchStore. */
|
|
8404
|
+
export declare class UploadToFileSearchStoreOperation implements Operation<UploadToFileSearchStoreResponse> {
|
|
8405
|
+
/** 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}`. */
|
|
8406
|
+
name?: string;
|
|
8407
|
+
/** 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. */
|
|
8408
|
+
metadata?: Record<string, unknown>;
|
|
8409
|
+
/** 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. */
|
|
8410
|
+
done?: boolean;
|
|
8411
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
8412
|
+
error?: Record<string, unknown>;
|
|
8413
|
+
/** The result of the UploadToFileSearchStore operation, available when the operation is done. */
|
|
8414
|
+
response?: UploadToFileSearchStoreResponse;
|
|
8415
|
+
/**
|
|
8416
|
+
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
8417
|
+
* @internal
|
|
8418
|
+
*/
|
|
8419
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<UploadToFileSearchStoreResponse>;
|
|
8420
|
+
/** The full HTTP response. */
|
|
8421
|
+
sdkHttpResponse?: HttpResponse;
|
|
8422
|
+
}
|
|
8423
|
+
|
|
8424
|
+
/** Generates the parameters for the private _upload_to_file_search_store method. */
|
|
8425
|
+
export declare interface UploadToFileSearchStoreParameters {
|
|
8426
|
+
/** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
|
|
8427
|
+
fileSearchStoreName: string;
|
|
8428
|
+
/** Used to override the default configuration. */
|
|
8429
|
+
config?: UploadToFileSearchStoreConfig;
|
|
8430
|
+
}
|
|
8431
|
+
|
|
8432
|
+
/** Parameters for the upload file to file search store method. */
|
|
8433
|
+
export declare interface UploadToFileSearchStoreParameters {
|
|
8434
|
+
/** The name of the file search store to upload. */
|
|
8435
|
+
fileSearchStoreName: string;
|
|
8436
|
+
/** The string path to the file to be uploaded or a Blob object. */
|
|
8437
|
+
file: string | globalThis.Blob;
|
|
8438
|
+
/** Configuration that contains optional parameters. */
|
|
8439
|
+
config?: UploadToFileSearchStoreConfig;
|
|
8440
|
+
}
|
|
8441
|
+
|
|
8442
|
+
/** The response when long-running operation for uploading a file to a FileSearchStore complete. */
|
|
8443
|
+
export declare class UploadToFileSearchStoreResponse {
|
|
8444
|
+
/** Used to retain the full HTTP response. */
|
|
8445
|
+
sdkHttpResponse?: HttpResponse;
|
|
8446
|
+
/** The name of the FileSearchStore containing Documents. */
|
|
8447
|
+
parent?: string;
|
|
8448
|
+
/** The identifier for the Document imported. */
|
|
8449
|
+
documentName?: string;
|
|
8450
|
+
}
|
|
8451
|
+
|
|
8452
|
+
/** Response for the resumable upload method. */
|
|
8453
|
+
export declare class UploadToFileSearchStoreResumableResponse {
|
|
8454
|
+
/** Used to retain the full HTTP response. */
|
|
8455
|
+
sdkHttpResponse?: HttpResponse;
|
|
8456
|
+
}
|
|
8457
|
+
|
|
7736
8458
|
/** Configuration for upscaling an image.
|
|
7737
8459
|
|
|
7738
8460
|
For more information on this configuration, refer to
|
|
@@ -7750,6 +8472,10 @@ export declare interface UpscaleImageConfig {
|
|
|
7750
8472
|
abortSignal?: AbortSignal;
|
|
7751
8473
|
/** Cloud Storage URI used to store the generated images. */
|
|
7752
8474
|
outputGcsUri?: string;
|
|
8475
|
+
/** Filter level for safety filtering. */
|
|
8476
|
+
safetyFilterLevel?: SafetyFilterLevel;
|
|
8477
|
+
/** Allows generation of people by the model. */
|
|
8478
|
+
personGeneration?: PersonGeneration;
|
|
7753
8479
|
/** Whether to include a reason for filtered-out images in the
|
|
7754
8480
|
response. */
|
|
7755
8481
|
includeRaiReason?: boolean;
|
|
@@ -7790,19 +8516,19 @@ export declare class UpscaleImageResponse {
|
|
|
7790
8516
|
generatedImages?: GeneratedImage[];
|
|
7791
8517
|
}
|
|
7792
8518
|
|
|
7793
|
-
/** Tool to support URL context
|
|
8519
|
+
/** Tool to support URL context. */
|
|
7794
8520
|
export declare interface UrlContext {
|
|
7795
8521
|
}
|
|
7796
8522
|
|
|
7797
8523
|
/** Metadata related to url context retrieval tool. */
|
|
7798
8524
|
export declare interface UrlContextMetadata {
|
|
7799
|
-
/** List of url context. */
|
|
8525
|
+
/** Output only. List of url context. */
|
|
7800
8526
|
urlMetadata?: UrlMetadata[];
|
|
7801
8527
|
}
|
|
7802
8528
|
|
|
7803
|
-
/** Context
|
|
8529
|
+
/** Context of the a single url retrieval. */
|
|
7804
8530
|
export declare interface UrlMetadata {
|
|
7805
|
-
/**
|
|
8531
|
+
/** Retrieved url by the tool. */
|
|
7806
8532
|
retrievedUrl?: string;
|
|
7807
8533
|
/** Status of the url retrieval. */
|
|
7808
8534
|
urlRetrievalStatus?: UrlRetrievalStatus;
|
|
@@ -7811,7 +8537,7 @@ export declare interface UrlMetadata {
|
|
|
7811
8537
|
/** Status of the url retrieval. */
|
|
7812
8538
|
export declare enum UrlRetrievalStatus {
|
|
7813
8539
|
/**
|
|
7814
|
-
* Default value. This value is unused
|
|
8540
|
+
* Default value. This value is unused.
|
|
7815
8541
|
*/
|
|
7816
8542
|
URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
|
|
7817
8543
|
/**
|
|
@@ -7823,11 +8549,11 @@ export declare enum UrlRetrievalStatus {
|
|
|
7823
8549
|
*/
|
|
7824
8550
|
URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
|
|
7825
8551
|
/**
|
|
7826
|
-
* Url retrieval is failed because the content is behind paywall.
|
|
8552
|
+
* Url retrieval is failed because the content is behind paywall. This enum value is not supported in Vertex AI.
|
|
7827
8553
|
*/
|
|
7828
8554
|
URL_RETRIEVAL_STATUS_PAYWALL = "URL_RETRIEVAL_STATUS_PAYWALL",
|
|
7829
8555
|
/**
|
|
7830
|
-
* Url retrieval is failed because the content is unsafe.
|
|
8556
|
+
* Url retrieval is failed because the content is unsafe. This enum value is not supported in Vertex AI.
|
|
7831
8557
|
*/
|
|
7832
8558
|
URL_RETRIEVAL_STATUS_UNSAFE = "URL_RETRIEVAL_STATUS_UNSAFE"
|
|
7833
8559
|
}
|
|
@@ -8011,21 +8737,19 @@ export declare enum VideoGenerationReferenceType {
|
|
|
8011
8737
|
STYLE = "STYLE"
|
|
8012
8738
|
}
|
|
8013
8739
|
|
|
8014
|
-
/**
|
|
8740
|
+
/** Metadata describes the input video content. */
|
|
8015
8741
|
export declare interface VideoMetadata {
|
|
8016
|
-
/** The frame rate of the video sent to the model. If not specified, the
|
|
8017
|
-
default value will be 1.0. The fps range is (0.0, 24.0]. */
|
|
8018
|
-
fps?: number;
|
|
8019
8742
|
/** Optional. The end offset of the video. */
|
|
8020
8743
|
endOffset?: string;
|
|
8744
|
+
/** Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0]. */
|
|
8745
|
+
fps?: number;
|
|
8021
8746
|
/** Optional. The start offset of the video. */
|
|
8022
8747
|
startOffset?: string;
|
|
8023
8748
|
}
|
|
8024
8749
|
|
|
8025
8750
|
/** The configuration for the voice to use. */
|
|
8026
8751
|
export declare interface VoiceConfig {
|
|
8027
|
-
/** The configuration for the
|
|
8028
|
-
*/
|
|
8752
|
+
/** The configuration for the prebuilt voice to use. */
|
|
8029
8753
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
8030
8754
|
}
|
|
8031
8755
|
|
|
@@ -8076,4 +8800,12 @@ export declare interface WeightedPrompt {
|
|
|
8076
8800
|
weight?: number;
|
|
8077
8801
|
}
|
|
8078
8802
|
|
|
8803
|
+
/** Configuration for a white space chunking algorithm. */
|
|
8804
|
+
export declare interface WhiteSpaceConfig {
|
|
8805
|
+
/** Maximum number of tokens per chunk. */
|
|
8806
|
+
maxTokensPerChunk?: number;
|
|
8807
|
+
/** Maximum number of overlapping tokens between two adjacent chunks. */
|
|
8808
|
+
maxOverlapTokens?: number;
|
|
8809
|
+
}
|
|
8810
|
+
|
|
8079
8811
|
export { }
|