@google/genai 2.4.0 → 2.6.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 +148 -72
- package/dist/index.cjs +470 -36
- package/dist/index.mjs +471 -37
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +470 -36
- package/dist/node/index.mjs +471 -37
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +148 -72
- package/dist/tokenizer/node.cjs +56 -16
- package/dist/tokenizer/node.d.ts +26 -21
- package/dist/tokenizer/node.mjs +56 -16
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +57 -17
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +143 -67
- package/dist/vertex_internal/index.js +57 -17
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +471 -37
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +148 -72
- package/package.json +1 -1
package/dist/node/node.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ declare interface Agent {
|
|
|
84
84
|
/**
|
|
85
85
|
* The environment configuration for the agent.
|
|
86
86
|
*/
|
|
87
|
-
base_environment?:
|
|
87
|
+
base_environment?: InteractionsAPI.Environment | string;
|
|
88
88
|
/**
|
|
89
89
|
* Agent description for developers to quickly read and understand.
|
|
90
90
|
*/
|
|
@@ -164,7 +164,7 @@ declare interface AgentCreateParams {
|
|
|
164
164
|
/**
|
|
165
165
|
* Body param: The environment configuration for the agent.
|
|
166
166
|
*/
|
|
167
|
-
base_environment?:
|
|
167
|
+
base_environment?: InteractionsAPI.Environment | string;
|
|
168
168
|
/**
|
|
169
169
|
* Body param: Agent description for developers to quickly read and understand.
|
|
170
170
|
*/
|
|
@@ -1447,7 +1447,7 @@ export declare interface BatchJobOutputInfo {
|
|
|
1447
1447
|
vertexMultimodalDatasetName?: string;
|
|
1448
1448
|
/** The full path of the Cloud Storage directory created, into which the prediction output is written. */
|
|
1449
1449
|
gcsOutputDirectory?: string;
|
|
1450
|
-
/** The name of the BigQuery table created, in `
|
|
1450
|
+
/** The name of the BigQuery table created, in `predictions_TIMESTAMP` format, into which the prediction output is written. */
|
|
1451
1451
|
bigqueryOutputTable?: string;
|
|
1452
1452
|
}
|
|
1453
1453
|
|
|
@@ -2079,15 +2079,13 @@ declare namespace CodeExecutionCallStep {
|
|
|
2079
2079
|
}
|
|
2080
2080
|
}
|
|
2081
2081
|
|
|
2082
|
-
/** Result of executing the `
|
|
2083
|
-
|
|
2084
|
-
Generated only when the `CodeExecution` tool is used. */
|
|
2082
|
+
/** Result of executing the ExecutableCode. Generated only when the `CodeExecution` tool is used. */
|
|
2085
2083
|
export declare interface CodeExecutionResult {
|
|
2086
2084
|
/** Required. Outcome of the code execution. */
|
|
2087
2085
|
outcome?: Outcome;
|
|
2088
2086
|
/** Optional. Contains stdout when code execution is successful, stderr or other description otherwise. */
|
|
2089
2087
|
output?: string;
|
|
2090
|
-
/** The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. */
|
|
2088
|
+
/** Optional. The identifier of the `ExecutableCode` part this result is for. Only populated if the corresponding `ExecutableCode` has an id. This field is not supported in Vertex AI. */
|
|
2091
2089
|
id?: string;
|
|
2092
2090
|
}
|
|
2093
2091
|
|
|
@@ -2136,6 +2134,9 @@ export declare interface ComputerUse {
|
|
|
2136
2134
|
1. Using a more restricted / different action space.
|
|
2137
2135
|
2. Improving the definitions / instructions of predefined functions. */
|
|
2138
2136
|
excludedPredefinedFunctions?: string[];
|
|
2137
|
+
/** Optional. Whether enable the prompt injection detection check on computer-use request.
|
|
2138
|
+
*/
|
|
2139
|
+
enablePromptInjectionDetection?: boolean;
|
|
2139
2140
|
}
|
|
2140
2141
|
|
|
2141
2142
|
/** Optional parameters for computing tokens. */
|
|
@@ -3021,35 +3022,51 @@ export declare interface DistillationDataStats {
|
|
|
3021
3022
|
trainingDatasetStats?: DatasetStats;
|
|
3022
3023
|
}
|
|
3023
3024
|
|
|
3024
|
-
/**
|
|
3025
|
+
/** Distillation hyperparameters for tuning. */
|
|
3025
3026
|
export declare interface DistillationHyperParameters {
|
|
3026
|
-
/**
|
|
3027
|
+
/** The size of the adapter. Can be 'small', 'medium', or 'large'. */
|
|
3027
3028
|
adapterSize?: AdapterSize;
|
|
3028
|
-
/**
|
|
3029
|
+
/** Number of complete passes the model makes over the entire training dataset
|
|
3030
|
+
during training. */
|
|
3029
3031
|
epochCount?: string;
|
|
3030
|
-
/**
|
|
3032
|
+
/** Multiplier for adjusting the default learning rate. */
|
|
3031
3033
|
learningRateMultiplier?: number;
|
|
3032
|
-
/**
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3034
|
+
/** Generation config for Distillation teacher model sampling. Only the
|
|
3035
|
+
following fields are supported for distillation teacher samplings:
|
|
3036
|
+
- temperature
|
|
3037
|
+
- top_p
|
|
3038
|
+
- top_k
|
|
3039
|
+
- candidate_count
|
|
3040
|
+
- thinking_config */
|
|
3041
|
+
generationConfig?: GenerationConfig;
|
|
3042
|
+
/** The learning rate for distillation tuning. */
|
|
3037
3043
|
learningRate?: number;
|
|
3044
|
+
/** Batch size for tuning. This feature is only available for open
|
|
3045
|
+
source models. */
|
|
3046
|
+
batchSize?: number;
|
|
3038
3047
|
}
|
|
3039
3048
|
|
|
3040
|
-
/**
|
|
3049
|
+
/** Distillation sampling spec for tuning. */
|
|
3041
3050
|
export declare interface DistillationSamplingSpec {
|
|
3042
|
-
/**
|
|
3051
|
+
/** The base teacher model that is being distilled. See [Supported
|
|
3052
|
+
models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). */
|
|
3043
3053
|
baseTeacherModel?: string;
|
|
3044
|
-
/**
|
|
3054
|
+
/** The resource name of the Tuned teacher model. Format:
|
|
3055
|
+
`projects/{project}/locations/{location}/models/{model}`. */
|
|
3045
3056
|
tunedTeacherModelSource?: string;
|
|
3046
|
-
/**
|
|
3057
|
+
/** Cloud Storage path to file containing validation dataset for distillation.
|
|
3058
|
+
The dataset must be formatted as a JSONL file. */
|
|
3047
3059
|
validationDatasetUri?: string;
|
|
3060
|
+
/** Cloud Storage path to file containing prompt dataset for distillation.
|
|
3061
|
+
The dataset must be formatted as a JSONL file. */
|
|
3062
|
+
promptDatasetUri?: string;
|
|
3063
|
+
/** Hyperparameters for distillation tuning. */
|
|
3064
|
+
hyperparameters?: DistillationHyperParameters;
|
|
3048
3065
|
}
|
|
3049
3066
|
|
|
3050
3067
|
/** Distillation tuning spec for tuning. */
|
|
3051
3068
|
export declare interface DistillationSpec {
|
|
3052
|
-
/**
|
|
3069
|
+
/** Optional. Cloud Storage path to file containing prompt dataset for distillation. The dataset must be formatted as a JSONL file. */
|
|
3053
3070
|
promptDatasetUri?: string;
|
|
3054
3071
|
/** The base teacher model that is being distilled. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/tuning#supported_models). */
|
|
3055
3072
|
baseTeacherModel?: string;
|
|
@@ -3065,7 +3082,7 @@ export declare interface DistillationSpec {
|
|
|
3065
3082
|
tunedTeacherModelSource?: string;
|
|
3066
3083
|
/** Optional. Cloud Storage path to file containing validation dataset for tuning. The dataset must be formatted as a JSONL file. */
|
|
3067
3084
|
validationDatasetUri?: string;
|
|
3068
|
-
/**
|
|
3085
|
+
/** Optional. Specifies the tuning mode for distillation (sft part). This feature is only available for open source models. */
|
|
3069
3086
|
tuningMode?: TuningMode;
|
|
3070
3087
|
}
|
|
3071
3088
|
|
|
@@ -3342,15 +3359,6 @@ export declare interface EmbedContentBatch {
|
|
|
3342
3359
|
|
|
3343
3360
|
/** Optional parameters for the embed_content method. */
|
|
3344
3361
|
export declare interface EmbedContentConfig {
|
|
3345
|
-
/** Used to override HTTP request options. */
|
|
3346
|
-
httpOptions?: HttpOptions;
|
|
3347
|
-
/** Abort signal which can be used to cancel the request.
|
|
3348
|
-
|
|
3349
|
-
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
3350
|
-
operation will not cancel the request in the service. You will still
|
|
3351
|
-
be charged usage for any applicable operations.
|
|
3352
|
-
*/
|
|
3353
|
-
abortSignal?: AbortSignal;
|
|
3354
3362
|
/** Type of task for which the embedding will be used.
|
|
3355
3363
|
*/
|
|
3356
3364
|
taskType?: string;
|
|
@@ -3380,6 +3388,15 @@ export declare interface EmbedContentConfig {
|
|
|
3380
3388
|
Only applicable to Gemini Embedding 2 models.
|
|
3381
3389
|
*/
|
|
3382
3390
|
audioTrackExtraction?: boolean;
|
|
3391
|
+
/** Used to override HTTP request options. */
|
|
3392
|
+
httpOptions?: HttpOptions;
|
|
3393
|
+
/** Abort signal which can be used to cancel the request.
|
|
3394
|
+
|
|
3395
|
+
NOTE: AbortSignal is a client-only operation. Using it to cancel an
|
|
3396
|
+
operation will not cancel the request in the service. You will still
|
|
3397
|
+
be charged usage for any applicable operations.
|
|
3398
|
+
*/
|
|
3399
|
+
abortSignal?: AbortSignal;
|
|
3383
3400
|
}
|
|
3384
3401
|
|
|
3385
3402
|
/** Request-level metadata for the Gemini Enterprise Agent Platform Embed Content API. */
|
|
@@ -3512,7 +3529,15 @@ export declare enum Environment {
|
|
|
3512
3529
|
/**
|
|
3513
3530
|
* Operates in a web browser.
|
|
3514
3531
|
*/
|
|
3515
|
-
ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER"
|
|
3532
|
+
ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER",
|
|
3533
|
+
/**
|
|
3534
|
+
* Operates in a mobile environment.
|
|
3535
|
+
*/
|
|
3536
|
+
ENVIRONMENT_MOBILE = "ENVIRONMENT_MOBILE",
|
|
3537
|
+
/**
|
|
3538
|
+
* Operates in a desktop environment.
|
|
3539
|
+
*/
|
|
3540
|
+
ENVIRONMENT_DESKTOP = "ENVIRONMENT_DESKTOP"
|
|
3516
3541
|
}
|
|
3517
3542
|
|
|
3518
3543
|
/**
|
|
@@ -3668,17 +3693,13 @@ export declare interface ExactMatchMetricValue {
|
|
|
3668
3693
|
score?: number;
|
|
3669
3694
|
}
|
|
3670
3695
|
|
|
3671
|
-
/**
|
|
3672
|
-
|
|
3673
|
-
Only generated when using the `CodeExecution` tool, in which the code will
|
|
3674
|
-
be automatically executed, and a corresponding `CodeExecutionResult` will
|
|
3675
|
-
also be generated. */
|
|
3696
|
+
/** Code generated by the model that is meant to be executed, and the result returned to the model. Generated when using the `CodeExecution` tool, in which the code will be automatically executed, and a corresponding CodeExecutionResult will also be generated. */
|
|
3676
3697
|
export declare interface ExecutableCode {
|
|
3677
3698
|
/** Required. The code to be executed. */
|
|
3678
3699
|
code?: string;
|
|
3679
3700
|
/** Required. Programming language of the `code`. */
|
|
3680
3701
|
language?: Language;
|
|
3681
|
-
/** Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. */
|
|
3702
|
+
/** Optional. Unique identifier of the `ExecutableCode` part. The server returns the `CodeExecutionResult` with the matching `id`. This field is not supported in Vertex AI. */
|
|
3682
3703
|
id?: string;
|
|
3683
3704
|
}
|
|
3684
3705
|
|
|
@@ -3999,22 +4020,21 @@ declare interface FileSearchResultStep {
|
|
|
3999
4020
|
|
|
4000
4021
|
/** A collection of Documents. */
|
|
4001
4022
|
export declare interface FileSearchStore {
|
|
4002
|
-
/** The resource name
|
|
4023
|
+
/** Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID (name excluding the "fileSearchStores/" prefix) that can contain up to 40 characters that are lowercase alphanumeric or dashes (-). It is output only. The unique name will be derived from `display_name` along with a 12 character random suffix. Example: `fileSearchStores/my-awesome-file-search-store-123a456b789c` If `display_name` is not provided, the name will be randomly generated. */
|
|
4003
4024
|
name?: string;
|
|
4004
|
-
/** The human-readable display name for the FileSearchStore. */
|
|
4025
|
+
/** Optional. The human-readable display name for the `FileSearchStore`. The display name must be no more than 512 characters in length, including spaces. Example: "Docs on Semantic Retriever". */
|
|
4005
4026
|
displayName?: string;
|
|
4006
|
-
/** The Timestamp of when the FileSearchStore was created. */
|
|
4027
|
+
/** Output only. The Timestamp of when the `FileSearchStore` was created. */
|
|
4007
4028
|
createTime?: string;
|
|
4008
|
-
/** The Timestamp of when the FileSearchStore was last updated. */
|
|
4029
|
+
/** Output only. The Timestamp of when the `FileSearchStore` was last updated. */
|
|
4009
4030
|
updateTime?: string;
|
|
4010
|
-
/** The number of documents in the FileSearchStore that are active and ready for retrieval. */
|
|
4031
|
+
/** Output only. The number of documents in the `FileSearchStore` that are active and ready for retrieval. */
|
|
4011
4032
|
activeDocumentsCount?: string;
|
|
4012
|
-
/** The number of documents in the FileSearchStore that are being processed. */
|
|
4033
|
+
/** Output only. The number of documents in the `FileSearchStore` that are being processed. */
|
|
4013
4034
|
pendingDocumentsCount?: string;
|
|
4014
|
-
/** The number of documents in the FileSearchStore that have failed processing. */
|
|
4035
|
+
/** Output only. The number of documents in the `FileSearchStore` that have failed processing. */
|
|
4015
4036
|
failedDocumentsCount?: string;
|
|
4016
|
-
/** The size of raw bytes ingested into the FileSearchStore
|
|
4017
|
-
total size of all the documents in the FileSearchStore. */
|
|
4037
|
+
/** Output only. The size of raw bytes ingested into the `FileSearchStore`. This is the total size of all the documents in the `FileSearchStore`. */
|
|
4018
4038
|
sizeBytes?: string;
|
|
4019
4039
|
/** The embedding model used by the FileSearchStore. */
|
|
4020
4040
|
embeddingModel?: string;
|
|
@@ -4278,9 +4298,9 @@ export declare interface FunctionCall {
|
|
|
4278
4298
|
/** The unique id of the function call. If populated, the client to execute the
|
|
4279
4299
|
`function_call` and return the response with the matching `id`. */
|
|
4280
4300
|
id?: string;
|
|
4281
|
-
/** Optional. The function parameters and values in JSON object format. See
|
|
4301
|
+
/** Optional. The function parameters and values in JSON object format. See FunctionDeclaration.parameters for parameter details. */
|
|
4282
4302
|
args?: Record<string, unknown>;
|
|
4283
|
-
/** Optional. The name of the function to call. Matches
|
|
4303
|
+
/** Optional. The name of the function to call. Matches FunctionDeclaration.name. */
|
|
4284
4304
|
name?: string;
|
|
4285
4305
|
/** Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally. This field is not supported in Gemini API. */
|
|
4286
4306
|
partialArgs?: PartialArg[];
|
|
@@ -4290,11 +4310,11 @@ export declare interface FunctionCall {
|
|
|
4290
4310
|
|
|
4291
4311
|
/** Function calling config. */
|
|
4292
4312
|
export declare interface FunctionCallingConfig {
|
|
4293
|
-
/** Optional. Function names to call. Only set when the Mode is ANY. Function names should match
|
|
4313
|
+
/** Optional. Function names to call. Only set when the Mode is ANY. Function names should match FunctionDeclaration.name. With mode set to ANY, model will predict a function call from the set of function names provided. */
|
|
4294
4314
|
allowedFunctionNames?: string[];
|
|
4295
4315
|
/** Optional. Function calling mode. */
|
|
4296
4316
|
mode?: FunctionCallingConfigMode;
|
|
4297
|
-
/** Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the
|
|
4317
|
+
/** Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the `FunctionCall.partial_args` field. This field is not supported in Gemini API. */
|
|
4298
4318
|
streamFunctionCallArguments?: boolean;
|
|
4299
4319
|
}
|
|
4300
4320
|
|
|
@@ -4351,7 +4371,7 @@ declare interface FunctionCallStep {
|
|
|
4351
4371
|
export declare interface FunctionDeclaration {
|
|
4352
4372
|
/** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
|
|
4353
4373
|
description?: string;
|
|
4354
|
-
/** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of
|
|
4374
|
+
/** Required. The name of the function to call. Must start with a letter or an underscore. Must be a-z, A-Z, 0-9, or contain underscores, dots, colons and dashes, with a maximum length of 128. */
|
|
4355
4375
|
name?: string;
|
|
4356
4376
|
/** Optional. Describes the parameters to this function in JSON Schema Object format. Reflects the Open API 3.03 Parameter Object. string Key: the name of the parameter. Parameter names are case sensitive. Schema Value: the Schema defining the type used for the parameter. For function with no parameters, this can be left unset. Parameter names must start with a letter or an underscore and must only contain chars a-z, A-Z, 0-9, or underscores with a maximum length of 64. Example with 1 required and 1 optional parameter: type: OBJECT properties: param1: type: STRING param2: type: INTEGER required: - param1 */
|
|
4357
4377
|
parameters?: Schema;
|
|
@@ -4376,7 +4396,7 @@ export declare class FunctionResponse {
|
|
|
4376
4396
|
parts?: FunctionResponsePart[];
|
|
4377
4397
|
/** Optional. The id of the function call this response is for. Populated by the client to match the corresponding function call `id`. */
|
|
4378
4398
|
id?: string;
|
|
4379
|
-
/** Required. The name of the function to call. Matches
|
|
4399
|
+
/** Required. The name of the function to call. Matches FunctionDeclaration.name and FunctionCall.name. */
|
|
4380
4400
|
name?: string;
|
|
4381
4401
|
/** Required. The function response in JSON object format. Use "output" key to specify function output and "error" key to specify error details (if any). If "output" and "error" keys are not specified, then whole "response" is treated as function output. */
|
|
4382
4402
|
response?: Record<string, unknown>;
|
|
@@ -5139,7 +5159,7 @@ export declare interface GenerationConfig {
|
|
|
5139
5159
|
presencePenalty?: number;
|
|
5140
5160
|
/** Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model's confidence in its own output and for debugging. */
|
|
5141
5161
|
responseLogprobs?: boolean;
|
|
5142
|
-
/** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined.
|
|
5162
|
+
/** Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. */
|
|
5143
5163
|
responseMimeType?: string;
|
|
5144
5164
|
/** Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image. */
|
|
5145
5165
|
responseModalities?: Modality[];
|
|
@@ -5979,9 +5999,9 @@ export declare interface GroundingChunkRetrievedContext {
|
|
|
5979
5999
|
customMetadata?: GroundingChunkCustomMetadata[];
|
|
5980
6000
|
/** Optional. Name of the `FileSearchStore` containing the document. Example: `fileSearchStores/123`. This field is not supported in Vertex AI. */
|
|
5981
6001
|
fileSearchStore?: string;
|
|
5982
|
-
/** Optional. Page number of the retrieved context. This field is not supported in Vertex AI. */
|
|
6002
|
+
/** Optional. Page number of the retrieved context, if applicable. This field is not supported in Vertex AI. */
|
|
5983
6003
|
pageNumber?: number;
|
|
5984
|
-
/** Optional.
|
|
6004
|
+
/** Optional. The media blob resource name for multimodal file search results. Format: fileSearchStores/{file_search_store_id}/media/{blob_id}. This field is not supported in Vertex AI. */
|
|
5985
6005
|
mediaId?: string;
|
|
5986
6006
|
}
|
|
5987
6007
|
|
|
@@ -6582,7 +6602,7 @@ declare interface Interaction {
|
|
|
6582
6602
|
/**
|
|
6583
6603
|
* Required. Output only. The status of the interaction.
|
|
6584
6604
|
*/
|
|
6585
|
-
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6605
|
+
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete' | 'budget_exceeded';
|
|
6586
6606
|
/**
|
|
6587
6607
|
* Required. Output only. The steps that make up the interaction.
|
|
6588
6608
|
*/
|
|
@@ -6870,7 +6890,7 @@ declare type InteractionSSEEvent = InteractionCreatedEvent | InteractionComplete
|
|
|
6870
6890
|
declare interface InteractionStatusUpdate {
|
|
6871
6891
|
event_type: 'interaction.status_update';
|
|
6872
6892
|
interaction_id: string;
|
|
6873
|
-
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
6893
|
+
status: 'in_progress' | 'requires_action' | 'completed' | 'failed' | 'cancelled' | 'incomplete' | 'budget_exceeded';
|
|
6874
6894
|
/**
|
|
6875
6895
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
6876
6896
|
*/
|
|
@@ -8061,7 +8081,7 @@ export declare enum MaskReferenceMode {
|
|
|
8061
8081
|
MASK_MODE_SEMANTIC = "MASK_MODE_SEMANTIC"
|
|
8062
8082
|
}
|
|
8063
8083
|
|
|
8064
|
-
/** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID:
|
|
8084
|
+
/** A MCPServer is a server that can be called by the model to perform actions. It is a server that implements the MCP protocol. Next ID: 6. This data type is not supported in Vertex AI. */
|
|
8065
8085
|
export declare interface McpServer {
|
|
8066
8086
|
/** The name of the MCPServer. */
|
|
8067
8087
|
name?: string;
|
|
@@ -8284,7 +8304,7 @@ export declare interface Model {
|
|
|
8284
8304
|
* The model that will complete your prompt.\n\nSee
|
|
8285
8305
|
* [models](https://ai.google.dev/gemini-api/docs/models) for additional details.
|
|
8286
8306
|
*/
|
|
8287
|
-
declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | (string & {});
|
|
8307
|
+
declare type Model_2 = 'gemini-2.5-computer-use-preview-10-2025' | 'gemini-2.5-flash' | 'gemini-2.5-flash-image' | 'gemini-2.5-flash-lite' | 'gemini-2.5-flash-lite-preview-09-2025' | 'gemini-2.5-flash-native-audio-preview-12-2025' | 'gemini-2.5-flash-preview-09-2025' | 'gemini-2.5-flash-preview-tts' | 'gemini-2.5-pro' | 'gemini-2.5-pro-preview-tts' | 'gemini-3-flash-preview' | 'gemini-3-pro-image-preview' | 'gemini-3-pro-preview' | 'gemini-3.1-pro-preview' | 'gemini-3.1-flash-image-preview' | 'gemini-3.1-flash-lite' | 'gemini-3.1-flash-lite-preview' | 'gemini-3.1-flash-tts-preview' | 'lyria-3-clip-preview' | 'lyria-3-pro-preview' | 'gemini-3.5-flash' | (string & {});
|
|
8288
8308
|
|
|
8289
8309
|
/** Configuration for Model Armor. Model Armor is a Google Cloud service that provides safety and security filtering for prompts and responses. It helps protect your AI applications from risks such as harmful content, sensitive data leakage, and prompt injection attacks. This data type is not supported in Gemini API. */
|
|
8290
8310
|
export declare interface ModelArmorConfig {
|
|
@@ -8863,15 +8883,15 @@ export declare enum Outcome {
|
|
|
8863
8883
|
*/
|
|
8864
8884
|
OUTCOME_UNSPECIFIED = "OUTCOME_UNSPECIFIED",
|
|
8865
8885
|
/**
|
|
8866
|
-
* Code execution completed successfully.
|
|
8886
|
+
* Code execution completed successfully. `output` contains the stdout, if any.
|
|
8867
8887
|
*/
|
|
8868
8888
|
OUTCOME_OK = "OUTCOME_OK",
|
|
8869
8889
|
/**
|
|
8870
|
-
* Code execution
|
|
8890
|
+
* Code execution failed. `output` contains the stderr and stdout, if any.
|
|
8871
8891
|
*/
|
|
8872
8892
|
OUTCOME_FAILED = "OUTCOME_FAILED",
|
|
8873
8893
|
/**
|
|
8874
|
-
* Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
|
|
8894
|
+
* Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
|
|
8875
8895
|
*/
|
|
8876
8896
|
OUTCOME_DEADLINE_EXCEEDED = "OUTCOME_DEADLINE_EXCEEDED"
|
|
8877
8897
|
}
|
|
@@ -9384,6 +9404,10 @@ export declare interface RagChunk {
|
|
|
9384
9404
|
pageSpan?: RagChunkPageSpan;
|
|
9385
9405
|
/** The content of the chunk. */
|
|
9386
9406
|
text?: string;
|
|
9407
|
+
/** The ID of the chunk. */
|
|
9408
|
+
chunkId?: string;
|
|
9409
|
+
/** The ID of the file that the chunk belongs to. */
|
|
9410
|
+
fileId?: string;
|
|
9387
9411
|
}
|
|
9388
9412
|
|
|
9389
9413
|
/** Represents where the chunk starts and ends in the document. This data type is not supported in Gemini API. */
|
|
@@ -11180,7 +11204,7 @@ declare interface ToolChoiceConfig {
|
|
|
11180
11204
|
|
|
11181
11205
|
declare type ToolChoiceType = 'auto' | 'any' | 'none' | 'validated';
|
|
11182
11206
|
|
|
11183
|
-
/** Tool that executes code generated by the model, and automatically returns the result to the model. See also
|
|
11207
|
+
/** 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. */
|
|
11184
11208
|
export declare interface ToolCodeExecution {
|
|
11185
11209
|
}
|
|
11186
11210
|
|
|
@@ -11417,10 +11441,11 @@ export declare interface TuningJob {
|
|
|
11417
11441
|
tuningJobState?: TuningJobState;
|
|
11418
11442
|
/** Tuning Spec for Veo Tuning. */
|
|
11419
11443
|
veoTuningSpec?: VeoTuningSpec;
|
|
11420
|
-
/** Optional. Spec for creating a distillation dataset. */
|
|
11421
|
-
distillationSamplingSpec?: DistillationSamplingSpec;
|
|
11422
11444
|
/** Output only. Tuning Job metadata. */
|
|
11423
11445
|
tuningJobMetadata?: TuningJobMetadata;
|
|
11446
|
+
/** Tuning Spec for Veo LoRA Tuning. */
|
|
11447
|
+
veoLoraTuningSpec?: VeoLoraTuningSpec;
|
|
11448
|
+
distillationSamplingSpec?: DistillationSamplingSpec;
|
|
11424
11449
|
}
|
|
11425
11450
|
|
|
11426
11451
|
/** Tuning job metadata. This data type is not supported in Gemini API. */
|
|
@@ -11561,7 +11586,23 @@ declare class Tunings extends BaseModule {
|
|
|
11561
11586
|
private tuneMldevInternal;
|
|
11562
11587
|
}
|
|
11563
11588
|
|
|
11564
|
-
/** The tuning
|
|
11589
|
+
/** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
|
|
11590
|
+
export declare enum TuningSpeed {
|
|
11591
|
+
/**
|
|
11592
|
+
* The default / unset value. For Veo 3.0 models, this defaults to FAST.
|
|
11593
|
+
*/
|
|
11594
|
+
TUNING_SPEED_UNSPECIFIED = "TUNING_SPEED_UNSPECIFIED",
|
|
11595
|
+
/**
|
|
11596
|
+
* Regular tuning speed.
|
|
11597
|
+
*/
|
|
11598
|
+
REGULAR = "REGULAR",
|
|
11599
|
+
/**
|
|
11600
|
+
* Fast tuning speed.
|
|
11601
|
+
*/
|
|
11602
|
+
FAST = "FAST"
|
|
11603
|
+
}
|
|
11604
|
+
|
|
11605
|
+
/** The tuning task for Veo. This enum is not supported in Gemini API. */
|
|
11565
11606
|
export declare enum TuningTask {
|
|
11566
11607
|
/**
|
|
11567
11608
|
* Default value. This value is unused.
|
|
@@ -11773,8 +11814,8 @@ declare namespace types {
|
|
|
11773
11814
|
createPartFromExecutableCode,
|
|
11774
11815
|
createUserContent,
|
|
11775
11816
|
createModelContent,
|
|
11776
|
-
Language,
|
|
11777
11817
|
Outcome,
|
|
11818
|
+
Language,
|
|
11778
11819
|
FunctionResponseScheduling,
|
|
11779
11820
|
Type,
|
|
11780
11821
|
Environment,
|
|
@@ -11806,7 +11847,9 @@ declare namespace types {
|
|
|
11806
11847
|
TuningJobState,
|
|
11807
11848
|
AggregationMetric,
|
|
11808
11849
|
PairwiseChoice,
|
|
11850
|
+
TuningSpeed,
|
|
11809
11851
|
TuningTask,
|
|
11852
|
+
VideoOrientation,
|
|
11810
11853
|
DocumentState,
|
|
11811
11854
|
PartMediaResolutionLevel,
|
|
11812
11855
|
ToolType,
|
|
@@ -11839,11 +11882,11 @@ declare namespace types {
|
|
|
11839
11882
|
Scale,
|
|
11840
11883
|
MusicGenerationMode,
|
|
11841
11884
|
LiveMusicPlaybackControl,
|
|
11842
|
-
ExecutableCode,
|
|
11843
|
-
CodeExecutionResult,
|
|
11844
11885
|
PartMediaResolution,
|
|
11845
11886
|
ToolCall,
|
|
11846
11887
|
ToolResponse,
|
|
11888
|
+
CodeExecutionResult,
|
|
11889
|
+
ExecutableCode,
|
|
11847
11890
|
FileData,
|
|
11848
11891
|
PartialArg,
|
|
11849
11892
|
FunctionCall,
|
|
@@ -12031,6 +12074,7 @@ declare namespace types {
|
|
|
12031
12074
|
PreferenceOptimizationHyperParameters,
|
|
12032
12075
|
PreferenceOptimizationSpec,
|
|
12033
12076
|
DistillationHyperParameters,
|
|
12077
|
+
DistillationSamplingSpec,
|
|
12034
12078
|
DistillationSpec,
|
|
12035
12079
|
GoogleRpcStatus,
|
|
12036
12080
|
PreTunedModel,
|
|
@@ -12066,8 +12110,8 @@ declare namespace types {
|
|
|
12066
12110
|
FullFineTuningSpec,
|
|
12067
12111
|
VeoHyperParameters,
|
|
12068
12112
|
VeoTuningSpec,
|
|
12069
|
-
DistillationSamplingSpec,
|
|
12070
12113
|
TuningJobMetadata,
|
|
12114
|
+
VeoLoraTuningSpec,
|
|
12071
12115
|
TuningJob,
|
|
12072
12116
|
ListTuningJobsConfig,
|
|
12073
12117
|
ListTuningJobsParameters,
|
|
@@ -12885,10 +12929,26 @@ export declare interface VeoHyperParameters {
|
|
|
12885
12929
|
epochCount?: string;
|
|
12886
12930
|
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
12887
12931
|
learningRateMultiplier?: number;
|
|
12888
|
-
/**
|
|
12932
|
+
/** The tuning task for Veo. */
|
|
12889
12933
|
tuningTask?: TuningTask;
|
|
12890
12934
|
/** Optional. The ratio of Google internal dataset to use in the training mixture, in range of `[0, 1)`. If `0.2`, it means 20% of Google internal dataset and 80% of user dataset will be used for training. If not set, the default value is 0.1. */
|
|
12891
12935
|
veoDataMixtureRatio?: number;
|
|
12936
|
+
/** Optional. The adapter size for LoRA tuning. */
|
|
12937
|
+
adapterSize?: AdapterSize;
|
|
12938
|
+
/** The speed of the tuning job. Only supported for Veo 3.0 models. */
|
|
12939
|
+
tuningSpeed?: TuningSpeed;
|
|
12940
|
+
}
|
|
12941
|
+
|
|
12942
|
+
/** Tuning Spec for Veo LoRA Model Tuning. This data type is not supported in Gemini API. */
|
|
12943
|
+
export declare interface VeoLoraTuningSpec {
|
|
12944
|
+
/** Optional. Hyperparameters for Veo LoRA. */
|
|
12945
|
+
hyperParameters?: VeoHyperParameters;
|
|
12946
|
+
/** Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
|
|
12947
|
+
trainingDatasetUri?: string;
|
|
12948
|
+
/** Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
|
|
12949
|
+
validationDatasetUri?: string;
|
|
12950
|
+
/** Optional. The orientation of the video. Defaults to LANDSCAPE. */
|
|
12951
|
+
videoOrientation?: VideoOrientation;
|
|
12892
12952
|
}
|
|
12893
12953
|
|
|
12894
12954
|
/** Tuning Spec for Veo Model Tuning. This data type is not supported in Gemini API. */
|
|
@@ -13076,6 +13136,22 @@ export declare interface VideoMetadata {
|
|
|
13076
13136
|
startOffset?: string;
|
|
13077
13137
|
}
|
|
13078
13138
|
|
|
13139
|
+
/** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
|
|
13140
|
+
export declare enum VideoOrientation {
|
|
13141
|
+
/**
|
|
13142
|
+
* Unspecified video orientation. Defaults to landscape.
|
|
13143
|
+
*/
|
|
13144
|
+
VIDEO_ORIENTATION_UNSPECIFIED = "VIDEO_ORIENTATION_UNSPECIFIED",
|
|
13145
|
+
/**
|
|
13146
|
+
* Landscape orientation (e.g. 16:9, 1280x720).
|
|
13147
|
+
*/
|
|
13148
|
+
LANDSCAPE = "LANDSCAPE",
|
|
13149
|
+
/**
|
|
13150
|
+
* Portrait orientation (e.g. 9:16, 720x1280).
|
|
13151
|
+
*/
|
|
13152
|
+
PORTRAIT = "PORTRAIT"
|
|
13153
|
+
}
|
|
13154
|
+
|
|
13079
13155
|
/** Voice activity signal. */
|
|
13080
13156
|
export declare interface VoiceActivity {
|
|
13081
13157
|
/** The type of the voice activity signal. */
|
package/dist/tokenizer/node.cjs
CHANGED
|
@@ -33,18 +33,6 @@ var path__namespace = /*#__PURE__*/_interopNamespaceDefault(path);
|
|
|
33
33
|
* Copyright 2025 Google LLC
|
|
34
34
|
* SPDX-License-Identifier: Apache-2.0
|
|
35
35
|
*/
|
|
36
|
-
/** Programming language of the `code`. */
|
|
37
|
-
var Language;
|
|
38
|
-
(function (Language) {
|
|
39
|
-
/**
|
|
40
|
-
* Unspecified language. This value should not be used.
|
|
41
|
-
*/
|
|
42
|
-
Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
|
|
43
|
-
/**
|
|
44
|
-
* Python >= 3.10, with numpy and simpy available.
|
|
45
|
-
*/
|
|
46
|
-
Language["PYTHON"] = "PYTHON";
|
|
47
|
-
})(Language || (Language = {}));
|
|
48
36
|
/** Outcome of the code execution. */
|
|
49
37
|
var Outcome;
|
|
50
38
|
(function (Outcome) {
|
|
@@ -53,18 +41,30 @@ var Outcome;
|
|
|
53
41
|
*/
|
|
54
42
|
Outcome["OUTCOME_UNSPECIFIED"] = "OUTCOME_UNSPECIFIED";
|
|
55
43
|
/**
|
|
56
|
-
* Code execution completed successfully.
|
|
44
|
+
* Code execution completed successfully. `output` contains the stdout, if any.
|
|
57
45
|
*/
|
|
58
46
|
Outcome["OUTCOME_OK"] = "OUTCOME_OK";
|
|
59
47
|
/**
|
|
60
|
-
* Code execution
|
|
48
|
+
* Code execution failed. `output` contains the stderr and stdout, if any.
|
|
61
49
|
*/
|
|
62
50
|
Outcome["OUTCOME_FAILED"] = "OUTCOME_FAILED";
|
|
63
51
|
/**
|
|
64
|
-
* Code execution ran for too long, and was cancelled. There may or may not be a partial output present.
|
|
52
|
+
* Code execution ran for too long, and was cancelled. There may or may not be a partial `output` present.
|
|
65
53
|
*/
|
|
66
54
|
Outcome["OUTCOME_DEADLINE_EXCEEDED"] = "OUTCOME_DEADLINE_EXCEEDED";
|
|
67
55
|
})(Outcome || (Outcome = {}));
|
|
56
|
+
/** Programming language of the `code`. */
|
|
57
|
+
var Language;
|
|
58
|
+
(function (Language) {
|
|
59
|
+
/**
|
|
60
|
+
* Unspecified language. This value should not be used.
|
|
61
|
+
*/
|
|
62
|
+
Language["LANGUAGE_UNSPECIFIED"] = "LANGUAGE_UNSPECIFIED";
|
|
63
|
+
/**
|
|
64
|
+
* Python >= 3.10, with numpy and simpy available.
|
|
65
|
+
*/
|
|
66
|
+
Language["PYTHON"] = "PYTHON";
|
|
67
|
+
})(Language || (Language = {}));
|
|
68
68
|
/** Specifies how the response should be scheduled in the conversation. */
|
|
69
69
|
var FunctionResponseScheduling;
|
|
70
70
|
(function (FunctionResponseScheduling) {
|
|
@@ -132,6 +132,14 @@ var Environment;
|
|
|
132
132
|
* Operates in a web browser.
|
|
133
133
|
*/
|
|
134
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";
|
|
135
143
|
})(Environment || (Environment = {}));
|
|
136
144
|
/** Type of auth scheme. This enum is not supported in Gemini API. */
|
|
137
145
|
var AuthType;
|
|
@@ -917,7 +925,23 @@ var PairwiseChoice;
|
|
|
917
925
|
*/
|
|
918
926
|
PairwiseChoice["TIE"] = "TIE";
|
|
919
927
|
})(PairwiseChoice || (PairwiseChoice = {}));
|
|
920
|
-
/** The tuning
|
|
928
|
+
/** The speed of the tuning job. Only supported for Veo 3.0 models. This enum is not supported in Gemini API. */
|
|
929
|
+
var TuningSpeed;
|
|
930
|
+
(function (TuningSpeed) {
|
|
931
|
+
/**
|
|
932
|
+
* The default / unset value. For Veo 3.0 models, this defaults to FAST.
|
|
933
|
+
*/
|
|
934
|
+
TuningSpeed["TUNING_SPEED_UNSPECIFIED"] = "TUNING_SPEED_UNSPECIFIED";
|
|
935
|
+
/**
|
|
936
|
+
* Regular tuning speed.
|
|
937
|
+
*/
|
|
938
|
+
TuningSpeed["REGULAR"] = "REGULAR";
|
|
939
|
+
/**
|
|
940
|
+
* Fast tuning speed.
|
|
941
|
+
*/
|
|
942
|
+
TuningSpeed["FAST"] = "FAST";
|
|
943
|
+
})(TuningSpeed || (TuningSpeed = {}));
|
|
944
|
+
/** The tuning task for Veo. This enum is not supported in Gemini API. */
|
|
921
945
|
var TuningTask;
|
|
922
946
|
(function (TuningTask) {
|
|
923
947
|
/**
|
|
@@ -937,6 +961,22 @@ var TuningTask;
|
|
|
937
961
|
*/
|
|
938
962
|
TuningTask["TUNING_TASK_R2V"] = "TUNING_TASK_R2V";
|
|
939
963
|
})(TuningTask || (TuningTask = {}));
|
|
964
|
+
/** The orientation of the video. Defaults to LANDSCAPE. This enum is not supported in Gemini API. */
|
|
965
|
+
var VideoOrientation;
|
|
966
|
+
(function (VideoOrientation) {
|
|
967
|
+
/**
|
|
968
|
+
* Unspecified video orientation. Defaults to landscape.
|
|
969
|
+
*/
|
|
970
|
+
VideoOrientation["VIDEO_ORIENTATION_UNSPECIFIED"] = "VIDEO_ORIENTATION_UNSPECIFIED";
|
|
971
|
+
/**
|
|
972
|
+
* Landscape orientation (e.g. 16:9, 1280x720).
|
|
973
|
+
*/
|
|
974
|
+
VideoOrientation["LANDSCAPE"] = "LANDSCAPE";
|
|
975
|
+
/**
|
|
976
|
+
* Portrait orientation (e.g. 9:16, 720x1280).
|
|
977
|
+
*/
|
|
978
|
+
VideoOrientation["PORTRAIT"] = "PORTRAIT";
|
|
979
|
+
})(VideoOrientation || (VideoOrientation = {}));
|
|
940
980
|
/** Output only. Current state of the `Document`. This enum is not supported in Vertex AI. */
|
|
941
981
|
var DocumentState;
|
|
942
982
|
(function (DocumentState) {
|