@google/genai 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -1
- package/dist/genai.d.ts +42 -29
- package/dist/index.cjs +73 -6
- package/dist/index.mjs +73 -6
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +73 -6
- package/dist/node/index.mjs +73 -6
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +42 -29
- package/dist/tokenizer/node.mjs.map +1 -1
- package/dist/vertex_internal/index.cjs +1 -1
- package/dist/vertex_internal/index.cjs.map +1 -1
- package/dist/vertex_internal/index.d.ts +14 -0
- package/dist/vertex_internal/index.js +1 -1
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +73 -6
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +42 -29
- package/package.json +1 -1
package/dist/node/node.d.ts
CHANGED
|
@@ -700,7 +700,7 @@ declare interface BaseCreateAgentInteractionParams {
|
|
|
700
700
|
* Body param: Enforces that the generated response is a JSON object that complies
|
|
701
701
|
* with the JSON schema specified in this field.
|
|
702
702
|
*/
|
|
703
|
-
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat |
|
|
703
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
|
|
704
704
|
/**
|
|
705
705
|
* Body param: The mime type of the response. This is required if response_format
|
|
706
706
|
* is set.
|
|
@@ -767,7 +767,7 @@ declare interface BaseCreateModelInteractionParams {
|
|
|
767
767
|
* Body param: Enforces that the generated response is a JSON object that complies
|
|
768
768
|
* with the JSON schema specified in this field.
|
|
769
769
|
*/
|
|
770
|
-
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat |
|
|
770
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
|
|
771
771
|
/**
|
|
772
772
|
* Body param: The mime type of the response. This is required if response_format
|
|
773
773
|
* is set.
|
|
@@ -6292,7 +6292,7 @@ declare interface Interaction {
|
|
|
6292
6292
|
* Enforces that the generated response is a JSON object that complies with the
|
|
6293
6293
|
* JSON schema specified in this field.
|
|
6294
6294
|
*/
|
|
6295
|
-
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat |
|
|
6295
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
|
|
6296
6296
|
/**
|
|
6297
6297
|
* The mime type of the response. This is required if response_format is set.
|
|
6298
6298
|
*/
|
|
@@ -6326,6 +6326,30 @@ declare interface Interaction {
|
|
|
6326
6326
|
* completes.
|
|
6327
6327
|
*/
|
|
6328
6328
|
webhook_config?: WebhookConfig_2;
|
|
6329
|
+
/**
|
|
6330
|
+
* Concatenated text from the last model output in response to the current request.
|
|
6331
|
+
*
|
|
6332
|
+
* Note: this is added by the SDK.
|
|
6333
|
+
*/
|
|
6334
|
+
output_text?: string;
|
|
6335
|
+
/**
|
|
6336
|
+
* The last image generated by the model in response to the current request.
|
|
6337
|
+
*
|
|
6338
|
+
* Note: this is added by the SDK.
|
|
6339
|
+
*/
|
|
6340
|
+
output_image?: ImageContent;
|
|
6341
|
+
/**
|
|
6342
|
+
* The last audio generated by the model in response to the current request.
|
|
6343
|
+
*
|
|
6344
|
+
* Note: this is added by the SDK.
|
|
6345
|
+
*/
|
|
6346
|
+
output_audio?: AudioContent;
|
|
6347
|
+
/**
|
|
6348
|
+
* The last video generated by the model in response to the current request.
|
|
6349
|
+
*
|
|
6350
|
+
* Note: this is added by the SDK.
|
|
6351
|
+
*/
|
|
6352
|
+
output_video?: VideoContent;
|
|
6329
6353
|
}
|
|
6330
6354
|
|
|
6331
6355
|
declare interface InteractionCancelParams {
|
|
@@ -6420,7 +6444,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
6420
6444
|
}
|
|
6421
6445
|
|
|
6422
6446
|
export declare namespace Interactions {
|
|
6423
|
-
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioResponseFormat as AudioResponseFormat, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallStep as CodeExecutionCallStep, type CodeExecutionResultStep as CodeExecutionResultStep, type Content_2 as Content, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallStep as FileSearchCallStep, type FileSearchResultStep as FileSearchResultStep, type Function_2 as Function, type FunctionCallStep as FunctionCallStep, type FunctionResultStep as FunctionResultStep, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallStep as GoogleMapsCallStep, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultStep as GoogleMapsResultStep, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallStep as GoogleSearchCallStep, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultStep as GoogleSearchResultStep, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type ImageResponseFormat as ImageResponseFormat, type Interaction as Interaction, type InteractionCompletedEvent as InteractionCompletedEvent, type InteractionCreatedEvent as InteractionCreatedEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallStep as MCPServerToolCallStep, type MCPServerToolResultStep as MCPServerToolResultStep, type Model_2 as Model, type ModelOutputStep as ModelOutputStep, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type Step as Step, type StepDelta as StepDelta, type StepStart as StepStart, type StepStop as StepStop, type TextContent as TextContent, type TextResponseFormat as TextResponseFormat, type ThinkingLevel_2 as ThinkingLevel, type ThoughtStep as ThoughtStep, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallStep as URLContextCallStep, type URLContextResult as URLContextResult, type URLContextResultStep as URLContextResultStep, type Usage as Usage, type UserInputStep as UserInputStep, type VideoContent as VideoContent, type
|
|
6447
|
+
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioResponseFormat as AudioResponseFormat, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallStep as CodeExecutionCallStep, type CodeExecutionResultStep as CodeExecutionResultStep, type Content_2 as Content, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileCitation as FileCitation, type FileSearchCallStep as FileSearchCallStep, type FileSearchResultStep as FileSearchResultStep, type Function_2 as Function, type FunctionCallStep as FunctionCallStep, type FunctionResultStep as FunctionResultStep, type GenerationConfig_2 as GenerationConfig, type GoogleMapsCallArguments as GoogleMapsCallArguments, type GoogleMapsCallStep as GoogleMapsCallStep, type GoogleMapsResult as GoogleMapsResult, type GoogleMapsResultStep as GoogleMapsResultStep, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallStep as GoogleSearchCallStep, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultStep as GoogleSearchResultStep, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type ImageResponseFormat as ImageResponseFormat, type Interaction as Interaction, type InteractionCompletedEvent as InteractionCompletedEvent, type InteractionCreatedEvent as InteractionCreatedEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallStep as MCPServerToolCallStep, type MCPServerToolResultStep as MCPServerToolResultStep, type Model_2 as Model, type ModelOutputStep as ModelOutputStep, type PlaceCitation as PlaceCitation, type SpeechConfig_2 as SpeechConfig, type Step as Step, type StepDelta as StepDelta, type StepStart as StepStart, type StepStop as StepStop, type TextContent as TextContent, type TextResponseFormat as TextResponseFormat, type ThinkingLevel_2 as ThinkingLevel, type ThoughtStep as ThoughtStep, type Tool_2 as Tool, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type URLCitation as URLCitation, type URLContextCallArguments as URLContextCallArguments, type URLContextCallStep as URLContextCallStep, type URLContextResult as URLContextResult, type URLContextResultStep as URLContextResultStep, type Usage as Usage, type UserInputStep as UserInputStep, type VideoContent as VideoContent, type WebhookConfig_2 as WebhookConfig, type InteractionDeleteResponse as InteractionDeleteResponse, type InteractionCreateParams as InteractionCreateParams, type CreateModelInteractionParamsNonStreaming as CreateModelInteractionParamsNonStreaming, type CreateModelInteractionParamsStreaming as CreateModelInteractionParamsStreaming, type CreateAgentInteractionParamsNonStreaming as CreateAgentInteractionParamsNonStreaming, type CreateAgentInteractionParamsStreaming as CreateAgentInteractionParamsStreaming, type InteractionDeleteParams as InteractionDeleteParams, type InteractionCancelParams as InteractionCancelParams, type InteractionGetParams as InteractionGetParams, type InteractionGetParamsNonStreaming as InteractionGetParamsNonStreaming, type InteractionGetParamsStreaming as InteractionGetParamsStreaming, };
|
|
6424
6448
|
}
|
|
6425
6449
|
|
|
6426
6450
|
declare namespace InteractionsAPI {
|
|
@@ -6487,7 +6511,6 @@ declare namespace InteractionsAPI {
|
|
|
6487
6511
|
Usage,
|
|
6488
6512
|
UserInputStep,
|
|
6489
6513
|
VideoContent,
|
|
6490
|
-
VideoResponseFormat,
|
|
6491
6514
|
WebhookConfig_2 as WebhookConfig,
|
|
6492
6515
|
InteractionDeleteResponse,
|
|
6493
6516
|
InteractionCreateParams,
|
|
@@ -7148,6 +7171,8 @@ export declare interface LiveConnectConfig {
|
|
|
7148
7171
|
response.
|
|
7149
7172
|
*/
|
|
7150
7173
|
safetySettings?: SafetySetting[];
|
|
7174
|
+
/** Config for stream translation. */
|
|
7175
|
+
streamTranslationConfig?: StreamTranslationConfig;
|
|
7151
7176
|
}
|
|
7152
7177
|
|
|
7153
7178
|
/** Config for LiveConnectConstraints for Auth Token creation. */
|
|
@@ -10249,6 +10274,17 @@ export declare interface StreamableHttpTransport {
|
|
|
10249
10274
|
url?: string;
|
|
10250
10275
|
}
|
|
10251
10276
|
|
|
10277
|
+
/** Config for stream translation. */
|
|
10278
|
+
export declare interface StreamTranslationConfig {
|
|
10279
|
+
/** If true, the model will generate audio when the target language is
|
|
10280
|
+
spoken, essentially it will parrot the input. If false, we will not produce
|
|
10281
|
+
audio for the target language. */
|
|
10282
|
+
echoTargetLanguage?: boolean;
|
|
10283
|
+
/** The target language for translation. Supported values are BCP-47
|
|
10284
|
+
language codes (e.g. "en", "es", "fr"). */
|
|
10285
|
+
targetLanguageCode?: string;
|
|
10286
|
+
}
|
|
10287
|
+
|
|
10252
10288
|
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
10253
10289
|
export declare interface StringList {
|
|
10254
10290
|
/** The string values of the metadata to store. */
|
|
@@ -11846,6 +11882,7 @@ declare namespace types {
|
|
|
11846
11882
|
LiveClientRealtimeInput,
|
|
11847
11883
|
LiveClientToolResponse,
|
|
11848
11884
|
LiveClientMessage,
|
|
11885
|
+
StreamTranslationConfig,
|
|
11849
11886
|
LiveConnectConfig,
|
|
11850
11887
|
LiveConnectParameters,
|
|
11851
11888
|
CreateChatParameters,
|
|
@@ -12703,30 +12740,6 @@ export declare interface VideoMetadata {
|
|
|
12703
12740
|
startOffset?: string;
|
|
12704
12741
|
}
|
|
12705
12742
|
|
|
12706
|
-
/**
|
|
12707
|
-
* Configuration for video output format.
|
|
12708
|
-
*/
|
|
12709
|
-
declare interface VideoResponseFormat {
|
|
12710
|
-
type: 'video';
|
|
12711
|
-
/**
|
|
12712
|
-
* The aspect ratio for the video output.
|
|
12713
|
-
*/
|
|
12714
|
-
aspectRatio?: '16:9' | '9:16';
|
|
12715
|
-
/**
|
|
12716
|
-
* The delivery mode for the video output.
|
|
12717
|
-
*/
|
|
12718
|
-
delivery?: 'inline' | 'uri';
|
|
12719
|
-
/**
|
|
12720
|
-
* The duration for the video output.
|
|
12721
|
-
*/
|
|
12722
|
-
duration?: string;
|
|
12723
|
-
/**
|
|
12724
|
-
* The GCS URI to store the video output. Required for Vertex if delivery mode is
|
|
12725
|
-
* URI.
|
|
12726
|
-
*/
|
|
12727
|
-
gcsUri?: string;
|
|
12728
|
-
}
|
|
12729
|
-
|
|
12730
12743
|
/** Voice activity signal. */
|
|
12731
12744
|
export declare interface VoiceActivity {
|
|
12732
12745
|
/** The type of the voice activity signal. */
|