@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/genai.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;
|
|
@@ -3363,6 +3738,7 @@ export declare class GoogleGenAI {
|
|
|
3363
3738
|
readonly operations: Operations;
|
|
3364
3739
|
readonly authTokens: Tokens;
|
|
3365
3740
|
readonly tunings: Tunings;
|
|
3741
|
+
readonly fileSearchStores: FileSearchStores;
|
|
3366
3742
|
constructor(options: GoogleGenAIOptions);
|
|
3367
3743
|
}
|
|
3368
3744
|
|
|
@@ -3429,9 +3805,9 @@ export declare interface GoogleGenAIOptions {
|
|
|
3429
3805
|
httpOptions?: HttpOptions;
|
|
3430
3806
|
}
|
|
3431
3807
|
|
|
3432
|
-
/** Tool to
|
|
3808
|
+
/** Tool to retrieve public maps data for grounding, powered by Google. */
|
|
3433
3809
|
export declare interface GoogleMaps {
|
|
3434
|
-
/**
|
|
3810
|
+
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
3435
3811
|
authConfig?: AuthConfig;
|
|
3436
3812
|
/** Optional. If true, include the widget context token in the response. */
|
|
3437
3813
|
enableWidget?: boolean;
|
|
@@ -3447,14 +3823,14 @@ export declare interface GoogleRpcStatus {
|
|
|
3447
3823
|
message?: string;
|
|
3448
3824
|
}
|
|
3449
3825
|
|
|
3450
|
-
/** Tool to support Google Search in Model. Powered by Google. */
|
|
3826
|
+
/** GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
3451
3827
|
export declare interface GoogleSearch {
|
|
3452
|
-
/** Optional. Filter search results to a specific time range.
|
|
3453
|
-
If customers set a start time, they must set an end time (and vice versa).
|
|
3454
|
-
*/
|
|
3455
|
-
timeRangeFilter?: Interval;
|
|
3456
3828
|
/** 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. */
|
|
3457
3829
|
excludeDomains?: string[];
|
|
3830
|
+
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
|
|
3831
|
+
blockingConfidence?: PhishBlockThreshold;
|
|
3832
|
+
/** 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. */
|
|
3833
|
+
timeRangeFilter?: Interval;
|
|
3458
3834
|
}
|
|
3459
3835
|
|
|
3460
3836
|
/** Tool to retrieve public web data for grounding, powered by Google. */
|
|
@@ -3489,11 +3865,11 @@ export declare interface GroundingChunkMaps {
|
|
|
3489
3865
|
placeAnswerSources?: GroundingChunkMapsPlaceAnswerSources;
|
|
3490
3866
|
/** This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place. */
|
|
3491
3867
|
placeId?: string;
|
|
3492
|
-
/** Text of the
|
|
3868
|
+
/** Text of the place answer. */
|
|
3493
3869
|
text?: string;
|
|
3494
|
-
/** Title of the
|
|
3870
|
+
/** Title of the place. */
|
|
3495
3871
|
title?: string;
|
|
3496
|
-
/** URI reference of the
|
|
3872
|
+
/** URI reference of the place. */
|
|
3497
3873
|
uri?: string;
|
|
3498
3874
|
}
|
|
3499
3875
|
|
|
@@ -3595,7 +3971,7 @@ export declare interface GroundingSupport {
|
|
|
3595
3971
|
segment?: Segment;
|
|
3596
3972
|
}
|
|
3597
3973
|
|
|
3598
|
-
/**
|
|
3974
|
+
/** 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. */
|
|
3599
3975
|
export declare enum HarmBlockMethod {
|
|
3600
3976
|
/**
|
|
3601
3977
|
* The harm block method is unspecified.
|
|
@@ -3611,7 +3987,7 @@ export declare enum HarmBlockMethod {
|
|
|
3611
3987
|
PROBABILITY = "PROBABILITY"
|
|
3612
3988
|
}
|
|
3613
3989
|
|
|
3614
|
-
/**
|
|
3990
|
+
/** The harm block threshold. */
|
|
3615
3991
|
export declare enum HarmBlockThreshold {
|
|
3616
3992
|
/**
|
|
3617
3993
|
* Unspecified harm block threshold.
|
|
@@ -3639,7 +4015,7 @@ export declare enum HarmBlockThreshold {
|
|
|
3639
4015
|
OFF = "OFF"
|
|
3640
4016
|
}
|
|
3641
4017
|
|
|
3642
|
-
/**
|
|
4018
|
+
/** Harm category. */
|
|
3643
4019
|
export declare enum HarmCategory {
|
|
3644
4020
|
/**
|
|
3645
4021
|
* The harm category is unspecified.
|
|
@@ -3711,7 +4087,7 @@ export declare enum HarmProbability {
|
|
|
3711
4087
|
HIGH = "HIGH"
|
|
3712
4088
|
}
|
|
3713
4089
|
|
|
3714
|
-
/** Output only. Harm severity levels in the content. */
|
|
4090
|
+
/** Output only. Harm severity levels in the content. This enum is not supported in Gemini API. */
|
|
3715
4091
|
export declare enum HarmSeverity {
|
|
3716
4092
|
/**
|
|
3717
4093
|
* Harm severity unspecified.
|
|
@@ -3735,6 +4111,31 @@ export declare enum HarmSeverity {
|
|
|
3735
4111
|
HARM_SEVERITY_HIGH = "HARM_SEVERITY_HIGH"
|
|
3736
4112
|
}
|
|
3737
4113
|
|
|
4114
|
+
/** The location of the API key. This enum is not supported in Gemini API. */
|
|
4115
|
+
export declare enum HttpElementLocation {
|
|
4116
|
+
HTTP_IN_UNSPECIFIED = "HTTP_IN_UNSPECIFIED",
|
|
4117
|
+
/**
|
|
4118
|
+
* Element is in the HTTP request query.
|
|
4119
|
+
*/
|
|
4120
|
+
HTTP_IN_QUERY = "HTTP_IN_QUERY",
|
|
4121
|
+
/**
|
|
4122
|
+
* Element is in the HTTP request header.
|
|
4123
|
+
*/
|
|
4124
|
+
HTTP_IN_HEADER = "HTTP_IN_HEADER",
|
|
4125
|
+
/**
|
|
4126
|
+
* Element is in the HTTP request path.
|
|
4127
|
+
*/
|
|
4128
|
+
HTTP_IN_PATH = "HTTP_IN_PATH",
|
|
4129
|
+
/**
|
|
4130
|
+
* Element is in the HTTP request body.
|
|
4131
|
+
*/
|
|
4132
|
+
HTTP_IN_BODY = "HTTP_IN_BODY",
|
|
4133
|
+
/**
|
|
4134
|
+
* Element is in the HTTP request cookie.
|
|
4135
|
+
*/
|
|
4136
|
+
HTTP_IN_COOKIE = "HTTP_IN_COOKIE"
|
|
4137
|
+
}
|
|
4138
|
+
|
|
3738
4139
|
/** HTTP options to be used in each of the requests. */
|
|
3739
4140
|
export declare interface HttpOptions {
|
|
3740
4141
|
/** The base URL for the AI platform service endpoint. */
|
|
@@ -3794,7 +4195,7 @@ declare interface HttpRequest {
|
|
|
3794
4195
|
/**
|
|
3795
4196
|
* Optional set of customizable configuration for HTTP requests.
|
|
3796
4197
|
*/
|
|
3797
|
-
httpOptions?: HttpOptions;
|
|
4198
|
+
httpOptions?: types.HttpOptions;
|
|
3798
4199
|
/**
|
|
3799
4200
|
* Optional abort signal which can be used to cancel the request.
|
|
3800
4201
|
*/
|
|
@@ -3832,6 +4233,10 @@ export declare interface ImageConfig {
|
|
|
3832
4233
|
/** Aspect ratio of the generated images. Supported values are
|
|
3833
4234
|
"1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
|
|
3834
4235
|
aspectRatio?: string;
|
|
4236
|
+
/** Optional. Specifies the size of generated images. Supported
|
|
4237
|
+
values are `1K`, `2K`, `4K`. If not specified, the model will use default
|
|
4238
|
+
value `1K`. */
|
|
4239
|
+
imageSize?: string;
|
|
3835
4240
|
}
|
|
3836
4241
|
|
|
3837
4242
|
/** Enum that specifies the language of the text in the prompt. */
|
|
@@ -3870,6 +4275,64 @@ export declare enum ImagePromptLanguage {
|
|
|
3870
4275
|
es = "es"
|
|
3871
4276
|
}
|
|
3872
4277
|
|
|
4278
|
+
/** Optional parameters for importing a file. */
|
|
4279
|
+
export declare interface ImportFileConfig {
|
|
4280
|
+
/** Used to override HTTP request options. */
|
|
4281
|
+
httpOptions?: HttpOptions;
|
|
4282
|
+
/** Abort signal which can be used to cancel the request.
|
|
4283
|
+
|
|
4284
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4285
|
+
operation will not cancel the request in the service. You will still
|
|
4286
|
+
be charged usage for any applicable operations.
|
|
4287
|
+
*/
|
|
4288
|
+
abortSignal?: AbortSignal;
|
|
4289
|
+
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
4290
|
+
customMetadata?: CustomMetadata[];
|
|
4291
|
+
/** Config for telling the service how to chunk the file. */
|
|
4292
|
+
chunkingConfig?: ChunkingConfig;
|
|
4293
|
+
}
|
|
4294
|
+
|
|
4295
|
+
/** Long-running operation for importing a file to a FileSearchStore. */
|
|
4296
|
+
export declare class ImportFileOperation implements Operation<ImportFileResponse> {
|
|
4297
|
+
/** 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}`. */
|
|
4298
|
+
name?: string;
|
|
4299
|
+
/** 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. */
|
|
4300
|
+
metadata?: Record<string, unknown>;
|
|
4301
|
+
/** 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. */
|
|
4302
|
+
done?: boolean;
|
|
4303
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
4304
|
+
error?: Record<string, unknown>;
|
|
4305
|
+
/** The result of the ImportFile operation, available when the operation is done. */
|
|
4306
|
+
response?: ImportFileResponse;
|
|
4307
|
+
/**
|
|
4308
|
+
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
4309
|
+
* @internal
|
|
4310
|
+
*/
|
|
4311
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<ImportFileResponse>;
|
|
4312
|
+
/** The full HTTP response. */
|
|
4313
|
+
sdkHttpResponse?: HttpResponse;
|
|
4314
|
+
}
|
|
4315
|
+
|
|
4316
|
+
/** Config for file_search_stores.import_file parameters. */
|
|
4317
|
+
export declare interface ImportFileParameters {
|
|
4318
|
+
/** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
|
|
4319
|
+
fileSearchStoreName: string;
|
|
4320
|
+
/** The name of the File API File to import. Example: `files/abc-123` */
|
|
4321
|
+
fileName: string;
|
|
4322
|
+
/** Optional parameters for the request. */
|
|
4323
|
+
config?: ImportFileConfig;
|
|
4324
|
+
}
|
|
4325
|
+
|
|
4326
|
+
/** Response for ImportFile to import a File API file with a file search store. */
|
|
4327
|
+
export declare class ImportFileResponse {
|
|
4328
|
+
/** Used to retain the full HTTP response. */
|
|
4329
|
+
sdkHttpResponse?: HttpResponse;
|
|
4330
|
+
/** The name of the FileSearchStore containing Documents. */
|
|
4331
|
+
parent?: string;
|
|
4332
|
+
/** The identifier for the Document imported. */
|
|
4333
|
+
documentName?: string;
|
|
4334
|
+
}
|
|
4335
|
+
|
|
3873
4336
|
/** Config for `inlined_embedding_responses` parameter. */
|
|
3874
4337
|
export declare class InlinedEmbedContentResponse {
|
|
3875
4338
|
/** The response to the request.
|
|
@@ -3905,17 +4368,12 @@ export declare class InlinedResponse {
|
|
|
3905
4368
|
error?: JobError;
|
|
3906
4369
|
}
|
|
3907
4370
|
|
|
3908
|
-
/** Represents a time interval, encoded as a start
|
|
3909
|
-
|
|
3910
|
-
The start time must be less than or equal to the end time.
|
|
3911
|
-
When the start equals the end time, the interval is an empty interval.
|
|
3912
|
-
(matches no time)
|
|
3913
|
-
When both start and end are unspecified, the interval matches any time. */
|
|
4371
|
+
/** 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. */
|
|
3914
4372
|
export declare interface Interval {
|
|
3915
|
-
/**
|
|
3916
|
-
startTime?: string;
|
|
3917
|
-
/** The end time of the interval. */
|
|
4373
|
+
/** Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. */
|
|
3918
4374
|
endTime?: string;
|
|
4375
|
+
/** Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. */
|
|
4376
|
+
startTime?: string;
|
|
3919
4377
|
}
|
|
3920
4378
|
|
|
3921
4379
|
/** Job error. */
|
|
@@ -3980,7 +4438,7 @@ export declare enum JobState {
|
|
|
3980
4438
|
JOB_STATE_PARTIALLY_SUCCEEDED = "JOB_STATE_PARTIALLY_SUCCEEDED"
|
|
3981
4439
|
}
|
|
3982
4440
|
|
|
3983
|
-
/**
|
|
4441
|
+
/** Programming language of the `code`. */
|
|
3984
4442
|
export declare enum Language {
|
|
3985
4443
|
/**
|
|
3986
4444
|
* Unspecified language. This value should not be used.
|
|
@@ -4065,7 +4523,38 @@ export declare class ListCachedContentsResponse {
|
|
|
4065
4523
|
cachedContents?: CachedContent[];
|
|
4066
4524
|
}
|
|
4067
4525
|
|
|
4068
|
-
/**
|
|
4526
|
+
/** Config for optional parameters. */
|
|
4527
|
+
export declare interface ListDocumentsConfig {
|
|
4528
|
+
/** Used to override HTTP request options. */
|
|
4529
|
+
httpOptions?: HttpOptions;
|
|
4530
|
+
/** Abort signal which can be used to cancel the request.
|
|
4531
|
+
|
|
4532
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4533
|
+
operation will not cancel the request in the service. You will still
|
|
4534
|
+
be charged usage for any applicable operations.
|
|
4535
|
+
*/
|
|
4536
|
+
abortSignal?: AbortSignal;
|
|
4537
|
+
pageSize?: number;
|
|
4538
|
+
pageToken?: string;
|
|
4539
|
+
}
|
|
4540
|
+
|
|
4541
|
+
/** Config for documents.list parameters. */
|
|
4542
|
+
export declare interface ListDocumentsParameters {
|
|
4543
|
+
/** The resource name of the FileSearchStores. Example: `fileSearchStore/file-search-store-foo` */
|
|
4544
|
+
parent: string;
|
|
4545
|
+
config?: ListDocumentsConfig;
|
|
4546
|
+
}
|
|
4547
|
+
|
|
4548
|
+
/** Config for documents.list return value. */
|
|
4549
|
+
export declare class ListDocumentsResponse {
|
|
4550
|
+
/** Used to retain the full HTTP response. */
|
|
4551
|
+
sdkHttpResponse?: HttpResponse;
|
|
4552
|
+
/** A token, which can be sent as `page_token` to retrieve the next page. If this field is omitted, there are no more pages. */
|
|
4553
|
+
nextPageToken?: string;
|
|
4554
|
+
/** The returned `Document`s. */
|
|
4555
|
+
documents?: Document_2[];
|
|
4556
|
+
}
|
|
4557
|
+
|
|
4069
4558
|
export declare interface ListFilesConfig {
|
|
4070
4559
|
/** Used to override HTTP request options. */
|
|
4071
4560
|
httpOptions?: HttpOptions;
|
|
@@ -4080,6 +4569,36 @@ export declare interface ListFilesConfig {
|
|
|
4080
4569
|
pageToken?: string;
|
|
4081
4570
|
}
|
|
4082
4571
|
|
|
4572
|
+
/** Optional parameters for listing FileSearchStore. */
|
|
4573
|
+
export declare interface ListFileSearchStoresConfig {
|
|
4574
|
+
/** Used to override HTTP request options. */
|
|
4575
|
+
httpOptions?: HttpOptions;
|
|
4576
|
+
/** Abort signal which can be used to cancel the request.
|
|
4577
|
+
|
|
4578
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
4579
|
+
operation will not cancel the request in the service. You will still
|
|
4580
|
+
be charged usage for any applicable operations.
|
|
4581
|
+
*/
|
|
4582
|
+
abortSignal?: AbortSignal;
|
|
4583
|
+
pageSize?: number;
|
|
4584
|
+
pageToken?: string;
|
|
4585
|
+
}
|
|
4586
|
+
|
|
4587
|
+
/** Config for file_search_stores.list parameters. */
|
|
4588
|
+
export declare interface ListFileSearchStoresParameters {
|
|
4589
|
+
/** Optional parameters for the list request. */
|
|
4590
|
+
config?: ListFileSearchStoresConfig;
|
|
4591
|
+
}
|
|
4592
|
+
|
|
4593
|
+
/** Config for file_search_stores.list return value. */
|
|
4594
|
+
export declare class ListFileSearchStoresResponse {
|
|
4595
|
+
/** Used to retain the full HTTP response. */
|
|
4596
|
+
sdkHttpResponse?: HttpResponse;
|
|
4597
|
+
nextPageToken?: string;
|
|
4598
|
+
/** The returned file search stores. */
|
|
4599
|
+
fileSearchStores?: FileSearchStore[];
|
|
4600
|
+
}
|
|
4601
|
+
|
|
4083
4602
|
/** Generates the parameters for the list method. */
|
|
4084
4603
|
export declare interface ListFilesParameters {
|
|
4085
4604
|
/** Used to override the default configuration. */
|
|
@@ -5489,9 +6008,9 @@ export declare interface ModelSelectionConfig {
|
|
|
5489
6008
|
featureSelectionPreference?: FeatureSelectionPreference;
|
|
5490
6009
|
}
|
|
5491
6010
|
|
|
5492
|
-
/** The configuration for the multi-speaker setup. */
|
|
6011
|
+
/** The configuration for the multi-speaker setup. This data type is not supported in Vertex AI. */
|
|
5493
6012
|
export declare interface MultiSpeakerVoiceConfig {
|
|
5494
|
-
/**
|
|
6013
|
+
/** Required. All the enabled speaker voices. */
|
|
5495
6014
|
speakerVoiceConfigs?: SpeakerVoiceConfig[];
|
|
5496
6015
|
}
|
|
5497
6016
|
|
|
@@ -5534,7 +6053,7 @@ export declare interface Operation<T> {
|
|
|
5534
6053
|
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
5535
6054
|
* @internal
|
|
5536
6055
|
*/
|
|
5537
|
-
_fromAPIResponse({ apiResponse,
|
|
6056
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<T>;
|
|
5538
6057
|
}
|
|
5539
6058
|
|
|
5540
6059
|
/** Parameters of the fromAPIResponse method of the Operation class. */
|
|
@@ -5542,7 +6061,7 @@ export declare interface OperationFromAPIResponseParameters {
|
|
|
5542
6061
|
/** The API response to be converted to an Operation. */
|
|
5543
6062
|
apiResponse: Record<string, unknown>;
|
|
5544
6063
|
/** Whether the API response is from Vertex AI. */
|
|
5545
|
-
|
|
6064
|
+
_isVertexAI: boolean;
|
|
5546
6065
|
}
|
|
5547
6066
|
|
|
5548
6067
|
/** Parameters for the get method of the operations module. */
|
|
@@ -5574,7 +6093,7 @@ export declare class Operations extends BaseModule {
|
|
|
5574
6093
|
private fetchPredictVideosOperationInternal;
|
|
5575
6094
|
}
|
|
5576
6095
|
|
|
5577
|
-
/**
|
|
6096
|
+
/** Outcome of the code execution. */
|
|
5578
6097
|
export declare enum Outcome {
|
|
5579
6098
|
/**
|
|
5580
6099
|
* Unspecified status. This value should not be used.
|
|
@@ -5599,10 +6118,13 @@ export declare enum PagedItem {
|
|
|
5599
6118
|
PAGED_ITEM_MODELS = "models",
|
|
5600
6119
|
PAGED_ITEM_TUNING_JOBS = "tuningJobs",
|
|
5601
6120
|
PAGED_ITEM_FILES = "files",
|
|
5602
|
-
PAGED_ITEM_CACHED_CONTENTS = "cachedContents"
|
|
6121
|
+
PAGED_ITEM_CACHED_CONTENTS = "cachedContents",
|
|
6122
|
+
PAGED_ITEM_FILE_SEARCH_STORES = "fileSearchStores",
|
|
6123
|
+
PAGED_ITEM_DOCUMENTS = "documents"
|
|
5603
6124
|
}
|
|
5604
6125
|
|
|
5605
6126
|
declare interface PagedItemConfig {
|
|
6127
|
+
parent?: string;
|
|
5606
6128
|
config?: {
|
|
5607
6129
|
pageToken?: string;
|
|
5608
6130
|
pageSize?: number;
|
|
@@ -5617,6 +6139,8 @@ declare interface PagedItemResponse<T> {
|
|
|
5617
6139
|
tuningJobs?: T[];
|
|
5618
6140
|
files?: T[];
|
|
5619
6141
|
cachedContents?: T[];
|
|
6142
|
+
fileSearchStores?: T[];
|
|
6143
|
+
documents?: T[];
|
|
5620
6144
|
}
|
|
5621
6145
|
|
|
5622
6146
|
/**
|
|
@@ -5725,17 +6249,6 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
5725
6249
|
of content being conveyed. Using multiple fields within the same `Part`
|
|
5726
6250
|
instance is considered invalid. */
|
|
5727
6251
|
export declare interface Part {
|
|
5728
|
-
/** Metadata for a given video. */
|
|
5729
|
-
videoMetadata?: VideoMetadata;
|
|
5730
|
-
/** Indicates if the part is thought from the model. */
|
|
5731
|
-
thought?: boolean;
|
|
5732
|
-
/** Optional. Inlined bytes data. */
|
|
5733
|
-
inlineData?: Blob_2;
|
|
5734
|
-
/** Optional. URI based data. */
|
|
5735
|
-
fileData?: FileData;
|
|
5736
|
-
/** An opaque signature for the thought so it can be reused in subsequent requests.
|
|
5737
|
-
* @remarks Encoded as base64 string. */
|
|
5738
|
-
thoughtSignature?: string;
|
|
5739
6252
|
/** A predicted [FunctionCall] returned from the model that contains a string
|
|
5740
6253
|
representing the [FunctionDeclaration.name] and a structured JSON object
|
|
5741
6254
|
containing the parameters and their values. */
|
|
@@ -5744,10 +6257,21 @@ export declare interface Part {
|
|
|
5744
6257
|
codeExecutionResult?: CodeExecutionResult;
|
|
5745
6258
|
/** Optional. Code generated by the model that is meant to be executed. */
|
|
5746
6259
|
executableCode?: ExecutableCode;
|
|
6260
|
+
/** Optional. URI based data. */
|
|
6261
|
+
fileData?: FileData;
|
|
5747
6262
|
/** 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. */
|
|
5748
6263
|
functionResponse?: FunctionResponse;
|
|
6264
|
+
/** Optional. Inlined bytes data. */
|
|
6265
|
+
inlineData?: Blob_2;
|
|
5749
6266
|
/** Optional. Text part (can be code). */
|
|
5750
6267
|
text?: string;
|
|
6268
|
+
/** Optional. Indicates if the part is thought from the model. */
|
|
6269
|
+
thought?: boolean;
|
|
6270
|
+
/** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
|
|
6271
|
+
* @remarks Encoded as base64 string. */
|
|
6272
|
+
thoughtSignature?: string;
|
|
6273
|
+
/** Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data. */
|
|
6274
|
+
videoMetadata?: VideoMetadata;
|
|
5751
6275
|
}
|
|
5752
6276
|
|
|
5753
6277
|
export declare type PartListUnion = PartUnion[] | PartUnion;
|
|
@@ -5780,9 +6304,41 @@ export declare enum PersonGeneration {
|
|
|
5780
6304
|
ALLOW_ALL = "ALLOW_ALL"
|
|
5781
6305
|
}
|
|
5782
6306
|
|
|
6307
|
+
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
6308
|
+
export declare enum PhishBlockThreshold {
|
|
6309
|
+
/**
|
|
6310
|
+
* Defaults to unspecified.
|
|
6311
|
+
*/
|
|
6312
|
+
PHISH_BLOCK_THRESHOLD_UNSPECIFIED = "PHISH_BLOCK_THRESHOLD_UNSPECIFIED",
|
|
6313
|
+
/**
|
|
6314
|
+
* Blocks Low and above confidence URL that is risky.
|
|
6315
|
+
*/
|
|
6316
|
+
BLOCK_LOW_AND_ABOVE = "BLOCK_LOW_AND_ABOVE",
|
|
6317
|
+
/**
|
|
6318
|
+
* Blocks Medium and above confidence URL that is risky.
|
|
6319
|
+
*/
|
|
6320
|
+
BLOCK_MEDIUM_AND_ABOVE = "BLOCK_MEDIUM_AND_ABOVE",
|
|
6321
|
+
/**
|
|
6322
|
+
* Blocks High and above confidence URL that is risky.
|
|
6323
|
+
*/
|
|
6324
|
+
BLOCK_HIGH_AND_ABOVE = "BLOCK_HIGH_AND_ABOVE",
|
|
6325
|
+
/**
|
|
6326
|
+
* Blocks Higher and above confidence URL that is risky.
|
|
6327
|
+
*/
|
|
6328
|
+
BLOCK_HIGHER_AND_ABOVE = "BLOCK_HIGHER_AND_ABOVE",
|
|
6329
|
+
/**
|
|
6330
|
+
* Blocks Very high and above confidence URL that is risky.
|
|
6331
|
+
*/
|
|
6332
|
+
BLOCK_VERY_HIGH_AND_ABOVE = "BLOCK_VERY_HIGH_AND_ABOVE",
|
|
6333
|
+
/**
|
|
6334
|
+
* Blocks Extremely high confidence URL that is risky.
|
|
6335
|
+
*/
|
|
6336
|
+
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
6337
|
+
}
|
|
6338
|
+
|
|
5783
6339
|
/** The configuration for the prebuilt speaker to use. */
|
|
5784
6340
|
export declare interface PrebuiltVoiceConfig {
|
|
5785
|
-
/** The name of the
|
|
6341
|
+
/** The name of the preset voice to use. */
|
|
5786
6342
|
voiceName?: string;
|
|
5787
6343
|
}
|
|
5788
6344
|
|
|
@@ -5806,6 +6362,30 @@ export declare interface PreferenceOptimizationDataStats {
|
|
|
5806
6362
|
userOutputTokenDistribution?: DatasetDistribution;
|
|
5807
6363
|
}
|
|
5808
6364
|
|
|
6365
|
+
/** Hyperparameters for Preference Optimization. This data type is not supported in Gemini API. */
|
|
6366
|
+
export declare interface PreferenceOptimizationHyperParameters {
|
|
6367
|
+
/** Optional. Adapter size for preference optimization. */
|
|
6368
|
+
adapterSize?: AdapterSize;
|
|
6369
|
+
/** Optional. Weight for KL Divergence regularization. */
|
|
6370
|
+
beta?: number;
|
|
6371
|
+
/** Optional. Number of complete passes the model makes over the entire training dataset during training. */
|
|
6372
|
+
epochCount?: string;
|
|
6373
|
+
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
6374
|
+
learningRateMultiplier?: number;
|
|
6375
|
+
}
|
|
6376
|
+
|
|
6377
|
+
/** Preference optimization tuning spec for tuning. */
|
|
6378
|
+
export declare interface PreferenceOptimizationSpec {
|
|
6379
|
+
/** 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. */
|
|
6380
|
+
exportLastCheckpointOnly?: boolean;
|
|
6381
|
+
/** Optional. Hyperparameters for Preference Optimization. */
|
|
6382
|
+
hyperParameters?: PreferenceOptimizationHyperParameters;
|
|
6383
|
+
/** Required. Cloud Storage path to file containing training dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
|
|
6384
|
+
trainingDatasetUri?: string;
|
|
6385
|
+
/** Optional. Cloud Storage path to file containing validation dataset for preference optimization tuning. The dataset must be formatted as a JSONL file. */
|
|
6386
|
+
validationDatasetUri?: string;
|
|
6387
|
+
}
|
|
6388
|
+
|
|
5809
6389
|
/** A pre-tuned model for continuous tuning. This data type is not supported in Gemini API. */
|
|
5810
6390
|
export declare interface PreTunedModel {
|
|
5811
6391
|
/** Output only. The name of the base model this PreTunedModel was tuned from. */
|
|
@@ -6089,13 +6669,13 @@ export declare interface SafetyRating {
|
|
|
6089
6669
|
blocked?: boolean;
|
|
6090
6670
|
/** Output only. Harm category. */
|
|
6091
6671
|
category?: HarmCategory;
|
|
6092
|
-
/** 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. */
|
|
6672
|
+
/** 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. */
|
|
6093
6673
|
overwrittenThreshold?: HarmBlockThreshold;
|
|
6094
6674
|
/** Output only. Harm probability levels in the content. */
|
|
6095
6675
|
probability?: HarmProbability;
|
|
6096
6676
|
/** Output only. Harm probability score. This field is not supported in Gemini API. */
|
|
6097
6677
|
probabilityScore?: number;
|
|
6098
|
-
/** Output only. Harm severity levels in the content. */
|
|
6678
|
+
/** Output only. Harm severity levels in the content. This field is not supported in Gemini API. */
|
|
6099
6679
|
severity?: HarmSeverity;
|
|
6100
6680
|
/** Output only. Harm severity score. This field is not supported in Gemini API. */
|
|
6101
6681
|
severityScore?: number;
|
|
@@ -6103,11 +6683,10 @@ export declare interface SafetyRating {
|
|
|
6103
6683
|
|
|
6104
6684
|
/** Safety settings. */
|
|
6105
6685
|
export declare interface SafetySetting {
|
|
6106
|
-
/** Determines if the harm block method uses probability or probability
|
|
6107
|
-
and severity scores. */
|
|
6108
|
-
method?: HarmBlockMethod;
|
|
6109
6686
|
/** Required. Harm category. */
|
|
6110
6687
|
category?: HarmCategory;
|
|
6688
|
+
/** 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. */
|
|
6689
|
+
method?: HarmBlockMethod;
|
|
6111
6690
|
/** Required. The harm block threshold. */
|
|
6112
6691
|
threshold?: HarmBlockThreshold;
|
|
6113
6692
|
}
|
|
@@ -6521,28 +7100,22 @@ export declare interface SlidingWindow {
|
|
|
6521
7100
|
targetTokens?: string;
|
|
6522
7101
|
}
|
|
6523
7102
|
|
|
6524
|
-
/**
|
|
7103
|
+
/** Configuration for a single speaker in a multi speaker setup. */
|
|
6525
7104
|
export declare interface SpeakerVoiceConfig {
|
|
6526
|
-
/** The name of the speaker
|
|
6527
|
-
prompt. */
|
|
7105
|
+
/** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
|
|
6528
7106
|
speaker?: string;
|
|
6529
|
-
/** The configuration for the voice
|
|
7107
|
+
/** Required. The configuration for the voice of this speaker. */
|
|
6530
7108
|
voiceConfig?: VoiceConfig;
|
|
6531
7109
|
}
|
|
6532
7110
|
|
|
6533
|
-
/** The speech generation
|
|
7111
|
+
/** The speech generation config. */
|
|
6534
7112
|
export declare interface SpeechConfig {
|
|
6535
|
-
/**
|
|
6536
|
-
|
|
7113
|
+
/** Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization. */
|
|
7114
|
+
languageCode?: string;
|
|
7115
|
+
/** The configuration for the speaker to use. */
|
|
6537
7116
|
voiceConfig?: VoiceConfig;
|
|
6538
|
-
/** The configuration for the multi-speaker setup.
|
|
6539
|
-
It is mutually exclusive with the voice_config field.
|
|
6540
|
-
*/
|
|
7117
|
+
/** 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. */
|
|
6541
7118
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
6542
|
-
/** Language code (ISO 639. e.g. en-US) for the speech synthesization.
|
|
6543
|
-
Only available for Live API.
|
|
6544
|
-
*/
|
|
6545
|
-
languageCode?: string;
|
|
6546
7119
|
}
|
|
6547
7120
|
|
|
6548
7121
|
export declare type SpeechConfigUnion = SpeechConfig | string;
|
|
@@ -6563,6 +7136,12 @@ export declare enum StartSensitivity {
|
|
|
6563
7136
|
START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
|
|
6564
7137
|
}
|
|
6565
7138
|
|
|
7139
|
+
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
7140
|
+
export declare interface StringList {
|
|
7141
|
+
/** The string values of the metadata to store. */
|
|
7142
|
+
values?: string[];
|
|
7143
|
+
}
|
|
7144
|
+
|
|
6566
7145
|
/** Configuration for a Style reference image. */
|
|
6567
7146
|
export declare interface StyleReferenceConfig {
|
|
6568
7147
|
/** A text description of the style to use for the generated image. */
|
|
@@ -6698,7 +7277,7 @@ export declare interface SupervisedTuningDataStats {
|
|
|
6698
7277
|
userOutputTokenDistribution?: SupervisedTuningDatasetDistribution;
|
|
6699
7278
|
}
|
|
6700
7279
|
|
|
6701
|
-
/**
|
|
7280
|
+
/** Supervised tuning spec for tuning. */
|
|
6702
7281
|
export declare interface SupervisedTuningSpec {
|
|
6703
7282
|
/** 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. */
|
|
6704
7283
|
exportLastCheckpointOnly?: boolean;
|
|
@@ -6854,25 +7433,24 @@ export declare interface Tool {
|
|
|
6854
7433
|
functionDeclarations?: FunctionDeclaration[];
|
|
6855
7434
|
/** 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. */
|
|
6856
7435
|
retrieval?: Retrieval;
|
|
6857
|
-
/** Optional.
|
|
6858
|
-
that is powered by Google Search. */
|
|
6859
|
-
googleSearch?: GoogleSearch;
|
|
6860
|
-
/** Optional. GoogleSearchRetrieval tool type. Specialized retrieval tool that is powered by Google search. */
|
|
7436
|
+
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
6861
7437
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
6862
|
-
/** Optional. Enterprise web search tool type. Specialized retrieval
|
|
6863
|
-
tool that is powered by Vertex AI Search and Sec4 compliance. */
|
|
6864
|
-
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
6865
|
-
/** Optional. Google Maps tool type. Specialized retrieval tool
|
|
6866
|
-
that is powered by Google Maps. */
|
|
6867
|
-
googleMaps?: GoogleMaps;
|
|
6868
|
-
/** Optional. Tool to support URL context retrieval. */
|
|
6869
|
-
urlContext?: UrlContext;
|
|
6870
7438
|
/** Optional. Tool to support the model interacting directly with the
|
|
6871
7439
|
computer. If enabled, it automatically populates computer-use specific
|
|
6872
7440
|
Function Declarations. */
|
|
6873
7441
|
computerUse?: ComputerUse;
|
|
7442
|
+
/** Optional. Tool to retrieve knowledge from the File Search Stores. */
|
|
7443
|
+
fileSearch?: FileSearch;
|
|
6874
7444
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
6875
7445
|
codeExecution?: ToolCodeExecution;
|
|
7446
|
+
/** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
|
|
7447
|
+
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
7448
|
+
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
7449
|
+
googleMaps?: GoogleMaps;
|
|
7450
|
+
/** Optional. GoogleSearch tool type. Tool to support Google Search in Model. Powered by Google. */
|
|
7451
|
+
googleSearch?: GoogleSearch;
|
|
7452
|
+
/** Optional. Tool to support URL context retrieval. */
|
|
7453
|
+
urlContext?: UrlContext;
|
|
6876
7454
|
}
|
|
6877
7455
|
|
|
6878
7456
|
/** 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. */
|
|
@@ -6893,14 +7471,14 @@ export declare type ToolListUnion = ToolUnion[];
|
|
|
6893
7471
|
|
|
6894
7472
|
export declare type ToolUnion = Tool | CallableTool;
|
|
6895
7473
|
|
|
6896
|
-
/** Output only.
|
|
7474
|
+
/** Output only. The traffic type for this request. This enum is not supported in Gemini API. */
|
|
6897
7475
|
export declare enum TrafficType {
|
|
6898
7476
|
/**
|
|
6899
7477
|
* Unspecified request traffic type.
|
|
6900
7478
|
*/
|
|
6901
7479
|
TRAFFIC_TYPE_UNSPECIFIED = "TRAFFIC_TYPE_UNSPECIFIED",
|
|
6902
7480
|
/**
|
|
6903
|
-
*
|
|
7481
|
+
* The request was processed using Pay-As-You-Go quota.
|
|
6904
7482
|
*/
|
|
6905
7483
|
ON_DEMAND = "ON_DEMAND",
|
|
6906
7484
|
/**
|
|
@@ -7021,6 +7599,8 @@ export declare interface TuningJob {
|
|
|
7021
7599
|
preTunedModel?: PreTunedModel;
|
|
7022
7600
|
/** Tuning Spec for Supervised Fine Tuning. */
|
|
7023
7601
|
supervisedTuningSpec?: SupervisedTuningSpec;
|
|
7602
|
+
/** Tuning Spec for Preference Optimization. */
|
|
7603
|
+
preferenceOptimizationSpec?: PreferenceOptimizationSpec;
|
|
7024
7604
|
/** Output only. The tuning data statistics associated with this TuningJob. */
|
|
7025
7605
|
tuningDataStats?: TuningDataStats;
|
|
7026
7606
|
/** 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. */
|
|
@@ -7039,13 +7619,25 @@ export declare interface TuningJob {
|
|
|
7039
7619
|
pipelineJob?: string;
|
|
7040
7620
|
/** 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. */
|
|
7041
7621
|
serviceAccount?: string;
|
|
7042
|
-
/** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
|
|
7622
|
+
/** 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. */
|
|
7043
7623
|
tunedModelDisplayName?: string;
|
|
7044
7624
|
/** Tuning Spec for Veo Tuning. */
|
|
7045
7625
|
veoTuningSpec?: VeoTuningSpec;
|
|
7046
7626
|
}
|
|
7047
7627
|
|
|
7048
|
-
/**
|
|
7628
|
+
/** Enum representing the tuning method. */
|
|
7629
|
+
export declare enum TuningMethod {
|
|
7630
|
+
/**
|
|
7631
|
+
* Supervised fine tuning.
|
|
7632
|
+
*/
|
|
7633
|
+
SUPERVISED_FINE_TUNING = "SUPERVISED_FINE_TUNING",
|
|
7634
|
+
/**
|
|
7635
|
+
* Preference optimization tuning.
|
|
7636
|
+
*/
|
|
7637
|
+
PREFERENCE_TUNING = "PREFERENCE_TUNING"
|
|
7638
|
+
}
|
|
7639
|
+
|
|
7640
|
+
/** Tuning mode. This enum is not supported in Gemini API. */
|
|
7049
7641
|
export declare enum TuningMode {
|
|
7050
7642
|
/**
|
|
7051
7643
|
* Tuning mode is unspecified.
|
|
@@ -7126,7 +7718,7 @@ declare class Tunings extends BaseModule {
|
|
|
7126
7718
|
private tuneMldevInternal;
|
|
7127
7719
|
}
|
|
7128
7720
|
|
|
7129
|
-
/**
|
|
7721
|
+
/** The tuning task. Either I2V or T2V. This enum is not supported in Gemini API. */
|
|
7130
7722
|
export declare enum TuningTask {
|
|
7131
7723
|
/**
|
|
7132
7724
|
* Default value. This value is unused.
|
|
@@ -7139,7 +7731,11 @@ export declare enum TuningTask {
|
|
|
7139
7731
|
/**
|
|
7140
7732
|
* Tuning task for text to video.
|
|
7141
7733
|
*/
|
|
7142
|
-
TUNING_TASK_T2V = "TUNING_TASK_T2V"
|
|
7734
|
+
TUNING_TASK_T2V = "TUNING_TASK_T2V",
|
|
7735
|
+
/**
|
|
7736
|
+
* Tuning task for reference to video.
|
|
7737
|
+
*/
|
|
7738
|
+
TUNING_TASK_R2V = "TUNING_TASK_R2V"
|
|
7143
7739
|
}
|
|
7144
7740
|
|
|
7145
7741
|
export declare interface TuningValidationDataset {
|
|
@@ -7185,7 +7781,7 @@ export declare enum TurnCoverage {
|
|
|
7185
7781
|
TURN_INCLUDES_ALL_INPUT = "TURN_INCLUDES_ALL_INPUT"
|
|
7186
7782
|
}
|
|
7187
7783
|
|
|
7188
|
-
/**
|
|
7784
|
+
/** The type of the data. */
|
|
7189
7785
|
export declare enum Type {
|
|
7190
7786
|
/**
|
|
7191
7787
|
* Not specified, should not be used.
|
|
@@ -7238,23 +7834,25 @@ declare namespace types {
|
|
|
7238
7834
|
Language,
|
|
7239
7835
|
FunctionResponseScheduling,
|
|
7240
7836
|
Type,
|
|
7837
|
+
Mode,
|
|
7838
|
+
ApiSpec,
|
|
7839
|
+
AuthType,
|
|
7840
|
+
HttpElementLocation,
|
|
7841
|
+
PhishBlockThreshold,
|
|
7241
7842
|
HarmCategory,
|
|
7242
7843
|
HarmBlockMethod,
|
|
7243
7844
|
HarmBlockThreshold,
|
|
7244
|
-
Mode,
|
|
7245
|
-
AuthType,
|
|
7246
|
-
ApiSpec,
|
|
7247
|
-
UrlRetrievalStatus,
|
|
7248
7845
|
FinishReason,
|
|
7249
7846
|
HarmProbability,
|
|
7250
7847
|
HarmSeverity,
|
|
7848
|
+
UrlRetrievalStatus,
|
|
7251
7849
|
BlockedReason,
|
|
7252
7850
|
TrafficType,
|
|
7253
7851
|
Modality,
|
|
7254
7852
|
MediaResolution,
|
|
7255
|
-
JobState,
|
|
7256
7853
|
TuningMode,
|
|
7257
7854
|
AdapterSize,
|
|
7855
|
+
JobState,
|
|
7258
7856
|
TuningTask,
|
|
7259
7857
|
FeatureSelectionPreference,
|
|
7260
7858
|
Behavior,
|
|
@@ -7272,6 +7870,8 @@ declare namespace types {
|
|
|
7272
7870
|
VideoGenerationReferenceType,
|
|
7273
7871
|
VideoGenerationMaskMode,
|
|
7274
7872
|
VideoCompressionQuality,
|
|
7873
|
+
TuningMethod,
|
|
7874
|
+
DocumentState,
|
|
7275
7875
|
FileState,
|
|
7276
7876
|
FileSource,
|
|
7277
7877
|
TurnCompleteReason,
|
|
@@ -7283,39 +7883,34 @@ declare namespace types {
|
|
|
7283
7883
|
Scale,
|
|
7284
7884
|
MusicGenerationMode,
|
|
7285
7885
|
LiveMusicPlaybackControl,
|
|
7286
|
-
VideoMetadata,
|
|
7287
|
-
Blob_2 as Blob,
|
|
7288
|
-
FileData,
|
|
7289
7886
|
FunctionCall,
|
|
7290
7887
|
CodeExecutionResult,
|
|
7291
7888
|
ExecutableCode,
|
|
7889
|
+
FileData,
|
|
7292
7890
|
FunctionResponseBlob,
|
|
7293
7891
|
FunctionResponseFileData,
|
|
7294
7892
|
FunctionResponsePart,
|
|
7295
7893
|
FunctionResponse,
|
|
7894
|
+
Blob_2 as Blob,
|
|
7895
|
+
VideoMetadata,
|
|
7296
7896
|
Part,
|
|
7297
7897
|
Content,
|
|
7298
7898
|
HttpOptions,
|
|
7299
7899
|
Schema,
|
|
7300
7900
|
ModelSelectionConfig,
|
|
7301
|
-
SafetySetting,
|
|
7302
7901
|
FunctionDeclaration,
|
|
7303
|
-
Interval,
|
|
7304
|
-
GoogleSearch,
|
|
7305
7902
|
DynamicRetrievalConfig,
|
|
7306
7903
|
GoogleSearchRetrieval,
|
|
7307
|
-
|
|
7904
|
+
ComputerUse,
|
|
7905
|
+
FileSearch,
|
|
7906
|
+
ApiAuthApiKeyConfig,
|
|
7907
|
+
ApiAuth,
|
|
7308
7908
|
ApiKeyConfig,
|
|
7309
7909
|
AuthConfigGoogleServiceAccountConfig,
|
|
7310
7910
|
AuthConfigHttpBasicAuthConfig,
|
|
7311
7911
|
AuthConfigOauthConfig,
|
|
7312
7912
|
AuthConfigOidcConfig,
|
|
7313
7913
|
AuthConfig,
|
|
7314
|
-
GoogleMaps,
|
|
7315
|
-
UrlContext,
|
|
7316
|
-
ComputerUse,
|
|
7317
|
-
ApiAuthApiKeyConfig,
|
|
7318
|
-
ApiAuth,
|
|
7319
7914
|
ExternalApiElasticSearchParams,
|
|
7320
7915
|
ExternalApiSimpleSearchParams,
|
|
7321
7916
|
ExternalApi,
|
|
@@ -7331,22 +7926,23 @@ declare namespace types {
|
|
|
7331
7926
|
VertexRagStore,
|
|
7332
7927
|
Retrieval,
|
|
7333
7928
|
ToolCodeExecution,
|
|
7929
|
+
EnterpriseWebSearch,
|
|
7930
|
+
GoogleMaps,
|
|
7931
|
+
Interval,
|
|
7932
|
+
GoogleSearch,
|
|
7933
|
+
UrlContext,
|
|
7334
7934
|
Tool,
|
|
7335
7935
|
FunctionCallingConfig,
|
|
7336
7936
|
LatLng,
|
|
7337
7937
|
RetrievalConfig,
|
|
7338
7938
|
ToolConfig,
|
|
7339
|
-
PrebuiltVoiceConfig,
|
|
7340
|
-
VoiceConfig,
|
|
7341
|
-
SpeakerVoiceConfig,
|
|
7342
|
-
MultiSpeakerVoiceConfig,
|
|
7343
|
-
SpeechConfig,
|
|
7344
7939
|
AutomaticFunctionCallingConfig,
|
|
7345
7940
|
ThinkingConfig,
|
|
7346
7941
|
ImageConfig,
|
|
7347
7942
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
7348
7943
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
7349
7944
|
GenerationConfigRoutingConfig,
|
|
7945
|
+
SafetySetting,
|
|
7350
7946
|
GenerateContentConfig,
|
|
7351
7947
|
GenerateContentParameters,
|
|
7352
7948
|
HttpResponse,
|
|
@@ -7354,8 +7950,6 @@ declare namespace types {
|
|
|
7354
7950
|
GoogleTypeDate,
|
|
7355
7951
|
Citation,
|
|
7356
7952
|
CitationMetadata,
|
|
7357
|
-
UrlMetadata,
|
|
7358
|
-
UrlContextMetadata,
|
|
7359
7953
|
GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution,
|
|
7360
7954
|
GroundingChunkMapsPlaceAnswerSourcesReviewSnippet,
|
|
7361
7955
|
GroundingChunkMapsPlaceAnswerSources,
|
|
@@ -7375,6 +7969,8 @@ declare namespace types {
|
|
|
7375
7969
|
LogprobsResultTopCandidates,
|
|
7376
7970
|
LogprobsResult,
|
|
7377
7971
|
SafetyRating,
|
|
7972
|
+
UrlMetadata,
|
|
7973
|
+
UrlContextMetadata,
|
|
7378
7974
|
Candidate,
|
|
7379
7975
|
GenerateContentResponsePromptFeedback,
|
|
7380
7976
|
ModalityTokenCount,
|
|
@@ -7427,6 +8023,11 @@ declare namespace types {
|
|
|
7427
8023
|
DeleteModelConfig,
|
|
7428
8024
|
DeleteModelParameters,
|
|
7429
8025
|
DeleteModelResponse,
|
|
8026
|
+
PrebuiltVoiceConfig,
|
|
8027
|
+
VoiceConfig,
|
|
8028
|
+
SpeakerVoiceConfig,
|
|
8029
|
+
MultiSpeakerVoiceConfig,
|
|
8030
|
+
SpeechConfig,
|
|
7430
8031
|
GenerationConfig,
|
|
7431
8032
|
CountTokensConfig,
|
|
7432
8033
|
CountTokensParameters,
|
|
@@ -7449,10 +8050,12 @@ declare namespace types {
|
|
|
7449
8050
|
GetTuningJobParameters,
|
|
7450
8051
|
TunedModelCheckpoint,
|
|
7451
8052
|
TunedModel,
|
|
7452
|
-
GoogleRpcStatus,
|
|
7453
|
-
PreTunedModel,
|
|
7454
8053
|
SupervisedHyperParameters,
|
|
7455
8054
|
SupervisedTuningSpec,
|
|
8055
|
+
PreferenceOptimizationHyperParameters,
|
|
8056
|
+
PreferenceOptimizationSpec,
|
|
8057
|
+
GoogleRpcStatus,
|
|
8058
|
+
PreTunedModel,
|
|
7456
8059
|
DatasetDistributionDistributionBucket,
|
|
7457
8060
|
DatasetDistribution,
|
|
7458
8061
|
DatasetStats,
|
|
@@ -7494,6 +8097,35 @@ declare namespace types {
|
|
|
7494
8097
|
ListCachedContentsConfig,
|
|
7495
8098
|
ListCachedContentsParameters,
|
|
7496
8099
|
ListCachedContentsResponse,
|
|
8100
|
+
GetDocumentConfig,
|
|
8101
|
+
GetDocumentParameters,
|
|
8102
|
+
StringList,
|
|
8103
|
+
CustomMetadata,
|
|
8104
|
+
Document_2 as Document,
|
|
8105
|
+
DeleteDocumentConfig,
|
|
8106
|
+
DeleteDocumentParameters,
|
|
8107
|
+
ListDocumentsConfig,
|
|
8108
|
+
ListDocumentsParameters,
|
|
8109
|
+
ListDocumentsResponse,
|
|
8110
|
+
CreateFileSearchStoreConfig,
|
|
8111
|
+
CreateFileSearchStoreParameters,
|
|
8112
|
+
FileSearchStore,
|
|
8113
|
+
GetFileSearchStoreConfig,
|
|
8114
|
+
GetFileSearchStoreParameters,
|
|
8115
|
+
DeleteFileSearchStoreConfig,
|
|
8116
|
+
DeleteFileSearchStoreParameters,
|
|
8117
|
+
ListFileSearchStoresConfig,
|
|
8118
|
+
ListFileSearchStoresParameters,
|
|
8119
|
+
ListFileSearchStoresResponse,
|
|
8120
|
+
WhiteSpaceConfig,
|
|
8121
|
+
ChunkingConfig,
|
|
8122
|
+
UploadToFileSearchStoreConfig,
|
|
8123
|
+
UploadToFileSearchStoreParameters,
|
|
8124
|
+
UploadToFileSearchStoreResumableResponse,
|
|
8125
|
+
ImportFileConfig,
|
|
8126
|
+
ImportFileParameters,
|
|
8127
|
+
ImportFileResponse,
|
|
8128
|
+
ImportFileOperation,
|
|
7497
8129
|
ListFilesConfig,
|
|
7498
8130
|
ListFilesParameters,
|
|
7499
8131
|
FileStatus,
|
|
@@ -7516,6 +8148,7 @@ declare namespace types {
|
|
|
7516
8148
|
BatchJobDestination,
|
|
7517
8149
|
CreateBatchJobConfig,
|
|
7518
8150
|
CreateBatchJobParameters,
|
|
8151
|
+
CompletionStats,
|
|
7519
8152
|
BatchJob,
|
|
7520
8153
|
EmbedContentBatch,
|
|
7521
8154
|
EmbeddingsBatchJobSource,
|
|
@@ -7608,6 +8241,8 @@ declare namespace types {
|
|
|
7608
8241
|
CreateAuthTokenParameters,
|
|
7609
8242
|
OperationGetParameters,
|
|
7610
8243
|
CreateTuningJobParameters,
|
|
8244
|
+
UploadToFileSearchStoreResponse,
|
|
8245
|
+
UploadToFileSearchStoreOperation,
|
|
7611
8246
|
BlobImageUnion,
|
|
7612
8247
|
PartUnion,
|
|
7613
8248
|
PartListUnion,
|
|
@@ -7683,6 +8318,17 @@ declare interface Uploader {
|
|
|
7683
8318
|
* @return A Promise that resolves to types.File.
|
|
7684
8319
|
*/
|
|
7685
8320
|
upload(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<File_2>;
|
|
8321
|
+
/**
|
|
8322
|
+
* Uploads a file to file search store via the given upload url.
|
|
8323
|
+
*
|
|
8324
|
+
* @param file The file to upload. file is in string type or a Blob.
|
|
8325
|
+
* @param uploadUrl The upload URL as a string is where the file will be
|
|
8326
|
+
* uploaded to. The uploadUrl must be a url that was returned by the
|
|
8327
|
+
* https://generativelanguage.googleapis.com/upload/v1beta/{file_search_store_name}:uploadToFileSearchStore endpoint
|
|
8328
|
+
* @param apiClient The ApiClient to use for uploading.
|
|
8329
|
+
* @return A Promise that resolves to types.UploadToFileSearchStoreOperation.
|
|
8330
|
+
*/
|
|
8331
|
+
uploadToFileSearchStore(file: string | Blob, uploadUrl: string, apiClient: ApiClient): Promise<UploadToFileSearchStoreOperation>;
|
|
7686
8332
|
/**
|
|
7687
8333
|
* Returns the file's mimeType and the size of a given file. If the file is a
|
|
7688
8334
|
* string path, the file type is determined by the file extension. If the
|
|
@@ -7721,6 +8367,82 @@ export declare interface UploadFileParameters {
|
|
|
7721
8367
|
config?: UploadFileConfig;
|
|
7722
8368
|
}
|
|
7723
8369
|
|
|
8370
|
+
/** Optional parameters for uploading a file to a FileSearchStore. */
|
|
8371
|
+
export declare interface UploadToFileSearchStoreConfig {
|
|
8372
|
+
/** Used to override HTTP request options. */
|
|
8373
|
+
httpOptions?: HttpOptions;
|
|
8374
|
+
/** Abort signal which can be used to cancel the request.
|
|
8375
|
+
|
|
8376
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
8377
|
+
operation will not cancel the request in the service. You will still
|
|
8378
|
+
be charged usage for any applicable operations.
|
|
8379
|
+
*/
|
|
8380
|
+
abortSignal?: AbortSignal;
|
|
8381
|
+
/** MIME type of the file to be uploaded. If not provided, it will be inferred from the file extension. */
|
|
8382
|
+
mimeType?: string;
|
|
8383
|
+
/** Display name of the created document. */
|
|
8384
|
+
displayName?: string;
|
|
8385
|
+
/** User provided custom metadata stored as key-value pairs used for querying. */
|
|
8386
|
+
customMetadata?: CustomMetadata[];
|
|
8387
|
+
/** Config for telling the service how to chunk the file. */
|
|
8388
|
+
chunkingConfig?: ChunkingConfig;
|
|
8389
|
+
}
|
|
8390
|
+
|
|
8391
|
+
/** Long-running operation for uploading a file to a FileSearchStore. */
|
|
8392
|
+
export declare class UploadToFileSearchStoreOperation implements Operation<UploadToFileSearchStoreResponse> {
|
|
8393
|
+
/** 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}`. */
|
|
8394
|
+
name?: string;
|
|
8395
|
+
/** 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. */
|
|
8396
|
+
metadata?: Record<string, unknown>;
|
|
8397
|
+
/** 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. */
|
|
8398
|
+
done?: boolean;
|
|
8399
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
8400
|
+
error?: Record<string, unknown>;
|
|
8401
|
+
/** The result of the UploadToFileSearchStore operation, available when the operation is done. */
|
|
8402
|
+
response?: UploadToFileSearchStoreResponse;
|
|
8403
|
+
/**
|
|
8404
|
+
* Instantiates an Operation of the same type as the one being called with the fields set from the API response.
|
|
8405
|
+
* @internal
|
|
8406
|
+
*/
|
|
8407
|
+
_fromAPIResponse({ apiResponse, _isVertexAI, }: OperationFromAPIResponseParameters): Operation<UploadToFileSearchStoreResponse>;
|
|
8408
|
+
/** The full HTTP response. */
|
|
8409
|
+
sdkHttpResponse?: HttpResponse;
|
|
8410
|
+
}
|
|
8411
|
+
|
|
8412
|
+
/** Generates the parameters for the private _upload_to_file_search_store method. */
|
|
8413
|
+
export declare interface UploadToFileSearchStoreParameters {
|
|
8414
|
+
/** The resource name of the FileSearchStore. Example: `fileSearchStores/my-file-search-store-123` */
|
|
8415
|
+
fileSearchStoreName: string;
|
|
8416
|
+
/** Used to override the default configuration. */
|
|
8417
|
+
config?: UploadToFileSearchStoreConfig;
|
|
8418
|
+
}
|
|
8419
|
+
|
|
8420
|
+
/** Parameters for the upload file to file search store method. */
|
|
8421
|
+
export declare interface UploadToFileSearchStoreParameters {
|
|
8422
|
+
/** The name of the file search store to upload. */
|
|
8423
|
+
fileSearchStoreName: string;
|
|
8424
|
+
/** The string path to the file to be uploaded or a Blob object. */
|
|
8425
|
+
file: string | globalThis.Blob;
|
|
8426
|
+
/** Configuration that contains optional parameters. */
|
|
8427
|
+
config?: UploadToFileSearchStoreConfig;
|
|
8428
|
+
}
|
|
8429
|
+
|
|
8430
|
+
/** The response when long-running operation for uploading a file to a FileSearchStore complete. */
|
|
8431
|
+
export declare class UploadToFileSearchStoreResponse {
|
|
8432
|
+
/** Used to retain the full HTTP response. */
|
|
8433
|
+
sdkHttpResponse?: HttpResponse;
|
|
8434
|
+
/** The name of the FileSearchStore containing Documents. */
|
|
8435
|
+
parent?: string;
|
|
8436
|
+
/** The identifier for the Document imported. */
|
|
8437
|
+
documentName?: string;
|
|
8438
|
+
}
|
|
8439
|
+
|
|
8440
|
+
/** Response for the resumable upload method. */
|
|
8441
|
+
export declare class UploadToFileSearchStoreResumableResponse {
|
|
8442
|
+
/** Used to retain the full HTTP response. */
|
|
8443
|
+
sdkHttpResponse?: HttpResponse;
|
|
8444
|
+
}
|
|
8445
|
+
|
|
7724
8446
|
/** Configuration for upscaling an image.
|
|
7725
8447
|
|
|
7726
8448
|
For more information on this configuration, refer to
|
|
@@ -7738,6 +8460,10 @@ export declare interface UpscaleImageConfig {
|
|
|
7738
8460
|
abortSignal?: AbortSignal;
|
|
7739
8461
|
/** Cloud Storage URI used to store the generated images. */
|
|
7740
8462
|
outputGcsUri?: string;
|
|
8463
|
+
/** Filter level for safety filtering. */
|
|
8464
|
+
safetyFilterLevel?: SafetyFilterLevel;
|
|
8465
|
+
/** Allows generation of people by the model. */
|
|
8466
|
+
personGeneration?: PersonGeneration;
|
|
7741
8467
|
/** Whether to include a reason for filtered-out images in the
|
|
7742
8468
|
response. */
|
|
7743
8469
|
includeRaiReason?: boolean;
|
|
@@ -7778,19 +8504,19 @@ export declare class UpscaleImageResponse {
|
|
|
7778
8504
|
generatedImages?: GeneratedImage[];
|
|
7779
8505
|
}
|
|
7780
8506
|
|
|
7781
|
-
/** Tool to support URL context
|
|
8507
|
+
/** Tool to support URL context. */
|
|
7782
8508
|
export declare interface UrlContext {
|
|
7783
8509
|
}
|
|
7784
8510
|
|
|
7785
8511
|
/** Metadata related to url context retrieval tool. */
|
|
7786
8512
|
export declare interface UrlContextMetadata {
|
|
7787
|
-
/** List of url context. */
|
|
8513
|
+
/** Output only. List of url context. */
|
|
7788
8514
|
urlMetadata?: UrlMetadata[];
|
|
7789
8515
|
}
|
|
7790
8516
|
|
|
7791
|
-
/** Context
|
|
8517
|
+
/** Context of the a single url retrieval. */
|
|
7792
8518
|
export declare interface UrlMetadata {
|
|
7793
|
-
/**
|
|
8519
|
+
/** Retrieved url by the tool. */
|
|
7794
8520
|
retrievedUrl?: string;
|
|
7795
8521
|
/** Status of the url retrieval. */
|
|
7796
8522
|
urlRetrievalStatus?: UrlRetrievalStatus;
|
|
@@ -7799,7 +8525,7 @@ export declare interface UrlMetadata {
|
|
|
7799
8525
|
/** Status of the url retrieval. */
|
|
7800
8526
|
export declare enum UrlRetrievalStatus {
|
|
7801
8527
|
/**
|
|
7802
|
-
* Default value. This value is unused
|
|
8528
|
+
* Default value. This value is unused.
|
|
7803
8529
|
*/
|
|
7804
8530
|
URL_RETRIEVAL_STATUS_UNSPECIFIED = "URL_RETRIEVAL_STATUS_UNSPECIFIED",
|
|
7805
8531
|
/**
|
|
@@ -7811,11 +8537,11 @@ export declare enum UrlRetrievalStatus {
|
|
|
7811
8537
|
*/
|
|
7812
8538
|
URL_RETRIEVAL_STATUS_ERROR = "URL_RETRIEVAL_STATUS_ERROR",
|
|
7813
8539
|
/**
|
|
7814
|
-
* Url retrieval is failed because the content is behind paywall.
|
|
8540
|
+
* Url retrieval is failed because the content is behind paywall. This enum value is not supported in Vertex AI.
|
|
7815
8541
|
*/
|
|
7816
8542
|
URL_RETRIEVAL_STATUS_PAYWALL = "URL_RETRIEVAL_STATUS_PAYWALL",
|
|
7817
8543
|
/**
|
|
7818
|
-
* Url retrieval is failed because the content is unsafe.
|
|
8544
|
+
* Url retrieval is failed because the content is unsafe. This enum value is not supported in Vertex AI.
|
|
7819
8545
|
*/
|
|
7820
8546
|
URL_RETRIEVAL_STATUS_UNSAFE = "URL_RETRIEVAL_STATUS_UNSAFE"
|
|
7821
8547
|
}
|
|
@@ -7999,21 +8725,19 @@ export declare enum VideoGenerationReferenceType {
|
|
|
7999
8725
|
STYLE = "STYLE"
|
|
8000
8726
|
}
|
|
8001
8727
|
|
|
8002
|
-
/**
|
|
8728
|
+
/** Metadata describes the input video content. */
|
|
8003
8729
|
export declare interface VideoMetadata {
|
|
8004
|
-
/** The frame rate of the video sent to the model. If not specified, the
|
|
8005
|
-
default value will be 1.0. The fps range is (0.0, 24.0]. */
|
|
8006
|
-
fps?: number;
|
|
8007
8730
|
/** Optional. The end offset of the video. */
|
|
8008
8731
|
endOffset?: string;
|
|
8732
|
+
/** 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]. */
|
|
8733
|
+
fps?: number;
|
|
8009
8734
|
/** Optional. The start offset of the video. */
|
|
8010
8735
|
startOffset?: string;
|
|
8011
8736
|
}
|
|
8012
8737
|
|
|
8013
8738
|
/** The configuration for the voice to use. */
|
|
8014
8739
|
export declare interface VoiceConfig {
|
|
8015
|
-
/** The configuration for the
|
|
8016
|
-
*/
|
|
8740
|
+
/** The configuration for the prebuilt voice to use. */
|
|
8017
8741
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
8018
8742
|
}
|
|
8019
8743
|
|
|
@@ -8064,4 +8788,12 @@ export declare interface WeightedPrompt {
|
|
|
8064
8788
|
weight?: number;
|
|
8065
8789
|
}
|
|
8066
8790
|
|
|
8791
|
+
/** Configuration for a white space chunking algorithm. */
|
|
8792
|
+
export declare interface WhiteSpaceConfig {
|
|
8793
|
+
/** Maximum number of tokens per chunk. */
|
|
8794
|
+
maxTokensPerChunk?: number;
|
|
8795
|
+
/** Maximum number of overlapping tokens between two adjacent chunks. */
|
|
8796
|
+
maxOverlapTokens?: number;
|
|
8797
|
+
}
|
|
8798
|
+
|
|
8067
8799
|
export { }
|