@google/genai 1.43.0 → 1.45.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 +629 -257
- package/dist/index.cjs +531 -364
- package/dist/index.mjs +531 -365
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +532 -365
- package/dist/node/index.mjs +532 -366
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +629 -257
- package/dist/tokenizer/node.cjs +171 -67
- package/dist/tokenizer/node.d.ts +96 -83
- package/dist/tokenizer/node.mjs +171 -67
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +2980 -0
- package/dist/vertex_internal/index.cjs.map +1 -0
- package/dist/vertex_internal/index.d.ts +7960 -0
- package/dist/vertex_internal/index.js +2951 -0
- package/dist/vertex_internal/index.js.map +1 -0
- package/dist/web/index.mjs +531 -365
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +629 -257
- package/package.json +13 -1
package/dist/tokenizer/node.d.ts
CHANGED
|
@@ -40,8 +40,10 @@ declare enum ApiSpec {
|
|
|
40
40
|
ELASTIC_SEARCH = "ELASTIC_SEARCH"
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/**
|
|
43
|
+
/** The authentication config to access the API. */
|
|
44
44
|
declare interface AuthConfig {
|
|
45
|
+
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
46
|
+
apiKey?: string;
|
|
45
47
|
/** Config for API key auth. */
|
|
46
48
|
apiKeyConfig?: ApiKeyConfig;
|
|
47
49
|
/** Type of auth scheme. */
|
|
@@ -129,12 +131,12 @@ declare enum Behavior {
|
|
|
129
131
|
NON_BLOCKING = "NON_BLOCKING"
|
|
130
132
|
}
|
|
131
133
|
|
|
132
|
-
/**
|
|
134
|
+
/** A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video. */
|
|
133
135
|
declare interface Blob_2 {
|
|
134
|
-
/** Required.
|
|
136
|
+
/** Required. The raw bytes of the data.
|
|
135
137
|
* @remarks Encoded as base64 string. */
|
|
136
138
|
data?: string;
|
|
137
|
-
/** Optional.
|
|
139
|
+
/** Optional. The 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 used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API. */
|
|
138
140
|
displayName?: string;
|
|
139
141
|
/** Required. The IANA standard MIME type of the source data. */
|
|
140
142
|
mimeType?: string;
|
|
@@ -171,7 +173,7 @@ declare interface Content {
|
|
|
171
173
|
/** List of parts that constitute a single message. Each part may have
|
|
172
174
|
a different IANA MIME type. */
|
|
173
175
|
parts?: Part[];
|
|
174
|
-
/** Optional. The producer of the content. Must be either 'user' or 'model'.
|
|
176
|
+
/** Optional. The producer of the content. Must be either 'user' or 'model'. If not set, the service will default to 'user'. */
|
|
175
177
|
role?: string;
|
|
176
178
|
}
|
|
177
179
|
|
|
@@ -231,10 +233,10 @@ declare enum DynamicRetrievalConfigMode {
|
|
|
231
233
|
|
|
232
234
|
/** Tool to search public web data, powered by Vertex AI Search and Sec4 compliance. This data type is not supported in Gemini API. */
|
|
233
235
|
declare interface EnterpriseWebSearch {
|
|
234
|
-
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
|
|
235
|
-
excludeDomains?: string[];
|
|
236
236
|
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. */
|
|
237
237
|
blockingConfidence?: PhishBlockThreshold;
|
|
238
|
+
/** Optional. List of domains to be excluded from the search results. The default limit is 2000 domains. */
|
|
239
|
+
excludeDomains?: string[];
|
|
238
240
|
}
|
|
239
241
|
|
|
240
242
|
/** The environment being operated. */
|
|
@@ -295,11 +297,11 @@ declare enum FeatureSelectionPreference {
|
|
|
295
297
|
PRIORITIZE_COST = "PRIORITIZE_COST"
|
|
296
298
|
}
|
|
297
299
|
|
|
298
|
-
/** URI
|
|
300
|
+
/** URI-based data. A FileData message contains a URI pointing to data of a specific media type. It is used to represent images, audio, and video stored in Google Cloud Storage. */
|
|
299
301
|
declare interface FileData {
|
|
300
|
-
/** Optional.
|
|
302
|
+
/** Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API. */
|
|
301
303
|
displayName?: string;
|
|
302
|
-
/** Required. URI. */
|
|
304
|
+
/** Required. The URI of the file in Google Cloud Storage. */
|
|
303
305
|
fileUri?: string;
|
|
304
306
|
/** Required. The IANA standard MIME type of the source data. */
|
|
305
307
|
mimeType?: string;
|
|
@@ -335,7 +337,7 @@ declare interface FunctionCall {
|
|
|
335
337
|
declare interface FunctionDeclaration {
|
|
336
338
|
/** Optional. Description and purpose of the function. Model uses it to decide how and whether to call the function. */
|
|
337
339
|
description?: string;
|
|
338
|
-
/** 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 and dashes, with a maximum length of 64. */
|
|
340
|
+
/** 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 64. */
|
|
339
341
|
name?: string;
|
|
340
342
|
/** 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 */
|
|
341
343
|
parameters?: Schema;
|
|
@@ -436,75 +438,75 @@ declare interface GenerationConfig {
|
|
|
436
438
|
`response_schema` that accepts [JSON Schema](https://json-schema.org/).
|
|
437
439
|
*/
|
|
438
440
|
responseJsonSchema?: unknown;
|
|
439
|
-
/** Optional. If enabled, audio
|
|
441
|
+
/** Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response. This field is not supported in Gemini API. */
|
|
440
442
|
audioTimestamp?: boolean;
|
|
441
|
-
/** Optional.
|
|
443
|
+
/** Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one. */
|
|
442
444
|
candidateCount?: number;
|
|
443
|
-
/** Optional. If enabled, the model will detect emotions and adapt its responses accordingly. This field is not supported in Gemini API. */
|
|
445
|
+
/** Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response. This field is not supported in Gemini API. */
|
|
444
446
|
enableAffectiveDialog?: boolean;
|
|
445
|
-
/** Optional.
|
|
447
|
+
/** Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0]. */
|
|
446
448
|
frequencyPenalty?: number;
|
|
447
|
-
/** Optional.
|
|
449
|
+
/** Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response. */
|
|
448
450
|
logprobs?: number;
|
|
449
|
-
/** Optional. The maximum number of
|
|
451
|
+
/** Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses. */
|
|
450
452
|
maxOutputTokens?: number;
|
|
451
|
-
/** Optional.
|
|
453
|
+
/** Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model. */
|
|
452
454
|
mediaResolution?: MediaResolution;
|
|
453
|
-
/** Optional.
|
|
455
|
+
/** Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0]. */
|
|
454
456
|
presencePenalty?: number;
|
|
455
|
-
/** Optional. If true,
|
|
457
|
+
/** 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. */
|
|
456
458
|
responseLogprobs?: boolean;
|
|
457
|
-
/** Optional.
|
|
459
|
+
/** 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. This is a preview feature. */
|
|
458
460
|
responseMimeType?: string;
|
|
459
|
-
/** Optional. The modalities of the response. */
|
|
461
|
+
/** 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. */
|
|
460
462
|
responseModalities?: Modality[];
|
|
461
|
-
/** Optional.
|
|
463
|
+
/** Optional. Lets you to specify a schema for the model's response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`. */
|
|
462
464
|
responseSchema?: Schema;
|
|
463
465
|
/** Optional. Routing configuration. This field is not supported in Gemini API. */
|
|
464
466
|
routingConfig?: GenerationConfigRoutingConfig;
|
|
465
|
-
/** Optional.
|
|
467
|
+
/** Optional. A seed for the random number generator. By setting a seed, you can make the model's output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it's not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the "random" choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results. */
|
|
466
468
|
seed?: number;
|
|
467
469
|
/** Optional. The speech generation config. */
|
|
468
470
|
speechConfig?: SpeechConfig;
|
|
469
|
-
/** Optional.
|
|
471
|
+
/** Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use ["\n", "###"] to stop generation at a new line or a specific marker. */
|
|
470
472
|
stopSequences?: string[];
|
|
471
|
-
/** Optional. Controls the randomness of
|
|
473
|
+
/** Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0]. */
|
|
472
474
|
temperature?: number;
|
|
473
|
-
/** Optional.
|
|
475
|
+
/** Optional. Configuration for thinking features. An error will be returned if this field is set for models that don't support thinking. */
|
|
474
476
|
thinkingConfig?: ThinkingConfig;
|
|
475
|
-
/** Optional.
|
|
477
|
+
/** Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words. */
|
|
476
478
|
topK?: number;
|
|
477
|
-
/** Optional.
|
|
479
|
+
/** Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It's recommended to adjust either temperature or `top_p`, but not both. */
|
|
478
480
|
topP?: number;
|
|
479
481
|
/** Optional. Enables enhanced civic answers. It may not be available for all models. This field is not supported in Vertex AI. */
|
|
480
482
|
enableEnhancedCivicAnswers?: boolean;
|
|
481
483
|
}
|
|
482
484
|
|
|
483
|
-
/** The configuration for routing the request to a specific model. This data type is not supported in Gemini API. */
|
|
485
|
+
/** The configuration for routing the request to a specific model. This can be used to control which model is used for the generation, either automatically or by specifying a model name. This data type is not supported in Gemini API. */
|
|
484
486
|
declare interface GenerationConfigRoutingConfig {
|
|
485
|
-
/**
|
|
487
|
+
/** In this mode, the model is selected automatically based on the content of the request. */
|
|
486
488
|
autoMode?: GenerationConfigRoutingConfigAutoRoutingMode;
|
|
487
|
-
/**
|
|
489
|
+
/** In this mode, the model is specified manually. */
|
|
488
490
|
manualMode?: GenerationConfigRoutingConfigManualRoutingMode;
|
|
489
491
|
}
|
|
490
492
|
|
|
491
|
-
/** When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. This data type is not supported in Gemini API. */
|
|
493
|
+
/** The configuration for automated routing. When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference. This data type is not supported in Gemini API. */
|
|
492
494
|
declare interface GenerationConfigRoutingConfigAutoRoutingMode {
|
|
493
495
|
/** The model routing preference. */
|
|
494
496
|
modelRoutingPreference?: 'UNKNOWN' | 'PRIORITIZE_QUALITY' | 'BALANCED' | 'PRIORITIZE_COST';
|
|
495
497
|
}
|
|
496
498
|
|
|
497
|
-
/** When manual routing is
|
|
499
|
+
/** The configuration for manual routing. When manual routing is specified, the model will be selected based on the model name provided. This data type is not supported in Gemini API. */
|
|
498
500
|
declare interface GenerationConfigRoutingConfigManualRoutingMode {
|
|
499
|
-
/** The model
|
|
501
|
+
/** The name of the model to use. Only public LLM models are accepted. */
|
|
500
502
|
modelName?: string;
|
|
501
503
|
}
|
|
502
504
|
|
|
503
|
-
/** Tool to retrieve
|
|
505
|
+
/** Tool to retrieve knowledge from Google Maps. */
|
|
504
506
|
declare interface GoogleMaps {
|
|
505
507
|
/** The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API. */
|
|
506
508
|
authConfig?: AuthConfig;
|
|
507
|
-
/** Optional.
|
|
509
|
+
/** Optional. Whether to return a widget context token in the GroundingMetadata of the response. Developers can use the widget context token to render a Google Maps widget with geospatial context related to the places that the model references in the response. */
|
|
508
510
|
enableWidget?: boolean;
|
|
509
511
|
}
|
|
510
512
|
|
|
@@ -512,10 +514,10 @@ declare interface GoogleMaps {
|
|
|
512
514
|
declare interface GoogleSearch {
|
|
513
515
|
/** Different types of search that can be enabled on the GoogleSearch tool. */
|
|
514
516
|
searchTypes?: SearchTypes;
|
|
515
|
-
/** 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. */
|
|
516
|
-
excludeDomains?: string[];
|
|
517
517
|
/** Optional. Sites with confidence level chosen & above this value will be blocked from the search results. This field is not supported in Gemini API. */
|
|
518
518
|
blockingConfidence?: PhishBlockThreshold;
|
|
519
|
+
/** 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. */
|
|
520
|
+
excludeDomains?: string[];
|
|
519
521
|
/** 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. */
|
|
520
522
|
timeRangeFilter?: Interval;
|
|
521
523
|
}
|
|
@@ -734,21 +736,21 @@ declare interface Part {
|
|
|
734
736
|
/** Media resolution for the input media.
|
|
735
737
|
*/
|
|
736
738
|
mediaResolution?: PartMediaResolution;
|
|
737
|
-
/** Optional.
|
|
739
|
+
/** Optional. The result of executing the ExecutableCode. */
|
|
738
740
|
codeExecutionResult?: CodeExecutionResult;
|
|
739
|
-
/** Optional. Code generated by the model that is
|
|
741
|
+
/** Optional. Code generated by the model that is intended to be executed. */
|
|
740
742
|
executableCode?: ExecutableCode;
|
|
741
|
-
/** Optional. URI
|
|
743
|
+
/** Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage. */
|
|
742
744
|
fileData?: FileData;
|
|
743
|
-
/** Optional. A predicted
|
|
745
|
+
/** Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function. */
|
|
744
746
|
functionCall?: FunctionCall;
|
|
745
|
-
/** Optional. The result
|
|
747
|
+
/** Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted. */
|
|
746
748
|
functionResponse?: FunctionResponse;
|
|
747
|
-
/** Optional.
|
|
749
|
+
/** Optional. The inline data content of the part. This can be used to include images, audio, or video in a request. */
|
|
748
750
|
inlineData?: Blob_2;
|
|
749
|
-
/** Optional.
|
|
751
|
+
/** Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent. */
|
|
750
752
|
text?: string;
|
|
751
|
-
/** Optional. Indicates
|
|
753
|
+
/** Optional. Indicates whether the `part` represents the model's thought process or reasoning. */
|
|
752
754
|
thought?: boolean;
|
|
753
755
|
/** Optional. An opaque signature for the thought so it can be reused in subsequent requests.
|
|
754
756
|
* @remarks Encoded as base64 string. */
|
|
@@ -759,16 +761,16 @@ declare interface Part {
|
|
|
759
761
|
|
|
760
762
|
/** Partial argument value of the function call. This data type is not supported in Gemini API. */
|
|
761
763
|
declare interface PartialArg {
|
|
764
|
+
/** Optional. Represents a boolean value. */
|
|
765
|
+
boolValue?: boolean;
|
|
766
|
+
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
767
|
+
jsonPath?: string;
|
|
762
768
|
/** Optional. Represents a null value. */
|
|
763
769
|
nullValue?: 'NULL_VALUE';
|
|
764
770
|
/** Optional. Represents a double value. */
|
|
765
771
|
numberValue?: number;
|
|
766
772
|
/** Optional. Represents a string value. */
|
|
767
773
|
stringValue?: string;
|
|
768
|
-
/** Optional. Represents a boolean value. */
|
|
769
|
-
boolValue?: boolean;
|
|
770
|
-
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
771
|
-
jsonPath?: string;
|
|
772
774
|
/** Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow. */
|
|
773
775
|
willContinue?: boolean;
|
|
774
776
|
}
|
|
@@ -841,9 +843,9 @@ declare enum PhishBlockThreshold {
|
|
|
841
843
|
BLOCK_ONLY_EXTREMELY_HIGH = "BLOCK_ONLY_EXTREMELY_HIGH"
|
|
842
844
|
}
|
|
843
845
|
|
|
844
|
-
/**
|
|
846
|
+
/** Configuration for a prebuilt voice. */
|
|
845
847
|
declare interface PrebuiltVoiceConfig {
|
|
846
|
-
/** The name of the
|
|
848
|
+
/** The name of the prebuilt voice to use. */
|
|
847
849
|
voiceName?: string;
|
|
848
850
|
}
|
|
849
851
|
|
|
@@ -936,49 +938,49 @@ declare interface Retrieval {
|
|
|
936
938
|
object](https://spec.openapis.org/oas/v3.0.3#schema-object). More fields may
|
|
937
939
|
be added in the future as needed. */
|
|
938
940
|
declare interface Schema {
|
|
939
|
-
/** Optional. The
|
|
941
|
+
/** Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`. */
|
|
940
942
|
anyOf?: Schema[];
|
|
941
|
-
/** Optional. Default value
|
|
943
|
+
/** Optional. Default value to use if the field is not specified. */
|
|
942
944
|
default?: unknown;
|
|
943
|
-
/** Optional.
|
|
945
|
+
/** Optional. Description of the schema. */
|
|
944
946
|
description?: string;
|
|
945
|
-
/** Optional. Possible values of the
|
|
947
|
+
/** Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:["EAST", "NORTH", "SOUTH", "WEST"]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:["101", "201", "301"]}` */
|
|
946
948
|
enum?: string[];
|
|
947
|
-
/** Optional. Example of
|
|
949
|
+
/** Optional. Example of an instance of this schema. */
|
|
948
950
|
example?: unknown;
|
|
949
|
-
/** Optional. The format of the data.
|
|
951
|
+
/** Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type. */
|
|
950
952
|
format?: string;
|
|
951
|
-
/** Optional.
|
|
953
|
+
/** Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array. */
|
|
952
954
|
items?: Schema;
|
|
953
|
-
/** Optional.
|
|
955
|
+
/** Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array. */
|
|
954
956
|
maxItems?: string;
|
|
955
|
-
/** Optional.
|
|
957
|
+
/** Optional. If type is `STRING`, `max_length` specifies the maximum length of the string. */
|
|
956
958
|
maxLength?: string;
|
|
957
|
-
/** Optional.
|
|
959
|
+
/** Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided. */
|
|
958
960
|
maxProperties?: string;
|
|
959
|
-
/** Optional.
|
|
961
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value. */
|
|
960
962
|
maximum?: number;
|
|
961
|
-
/** Optional.
|
|
963
|
+
/** Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array. */
|
|
962
964
|
minItems?: string;
|
|
963
|
-
/** Optional.
|
|
965
|
+
/** Optional. If type is `STRING`, `min_length` specifies the minimum length of the string. */
|
|
964
966
|
minLength?: string;
|
|
965
|
-
/** Optional.
|
|
967
|
+
/** Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided. */
|
|
966
968
|
minProperties?: string;
|
|
967
|
-
/** Optional.
|
|
969
|
+
/** Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value. */
|
|
968
970
|
minimum?: number;
|
|
969
|
-
/** Optional. Indicates if the value
|
|
971
|
+
/** Optional. Indicates if the value of this field can be null. */
|
|
970
972
|
nullable?: boolean;
|
|
971
|
-
/** Optional.
|
|
973
|
+
/** Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match. */
|
|
972
974
|
pattern?: string;
|
|
973
|
-
/** Optional.
|
|
975
|
+
/** Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object. */
|
|
974
976
|
properties?: Record<string, Schema>;
|
|
975
|
-
/** Optional.
|
|
977
|
+
/** Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties. */
|
|
976
978
|
propertyOrdering?: string[];
|
|
977
|
-
/** Optional.
|
|
979
|
+
/** Optional. If type is `OBJECT`, `required` lists the names of properties that must be present. */
|
|
978
980
|
required?: string[];
|
|
979
|
-
/** Optional.
|
|
981
|
+
/** Optional. Title for the schema. */
|
|
980
982
|
title?: string;
|
|
981
|
-
/** Optional.
|
|
983
|
+
/** Optional. Data type of the schema field. */
|
|
982
984
|
type?: Type;
|
|
983
985
|
}
|
|
984
986
|
|
|
@@ -991,7 +993,7 @@ declare interface SearchTypes {
|
|
|
991
993
|
imageSearch?: ImageSearch;
|
|
992
994
|
}
|
|
993
995
|
|
|
994
|
-
/** Configuration for a single speaker in a multi
|
|
996
|
+
/** Configuration for a single speaker in a multi-speaker setup. */
|
|
995
997
|
declare interface SpeakerVoiceConfig {
|
|
996
998
|
/** Required. The name of the speaker. This should be the same as the speaker name used in the prompt. */
|
|
997
999
|
speaker?: string;
|
|
@@ -1002,7 +1004,7 @@ declare interface SpeakerVoiceConfig {
|
|
|
1002
1004
|
declare interface SpeechConfig {
|
|
1003
1005
|
/** Configuration for the voice of the response. */
|
|
1004
1006
|
voiceConfig?: VoiceConfig;
|
|
1005
|
-
/** Optional.
|
|
1007
|
+
/** Optional. The language code (ISO 639-1) for the speech synthesis. */
|
|
1006
1008
|
languageCode?: string;
|
|
1007
1009
|
/** The configuration for a multi-speaker text-to-speech request. This field is mutually exclusive with `voice_config`. */
|
|
1008
1010
|
multiSpeakerVoiceConfig?: MultiSpeakerVoiceConfig;
|
|
@@ -1081,16 +1083,19 @@ declare interface Tool {
|
|
|
1081
1083
|
fileSearch?: FileSearch;
|
|
1082
1084
|
/** Enables the model to execute Google Search as part of generation. */
|
|
1083
1085
|
googleSearch?: GoogleSearch;
|
|
1086
|
+
/** Optional. Tool that allows grounding the model's response with
|
|
1087
|
+
geospatial context related to the user's query. */
|
|
1088
|
+
googleMaps?: GoogleMaps;
|
|
1084
1089
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
1085
1090
|
codeExecution?: ToolCodeExecution;
|
|
1086
1091
|
/** Optional. Tool to support searching public web data, powered by Vertex AI Search and Sec4 compliance. This field is not supported in Gemini API. */
|
|
1087
1092
|
enterpriseWebSearch?: EnterpriseWebSearch;
|
|
1088
1093
|
/** Optional. Function tool type. One or more function declarations to be passed to the model along with the current user query. Model may decide to call a subset of these functions by populating FunctionCall in the response. User should provide a FunctionResponse for each function call in the next turn. Based on the function responses, Model will generate the final response back to the user. Maximum 512 function declarations can be provided. */
|
|
1089
1094
|
functionDeclarations?: FunctionDeclaration[];
|
|
1090
|
-
/** Optional. GoogleMaps tool type. Tool to support Google Maps in Model. */
|
|
1091
|
-
googleMaps?: GoogleMaps;
|
|
1092
1095
|
/** Optional. Specialized retrieval tool that is powered by Google Search. */
|
|
1093
1096
|
googleSearchRetrieval?: GoogleSearchRetrieval;
|
|
1097
|
+
/** Optional. If specified, Vertex AI will use Parallel.ai to search for information to answer user queries. The search results will be grounded on Parallel.ai and presented to the model for response generation. This field is not supported in Gemini API. */
|
|
1098
|
+
parallelAiSearch?: ToolParallelAiSearch;
|
|
1094
1099
|
/** Optional. Tool to support URL context retrieval. */
|
|
1095
1100
|
urlContext?: UrlContext;
|
|
1096
1101
|
/** Optional. MCP Servers to connect to. This field is not supported in Vertex AI. */
|
|
@@ -1101,7 +1106,15 @@ declare interface Tool {
|
|
|
1101
1106
|
declare interface ToolCodeExecution {
|
|
1102
1107
|
}
|
|
1103
1108
|
|
|
1104
|
-
/**
|
|
1109
|
+
/** ParallelAiSearch tool type. A tool that uses the Parallel.ai search engine for grounding. This data type is not supported in Gemini API. */
|
|
1110
|
+
declare interface ToolParallelAiSearch {
|
|
1111
|
+
/** Optional. The API key for ParallelAiSearch. If an API key is not provided, the system will attempt to verify access by checking for an active Parallel.ai subscription through the Google Cloud Marketplace. See https://docs.parallel.ai/search/search-quickstart for more details. */
|
|
1112
|
+
apiKey?: string;
|
|
1113
|
+
/** Optional. Custom configs for ParallelAiSearch. This field can be used to pass any parameter from the Parallel.ai Search API. See the Parallel.ai documentation for the full list of available parameters and their usage: https://docs.parallel.ai/api-reference/search-beta/search Currently only `source_policy`, `excerpts`, `max_results`, `mode`, `fetch_policy` can be set via this field. For example: { "source_policy": { "include_domains": ["google.com", "wikipedia.org"], "exclude_domains": ["example.com"] }, "fetch_policy": { "max_age_seconds": 3600 } } */
|
|
1114
|
+
customConfigs?: Record<string, unknown>;
|
|
1115
|
+
}
|
|
1116
|
+
|
|
1117
|
+
/** Data type of the schema field. */
|
|
1105
1118
|
declare enum Type {
|
|
1106
1119
|
/**
|
|
1107
1120
|
* Not specified, should not be used.
|
|
@@ -1187,11 +1200,11 @@ declare interface VertexRagStoreRagResource {
|
|
|
1187
1200
|
ragFileIds?: string[];
|
|
1188
1201
|
}
|
|
1189
1202
|
|
|
1190
|
-
/**
|
|
1203
|
+
/** Provides metadata for a video, including the start and end offsets for clipping and the frame rate. */
|
|
1191
1204
|
declare interface VideoMetadata {
|
|
1192
1205
|
/** Optional. The end offset of the video. */
|
|
1193
1206
|
endOffset?: string;
|
|
1194
|
-
/** Optional. The frame rate of the video sent to the model. If not specified, the default value
|
|
1207
|
+
/** Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0]. */
|
|
1195
1208
|
fps?: number;
|
|
1196
1209
|
/** Optional. The start offset of the video. */
|
|
1197
1210
|
startOffset?: string;
|
|
@@ -1200,7 +1213,7 @@ declare interface VideoMetadata {
|
|
|
1200
1213
|
declare interface VoiceConfig {
|
|
1201
1214
|
/** If true, the model will use a replicated voice for the response. */
|
|
1202
1215
|
replicatedVoiceConfig?: ReplicatedVoiceConfig;
|
|
1203
|
-
/** The configuration for
|
|
1216
|
+
/** The configuration for a prebuilt voice. */
|
|
1204
1217
|
prebuiltVoiceConfig?: PrebuiltVoiceConfig;
|
|
1205
1218
|
}
|
|
1206
1219
|
|