@google/genai 2.9.0 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/genai.d.ts +215 -19
- package/dist/index.cjs +134 -29
- package/dist/index.mjs +135 -30
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +134 -29
- package/dist/node/index.mjs +135 -30
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +215 -19
- package/dist/tokenizer/node.cjs +56 -20
- package/dist/tokenizer/node.d.ts +41 -10
- package/dist/tokenizer/node.mjs +56 -20
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +57 -21
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +47 -15
- package/dist/vertex_internal/index.js +57 -21
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +135 -30
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +215 -19
- package/package.json +1 -1
package/dist/node/node.d.ts
CHANGED
|
@@ -1031,7 +1031,7 @@ export declare interface BatchJob {
|
|
|
1031
1031
|
outputInfo?: BatchJobOutputInfo;
|
|
1032
1032
|
}
|
|
1033
1033
|
|
|
1034
|
-
/** Config for `
|
|
1034
|
+
/** Config for `dest` parameter. */
|
|
1035
1035
|
export declare interface BatchJobDestination {
|
|
1036
1036
|
/** Storage format of the output files. Must be one of:
|
|
1037
1037
|
'jsonl', 'bigquery', 'vertex-dataset'.
|
|
@@ -1752,15 +1752,12 @@ declare type ComputerUse$ = ComputerUse_2;
|
|
|
1752
1752
|
export declare interface ComputerUse {
|
|
1753
1753
|
/** Required. The environment being operated. */
|
|
1754
1754
|
environment?: Environment;
|
|
1755
|
-
/** By default, predefined functions are included in the final model call.
|
|
1756
|
-
Some of them can be explicitly excluded from being automatically included.
|
|
1757
|
-
This can serve two purposes:
|
|
1758
|
-
1. Using a more restricted / different action space.
|
|
1759
|
-
2. Improving the definitions / instructions of predefined functions. */
|
|
1755
|
+
/** Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions. */
|
|
1760
1756
|
excludedPredefinedFunctions?: string[];
|
|
1761
|
-
/** Optional.
|
|
1762
|
-
*/
|
|
1757
|
+
/** Optional. Enables the prompt injection detection check on computer-use request. */
|
|
1763
1758
|
enablePromptInjectionDetection?: boolean;
|
|
1759
|
+
/** Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI. */
|
|
1760
|
+
disabledSafetyPolicies?: SafetyPolicy[];
|
|
1764
1761
|
}
|
|
1765
1762
|
|
|
1766
1763
|
/**
|
|
@@ -1783,6 +1780,10 @@ declare type ComputerUse_2 = {
|
|
|
1783
1780
|
* request.
|
|
1784
1781
|
*/
|
|
1785
1782
|
enable_prompt_injection_detection?: boolean | undefined;
|
|
1783
|
+
/**
|
|
1784
|
+
* Optional. Disabled safety policies for computer use.
|
|
1785
|
+
*/
|
|
1786
|
+
disabled_safety_policies?: Array<DisabledSafetyPolicy> | undefined;
|
|
1786
1787
|
};
|
|
1787
1788
|
|
|
1788
1789
|
/** Optional parameters for computing tokens. */
|
|
@@ -2935,6 +2936,8 @@ declare type DeleteWebhookRequest = {
|
|
|
2935
2936
|
*/
|
|
2936
2937
|
declare type Disabled = "disabled";
|
|
2937
2938
|
|
|
2939
|
+
declare type DisabledSafetyPolicy = "financial_transactions" | "sensitive_data_modification" | "communication_tool" | "account_creation" | "data_modification" | "user_consent_management" | "legal_terms_and_agreements" | (string & {});
|
|
2940
|
+
|
|
2938
2941
|
/** Statistics for distillation prompt dataset. These statistics do not include the responses sampled from the teacher model. This data type is not supported in Gemini API. */
|
|
2939
2942
|
export declare interface DistillationDataStats {
|
|
2940
2943
|
/** Output only. Statistics computed for the training dataset. */
|
|
@@ -3550,6 +3553,8 @@ declare type EnvironmentNetworkEgressAllowlist = Allowlist | Disabled;
|
|
|
3550
3553
|
|
|
3551
3554
|
declare type Error$ = ErrorT;
|
|
3552
3555
|
|
|
3556
|
+
declare type Error$2 = Status;
|
|
3557
|
+
|
|
3553
3558
|
declare type ErrorEvent$ = ErrorEvent_2;
|
|
3554
3559
|
|
|
3555
3560
|
declare type ErrorEvent_2 = {
|
|
@@ -3845,7 +3850,7 @@ export declare class Files extends BaseModule {
|
|
|
3845
3850
|
* file extension.
|
|
3846
3851
|
* - For Blob object inputs, the `mimeType` will be set to the Blob's `type`
|
|
3847
3852
|
* property.
|
|
3848
|
-
*
|
|
3853
|
+
* Some examples for file extension to mimeType mapping:
|
|
3849
3854
|
* .txt -> text/plain
|
|
3850
3855
|
* .json -> application/json
|
|
3851
3856
|
* .jpg -> image/jpeg
|
|
@@ -5344,6 +5349,10 @@ declare type GenerationConfig_2 = {
|
|
|
5344
5349
|
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
5345
5350
|
*/
|
|
5346
5351
|
image_config?: ImageConfig_2 | undefined;
|
|
5352
|
+
/**
|
|
5353
|
+
* Configuration options for video generation.
|
|
5354
|
+
*/
|
|
5355
|
+
video_config?: VideoConfig | undefined;
|
|
5347
5356
|
/**
|
|
5348
5357
|
* Penalizes tokens that have already appeared in the generated
|
|
5349
5358
|
*
|
|
@@ -7228,7 +7237,8 @@ export declare namespace Interactions {
|
|
|
7228
7237
|
export type MCPServerToolCallStep = MCPServerToolCallStep$;
|
|
7229
7238
|
export type MCPServerToolResultStep = MCPServerToolResultStep$;
|
|
7230
7239
|
export type Model = Model$;
|
|
7231
|
-
export
|
|
7240
|
+
export interface ModelOutputStep extends ModelOutputStep$ {
|
|
7241
|
+
}
|
|
7232
7242
|
export interface PlaceCitation extends PlaceCitation$ {
|
|
7233
7243
|
}
|
|
7234
7244
|
export type SpeechConfig = SpeechConfig$;
|
|
@@ -7256,7 +7266,9 @@ export declare namespace Interactions {
|
|
|
7256
7266
|
export interface Usage extends Usage$ {
|
|
7257
7267
|
}
|
|
7258
7268
|
export type UserInputStep = UserInputStep$;
|
|
7269
|
+
export type VideoConfig = VideoConfig$;
|
|
7259
7270
|
export type VideoContent = VideoContent$;
|
|
7271
|
+
export type VideoResponseFormat = VideoResponseFormat$;
|
|
7260
7272
|
export type WebhookConfig = WebhookConfig$;
|
|
7261
7273
|
export namespace CodeExecutionCallStep {
|
|
7262
7274
|
export type Arguments = Arguments$;
|
|
@@ -7313,6 +7325,9 @@ export declare namespace Interactions {
|
|
|
7313
7325
|
export namespace InteractionStatusUpdate {
|
|
7314
7326
|
export type Metadata = Metadata$4;
|
|
7315
7327
|
}
|
|
7328
|
+
export namespace ModelOutputStep {
|
|
7329
|
+
export type Error = Error$2;
|
|
7330
|
+
}
|
|
7316
7331
|
export namespace PlaceCitation {
|
|
7317
7332
|
export type ReviewSnippet = ReviewSnippet$3;
|
|
7318
7333
|
}
|
|
@@ -7398,6 +7413,7 @@ declare namespace interactions {
|
|
|
7398
7413
|
CodeExecutionResultStep,
|
|
7399
7414
|
CodeExecution,
|
|
7400
7415
|
EnvironmentEnum,
|
|
7416
|
+
DisabledSafetyPolicy,
|
|
7401
7417
|
ComputerUse_2 as ComputerUse,
|
|
7402
7418
|
Content_2 as Content,
|
|
7403
7419
|
CreateAgentInteractionResponseFormat,
|
|
@@ -7517,6 +7533,7 @@ declare namespace interactions {
|
|
|
7517
7533
|
SourceType,
|
|
7518
7534
|
Source,
|
|
7519
7535
|
SpeechConfig_2 as SpeechConfig,
|
|
7536
|
+
Status,
|
|
7520
7537
|
StepDeltaData,
|
|
7521
7538
|
StepDeltaMetadata,
|
|
7522
7539
|
StepDelta,
|
|
@@ -7553,10 +7570,15 @@ declare namespace interactions {
|
|
|
7553
7570
|
Usage,
|
|
7554
7571
|
UserInputStep,
|
|
7555
7572
|
VertexAISearchConfig,
|
|
7573
|
+
Task,
|
|
7574
|
+
VideoConfig,
|
|
7556
7575
|
VideoContentMimeType,
|
|
7557
7576
|
VideoContent,
|
|
7558
7577
|
VideoDeltaMimeType,
|
|
7559
7578
|
VideoDelta,
|
|
7579
|
+
VideoResponseFormatDelivery,
|
|
7580
|
+
VideoResponseFormatAspectRatio,
|
|
7581
|
+
VideoResponseFormat,
|
|
7560
7582
|
WebhookConfig_2 as WebhookConfig
|
|
7561
7583
|
}
|
|
7562
7584
|
}
|
|
@@ -8783,9 +8805,9 @@ export declare interface LiveServerSessionResumptionUpdate {
|
|
|
8783
8805
|
resumable?: boolean;
|
|
8784
8806
|
/** Index of last message sent by client that is included in state represented by this SessionResumptionToken. Only sent when `SessionResumptionConfig.transparent` is set.
|
|
8785
8807
|
|
|
8786
|
-
Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `
|
|
8808
|
+
Presence of this index allows users to transparently reconnect and avoid issue of losing some part of realtime audio input/video. If client wishes to temporarily disconnect (for example as result of receiving GoAway) they can do it without losing state by buffering messages sent since last `SessionResumptionTokenUpdate`. This field will enable them to limit buffering (avoid keeping all requests in RAM).
|
|
8787
8809
|
|
|
8788
|
-
Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames
|
|
8810
|
+
Note: This should not be used for when resuming a session at some time later -- in those cases partial audio and video frames are likely not needed. */
|
|
8789
8811
|
lastConsumedClientMessageIndex?: string;
|
|
8790
8812
|
}
|
|
8791
8813
|
|
|
@@ -9247,6 +9269,18 @@ declare type ModelOutputStep$ = ModelOutputStep;
|
|
|
9247
9269
|
declare type ModelOutputStep = {
|
|
9248
9270
|
type: "model_output";
|
|
9249
9271
|
content?: Array<Content_2> | undefined;
|
|
9272
|
+
/**
|
|
9273
|
+
* The `Status` type defines a logical error model that is suitable for
|
|
9274
|
+
*
|
|
9275
|
+
* @remarks
|
|
9276
|
+
* different programming environments, including REST APIs and RPC APIs. It is
|
|
9277
|
+
* used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
9278
|
+
* three pieces of data: error code, error message, and error details.
|
|
9279
|
+
*
|
|
9280
|
+
* You can find out more about this error model and how to work with it in the
|
|
9281
|
+
* [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
9282
|
+
*/
|
|
9283
|
+
error?: Status | undefined;
|
|
9250
9284
|
};
|
|
9251
9285
|
|
|
9252
9286
|
export declare class Models extends BaseModule {
|
|
@@ -9320,7 +9354,7 @@ export declare class Models extends BaseModule {
|
|
|
9320
9354
|
* To maintain backward compatibility, we move the data that was treated as
|
|
9321
9355
|
* JSON schema from the responseSchema field to the responseJsonSchema field.
|
|
9322
9356
|
*/
|
|
9323
|
-
private
|
|
9357
|
+
private maybeMoveToResponseJsonSchema;
|
|
9324
9358
|
/**
|
|
9325
9359
|
* Makes an API request to generate content with a given model and yields the
|
|
9326
9360
|
* response in chunks.
|
|
@@ -10848,7 +10882,7 @@ export declare enum ResourceScope {
|
|
|
10848
10882
|
COLLECTION = "COLLECTION"
|
|
10849
10883
|
}
|
|
10850
10884
|
|
|
10851
|
-
declare type ResponseFormat = AudioResponseFormat | TextResponseFormat | ImageResponseFormat | {
|
|
10885
|
+
declare type ResponseFormat = AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | {
|
|
10852
10886
|
[k: string]: any;
|
|
10853
10887
|
};
|
|
10854
10888
|
|
|
@@ -11040,6 +11074,42 @@ export declare enum SafetyFilterLevel {
|
|
|
11040
11074
|
BLOCK_NONE = "BLOCK_NONE"
|
|
11041
11075
|
}
|
|
11042
11076
|
|
|
11077
|
+
/** SafetyPolicy */
|
|
11078
|
+
export declare enum SafetyPolicy {
|
|
11079
|
+
/**
|
|
11080
|
+
* Unspecified safety policy.
|
|
11081
|
+
*/
|
|
11082
|
+
SAFETY_POLICY_UNSPECIFIED = "SAFETY_POLICY_UNSPECIFIED",
|
|
11083
|
+
/**
|
|
11084
|
+
* Safety policy for financial transactions.
|
|
11085
|
+
*/
|
|
11086
|
+
FINANCIAL_TRANSACTIONS = "FINANCIAL_TRANSACTIONS",
|
|
11087
|
+
/**
|
|
11088
|
+
* Safety policy for sensitive data modification.
|
|
11089
|
+
*/
|
|
11090
|
+
SENSITIVE_DATA_MODIFICATION = "SENSITIVE_DATA_MODIFICATION",
|
|
11091
|
+
/**
|
|
11092
|
+
* Safety policy for communication tools (e.g. Gmail, Chat, Meet).
|
|
11093
|
+
*/
|
|
11094
|
+
COMMUNICATION_TOOL = "COMMUNICATION_TOOL",
|
|
11095
|
+
/**
|
|
11096
|
+
* Safety policy for account creation.
|
|
11097
|
+
*/
|
|
11098
|
+
ACCOUNT_CREATION = "ACCOUNT_CREATION",
|
|
11099
|
+
/**
|
|
11100
|
+
* Safety policy for data modification.
|
|
11101
|
+
*/
|
|
11102
|
+
DATA_MODIFICATION = "DATA_MODIFICATION",
|
|
11103
|
+
/**
|
|
11104
|
+
* Safety policy for user consent management.
|
|
11105
|
+
*/
|
|
11106
|
+
USER_CONSENT_MANAGEMENT = "USER_CONSENT_MANAGEMENT",
|
|
11107
|
+
/**
|
|
11108
|
+
* Safety policy for legal terms and agreements.
|
|
11109
|
+
*/
|
|
11110
|
+
LEGAL_TERMS_AND_AGREEMENTS = "LEGAL_TERMS_AND_AGREEMENTS"
|
|
11111
|
+
}
|
|
11112
|
+
|
|
11043
11113
|
/** A safety rating for a piece of content. The safety rating contains the harm category and the harm probability level. */
|
|
11044
11114
|
export declare interface SafetyRating {
|
|
11045
11115
|
/** Output only. Indicates whether the content was blocked because of this rating. */
|
|
@@ -11668,6 +11738,48 @@ export declare enum StartSensitivity {
|
|
|
11668
11738
|
START_SENSITIVITY_LOW = "START_SENSITIVITY_LOW"
|
|
11669
11739
|
}
|
|
11670
11740
|
|
|
11741
|
+
/**
|
|
11742
|
+
* @license
|
|
11743
|
+
* Copyright 2026 Google LLC
|
|
11744
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
11745
|
+
*
|
|
11746
|
+
* g3-prettier-ignore-file
|
|
11747
|
+
*/
|
|
11748
|
+
/**
|
|
11749
|
+
* The `Status` type defines a logical error model that is suitable for
|
|
11750
|
+
*
|
|
11751
|
+
* @remarks
|
|
11752
|
+
* different programming environments, including REST APIs and RPC APIs. It is
|
|
11753
|
+
* used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
11754
|
+
* three pieces of data: error code, error message, and error details.
|
|
11755
|
+
*
|
|
11756
|
+
* You can find out more about this error model and how to work with it in the
|
|
11757
|
+
* [API Design Guide](https://cloud.google.com/apis/design/errors).
|
|
11758
|
+
*/
|
|
11759
|
+
declare type Status = {
|
|
11760
|
+
/**
|
|
11761
|
+
* The status code, which should be an enum value of google.rpc.Code.
|
|
11762
|
+
*/
|
|
11763
|
+
code?: number | undefined;
|
|
11764
|
+
/**
|
|
11765
|
+
* A developer-facing error message, which should be in English. Any
|
|
11766
|
+
*
|
|
11767
|
+
* @remarks
|
|
11768
|
+
* user-facing error message should be localized and sent in the
|
|
11769
|
+
* google.rpc.Status.details field, or localized by the client.
|
|
11770
|
+
*/
|
|
11771
|
+
message?: string | undefined;
|
|
11772
|
+
/**
|
|
11773
|
+
* A list of messages that carry the error details. There is a common set of
|
|
11774
|
+
*
|
|
11775
|
+
* @remarks
|
|
11776
|
+
* message types for APIs to use.
|
|
11777
|
+
*/
|
|
11778
|
+
details?: Array<{
|
|
11779
|
+
[k: string]: any;
|
|
11780
|
+
}> | undefined;
|
|
11781
|
+
};
|
|
11782
|
+
|
|
11671
11783
|
declare type Step$ = Step;
|
|
11672
11784
|
|
|
11673
11785
|
/**
|
|
@@ -11730,6 +11842,14 @@ declare type StepStop$ = StepStop;
|
|
|
11730
11842
|
declare type StepStop = {
|
|
11731
11843
|
event_type: "step.stop";
|
|
11732
11844
|
index: number;
|
|
11845
|
+
/**
|
|
11846
|
+
* Statistics on the interaction request's token usage.
|
|
11847
|
+
*/
|
|
11848
|
+
usage?: Usage | undefined;
|
|
11849
|
+
/**
|
|
11850
|
+
* Statistics on the interaction request's token usage.
|
|
11851
|
+
*/
|
|
11852
|
+
step_usage?: Usage | undefined;
|
|
11733
11853
|
/**
|
|
11734
11854
|
* The event_id token to be used to resume the interaction stream, from
|
|
11735
11855
|
*
|
|
@@ -11942,6 +12062,22 @@ export declare interface SupervisedTuningSpec {
|
|
|
11942
12062
|
validationDatasetUri?: string;
|
|
11943
12063
|
}
|
|
11944
12064
|
|
|
12065
|
+
/**
|
|
12066
|
+
* @license
|
|
12067
|
+
* Copyright 2026 Google LLC
|
|
12068
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
12069
|
+
*
|
|
12070
|
+
* g3-prettier-ignore-file
|
|
12071
|
+
*/
|
|
12072
|
+
/**
|
|
12073
|
+
* Optional task mode for video generation. If not specified, the model
|
|
12074
|
+
*
|
|
12075
|
+
* @remarks
|
|
12076
|
+
* automatically determines the appropriate mode based on the provided text
|
|
12077
|
+
* prompt and input media.
|
|
12078
|
+
*/
|
|
12079
|
+
declare type Task = "text_to_video" | "image_to_video" | "reference_to_video" | "edit" | (string & {});
|
|
12080
|
+
|
|
11945
12081
|
export declare interface TestTableFile {
|
|
11946
12082
|
comment?: string;
|
|
11947
12083
|
testMethod?: string;
|
|
@@ -12251,9 +12387,7 @@ declare type Tool$ = Tool_2;
|
|
|
12251
12387
|
export declare interface Tool {
|
|
12252
12388
|
/** 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. */
|
|
12253
12389
|
retrieval?: Retrieval;
|
|
12254
|
-
/** Optional. Tool to support the model interacting directly with the
|
|
12255
|
-
computer. If enabled, it automatically populates computer-use specific
|
|
12256
|
-
Function Declarations. */
|
|
12390
|
+
/** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
|
|
12257
12391
|
computerUse?: ComputerUse;
|
|
12258
12392
|
/** Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora. This field is not supported in Vertex AI. */
|
|
12259
12393
|
fileSearch?: FileSearch;
|
|
@@ -12975,10 +13109,11 @@ declare namespace types {
|
|
|
12975
13109
|
Language,
|
|
12976
13110
|
FunctionResponseScheduling,
|
|
12977
13111
|
Type,
|
|
12978
|
-
Environment,
|
|
12979
13112
|
AuthType,
|
|
12980
13113
|
HttpElementLocation,
|
|
12981
13114
|
ApiSpec,
|
|
13115
|
+
Environment,
|
|
13116
|
+
SafetyPolicy,
|
|
12982
13117
|
PhishBlockThreshold,
|
|
12983
13118
|
Behavior,
|
|
12984
13119
|
DynamicRetrievalConfigMode,
|
|
@@ -13062,7 +13197,6 @@ declare namespace types {
|
|
|
13062
13197
|
HttpOptions,
|
|
13063
13198
|
Schema,
|
|
13064
13199
|
ModelSelectionConfig,
|
|
13065
|
-
ComputerUse,
|
|
13066
13200
|
ApiKeyConfig,
|
|
13067
13201
|
AuthConfigGoogleServiceAccountConfig,
|
|
13068
13202
|
AuthConfigHttpBasicAuthConfig,
|
|
@@ -13086,6 +13220,7 @@ declare namespace types {
|
|
|
13086
13220
|
RagRetrievalConfig,
|
|
13087
13221
|
VertexRagStore,
|
|
13088
13222
|
Retrieval,
|
|
13223
|
+
ComputerUse,
|
|
13089
13224
|
FileSearch,
|
|
13090
13225
|
WebSearch,
|
|
13091
13226
|
ImageSearch,
|
|
@@ -14256,6 +14391,22 @@ export declare enum VideoCompressionQuality {
|
|
|
14256
14391
|
LOSSLESS = "LOSSLESS"
|
|
14257
14392
|
}
|
|
14258
14393
|
|
|
14394
|
+
declare type VideoConfig$ = VideoConfig;
|
|
14395
|
+
|
|
14396
|
+
/**
|
|
14397
|
+
* Configuration options for video generation.
|
|
14398
|
+
*/
|
|
14399
|
+
declare type VideoConfig = {
|
|
14400
|
+
/**
|
|
14401
|
+
* Optional task mode for video generation. If not specified, the model
|
|
14402
|
+
*
|
|
14403
|
+
* @remarks
|
|
14404
|
+
* automatically determines the appropriate mode based on the provided text
|
|
14405
|
+
* prompt and input media.
|
|
14406
|
+
*/
|
|
14407
|
+
task?: Task | undefined;
|
|
14408
|
+
};
|
|
14409
|
+
|
|
14259
14410
|
declare type VideoContent$ = VideoContent;
|
|
14260
14411
|
|
|
14261
14412
|
/**
|
|
@@ -14380,6 +14531,51 @@ export declare enum VideoOrientation {
|
|
|
14380
14531
|
PORTRAIT = "PORTRAIT"
|
|
14381
14532
|
}
|
|
14382
14533
|
|
|
14534
|
+
declare type VideoResponseFormat$ = VideoResponseFormat;
|
|
14535
|
+
|
|
14536
|
+
/**
|
|
14537
|
+
* Configuration for video output format.
|
|
14538
|
+
*/
|
|
14539
|
+
declare type VideoResponseFormat = {
|
|
14540
|
+
type: "video";
|
|
14541
|
+
/**
|
|
14542
|
+
* The delivery mode for the video output.
|
|
14543
|
+
*/
|
|
14544
|
+
delivery?: VideoResponseFormatDelivery | undefined;
|
|
14545
|
+
/**
|
|
14546
|
+
* The GCS URI to store the video output. Required for Vertex if delivery mode
|
|
14547
|
+
*
|
|
14548
|
+
* @remarks
|
|
14549
|
+
* is URI.
|
|
14550
|
+
*/
|
|
14551
|
+
gcs_uri?: string | undefined;
|
|
14552
|
+
/**
|
|
14553
|
+
* The aspect ratio for the video output.
|
|
14554
|
+
*/
|
|
14555
|
+
aspect_ratio?: VideoResponseFormatAspectRatio | undefined;
|
|
14556
|
+
/**
|
|
14557
|
+
* The duration for the video output.
|
|
14558
|
+
*/
|
|
14559
|
+
duration?: string | undefined;
|
|
14560
|
+
};
|
|
14561
|
+
|
|
14562
|
+
/**
|
|
14563
|
+
* The aspect ratio for the video output.
|
|
14564
|
+
*/
|
|
14565
|
+
declare type VideoResponseFormatAspectRatio = "16:9" | "9:16" | (string & {});
|
|
14566
|
+
|
|
14567
|
+
/**
|
|
14568
|
+
* @license
|
|
14569
|
+
* Copyright 2026 Google LLC
|
|
14570
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
14571
|
+
*
|
|
14572
|
+
* g3-prettier-ignore-file
|
|
14573
|
+
*/
|
|
14574
|
+
/**
|
|
14575
|
+
* The delivery mode for the video output.
|
|
14576
|
+
*/
|
|
14577
|
+
declare type VideoResponseFormatDelivery = "inline" | "uri" | (string & {});
|
|
14578
|
+
|
|
14383
14579
|
/**
|
|
14384
14580
|
* Whether to include visualizations in the response.
|
|
14385
14581
|
*/
|
package/dist/tokenizer/node.cjs
CHANGED
|
@@ -121,26 +121,6 @@ var Type;
|
|
|
121
121
|
*/
|
|
122
122
|
Type["NULL"] = "NULL";
|
|
123
123
|
})(Type || (Type = {}));
|
|
124
|
-
/** The environment being operated. */
|
|
125
|
-
var Environment;
|
|
126
|
-
(function (Environment) {
|
|
127
|
-
/**
|
|
128
|
-
* Defaults to browser.
|
|
129
|
-
*/
|
|
130
|
-
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
131
|
-
/**
|
|
132
|
-
* Operates in a web browser.
|
|
133
|
-
*/
|
|
134
|
-
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
135
|
-
/**
|
|
136
|
-
* Operates in a mobile environment.
|
|
137
|
-
*/
|
|
138
|
-
Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
|
|
139
|
-
/**
|
|
140
|
-
* Operates in a desktop environment.
|
|
141
|
-
*/
|
|
142
|
-
Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
|
|
143
|
-
})(Environment || (Environment = {}));
|
|
144
124
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
145
125
|
var AuthType;
|
|
146
126
|
(function (AuthType) {
|
|
@@ -211,6 +191,62 @@ var ApiSpec;
|
|
|
211
191
|
*/
|
|
212
192
|
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
213
193
|
})(ApiSpec || (ApiSpec = {}));
|
|
194
|
+
/** The environment being operated. */
|
|
195
|
+
var Environment;
|
|
196
|
+
(function (Environment) {
|
|
197
|
+
/**
|
|
198
|
+
* Defaults to browser.
|
|
199
|
+
*/
|
|
200
|
+
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
201
|
+
/**
|
|
202
|
+
* Operates in a web browser.
|
|
203
|
+
*/
|
|
204
|
+
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
205
|
+
/**
|
|
206
|
+
* Operates in a mobile environment.
|
|
207
|
+
*/
|
|
208
|
+
Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
|
|
209
|
+
/**
|
|
210
|
+
* Operates in a desktop environment.
|
|
211
|
+
*/
|
|
212
|
+
Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
|
|
213
|
+
})(Environment || (Environment = {}));
|
|
214
|
+
/** SafetyPolicy */
|
|
215
|
+
var SafetyPolicy;
|
|
216
|
+
(function (SafetyPolicy) {
|
|
217
|
+
/**
|
|
218
|
+
* Unspecified safety policy.
|
|
219
|
+
*/
|
|
220
|
+
SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
|
|
221
|
+
/**
|
|
222
|
+
* Safety policy for financial transactions.
|
|
223
|
+
*/
|
|
224
|
+
SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
|
|
225
|
+
/**
|
|
226
|
+
* Safety policy for sensitive data modification.
|
|
227
|
+
*/
|
|
228
|
+
SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
|
|
229
|
+
/**
|
|
230
|
+
* Safety policy for communication tools (e.g. Gmail, Chat, Meet).
|
|
231
|
+
*/
|
|
232
|
+
SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
|
|
233
|
+
/**
|
|
234
|
+
* Safety policy for account creation.
|
|
235
|
+
*/
|
|
236
|
+
SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
|
|
237
|
+
/**
|
|
238
|
+
* Safety policy for data modification.
|
|
239
|
+
*/
|
|
240
|
+
SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
|
|
241
|
+
/**
|
|
242
|
+
* Safety policy for user consent management.
|
|
243
|
+
*/
|
|
244
|
+
SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
|
|
245
|
+
/**
|
|
246
|
+
* Safety policy for legal terms and agreements.
|
|
247
|
+
*/
|
|
248
|
+
SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
|
|
249
|
+
})(SafetyPolicy || (SafetyPolicy = {}));
|
|
214
250
|
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
215
251
|
var PhishBlockThreshold;
|
|
216
252
|
(function (PhishBlockThreshold) {
|
package/dist/tokenizer/node.d.ts
CHANGED
|
@@ -156,15 +156,12 @@ declare interface CodeExecutionResult {
|
|
|
156
156
|
declare interface ComputerUse {
|
|
157
157
|
/** Required. The environment being operated. */
|
|
158
158
|
environment?: Environment;
|
|
159
|
-
/** By default, predefined functions are included in the final model call.
|
|
160
|
-
Some of them can be explicitly excluded from being automatically included.
|
|
161
|
-
This can serve two purposes:
|
|
162
|
-
1. Using a more restricted / different action space.
|
|
163
|
-
2. Improving the definitions / instructions of predefined functions. */
|
|
159
|
+
/** Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions. */
|
|
164
160
|
excludedPredefinedFunctions?: string[];
|
|
165
|
-
/** Optional.
|
|
166
|
-
*/
|
|
161
|
+
/** Optional. Enables the prompt injection detection check on computer-use request. */
|
|
167
162
|
enablePromptInjectionDetection?: boolean;
|
|
163
|
+
/** Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI. */
|
|
164
|
+
disabledSafetyPolicies?: SafetyPolicy[];
|
|
168
165
|
}
|
|
169
166
|
|
|
170
167
|
/** Local tokenizer compute tokens result. */
|
|
@@ -943,6 +940,42 @@ declare interface Retrieval {
|
|
|
943
940
|
vertexRagStore?: VertexRagStore;
|
|
944
941
|
}
|
|
945
942
|
|
|
943
|
+
/** SafetyPolicy */
|
|
944
|
+
declare enum SafetyPolicy {
|
|
945
|
+
/**
|
|
946
|
+
* Unspecified safety policy.
|
|
947
|
+
*/
|
|
948
|
+
SAFETY_POLICY_UNSPECIFIED = "SAFETY_POLICY_UNSPECIFIED",
|
|
949
|
+
/**
|
|
950
|
+
* Safety policy for financial transactions.
|
|
951
|
+
*/
|
|
952
|
+
FINANCIAL_TRANSACTIONS = "FINANCIAL_TRANSACTIONS",
|
|
953
|
+
/**
|
|
954
|
+
* Safety policy for sensitive data modification.
|
|
955
|
+
*/
|
|
956
|
+
SENSITIVE_DATA_MODIFICATION = "SENSITIVE_DATA_MODIFICATION",
|
|
957
|
+
/**
|
|
958
|
+
* Safety policy for communication tools (e.g. Gmail, Chat, Meet).
|
|
959
|
+
*/
|
|
960
|
+
COMMUNICATION_TOOL = "COMMUNICATION_TOOL",
|
|
961
|
+
/**
|
|
962
|
+
* Safety policy for account creation.
|
|
963
|
+
*/
|
|
964
|
+
ACCOUNT_CREATION = "ACCOUNT_CREATION",
|
|
965
|
+
/**
|
|
966
|
+
* Safety policy for data modification.
|
|
967
|
+
*/
|
|
968
|
+
DATA_MODIFICATION = "DATA_MODIFICATION",
|
|
969
|
+
/**
|
|
970
|
+
* Safety policy for user consent management.
|
|
971
|
+
*/
|
|
972
|
+
USER_CONSENT_MANAGEMENT = "USER_CONSENT_MANAGEMENT",
|
|
973
|
+
/**
|
|
974
|
+
* Safety policy for legal terms and agreements.
|
|
975
|
+
*/
|
|
976
|
+
LEGAL_TERMS_AND_AGREEMENTS = "LEGAL_TERMS_AND_AGREEMENTS"
|
|
977
|
+
}
|
|
978
|
+
|
|
946
979
|
/** Schema is used to define the format of input/output data.
|
|
947
980
|
|
|
948
981
|
Represents a select subset of an [OpenAPI 3.0 schema
|
|
@@ -1086,9 +1119,7 @@ export declare interface TokensInfo {
|
|
|
1086
1119
|
declare interface Tool {
|
|
1087
1120
|
/** 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. */
|
|
1088
1121
|
retrieval?: Retrieval;
|
|
1089
|
-
/** Optional. Tool to support the model interacting directly with the
|
|
1090
|
-
computer. If enabled, it automatically populates computer-use specific
|
|
1091
|
-
Function Declarations. */
|
|
1122
|
+
/** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
|
|
1092
1123
|
computerUse?: ComputerUse;
|
|
1093
1124
|
/** Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora. This field is not supported in Vertex AI. */
|
|
1094
1125
|
fileSearch?: FileSearch;
|
package/dist/tokenizer/node.mjs
CHANGED
|
@@ -97,26 +97,6 @@ var Type;
|
|
|
97
97
|
*/
|
|
98
98
|
Type["NULL"] = "NULL";
|
|
99
99
|
})(Type || (Type = {}));
|
|
100
|
-
/** The environment being operated. */
|
|
101
|
-
var Environment;
|
|
102
|
-
(function (Environment) {
|
|
103
|
-
/**
|
|
104
|
-
* Defaults to browser.
|
|
105
|
-
*/
|
|
106
|
-
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
107
|
-
/**
|
|
108
|
-
* Operates in a web browser.
|
|
109
|
-
*/
|
|
110
|
-
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
111
|
-
/**
|
|
112
|
-
* Operates in a mobile environment.
|
|
113
|
-
*/
|
|
114
|
-
Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
|
|
115
|
-
/**
|
|
116
|
-
* Operates in a desktop environment.
|
|
117
|
-
*/
|
|
118
|
-
Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
|
|
119
|
-
})(Environment || (Environment = {}));
|
|
120
100
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
121
101
|
var AuthType;
|
|
122
102
|
(function (AuthType) {
|
|
@@ -187,6 +167,62 @@ var ApiSpec;
|
|
|
187
167
|
*/
|
|
188
168
|
ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
|
|
189
169
|
})(ApiSpec || (ApiSpec = {}));
|
|
170
|
+
/** The environment being operated. */
|
|
171
|
+
var Environment;
|
|
172
|
+
(function (Environment) {
|
|
173
|
+
/**
|
|
174
|
+
* Defaults to browser.
|
|
175
|
+
*/
|
|
176
|
+
Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
|
|
177
|
+
/**
|
|
178
|
+
* Operates in a web browser.
|
|
179
|
+
*/
|
|
180
|
+
Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
|
|
181
|
+
/**
|
|
182
|
+
* Operates in a mobile environment.
|
|
183
|
+
*/
|
|
184
|
+
Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
|
|
185
|
+
/**
|
|
186
|
+
* Operates in a desktop environment.
|
|
187
|
+
*/
|
|
188
|
+
Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
|
|
189
|
+
})(Environment || (Environment = {}));
|
|
190
|
+
/** SafetyPolicy */
|
|
191
|
+
var SafetyPolicy;
|
|
192
|
+
(function (SafetyPolicy) {
|
|
193
|
+
/**
|
|
194
|
+
* Unspecified safety policy.
|
|
195
|
+
*/
|
|
196
|
+
SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
|
|
197
|
+
/**
|
|
198
|
+
* Safety policy for financial transactions.
|
|
199
|
+
*/
|
|
200
|
+
SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
|
|
201
|
+
/**
|
|
202
|
+
* Safety policy for sensitive data modification.
|
|
203
|
+
*/
|
|
204
|
+
SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
|
|
205
|
+
/**
|
|
206
|
+
* Safety policy for communication tools (e.g. Gmail, Chat, Meet).
|
|
207
|
+
*/
|
|
208
|
+
SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
|
|
209
|
+
/**
|
|
210
|
+
* Safety policy for account creation.
|
|
211
|
+
*/
|
|
212
|
+
SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
|
|
213
|
+
/**
|
|
214
|
+
* Safety policy for data modification.
|
|
215
|
+
*/
|
|
216
|
+
SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
|
|
217
|
+
/**
|
|
218
|
+
* Safety policy for user consent management.
|
|
219
|
+
*/
|
|
220
|
+
SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
|
|
221
|
+
/**
|
|
222
|
+
* Safety policy for legal terms and agreements.
|
|
223
|
+
*/
|
|
224
|
+
SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
|
|
225
|
+
})(SafetyPolicy || (SafetyPolicy = {}));
|
|
190
226
|
/** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
|
|
191
227
|
var PhishBlockThreshold;
|
|
192
228
|
(function (PhishBlockThreshold) {
|