@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/web/web.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;
|
|
@@ -3368,6 +3743,7 @@ export declare class GoogleGenAI {
|
|
|
3368
3743
|
readonly operations: Operations;
|
|
3369
3744
|
readonly authTokens: Tokens;
|
|
3370
3745
|
readonly tunings: Tunings;
|
|
3746
|
+
readonly fileSearchStores: FileSearchStores;
|
|
3371
3747
|
constructor(options: GoogleGenAIOptions);
|
|
3372
3748
|
}
|
|
3373
3749
|
|
|
@@ -3434,9 +3810,9 @@ export declare interface GoogleGenAIOptions {
|
|
|
3434
3810
|
httpOptions?: HttpOptions;
|
|
3435
3811
|
}
|
|
3436
3812
|
|
|
3437
|
-
/** Tool to
|
|
3813
|
+
/** Tool to retrieve public maps data for grounding, powered by Google. */
|
|
3438
3814
|
export declare interface GoogleMaps {
|
|
3439
|
-
/**
|
|
3815
|
+
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
3440
3816
|
authConfig?: AuthConfig;
|
|
3441
3817
|
/** Optional. If true, include the widget context token in the response. */
|
|
3442
3818
|
enableWidget?: boolean;
|
|
@@ -3452,14 +3828,14 @@ export declare interface GoogleRpcStatus {
|
|
|
3452
3828
|
message?: string;
|
|
3453
3829
|
}
|
|
3454
3830
|
|
|
3455
|
-
/** Tool to support Google Search in Model. Powered by Google. */
|
|
3831
|
+
/** GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
3456
3832
|
export declare interface GoogleSearch {
|
|
3457
|
-
/** Optional. Filter search results to a specific time range.
|
|
3458
|
-
If customers set a start time, they must set an end time (and vice versa).
|
|
3459
|
-
*/
|
|
3460
|
-
timeRangeFilter?: Interval;
|
|
3461
3833
|
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. Example: ["amazon.com", "facebook.com"]. This field is not supported in Gemini API. */
|
|
3462
3834
|
excludeDomains?: string[];
|
|
3835
|
+
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
|
|
3836
|
+
blockingConfidence?: PhishBlockThreshold;
|
|
3837
|
+
/** Optional. Filter search results to a specific time range. If customers set a start time, they must set an end time (and vice versa). This field is not supported in Vertex AI. */
|
|
3838
|
+
timeRangeFilter?: Interval;
|
|
3463
3839
|
}
|
|
3464
3840
|
|
|
3465
3841
|
/** Tool to retrieve public web data for grounding, powered by Google. */
|
|
@@ -3494,11 +3870,11 @@ export declare interface GroundingChunkMaps {
|
|
|
3494
3870
|
placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
|
|
3495
3871
|
/** This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place. */
|
|
3496
3872
|
placeId?: string;
|
|
3497
|
-
/** Text of the
|
|
3873
|
+
/** Text of the place answer. */
|
|
3498
3874
|
text?: string;
|
|
3499
|
-
/** Title of the
|
|
3875
|
+
/** Title of the place. */
|
|
3500
3876
|
title?: string;
|
|
3501
|
-
/** URI reference of the
|
|
3877
|
+
/** URI reference of the place. */
|
|
3502
3878
|
uri?: string;
|
|
3503
3879
|
}
|
|
3504
3880
|
|
|
@@ -3600,7 +3976,7 @@ export declare interface GroundingSupport {
|
|
|
3600
3976
|
segment?: Segment;
|
|
3601
3977
|
}
|
|
3602
3978
|
|
|
3603
|
-
/**
|
|
3979
|
+
/** 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. */
|
|
3604
3980
|
export declare enum HarmBlockMethod {
|
|
3605
3981
|
/**
|
|
3606
3982
|
* The harm block method is unspecified.
|
|
@@ -3616,7 +3992,7 @@ export declare enum HarmBlockMethod {
|
|
|
3616
3992
|
PROBABILITY = "PROBABILITY"
|
|
3617
3993
|
}
|
|
3618
3994
|
|
|
3619
|
-
/**
|
|
3995
|
+
/** The harm block threshold. */
|
|
3620
3996
|
export declare enum HarmBlockThreshold {
|
|
3621
3997
|
/**
|
|
3622
3998
|
* Unspecified harm block threshold.
|
|
@@ -3644,7 +4020,7 @@ export declare enum HarmBlockThreshold {
|
|
|
3644
4020
|
OFF = "OFF"
|
|
3645
4021
|
}
|
|
3646
4022
|
|
|
3647
|
-
/**
|
|
4023
|
+
/** Harm category. */
|
|
3648
4024
|
export declare enum HarmCategory {
|
|
3649
4025
|
/**
|
|
3650
4026
|
* The harm category is unspecified.
|
|
@@ -3716,7 +4092,7 @@ export declare enum HarmProbability {
|
|
|
3716
4092
|
HIGH = "HIGH"
|
|
3717
4093
|
}
|
|
3718
4094
|
|
|
3719
|
-
/** Output only. Harm severity levels in the content. */
|
|
4095
|
+
/** Output only. Harm severity levels in the content. This enum is not supported in Gemini API. */
|
|
3720
4096
|
export declare enum HarmSeverity {
|
|
3721
4097
|
/**
|
|
3722
4098
|
* Harm severity unspecified.
|
|
@@ -3740,6 +4116,31 @@ export declare enum HarmSeverity {
|
|
|
3740
4116
|
HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
|
|
3741
4117
|
}
|
|
3742
4118
|
|
|
4119
|
+
/** The location of the API key. This enum is not supported in Gemini API. */
|
|
4120
|
+
export declare enum HttpElementLocation {
|
|
4121
|
+
HTTP_IN_UNSPECIFIED = "HTTP_IN_UNSPECIFIED",
|
|
4122
|
+
/**
|
|
4123
|
+
* Element is in the HTTP request query.
|
|
4124
|
+
*/
|
|
4125
|
+
HTTP_IN_QUERY = "HTTP_IN_QUERY",
|
|
4126
|
+
/**
|
|
4127
|
+
* Element is in the HTTP request header.
|
|
4128
|
+
*/
|
|
4129
|
+
HTTP_IN_HEADER = "HTTP_IN_HEADER",
|
|
4130
|
+
/**
|
|
4131
|
+
* Element is in the HTTP request path.
|
|
4132
|
+
*/
|
|
4133
|
+
HTTP_IN_PATH = "HTTP_IN_PATH",
|
|
4134
|
+
/**
|
|
4135
|
+
* Element is in the HTTP request body.
|
|
4136
|
+
*/
|
|
4137
|
+
HTTP_IN_BODY = "HTTP_IN_BODY",
|
|
4138
|
+
/**
|
|
4139
|
+
* Element is in the HTTP request cookie.
|
|
4140
|
+
*/
|
|
4141
|
+
HTTP_IN_COOKIE = "HTTP_IN_COOKIE"
|
|
4142
|
+
}
|
|
4143
|
+
|
|
3743
4144
|
/** HTTP options to be used in each of the requests. */
|
|
3744
4145
|
export declare interface HttpOptions {
|
|
3745
4146
|
/** The base URL for the AI platform service endpoint. */
|
|
@@ -3799,7 +4200,7 @@ declare interface HttpRequest {
|
|
|
3799
4200
|
/**
|
|
3800
4201
|
* Optional set of customizable configuration for HTTP requests.
|
|
3801
4202
|
*/
|
|
3802
|
-
httpOptions?: HttpOptions;
|
|
4203
|
+
httpOptions?: types.HttpOptions;
|
|
3803
4204
|
/**
|
|
3804
4205
|
* Optional abort signal which can be used to cancel the request.
|
|
3805
4206
|
*/
|
|
@@ -3837,6 +4238,10 @@ export declare interface ImageConfig {
|
|
|
3837
4238
|
/** Aspect ratio of the generated images. Supported values are
|
|
3838
4239
|
"1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
|
|
3839
4240
|
aspectRatio?: string;
|
|
4241
|
+
/** Optional. Specifies the size of generated images. Supported
|
|
4242
|
+
values are `1K`, `2K`, `4K`. If not specified, the model will use default
|
|
4243
|
+
value `1K`. */
|
|
4244
|
+
imageSize?: string;
|
|
3840
4245
|
}
|
|
3841
4246
|
|
|
3842
4247
|
/** Enum that specifies the language of the text in the prompt. */
|
|
@@ -3875,6 +4280,64 @@ export declare enum ImagePromptLanguage {
|
|
|
3875
4280
|
es = "es"
|
|
3876
4281
|
}
|
|
3877
4282
|
|
|
4283
|
+
/** Optional parameters for importing a file. */
|
|
4284
|
+
export declare interface ImportFileConfig {
|
|
4285
|
+
/** Used to override HTTP request options. */
|
|
4286
|
+
httpOptions?: HttpOptions;
|
|
4287
|
+
/** Abort signal which can be used to cancel the request.
|
|
4288
|
+
|
|
4289
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4290
|
+
operation will not cancel the request in the service. You will still
|
|
4291
|
+
be charged usage for any applicable operations.
|
|
4292
|
+
*/
|
|
4293
|
+
abortSignal?: AbortSignal;
|
|
4294
|
+
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
4295
|
+
customMetadata?: CustomMetadata[];
|
|
4296
|
+
/** Config for telling the service how to chunk the file. */
|
|
4297
|
+
chunkingConfig?: ChunkingConfig;
|
|
4298
|
+
}
|
|
4299
|
+
|
|
4300
|
+
/** Long-running operation for importing a file to a FileSearchStore. */
|
|
4301
|
+
export declare class ImportFileOperation implements Operation<ImportFileResponse> {
|
|
4302
|
+
/** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
|
|
4303
|
+
name?: string;
|
|
4304
|
+
/** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */
|
|
4305
|
+
metadata?: Record<string, unknown>;
|
|
4306
|
+
/** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
|
|
4307
|
+
done?: boolean;
|
|
4308
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
4309
|
+
error?: Record<string, unknown>;
|
|
4310
|
+
/** The result of the ImportFile operation, available when the operation is done. */
|
|
4311
|
+
response?: ImportFileResponse;
|
|
4312
|
+
/**
|
|
4313
|
+
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
4314
|
+
* @internal
|
|
4315
|
+
*/
|
|
4316
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<ImportFileResponse>;
|
|
4317
|
+
/** The full HTTP response. */
|
|
4318
|
+
sdkHttpResponse?: HttpResponse;
|
|
4319
|
+
}
|
|
4320
|
+
|
|
4321
|
+
/** Config for file_search_stores.import_file parameters. */
|
|
4322
|
+
export declare interface ImportFileParameters {
|
|
4323
|
+
/** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
|
|
4324
|
+
fileSearchStoreName: string;
|
|
4325
|
+
/** The name of the File API File to import. Example: `files/abc-123` */
|
|
4326
|
+
fileName: string;
|
|
4327
|
+
/** Optional parameters for the request. */
|
|
4328
|
+
config?: ImportFileConfig;
|
|
4329
|
+
}
|
|
4330
|
+
|
|
4331
|
+
/** Response for ImportFile to import a File API file with a file search store. */
|
|
4332
|
+
export declare class ImportFileResponse {
|
|
4333
|
+
/** Used to retain the full HTTP response. */
|
|
4334
|
+
sdkHttpResponse?: HttpResponse;
|
|
4335
|
+
/** The name of the FileSearchStore containing Documents. */
|
|
4336
|
+
parent?: string;
|
|
4337
|
+
/** The identifier for the Document imported. */
|
|
4338
|
+
documentName?: string;
|
|
4339
|
+
}
|
|
4340
|
+
|
|
3878
4341
|
/** Config for `inlined_embedding_responses` parameter. */
|
|
3879
4342
|
export declare class InlinedEmbedContentResponse {
|
|
3880
4343
|
/** The response to the request.
|
|
@@ -3910,17 +4373,12 @@ export declare class InlinedResponse {
|
|
|
3910
4373
|
error?: JobError;
|
|
3911
4374
|
}
|
|
3912
4375
|
|
|
3913
|
-
/** Represents a time interval, encoded as a start
|
|
3914
|
-
|
|
3915
|
-
The start time must be less than or equal to the end time.
|
|
3916
|
-
When the start equals the end time, the interval is an empty interval.
|
|
3917
|
-
(matches no time)
|
|
3918
|
-
When both start and end are unspecified, the interval matches any time. */
|
|
4376
|
+
/** 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. */
|
|
3919
4377
|
export declare interface Interval {
|
|
3920
|
-
/**
|
|
3921
|
-
startTime?: string;
|
|
3922
|
-
/** The end time of the interval. */
|
|
4378
|
+
/** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
|
|
3923
4379
|
endTime?: string;
|
|
4380
|
+
/** Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. */
|
|
4381
|
+
startTime?: string;
|
|
3924
4382
|
}
|
|
3925
4383
|
|
|
3926
4384
|
/** Job error. */
|
|
@@ -3985,7 +4443,7 @@ export declare enum JobState {
|
|
|
3985
4443
|
JOB_STATE_PARTIALLY_SUCCEEDED = "JOB_STATE_PARTIALLY_SUCCEEDED"
|
|
3986
4444
|
}
|
|
3987
4445
|
|
|
3988
|
-
/**
|
|
4446
|
+
/** Programming language of the `code`. */
|
|
3989
4447
|
export declare enum Language {
|
|
3990
4448
|
/**
|
|
3991
4449
|
* Unspecified language. This value should not be used.
|
|
@@ -4070,7 +4528,38 @@ export declare class ListCachedContentsResponse {
|
|
|
4070
4528
|
cachedContents?: CachedContent[];
|
|
4071
4529
|
}
|
|
4072
4530
|
|
|
4073
|
-
/**
|
|
4531
|
+
/** Config for optional parameters. */
|
|
4532
|
+
export declare interface ListDocumentsConfig {
|
|
4533
|
+
/** Used to override HTTP request options. */
|
|
4534
|
+
httpOptions?: HttpOptions;
|
|
4535
|
+
/** Abort signal which can be used to cancel the request.
|
|
4536
|
+
|
|
4537
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4538
|
+
operation will not cancel the request in the service. You will still
|
|
4539
|
+
be charged usage for any applicable operations.
|
|
4540
|
+
*/
|
|
4541
|
+
abortSignal?: AbortSignal;
|
|
4542
|
+
pageSize?: number;
|
|
4543
|
+
pageToken?: string;
|
|
4544
|
+
}
|
|
4545
|
+
|
|
4546
|
+
/** Config for documents.list parameters. */
|
|
4547
|
+
export declare interface ListDocumentsParameters {
|
|
4548
|
+
/** The resource name of the FileSearchStores. Example: `fileSearchStore/file-search-store-foo` */
|
|
4549
|
+
parent: string;
|
|
4550
|
+
config?: ListDocumentsConfig;
|
|
4551
|
+
}
|
|
4552
|
+
|
|
4553
|
+
/** Config for documents.list return value. */
|
|
4554
|
+
export declare class ListDocumentsResponse {
|
|
4555
|
+
/** Used to retain the full HTTP response. */
|
|
4556
|
+
sdkHttpResponse?: HttpResponse;
|
|
4557
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages. */
|
|
4558
|
+
nextPageToken?: string;
|
|
4559
|
+
/** The returned `Document`s. */
|
|
4560
|
+
documents?: Document_2[];
|
|
4561
|
+
}
|
|
4562
|
+
|
|
4074
4563
|
export declare interface ListFilesConfig {
|
|
4075
4564
|
/** Used to override HTTP request options. */
|
|
4076
4565
|
httpOptions?: HttpOptions;
|
|
@@ -4085,6 +4574,36 @@ export declare interface ListFilesConfig {
|
|
|
4085
4574
|
pageToken?: string;
|
|
4086
4575
|
}
|
|
4087
4576
|
|
|
4577
|
+
/** Optional parameters for listing FileSearchStore. */
|
|
4578
|
+
export declare interface ListFileSearchStoresConfig {
|
|
4579
|
+
/** Used to override HTTP request options. */
|
|
4580
|
+
httpOptions?: HttpOptions;
|
|
4581
|
+
/** Abort signal which can be used to cancel the request.
|
|
4582
|
+
|
|
4583
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4584
|
+
operation will not cancel the request in the service. You will still
|
|
4585
|
+
be charged usage for any applicable operations.
|
|
4586
|
+
*/
|
|
4587
|
+
abortSignal?: AbortSignal;
|
|
4588
|
+
pageSize?: number;
|
|
4589
|
+
pageToken?: string;
|
|
4590
|
+
}
|
|
4591
|
+
|
|
4592
|
+
/** Config for file_search_stores.list parameters. */
|
|
4593
|
+
export declare interface ListFileSearchStoresParameters {
|
|
4594
|
+
/** Optional parameters for the list request. */
|
|
4595
|
+
config?: ListFileSearchStoresConfig;
|
|
4596
|
+
}
|
|
4597
|
+
|
|
4598
|
+
/** Config for file_search_stores.list return value. */
|
|
4599
|
+
export declare class ListFileSearchStoresResponse {
|
|
4600
|
+
/** Used to retain the full HTTP response. */
|
|
4601
|
+
sdkHttpResponse?: HttpResponse;
|
|
4602
|
+
nextPageToken?: string;
|
|
4603
|
+
/** The returned file search stores. */
|
|
4604
|
+
fileSearchStores?: FileSearchStore[];
|
|
4605
|
+
}
|
|
4606
|
+
|
|
4088
4607
|
/** Generates the parameters for the list method. */
|
|
4089
4608
|
export declare interface ListFilesParameters {
|
|
4090
4609
|
/** Used to override the default configuration. */
|
|
@@ -5494,9 +6013,9 @@ export declare interface ModelSelectionConfig {
|
|
|
5494
6013
|
featureSelectionPreference?: FeatureSelectionPreference;
|
|
5495
6014
|
}
|
|
5496
6015
|
|
|
5497
|
-
/** The configuration for the multi-speaker setup. */
|
|
6016
|
+
/** The configuration for the multi-speaker setup. This data type is not supported in Vertex AI. */
|
|
5498
6017
|
export declare interface MultiSpeakerVoiceConfig {
|
|
5499
|
-
/**
|
|
6018
|
+
/** Required. All the enabled speaker voices. */
|
|
5500
6019
|
speakerVoiceConfigs?: SpeakerVoiceConfig[];
|
|
5501
6020
|
}
|
|
5502
6021
|
|
|
@@ -5539,7 +6058,7 @@ export declare interface Operation<T> {
|
|
|
5539
6058
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
5540
6059
|
* @internal
|
|
5541
6060
|
*/
|
|
5542
|
-
_fromAPIResponse({ apiResponse,
|
|
6061
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<T>;
|
|
5543
6062
|
}
|
|
5544
6063
|
|
|
5545
6064
|
/** Parameters of the fromAPIResponse method of the Operation class. */
|
|
@@ -5547,7 +6066,7 @@ export declare interface OperationFromAPIResponseParameters {
|
|
|
5547
6066
|
/** The API response to be converted to an Operation. */
|
|
5548
6067
|
apiResponse: Record<string, unknown>;
|
|
5549
6068
|
/** Whether the API response is from Vertex AI. */
|
|
5550
|
-
|
|
6069
|
+
_isVertexAI: boolean;
|
|
5551
6070
|
}
|
|
5552
6071
|
|
|
5553
6072
|
/** Parameters for the get method of the operations module. */
|
|
@@ -5579,7 +6098,7 @@ export declare class Operations extends BaseModule {
|
|
|
5579
6098
|
private fetchPredictVideosOperationInternal;
|
|
5580
6099
|
}
|
|
5581
6100
|
|
|
5582
|
-
/**
|
|
6101
|
+
/** Outcome of the code execution. */
|
|
5583
6102
|
export declare enum Outcome {
|
|
5584
6103
|
/**
|
|
5585
6104
|
* Unspecified status. This value should not be used.
|
|
@@ -5604,10 +6123,13 @@ export declare enum PagedItem {
|
|
|
5604
6123
|
PAGED_ITEM_MODELS = "models",
|
|
5605
6124
|
PAGED_ITEM_TUNING_JOBS = "tuningJobs",
|
|
5606
6125
|
PAGED_ITEM_FILES = "files",
|
|
5607
|
-
PAGED_ITEM_CACHED_CONTENTS = "cachedContents"
|
|
6126
|
+
PAGED_ITEM_CACHED_CONTENTS = "cachedContents",
|
|
6127
|
+
PAGED_ITEM_FILE_SEARCH_STORES = "fileSearchStores",
|
|
6128
|
+
PAGED_ITEM_DOCUMENTS = "documents"
|
|
5608
6129
|
}
|
|
5609
6130
|
|
|
5610
6131
|
declare interface PagedItemConfig {
|
|
6132
|
+
parent?: string;
|
|
5611
6133
|
config?: {
|
|
5612
6134
|
pageToken?: string;
|
|
5613
6135
|
pageSize?: number;
|
|
@@ -5622,6 +6144,8 @@ declare interface PagedItemResponse<T> {
|
|
|
5622
6144
|
tuningJobs?: T[];
|
|
5623
6145
|
files?: T[];
|
|
5624
6146
|
cachedContents?: T[];
|
|
6147
|
+
fileSearchStores?: T[];
|
|
6148
|
+
documents?: T[];
|
|
5625
6149
|
}
|
|
5626
6150
|
|
|
5627
6151
|
/**
|
|
@@ -5730,17 +6254,6 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
5730
6254
|
of content being conveyed. Using multiple fields within the same `Part`
|
|
5731
6255
|
instance is considered invalid. */
|
|
5732
6256
|
export declare interface Part {
|
|
5733
|
-
/** Metadata for a given video. */
|
|
5734
|
-
videoMetadata?: VideoMetadata;
|
|
5735
|
-
/** Indicates if the part is thought from the model. */
|
|
5736
|
-
thought?: boolean;
|
|
5737
|
-
/** Optional. Inlined bytes data. */
|
|
5738
|
-
inlineData?: Blob_2;
|
|
5739
|
-
/** Optional. URI based data. */
|
|
5740
|
-
fileData?: FileData;
|
|
5741
|
-
/** An opaque signature for the thought so it can be reused in subsequent requests.
|
|
5742
|
-
* @remarks Encoded as base64 string. */
|
|
5743
|
-
thoughtSignature?: string;
|
|
5744
6257
|
/** A predicted [FunctionCall] returned from the model that contains a string
|
|
5745
6258
|
representing the [FunctionDeclaration.name] and a structured JSON object
|
|
5746
6259
|
containing the parameters and their values. */
|
|
@@ -5749,10 +6262,21 @@ export declare interface Part {
|
|
|
5749
6262
|
codeExecutionResult?: CodeExecutionResult;
|
|
5750
6263
|
/** Optional. Code generated by the model that is meant to be executed. */
|
|
5751
6264
|
executableCode?: ExecutableCode;
|
|
6265
|
+
/** Optional. URI based data. */
|
|
6266
|
+
fileData?: FileData;
|
|
5752
6267
|
/** 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. */
|
|
5753
6268
|
functionResponse?: FunctionResponse;
|
|
6269
|
+
/** Optional. Inlined bytes data. */
|
|
6270
|
+
inlineData?: Blob_2;
|
|
5754
6271
|
/** Optional. Text part (can be code). */
|
|
5755
6272
|
text?: string;
|
|
6273
|
+
/** Optional. Indicates if the part is thought from the model. */
|
|
6274
|
+
thought?: boolean;
|
|
6275
|
+
/** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
|
|
6276
|
+
* @remarks Encoded as base64 string. */
|
|
6277
|
+
thoughtSignature?: string;
|
|
6278
|
+
/** Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. */
|
|
6279
|
+
videoMetadata?: VideoMetadata;
|
|
5756
6280
|
}
|
|
5757
6281
|
|
|
5758
6282
|
export declare type PartListUnion = PartUnion[] | PartUnion;
|
|
@@ -5785,9 +6309,41 @@ export declare enum PersonGeneration {
|
|
|
5785
6309
|
ALLOW_ALL = "ALLOW_ALL"
|
|
5786
6310
|
}
|
|
5787
6311
|
|
|
6312
|
+
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
6313
|
+
export declare enum PhishBlockThreshold {
|
|
6314
|
+
/**
|
|
6315
|
+
* Defaults to unspecified.
|
|
6316
|
+
*/
|
|
6317
|
+
PHISH_BLOCK_THRESHOLD_UNSPECIFIED = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
6318
|
+
/**
|
|
6319
|
+
* Blocks Low and above confidence URL that is risky.
|
|
6320
|
+
*/
|
|
6321
|
+
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
|
|
6322
|
+
/**
|
|
6323
|
+
* Blocks Medium and above confidence URL that is risky.
|
|
6324
|
+
*/
|
|
6325
|
+
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
|
|
6326
|
+
/**
|
|
6327
|
+
* Blocks High and above confidence URL that is risky.
|
|
6328
|
+
*/
|
|
6329
|
+
BLOCK_HIGH_AND_ABOVE = "BLOCK_HIGH_AND_ABOVE",
|
|
6330
|
+
/**
|
|
6331
|
+
* Blocks Higher and above confidence URL that is risky.
|
|
6332
|
+
*/
|
|
6333
|
+
BLOCK_HIGHER_AND_ABOVE = "BLOCK_HIGHER_AND_ABOVE",
|
|
6334
|
+
/**
|
|
6335
|
+
* Blocks Very high and above confidence URL that is risky.
|
|
6336
|
+
*/
|
|
6337
|
+
BLOCK_VERY_HIGH_AND_ABOVE = "BLOCK_VERY_HIGH_AND_ABOVE",
|
|
6338
|
+
/**
|
|
6339
|
+
* Blocks Extremely high confidence URL that is risky.
|
|
6340
|
+
*/
|
|
6341
|
+
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
6342
|
+
}
|
|
6343
|
+
|
|
5788
6344
|
/** The configuration for the prebuilt speaker to use. */
|
|
5789
6345
|
export declare interface PrebuiltVoiceConfig {
|
|
5790
|
-
/** The name of the
|
|
6346
|
+
/** The name of the preset voice to use. */
|
|
5791
6347
|
voiceName?: string;
|
|
5792
6348
|
}
|
|
5793
6349
|
|
|
@@ -5811,6 +6367,30 @@ export declare interface PreferenceOptimizationDataStats {
|
|
|
5811
6367
|
userOutputTokenDistribution?: DatasetDistribution;
|
|
5812
6368
|
}
|
|
5813
6369
|
|
|
6370
|
+
/** Hyperparameters for Preference Optimization. This data type is not supported in Gemini API. */
|
|
6371
|
+
export declare interface PreferenceOptimizationHyperParameters {
|
|
6372
|
+
/** Optional. Adapter size for preference optimization. */
|
|
6373
|
+
adapterSize?: AdapterSize;
|
|
6374
|
+
/** Optional. Weight for KL Divergence regularization. */
|
|
6375
|
+
beta?: number;
|
|
6376
|
+
/** Optional. Number of complete passes the model makes over the entire training dataset during training. */
|
|
6377
|
+
epochCount?: string;
|
|
6378
|
+
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
6379
|
+
learningRateMultiplier?: number;
|
|
6380
|
+
}
|
|
6381
|
+
|
|
6382
|
+
/** Preference optimization tuning spec for tuning. */
|
|
6383
|
+
export declare interface PreferenceOptimizationSpec {
|
|
6384
|
+
/** 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. */
|
|
6385
|
+
exportLastCheckpointOnly?: boolean;
|
|
6386
|
+
/** Optional. Hyperparameters for Preference Optimization. */
|
|
6387
|
+
hyperParameters?: PreferenceOptimizationHyperParameters;
|
|
6388
|
+
/** Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
|
|
6389
|
+
trainingDatasetUri?: string;
|
|
6390
|
+
/** Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
|
|
6391
|
+
validationDatasetUri?: string;
|
|
6392
|
+
}
|
|
6393
|
+
|
|
5814
6394
|
/** A pre-tuned model for continuous tuning. This data type is not supported in Gemini API. */
|
|
5815
6395
|
export declare interface PreTunedModel {
|
|
5816
6396
|
/** Output only. The name of the base model this PreTunedModel was tuned from. */
|
|
@@ -6094,13 +6674,13 @@ export declare interface SafetyRating {
|
|
|
6094
6674
|
blocked?: boolean;
|
|
6095
6675
|
/** Output only. Harm category. */
|
|
6096
6676
|
category?: HarmCategory;
|
|
6097
|
-
/** 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. */
|
|
6677
|
+
/** 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. */
|
|
6098
6678
|
overwrittenThreshold?: HarmBlockThreshold;
|
|
6099
6679
|
/** Output only. Harm probability levels in the content. */
|
|
6100
6680
|
probability?: HarmProbability;
|
|
6101
6681
|
/** Output only. Harm probability score. This field is not supported in Gemini API. */
|
|
6102
6682
|
probabilityScore?: number;
|
|
6103
|
-
/** Output only. Harm severity levels in the content. */
|
|
6683
|
+
/** Output only. Harm severity levels in the content. This field is not supported in Gemini API. */
|
|
6104
6684
|
severity?: HarmSeverity;
|
|
6105
6685
|
/** Output only. Harm severity score. This field is not supported in Gemini API. */
|
|
6106
6686
|
severityScore?: number;
|
|
@@ -6108,11 +6688,10 @@ export declare interface SafetyRating {
|
|
|
6108
6688
|
|
|
6109
6689
|
/** Safety settings. */
|
|
6110
6690
|
export declare interface SafetySetting {
|
|
6111
|
-
/** Determines if the harm block method uses probability or probability
|
|
6112
|
-
and severity scores. */
|
|
6113
|
-
method?: HarmBlockMethod;
|
|
6114
6691
|
/** Required. Harm category. */
|
|
6115
6692
|
category?: HarmCategory;
|
|
6693
|
+
/** 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. */
|
|
6694
|
+
method?: HarmBlockMethod;
|
|
6116
6695
|
/** Required. The harm block threshold. */
|
|
6117
6696
|
threshold?: HarmBlockThreshold;
|
|
6118
6697
|
}
|
|
@@ -6526,28 +7105,22 @@ export declare interface SlidingWindow {
|
|
|
6526
7105
|
targetTokens?: string;
|
|
6527
7106
|
}
|
|
6528
7107
|
|
|
6529
|
-
/**
|
|
7108
|
+
/** Configuration for a single speaker in a multi speaker setup. */
|
|
6530
7109
|
export declare interface SpeakerVoiceConfig {
|
|
6531
|
-
/** The name of the speaker
|
|
6532
|
-
prompt. */
|
|
7110
|
+
/** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
|
|
6533
7111
|
speaker?: string;
|
|
6534
|
-
/** The configuration for the voice
|
|
7112
|
+
/** Required. The configuration for the voice of this speaker. */
|
|
6535
7113
|
voiceConfig?: VoiceConfig;
|
|
6536
7114
|
}
|
|
6537
7115
|
|
|
6538
|
-
/** The speech generation
|
|
7116
|
+
/** The speech generation config. */
|
|
6539
7117
|
export declare interface SpeechConfig {
|
|
6540
|
-
/**
|
|
6541
|
-
|
|
7118
|
+
/** Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization. */
|
|
7119
|
+
languageCode?: string;
|
|
7120
|
+
/** The configuration for the speaker to use. */
|
|
6542
7121
|
voiceConfig?: VoiceConfig;
|
|
6543
|
-
/** The configuration for the multi-speaker setup.
|
|
6544
|
-
It is mutually exclusive with the voice_config field.
|
|
6545
|
-
*/
|
|
7122
|
+
/** 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. */
|
|
6546
7123
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
6547
|
-
/** Language code (ISO 639. e.g. en-US) for the speech synthesization.
|
|
6548
|
-
Only available for Live API.
|
|
6549
|
-
*/
|
|
6550
|
-
languageCode?: string;
|
|
6551
7124
|
}
|
|
6552
7125
|
|
|
6553
7126
|
export declare type SpeechConfigUnion = SpeechConfig | string;
|
|
@@ -6568,6 +7141,12 @@ export declare enum StartSensitivity {
|
|
|
6568
7141
|
START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
|
|
6569
7142
|
}
|
|
6570
7143
|
|
|
7144
|
+
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
7145
|
+
export declare interface StringList {
|
|
7146
|
+
/** The string values of the metadata to store. */
|
|
7147
|
+
values?: string[];
|
|
7148
|
+
}
|
|
7149
|
+
|
|
6571
7150
|
/** Configuration for a Style reference image. */
|
|
6572
7151
|
export declare interface StyleReferenceConfig {
|
|
6573
7152
|
/** A text description of the style to use for the generated image. */
|
|
@@ -6703,7 +7282,7 @@ export declare interface SupervisedTuningDataStats {
|
|
|
6703
7282
|
userOutputTokenDistribution?: SupervisedTuningDatasetDistribution;
|
|
6704
7283
|
}
|
|
6705
7284
|
|
|
6706
|
-
/**
|
|
7285
|
+
/** Supervised tuning spec for tuning. */
|
|
6707
7286
|
export declare interface SupervisedTuningSpec {
|
|
6708
7287
|
/** 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. */
|
|
6709
7288
|
exportLastCheckpointOnly?: boolean;
|
|
@@ -6859,25 +7438,24 @@ export declare interface Tool {
|
|
|
6859
7438
|
functionDeclarations?: FunctionDeclaration[];
|
|
6860
7439
|
/** 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. */
|
|
6861
7440
|
retrieval?: Retrieval;
|
|
6862
|
-
/** Optional.
|
|
6863
|
-
that is powered by Google Search. */
|
|
6864
|
-
googleSearch?: GoogleSearch;
|
|
6865
|
-
/** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */
|
|
7441
|
+
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
6866
7442
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
6867
|
-
/** Optional. Enterprise web search tool type. Specialized retrieval
|
|
6868
|
-
tool that is powered by Vertex AI Search and Sec4 compliance. */
|
|
6869
|
-
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
6870
|
-
/** Optional. Google Maps tool type. Specialized retrieval tool
|
|
6871
|
-
that is powered by Google Maps. */
|
|
6872
|
-
googleMaps?: GoogleMaps;
|
|
6873
|
-
/** Optional. Tool to support URL context retrieval. */
|
|
6874
|
-
urlContext?: UrlContext;
|
|
6875
7443
|
/** Optional. Tool to support the model interacting directly with the
|
|
6876
7444
|
computer. If enabled, it automatically populates computer-use specific
|
|
6877
7445
|
Function Declarations. */
|
|
6878
7446
|
computerUse?: ComputerUse;
|
|
7447
|
+
/** Optional. Tool to retrieve knowledge from the File Search Stores. */
|
|
7448
|
+
fileSearch?: FileSearch;
|
|
6879
7449
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
6880
7450
|
codeExecution?: ToolCodeExecution;
|
|
7451
|
+
/** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
|
|
7452
|
+
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
7453
|
+
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
7454
|
+
googleMaps?: GoogleMaps;
|
|
7455
|
+
/** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
7456
|
+
googleSearch?: GoogleSearch;
|
|
7457
|
+
/** Optional. Tool to support URL context retrieval. */
|
|
7458
|
+
urlContext?: UrlContext;
|
|
6881
7459
|
}
|
|
6882
7460
|
|
|
6883
7461
|
/** 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. */
|
|
@@ -6898,14 +7476,14 @@ export declare type ToolListUnion = ToolUnion[];
|
|
|
6898
7476
|
|
|
6899
7477
|
export declare type ToolUnion = Tool | CallableTool;
|
|
6900
7478
|
|
|
6901
|
-
/** Output only.
|
|
7479
|
+
/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
|
|
6902
7480
|
export declare enum TrafficType {
|
|
6903
7481
|
/**
|
|
6904
7482
|
* Unspecified request traffic type.
|
|
6905
7483
|
*/
|
|
6906
7484
|
TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED",
|
|
6907
7485
|
/**
|
|
6908
|
-
*
|
|
7486
|
+
* The request was processed using Pay-As-You-Go quota.
|
|
6909
7487
|
*/
|
|
6910
7488
|
ON_DEMAND = "ON_DEMAND",
|
|
6911
7489
|
/**
|
|
@@ -7026,6 +7604,8 @@ export declare interface TuningJob {
|
|
|
7026
7604
|
preTunedModel?: PreTunedModel;
|
|
7027
7605
|
/** Tuning Spec for Supervised Fine Tuning. */
|
|
7028
7606
|
supervisedTuningSpec?: SupervisedTuningSpec;
|
|
7607
|
+
/** Tuning Spec for Preference Optimization. */
|
|
7608
|
+
preferenceOptimizationSpec?: PreferenceOptimizationSpec;
|
|
7029
7609
|
/** Output only. The tuning data statistics associated with this TuningJob. */
|
|
7030
7610
|
tuningDataStats?: TuningDataStats;
|
|
7031
7611
|
/** 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. */
|
|
@@ -7044,13 +7624,25 @@ export declare interface TuningJob {
|
|
|
7044
7624
|
pipelineJob?: string;
|
|
7045
7625
|
/** 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. */
|
|
7046
7626
|
serviceAccount?: string;
|
|
7047
|
-
/** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
|
|
7627
|
+
/** 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. */
|
|
7048
7628
|
tunedModelDisplayName?: string;
|
|
7049
7629
|
/** Tuning Spec for Veo Tuning. */
|
|
7050
7630
|
veoTuningSpec?: VeoTuningSpec;
|
|
7051
7631
|
}
|
|
7052
7632
|
|
|
7053
|
-
/**
|
|
7633
|
+
/** Enum representing the tuning method. */
|
|
7634
|
+
export declare enum TuningMethod {
|
|
7635
|
+
/**
|
|
7636
|
+
* Supervised fine tuning.
|
|
7637
|
+
*/
|
|
7638
|
+
SUPERVISED_FINE_TUNING = "SUPERVISED_FINE_TUNING",
|
|
7639
|
+
/**
|
|
7640
|
+
* Preference optimization tuning.
|
|
7641
|
+
*/
|
|
7642
|
+
PREFERENCE_TUNING = "PREFERENCE_TUNING"
|
|
7643
|
+
}
|
|
7644
|
+
|
|
7645
|
+
/** Tuning mode. This enum is not supported in Gemini API. */
|
|
7054
7646
|
export declare enum TuningMode {
|
|
7055
7647
|
/**
|
|
7056
7648
|
* Tuning mode is unspecified.
|
|
@@ -7131,7 +7723,7 @@ declare class Tunings extends BaseModule {
|
|
|
7131
7723
|
private tuneMldevInternal;
|
|
7132
7724
|
}
|
|
7133
7725
|
|
|
7134
|
-
/**
|
|
7726
|
+
/** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
|
|
7135
7727
|
export declare enum TuningTask {
|
|
7136
7728
|
/**
|
|
7137
7729
|
* Default value. This value is unused.
|
|
@@ -7144,7 +7736,11 @@ export declare enum TuningTask {
|
|
|
7144
7736
|
/**
|
|
7145
7737
|
* Tuning task for text to video.
|
|
7146
7738
|
*/
|
|
7147
|
-
TUNING_TASK_T2V = "TUNING_TASK_T2V"
|
|
7739
|
+
TUNING_TASK_T2V = "TUNING_TASK_T2V",
|
|
7740
|
+
/**
|
|
7741
|
+
* Tuning task for reference to video.
|
|
7742
|
+
*/
|
|
7743
|
+
TUNING_TASK_R2V = "TUNING_TASK_R2V"
|
|
7148
7744
|
}
|
|
7149
7745
|
|
|
7150
7746
|
export declare interface TuningValidationDataset {
|
|
@@ -7190,7 +7786,7 @@ export declare enum TurnCoverage {
|
|
|
7190
7786
|
TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
|
|
7191
7787
|
}
|
|
7192
7788
|
|
|
7193
|
-
/**
|
|
7789
|
+
/** The type of the data. */
|
|
7194
7790
|
export declare enum Type {
|
|
7195
7791
|
/**
|
|
7196
7792
|
* Not specified, should not be used.
|
|
@@ -7243,23 +7839,25 @@ declare namespace types {
|
|
|
7243
7839
|
Language,
|
|
7244
7840
|
FunctionResponseScheduling,
|
|
7245
7841
|
Type,
|
|
7842
|
+
Mode,
|
|
7843
|
+
ApiSpec,
|
|
7844
|
+
AuthType,
|
|
7845
|
+
HttpElementLocation,
|
|
7846
|
+
PhishBlockThreshold,
|
|
7246
7847
|
HarmCategory,
|
|
7247
7848
|
HarmBlockMethod,
|
|
7248
7849
|
HarmBlockThreshold,
|
|
7249
|
-
Mode,
|
|
7250
|
-
AuthType,
|
|
7251
|
-
ApiSpec,
|
|
7252
|
-
UrlRetrievalStatus,
|
|
7253
7850
|
FinishReason,
|
|
7254
7851
|
HarmProbability,
|
|
7255
7852
|
HarmSeverity,
|
|
7853
|
+
UrlRetrievalStatus,
|
|
7256
7854
|
BlockedReason,
|
|
7257
7855
|
TrafficType,
|
|
7258
7856
|
Modality,
|
|
7259
7857
|
MediaResolution,
|
|
7260
|
-
JobState,
|
|
7261
7858
|
TuningMode,
|
|
7262
7859
|
AdapterSize,
|
|
7860
|
+
JobState,
|
|
7263
7861
|
TuningTask,
|
|
7264
7862
|
FeatureSelectionPreference,
|
|
7265
7863
|
Behavior,
|
|
@@ -7277,6 +7875,8 @@ declare namespace types {
|
|
|
7277
7875
|
VideoGenerationReferenceType,
|
|
7278
7876
|
VideoGenerationMaskMode,
|
|
7279
7877
|
VideoCompressionQuality,
|
|
7878
|
+
TuningMethod,
|
|
7879
|
+
DocumentState,
|
|
7280
7880
|
FileState,
|
|
7281
7881
|
FileSource,
|
|
7282
7882
|
TurnCompleteReason,
|
|
@@ -7288,39 +7888,34 @@ declare namespace types {
|
|
|
7288
7888
|
Scale,
|
|
7289
7889
|
MusicGenerationMode,
|
|
7290
7890
|
LiveMusicPlaybackControl,
|
|
7291
|
-
VideoMetadata,
|
|
7292
|
-
Blob_2 as Blob,
|
|
7293
|
-
FileData,
|
|
7294
7891
|
FunctionCall,
|
|
7295
7892
|
CodeExecutionResult,
|
|
7296
7893
|
ExecutableCode,
|
|
7894
|
+
FileData,
|
|
7297
7895
|
FunctionResponseBlob,
|
|
7298
7896
|
FunctionResponseFileData,
|
|
7299
7897
|
FunctionResponsePart,
|
|
7300
7898
|
FunctionResponse,
|
|
7899
|
+
Blob_2 as Blob,
|
|
7900
|
+
VideoMetadata,
|
|
7301
7901
|
Part,
|
|
7302
7902
|
Content,
|
|
7303
7903
|
HttpOptions,
|
|
7304
7904
|
Schema,
|
|
7305
7905
|
ModelSelectionConfig,
|
|
7306
|
-
SafetySetting,
|
|
7307
7906
|
FunctionDeclaration,
|
|
7308
|
-
Interval,
|
|
7309
|
-
GoogleSearch,
|
|
7310
7907
|
DynamicRetrievalConfig,
|
|
7311
7908
|
GoogleSearchRetrieval,
|
|
7312
|
-
|
|
7909
|
+
ComputerUse,
|
|
7910
|
+
FileSearch,
|
|
7911
|
+
ApiAuthApiKeyConfig,
|
|
7912
|
+
ApiAuth,
|
|
7313
7913
|
ApiKeyConfig,
|
|
7314
7914
|
AuthConfigGoogleServiceAccountConfig,
|
|
7315
7915
|
AuthConfigHttpBasicAuthConfig,
|
|
7316
7916
|
AuthConfigOauthConfig,
|
|
7317
7917
|
AuthConfigOidcConfig,
|
|
7318
7918
|
AuthConfig,
|
|
7319
|
-
GoogleMaps,
|
|
7320
|
-
UrlContext,
|
|
7321
|
-
ComputerUse,
|
|
7322
|
-
ApiAuthApiKeyConfig,
|
|
7323
|
-
ApiAuth,
|
|
7324
7919
|
ExternalApiElasticSearchParams,
|
|
7325
7920
|
ExternalApiSimpleSearchParams,
|
|
7326
7921
|
ExternalApi,
|
|
@@ -7336,22 +7931,23 @@ declare namespace types {
|
|
|
7336
7931
|
VertexRagStore,
|
|
7337
7932
|
Retrieval,
|
|
7338
7933
|
ToolCodeExecution,
|
|
7934
|
+
EnterpriseWebSearch,
|
|
7935
|
+
GoogleMaps,
|
|
7936
|
+
Interval,
|
|
7937
|
+
GoogleSearch,
|
|
7938
|
+
UrlContext,
|
|
7339
7939
|
Tool,
|
|
7340
7940
|
FunctionCallingConfig,
|
|
7341
7941
|
LatLng,
|
|
7342
7942
|
RetrievalConfig,
|
|
7343
7943
|
ToolConfig,
|
|
7344
|
-
PrebuiltVoiceConfig,
|
|
7345
|
-
VoiceConfig,
|
|
7346
|
-
SpeakerVoiceConfig,
|
|
7347
|
-
MultiSpeakerVoiceConfig,
|
|
7348
|
-
SpeechConfig,
|
|
7349
7944
|
AutomaticFunctionCallingConfig,
|
|
7350
7945
|
ThinkingConfig,
|
|
7351
7946
|
ImageConfig,
|
|
7352
7947
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
7353
7948
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
7354
7949
|
GenerationConfigRoutingConfig,
|
|
7950
|
+
SafetySetting,
|
|
7355
7951
|
GenerateContentConfig,
|
|
7356
7952
|
GenerateContentParameters,
|
|
7357
7953
|
HttpResponse,
|
|
@@ -7359,8 +7955,6 @@ declare namespace types {
|
|
|
7359
7955
|
GoogleTypeDate,
|
|
7360
7956
|
Citation,
|
|
7361
7957
|
CitationMetadata,
|
|
7362
|
-
UrlMetadata,
|
|
7363
|
-
UrlContextMetadata,
|
|
7364
7958
|
GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
|
|
7365
7959
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
|
|
7366
7960
|
GroundingChunkMapsPlaceAnswerSources,
|
|
@@ -7380,6 +7974,8 @@ declare namespace types {
|
|
|
7380
7974
|
LogprobsResultTopCandidates,
|
|
7381
7975
|
LogprobsResult,
|
|
7382
7976
|
SafetyRating,
|
|
7977
|
+
UrlMetadata,
|
|
7978
|
+
UrlContextMetadata,
|
|
7383
7979
|
Candidate,
|
|
7384
7980
|
GenerateContentResponsePromptFeedback,
|
|
7385
7981
|
ModalityTokenCount,
|
|
@@ -7432,6 +8028,11 @@ declare namespace types {
|
|
|
7432
8028
|
DeleteModelConfig,
|
|
7433
8029
|
DeleteModelParameters,
|
|
7434
8030
|
DeleteModelResponse,
|
|
8031
|
+
PrebuiltVoiceConfig,
|
|
8032
|
+
VoiceConfig,
|
|
8033
|
+
SpeakerVoiceConfig,
|
|
8034
|
+
MultiSpeakerVoiceConfig,
|
|
8035
|
+
SpeechConfig,
|
|
7435
8036
|
GenerationConfig,
|
|
7436
8037
|
CountTokensConfig,
|
|
7437
8038
|
CountTokensParameters,
|
|
@@ -7454,10 +8055,12 @@ declare namespace types {
|
|
|
7454
8055
|
GetTuningJobParameters,
|
|
7455
8056
|
TunedModelCheckpoint,
|
|
7456
8057
|
TunedModel,
|
|
7457
|
-
GoogleRpcStatus,
|
|
7458
|
-
PreTunedModel,
|
|
7459
8058
|
SupervisedHyperParameters,
|
|
7460
8059
|
SupervisedTuningSpec,
|
|
8060
|
+
PreferenceOptimizationHyperParameters,
|
|
8061
|
+
PreferenceOptimizationSpec,
|
|
8062
|
+
GoogleRpcStatus,
|
|
8063
|
+
PreTunedModel,
|
|
7461
8064
|
DatasetDistributionDistributionBucket,
|
|
7462
8065
|
DatasetDistribution,
|
|
7463
8066
|
DatasetStats,
|
|
@@ -7499,6 +8102,35 @@ declare namespace types {
|
|
|
7499
8102
|
ListCachedContentsConfig,
|
|
7500
8103
|
ListCachedContentsParameters,
|
|
7501
8104
|
ListCachedContentsResponse,
|
|
8105
|
+
GetDocumentConfig,
|
|
8106
|
+
GetDocumentParameters,
|
|
8107
|
+
StringList,
|
|
8108
|
+
CustomMetadata,
|
|
8109
|
+
Document_2 as Document,
|
|
8110
|
+
DeleteDocumentConfig,
|
|
8111
|
+
DeleteDocumentParameters,
|
|
8112
|
+
ListDocumentsConfig,
|
|
8113
|
+
ListDocumentsParameters,
|
|
8114
|
+
ListDocumentsResponse,
|
|
8115
|
+
CreateFileSearchStoreConfig,
|
|
8116
|
+
CreateFileSearchStoreParameters,
|
|
8117
|
+
FileSearchStore,
|
|
8118
|
+
GetFileSearchStoreConfig,
|
|
8119
|
+
GetFileSearchStoreParameters,
|
|
8120
|
+
DeleteFileSearchStoreConfig,
|
|
8121
|
+
DeleteFileSearchStoreParameters,
|
|
8122
|
+
ListFileSearchStoresConfig,
|
|
8123
|
+
ListFileSearchStoresParameters,
|
|
8124
|
+
ListFileSearchStoresResponse,
|
|
8125
|
+
WhiteSpaceConfig,
|
|
8126
|
+
ChunkingConfig,
|
|
8127
|
+
UploadToFileSearchStoreConfig,
|
|
8128
|
+
UploadToFileSearchStoreParameters,
|
|
8129
|
+
UploadToFileSearchStoreResumableResponse,
|
|
8130
|
+
ImportFileConfig,
|
|
8131
|
+
ImportFileParameters,
|
|
8132
|
+
ImportFileResponse,
|
|
8133
|
+
ImportFileOperation,
|
|
7502
8134
|
ListFilesConfig,
|
|
7503
8135
|
ListFilesParameters,
|
|
7504
8136
|
FileStatus,
|
|
@@ -7521,6 +8153,7 @@ declare namespace types {
|
|
|
7521
8153
|
BatchJobDestination,
|
|
7522
8154
|
CreateBatchJobConfig,
|
|
7523
8155
|
CreateBatchJobParameters,
|
|
8156
|
+
CompletionStats,
|
|
7524
8157
|
BatchJob,
|
|
7525
8158
|
EmbedContentBatch,
|
|
7526
8159
|
EmbeddingsBatchJobSource,
|
|
@@ -7613,6 +8246,8 @@ declare namespace types {
|
|
|
7613
8246
|
CreateAuthTokenParameters,
|
|
7614
8247
|
OperationGetParameters,
|
|
7615
8248
|
CreateTuningJobParameters,
|
|
8249
|
+
UploadToFileSearchStoreResponse,
|
|
8250
|
+
UploadToFileSearchStoreOperation,
|
|
7616
8251
|
BlobImageUnion,
|
|
7617
8252
|
PartUnion,
|
|
7618
8253
|
PartListUnion,
|
|
@@ -7688,6 +8323,17 @@ declare interface Uploader {
|
|
|
7688
8323
|
* @return A Promise that resolves to types.File.
|
|
7689
8324
|
*/
|
|
7690
8325
|
upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<File_2>;
|
|
8326
|
+
/**
|
|
8327
|
+
* Uploads a file to file search store via the given upload url.
|
|
8328
|
+
*
|
|
8329
|
+
* @param file The file to upload. file is in string type or a Blob.
|
|
8330
|
+
* @param uploadUrl The upload URL as a string is where the file will be
|
|
8331
|
+
* uploaded to. The uploadUrl must be a url that was returned by the
|
|
8332
|
+
* https://generativelanguage.googleapis.com/upload/v1beta/{file_search_store_name}:uploadToFileSearchStore endpoint
|
|
8333
|
+
* @param apiClient The ApiClient to use for uploading.
|
|
8334
|
+
* @return A Promise that resolves to types.UploadToFileSearchStoreOperation.
|
|
8335
|
+
*/
|
|
8336
|
+
uploadToFileSearchStore(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<UploadToFileSearchStoreOperation>;
|
|
7691
8337
|
/**
|
|
7692
8338
|
* Returns the file's mimeType and the size of a given file. If the file is a
|
|
7693
8339
|
* string path, the file type is determined by the file extension. If the
|
|
@@ -7726,6 +8372,82 @@ export declare interface UploadFileParameters {
|
|
|
7726
8372
|
config?: UploadFileConfig;
|
|
7727
8373
|
}
|
|
7728
8374
|
|
|
8375
|
+
/** Optional parameters for uploading a file to a FileSearchStore. */
|
|
8376
|
+
export declare interface UploadToFileSearchStoreConfig {
|
|
8377
|
+
/** Used to override HTTP request options. */
|
|
8378
|
+
httpOptions?: HttpOptions;
|
|
8379
|
+
/** Abort signal which can be used to cancel the request.
|
|
8380
|
+
|
|
8381
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
8382
|
+
operation will not cancel the request in the service. You will still
|
|
8383
|
+
be charged usage for any applicable operations.
|
|
8384
|
+
*/
|
|
8385
|
+
abortSignal?: AbortSignal;
|
|
8386
|
+
/** MIME type of the file to be uploaded. If not provided, it will be inferred from the file extension. */
|
|
8387
|
+
mimeType?: string;
|
|
8388
|
+
/** Display name of the created document. */
|
|
8389
|
+
displayName?: string;
|
|
8390
|
+
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
8391
|
+
customMetadata?: CustomMetadata[];
|
|
8392
|
+
/** Config for telling the service how to chunk the file. */
|
|
8393
|
+
chunkingConfig?: ChunkingConfig;
|
|
8394
|
+
}
|
|
8395
|
+
|
|
8396
|
+
/** Long-running operation for uploading a file to a FileSearchStore. */
|
|
8397
|
+
export declare class UploadToFileSearchStoreOperation implements Operation<UploadToFileSearchStoreResponse> {
|
|
8398
|
+
/** 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}`. */
|
|
8399
|
+
name?: string;
|
|
8400
|
+
/** 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. */
|
|
8401
|
+
metadata?: Record<string, unknown>;
|
|
8402
|
+
/** 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. */
|
|
8403
|
+
done?: boolean;
|
|
8404
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
8405
|
+
error?: Record<string, unknown>;
|
|
8406
|
+
/** The result of the UploadToFileSearchStore operation, available when the operation is done. */
|
|
8407
|
+
response?: UploadToFileSearchStoreResponse;
|
|
8408
|
+
/**
|
|
8409
|
+
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
8410
|
+
* @internal
|
|
8411
|
+
*/
|
|
8412
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<UploadToFileSearchStoreResponse>;
|
|
8413
|
+
/** The full HTTP response. */
|
|
8414
|
+
sdkHttpResponse?: HttpResponse;
|
|
8415
|
+
}
|
|
8416
|
+
|
|
8417
|
+
/** Generates the parameters for the private _upload_to_file_search_store method. */
|
|
8418
|
+
export declare interface UploadToFileSearchStoreParameters {
|
|
8419
|
+
/** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
|
|
8420
|
+
fileSearchStoreName: string;
|
|
8421
|
+
/** Used to override the default configuration. */
|
|
8422
|
+
config?: UploadToFileSearchStoreConfig;
|
|
8423
|
+
}
|
|
8424
|
+
|
|
8425
|
+
/** Parameters for the upload file to file search store method. */
|
|
8426
|
+
export declare interface UploadToFileSearchStoreParameters {
|
|
8427
|
+
/** The name of the file search store to upload. */
|
|
8428
|
+
fileSearchStoreName: string;
|
|
8429
|
+
/** The string path to the file to be uploaded or a Blob object. */
|
|
8430
|
+
file: string | globalThis.Blob;
|
|
8431
|
+
/** Configuration that contains optional parameters. */
|
|
8432
|
+
config?: UploadToFileSearchStoreConfig;
|
|
8433
|
+
}
|
|
8434
|
+
|
|
8435
|
+
/** The response when long-running operation for uploading a file to a FileSearchStore complete. */
|
|
8436
|
+
export declare class UploadToFileSearchStoreResponse {
|
|
8437
|
+
/** Used to retain the full HTTP response. */
|
|
8438
|
+
sdkHttpResponse?: HttpResponse;
|
|
8439
|
+
/** The name of the FileSearchStore containing Documents. */
|
|
8440
|
+
parent?: string;
|
|
8441
|
+
/** The identifier for the Document imported. */
|
|
8442
|
+
documentName?: string;
|
|
8443
|
+
}
|
|
8444
|
+
|
|
8445
|
+
/** Response for the resumable upload method. */
|
|
8446
|
+
export declare class UploadToFileSearchStoreResumableResponse {
|
|
8447
|
+
/** Used to retain the full HTTP response. */
|
|
8448
|
+
sdkHttpResponse?: HttpResponse;
|
|
8449
|
+
}
|
|
8450
|
+
|
|
7729
8451
|
/** Configuration for upscaling an image.
|
|
7730
8452
|
|
|
7731
8453
|
For more information on this configuration, refer to
|
|
@@ -7743,6 +8465,10 @@ export declare interface UpscaleImageConfig {
|
|
|
7743
8465
|
abortSignal?: AbortSignal;
|
|
7744
8466
|
/** Cloud Storage URI used to store the generated images. */
|
|
7745
8467
|
outputGcsUri?: string;
|
|
8468
|
+
/** Filter level for safety filtering. */
|
|
8469
|
+
safetyFilterLevel?: SafetyFilterLevel;
|
|
8470
|
+
/** Allows generation of people by the model. */
|
|
8471
|
+
personGeneration?: PersonGeneration;
|
|
7746
8472
|
/** Whether to include a reason for filtered-out images in the
|
|
7747
8473
|
response. */
|
|
7748
8474
|
includeRaiReason?: boolean;
|
|
@@ -7783,19 +8509,19 @@ export declare class UpscaleImageResponse {
|
|
|
7783
8509
|
generatedImages?: GeneratedImage[];
|
|
7784
8510
|
}
|
|
7785
8511
|
|
|
7786
|
-
/** Tool to support URL context
|
|
8512
|
+
/** Tool to support URL context. */
|
|
7787
8513
|
export declare interface UrlContext {
|
|
7788
8514
|
}
|
|
7789
8515
|
|
|
7790
8516
|
/** Metadata related to url context retrieval tool. */
|
|
7791
8517
|
export declare interface UrlContextMetadata {
|
|
7792
|
-
/** List of url context. */
|
|
8518
|
+
/** Output only. List of url context. */
|
|
7793
8519
|
urlMetadata?: UrlMetadata[];
|
|
7794
8520
|
}
|
|
7795
8521
|
|
|
7796
|
-
/** Context
|
|
8522
|
+
/** Context of the a single url retrieval. */
|
|
7797
8523
|
export declare interface UrlMetadata {
|
|
7798
|
-
/**
|
|
8524
|
+
/** Retrieved url by the tool. */
|
|
7799
8525
|
retrievedUrl?: string;
|
|
7800
8526
|
/** Status of the url retrieval. */
|
|
7801
8527
|
urlRetrievalStatus?: UrlRetrievalStatus;
|
|
@@ -7804,7 +8530,7 @@ export declare interface UrlMetadata {
|
|
|
7804
8530
|
/** Status of the url retrieval. */
|
|
7805
8531
|
export declare enum UrlRetrievalStatus {
|
|
7806
8532
|
/**
|
|
7807
|
-
* Default value. This value is unused
|
|
8533
|
+
* Default value. This value is unused.
|
|
7808
8534
|
*/
|
|
7809
8535
|
URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
|
|
7810
8536
|
/**
|
|
@@ -7816,11 +8542,11 @@ export declare enum UrlRetrievalStatus {
|
|
|
7816
8542
|
*/
|
|
7817
8543
|
URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
|
|
7818
8544
|
/**
|
|
7819
|
-
* Url retrieval is failed because the content is behind paywall.
|
|
8545
|
+
* Url retrieval is failed because the content is behind paywall. This enum value is not supported in Vertex AI.
|
|
7820
8546
|
*/
|
|
7821
8547
|
URL_RETRIEVAL_STATUS_PAYWALL = "URL_RETRIEVAL_STATUS_PAYWALL",
|
|
7822
8548
|
/**
|
|
7823
|
-
* Url retrieval is failed because the content is unsafe.
|
|
8549
|
+
* Url retrieval is failed because the content is unsafe. This enum value is not supported in Vertex AI.
|
|
7824
8550
|
*/
|
|
7825
8551
|
URL_RETRIEVAL_STATUS_UNSAFE = "URL_RETRIEVAL_STATUS_UNSAFE"
|
|
7826
8552
|
}
|
|
@@ -8004,21 +8730,19 @@ export declare enum VideoGenerationReferenceType {
|
|
|
8004
8730
|
STYLE = "STYLE"
|
|
8005
8731
|
}
|
|
8006
8732
|
|
|
8007
|
-
/**
|
|
8733
|
+
/** Metadata describes the input video content. */
|
|
8008
8734
|
export declare interface VideoMetadata {
|
|
8009
|
-
/** The frame rate of the video sent to the model. If not specified, the
|
|
8010
|
-
default value will be 1.0. The fps range is (0.0, 24.0]. */
|
|
8011
|
-
fps?: number;
|
|
8012
8735
|
/** Optional. The end offset of the video. */
|
|
8013
8736
|
endOffset?: string;
|
|
8737
|
+
/** 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]. */
|
|
8738
|
+
fps?: number;
|
|
8014
8739
|
/** Optional. The start offset of the video. */
|
|
8015
8740
|
startOffset?: string;
|
|
8016
8741
|
}
|
|
8017
8742
|
|
|
8018
8743
|
/** The configuration for the voice to use. */
|
|
8019
8744
|
export declare interface VoiceConfig {
|
|
8020
|
-
/** The configuration for the
|
|
8021
|
-
*/
|
|
8745
|
+
/** The configuration for the prebuilt voice to use. */
|
|
8022
8746
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
8023
8747
|
}
|
|
8024
8748
|
|
|
@@ -8069,4 +8793,12 @@ export declare interface WeightedPrompt {
|
|
|
8069
8793
|
weight?: number;
|
|
8070
8794
|
}
|
|
8071
8795
|
|
|
8796
|
+
/** Configuration for a white space chunking algorithm. */
|
|
8797
|
+
export declare interface WhiteSpaceConfig {
|
|
8798
|
+
/** Maximum number of tokens per chunk. */
|
|
8799
|
+
maxTokensPerChunk?: number;
|
|
8800
|
+
/** Maximum number of overlapping tokens between two adjacent chunks. */
|
|
8801
|
+
maxOverlapTokens?: number;
|
|
8802
|
+
}
|
|
8803
|
+
|
|
8072
8804
|
export { }
|