@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/dist/web/web.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 | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
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 | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
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.
@@ -6285,7 +6285,7 @@ declare interface Interaction {
6285
6285
  * Enforces that the generated response is a JSON object that complies with the
6286
6286
  * JSON schema specified in this field.
6287
6287
  */
6288
- response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | VideoResponseFormat | unknown;
6288
+ response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
6289
6289
  /**
6290
6290
  * The mime type of the response. This is required if response_format is set.
6291
6291
  */
@@ -6319,6 +6319,30 @@ declare interface Interaction {
6319
6319
  * completes.
6320
6320
  */
6321
6321
  webhook_config?: WebhookConfig_2;
6322
+ /**
6323
+ * Concatenated text from the last model output in response to the current request.
6324
+ *
6325
+ * Note: this is added by the SDK.
6326
+ */
6327
+ output_text?: string;
6328
+ /**
6329
+ * The last image generated by the model in response to the current request.
6330
+ *
6331
+ * Note: this is added by the SDK.
6332
+ */
6333
+ output_image?: ImageContent;
6334
+ /**
6335
+ * The last audio generated by the model in response to the current request.
6336
+ *
6337
+ * Note: this is added by the SDK.
6338
+ */
6339
+ output_audio?: AudioContent;
6340
+ /**
6341
+ * The last video generated by the model in response to the current request.
6342
+ *
6343
+ * Note: this is added by the SDK.
6344
+ */
6345
+ output_video?: VideoContent;
6322
6346
  }
6323
6347
 
6324
6348
  declare interface InteractionCancelParams {
@@ -6413,7 +6437,7 @@ export declare class Interactions extends BaseInteractions {
6413
6437
  }
6414
6438
 
6415
6439
  export declare namespace Interactions {
6416
- 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 VideoResponseFormat as VideoResponseFormat, 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, };
6440
+ 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, };
6417
6441
  }
6418
6442
 
6419
6443
  declare namespace InteractionsAPI {
@@ -6480,7 +6504,6 @@ declare namespace InteractionsAPI {
6480
6504
  Usage,
6481
6505
  UserInputStep,
6482
6506
  VideoContent,
6483
- VideoResponseFormat,
6484
6507
  WebhookConfig_2 as WebhookConfig,
6485
6508
  InteractionDeleteResponse,
6486
6509
  InteractionCreateParams,
@@ -7141,6 +7164,8 @@ export declare interface LiveConnectConfig {
7141
7164
  response.
7142
7165
  */
7143
7166
  safetySettings?: SafetySetting[];
7167
+ /** Config for stream translation. */
7168
+ streamTranslationConfig?: StreamTranslationConfig;
7144
7169
  }
7145
7170
 
7146
7171
  /** Config for LiveConnectConstraints for Auth Token creation. */
@@ -10242,6 +10267,17 @@ export declare interface StreamableHttpTransport {
10242
10267
  url?: string;
10243
10268
  }
10244
10269
 
10270
+ /** Config for stream translation. */
10271
+ export declare interface StreamTranslationConfig {
10272
+ /** If true, the model will generate audio when the target language is
10273
+ spoken, essentially it will parrot the input. If false, we will not produce
10274
+ audio for the target language. */
10275
+ echoTargetLanguage?: boolean;
10276
+ /** The target language for translation. Supported values are BCP-47
10277
+ language codes (e.g. "en", "es", "fr"). */
10278
+ targetLanguageCode?: string;
10279
+ }
10280
+
10245
10281
  /** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
10246
10282
  export declare interface StringList {
10247
10283
  /** The string values of the metadata to store. */
@@ -11839,6 +11875,7 @@ declare namespace types {
11839
11875
  LiveClientRealtimeInput,
11840
11876
  LiveClientToolResponse,
11841
11877
  LiveClientMessage,
11878
+ StreamTranslationConfig,
11842
11879
  LiveConnectConfig,
11843
11880
  LiveConnectParameters,
11844
11881
  CreateChatParameters,
@@ -12696,30 +12733,6 @@ export declare interface VideoMetadata {
12696
12733
  startOffset?: string;
12697
12734
  }
12698
12735
 
12699
- /**
12700
- * Configuration for video output format.
12701
- */
12702
- declare interface VideoResponseFormat {
12703
- type: 'video';
12704
- /**
12705
- * The aspect ratio for the video output.
12706
- */
12707
- aspectRatio?: '16:9' | '9:16';
12708
- /**
12709
- * The delivery mode for the video output.
12710
- */
12711
- delivery?: 'inline' | 'uri';
12712
- /**
12713
- * The duration for the video output.
12714
- */
12715
- duration?: string;
12716
- /**
12717
- * The GCS URI to store the video output. Required for Vertex if delivery mode is
12718
- * URI.
12719
- */
12720
- gcsUri?: string;
12721
- }
12722
-
12723
12736
  /** Voice activity signal. */
12724
12737
  export declare interface VoiceActivity {
12725
12738
  /** The type of the voice activity signal. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@google/genai",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.mjs",