@google/genai 1.35.0 → 1.37.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 +102 -6
- package/dist/index.cjs +31 -1
- package/dist/index.mjs +32 -2
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +31 -1
- package/dist/node/index.mjs +32 -2
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +102 -6
- package/dist/tokenizer/node.cjs +5664 -0
- package/dist/tokenizer/node.d.ts +1145 -0
- package/dist/tokenizer/node.mjs +5640 -0
- package/dist/tokenizer/node.mjs.map +1 -0
- package/dist/web/index.mjs +32 -2
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +102 -6
- package/package.json +32 -5
package/dist/genai.d.ts
CHANGED
|
@@ -417,11 +417,17 @@ export declare interface AudioChunk {
|
|
|
417
417
|
*/
|
|
418
418
|
declare interface AudioContent {
|
|
419
419
|
type: 'audio';
|
|
420
|
+
/**
|
|
421
|
+
* The audio content.
|
|
422
|
+
*/
|
|
420
423
|
data?: string;
|
|
421
424
|
/**
|
|
422
425
|
* The mime type of the audio.
|
|
423
426
|
*/
|
|
424
427
|
mime_type?: AudioMimeType;
|
|
428
|
+
/**
|
|
429
|
+
* The URI of the audio.
|
|
430
|
+
*/
|
|
425
431
|
uri?: string;
|
|
426
432
|
}
|
|
427
433
|
|
|
@@ -581,7 +587,7 @@ declare interface BaseCreateAgentInteractionParams {
|
|
|
581
587
|
/**
|
|
582
588
|
* Body param: The inputs for the interaction.
|
|
583
589
|
*/
|
|
584
|
-
input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
|
|
590
|
+
input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
|
|
585
591
|
/**
|
|
586
592
|
* Path param: Which version of the API to use.
|
|
587
593
|
*/
|
|
@@ -633,7 +639,7 @@ declare interface BaseCreateModelInteractionParams {
|
|
|
633
639
|
/**
|
|
634
640
|
* Body param: The inputs for the interaction.
|
|
635
641
|
*/
|
|
636
|
-
input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
|
|
642
|
+
input: string | Array<Content_2> | Array<Turn> | TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
|
|
637
643
|
/**
|
|
638
644
|
* Body param: The name of the `Model` used for generating the interaction.
|
|
639
645
|
*/
|
|
@@ -1701,6 +1707,12 @@ export declare class ComputeTokensResponse {
|
|
|
1701
1707
|
tokensInfo?: TokensInfo[];
|
|
1702
1708
|
}
|
|
1703
1709
|
|
|
1710
|
+
/** Local tokenizer compute tokens result. */
|
|
1711
|
+
export declare interface ComputeTokensResult {
|
|
1712
|
+
/** Lists of tokens info from the input. */
|
|
1713
|
+
tokensInfo?: TokensInfo[];
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1704
1716
|
declare type _ConditionalNodeReadableStream<R = any> = typeof globalThis extends {
|
|
1705
1717
|
ReadableStream: any;
|
|
1706
1718
|
} ? never : _NodeReadableStream<R>;
|
|
@@ -1720,10 +1732,10 @@ export declare interface Content {
|
|
|
1720
1732
|
/**
|
|
1721
1733
|
* The content of the response.
|
|
1722
1734
|
*/
|
|
1723
|
-
declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchResultContent;
|
|
1735
|
+
declare type Content_2 = TextContent | ImageContent | AudioContent | DocumentContent | VideoContent | ThoughtContent | FunctionCallContent | FunctionResultContent | CodeExecutionCallContent | CodeExecutionResultContent | URLContextCallContent | URLContextResultContent | GoogleSearchCallContent | GoogleSearchResultContent | MCPServerToolCallContent | MCPServerToolResultContent | FileSearchCallContent | FileSearchResultContent;
|
|
1724
1736
|
|
|
1725
1737
|
declare interface ContentDelta {
|
|
1726
|
-
delta?: ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.AudioDelta | ContentDelta.DocumentDelta | ContentDelta.VideoDelta | ContentDelta.ThoughtSummaryDelta | ContentDelta.ThoughtSignatureDelta | ContentDelta.FunctionCallDelta | ContentDelta.FunctionResultDelta | ContentDelta.CodeExecutionCallDelta | ContentDelta.CodeExecutionResultDelta | ContentDelta.URLContextCallDelta | ContentDelta.URLContextResultDelta | ContentDelta.GoogleSearchCallDelta | ContentDelta.GoogleSearchResultDelta | ContentDelta.MCPServerToolCallDelta | ContentDelta.MCPServerToolResultDelta | ContentDelta.FileSearchResultDelta;
|
|
1738
|
+
delta?: ContentDelta.TextDelta | ContentDelta.ImageDelta | ContentDelta.AudioDelta | ContentDelta.DocumentDelta | ContentDelta.VideoDelta | ContentDelta.ThoughtSummaryDelta | ContentDelta.ThoughtSignatureDelta | ContentDelta.FunctionCallDelta | ContentDelta.FunctionResultDelta | ContentDelta.CodeExecutionCallDelta | ContentDelta.CodeExecutionResultDelta | ContentDelta.URLContextCallDelta | ContentDelta.URLContextResultDelta | ContentDelta.GoogleSearchCallDelta | ContentDelta.GoogleSearchResultDelta | ContentDelta.MCPServerToolCallDelta | ContentDelta.MCPServerToolResultDelta | ContentDelta.FileSearchCallDelta | ContentDelta.FileSearchResultDelta;
|
|
1727
1739
|
/**
|
|
1728
1740
|
* The event_id token to be used to resume the interaction stream, from this event.
|
|
1729
1741
|
*/
|
|
@@ -1921,6 +1933,13 @@ declare namespace ContentDelta {
|
|
|
1921
1933
|
items?: Array<string | InteractionsAPI.ImageContent | unknown>;
|
|
1922
1934
|
}
|
|
1923
1935
|
}
|
|
1936
|
+
interface FileSearchCallDelta {
|
|
1937
|
+
type: 'file_search_call';
|
|
1938
|
+
/**
|
|
1939
|
+
* A unique ID for this specific tool call.
|
|
1940
|
+
*/
|
|
1941
|
+
id?: string;
|
|
1942
|
+
}
|
|
1924
1943
|
interface FileSearchResultDelta {
|
|
1925
1944
|
type: 'file_search_result';
|
|
1926
1945
|
result?: Array<FileSearchResultDelta.Result>;
|
|
@@ -2103,6 +2122,12 @@ export declare class CountTokensResponse {
|
|
|
2103
2122
|
cachedContentTokenCount?: number;
|
|
2104
2123
|
}
|
|
2105
2124
|
|
|
2125
|
+
/** Local tokenizer count tokens result. */
|
|
2126
|
+
export declare interface CountTokensResult {
|
|
2127
|
+
/** The total number of tokens. */
|
|
2128
|
+
totalTokens?: number;
|
|
2129
|
+
}
|
|
2130
|
+
|
|
2106
2131
|
declare interface CreateAgentInteractionParamsNonStreaming extends BaseCreateAgentInteractionParams {
|
|
2107
2132
|
/**
|
|
2108
2133
|
* Body param: Input only. Whether the interaction will be streamed.
|
|
@@ -2754,11 +2779,17 @@ export { Document_2 as Document }
|
|
|
2754
2779
|
*/
|
|
2755
2780
|
declare interface DocumentContent {
|
|
2756
2781
|
type: 'document';
|
|
2782
|
+
/**
|
|
2783
|
+
* The document content.
|
|
2784
|
+
*/
|
|
2757
2785
|
data?: string;
|
|
2758
2786
|
/**
|
|
2759
2787
|
* The mime type of the document.
|
|
2760
2788
|
*/
|
|
2761
2789
|
mime_type?: DocumentMimeType;
|
|
2790
|
+
/**
|
|
2791
|
+
* The URI of the document.
|
|
2792
|
+
*/
|
|
2762
2793
|
uri?: string;
|
|
2763
2794
|
}
|
|
2764
2795
|
|
|
@@ -3399,6 +3430,17 @@ export declare interface FileSearch {
|
|
|
3399
3430
|
metadataFilter?: string;
|
|
3400
3431
|
}
|
|
3401
3432
|
|
|
3433
|
+
/**
|
|
3434
|
+
* File Search content.
|
|
3435
|
+
*/
|
|
3436
|
+
declare interface FileSearchCallContent {
|
|
3437
|
+
type: 'file_search_call';
|
|
3438
|
+
/**
|
|
3439
|
+
* A unique ID for this specific tool call.
|
|
3440
|
+
*/
|
|
3441
|
+
id?: string;
|
|
3442
|
+
}
|
|
3443
|
+
|
|
3402
3444
|
/**
|
|
3403
3445
|
* File Search result content.
|
|
3404
3446
|
*/
|
|
@@ -4560,6 +4602,10 @@ export declare interface GenerationConfig {
|
|
|
4560
4602
|
* Configuration parameters for model interactions.
|
|
4561
4603
|
*/
|
|
4562
4604
|
declare interface GenerationConfig_2 {
|
|
4605
|
+
/**
|
|
4606
|
+
* Configuration for image interaction.
|
|
4607
|
+
*/
|
|
4608
|
+
image_config?: ImageConfig_2;
|
|
4563
4609
|
/**
|
|
4564
4610
|
* The maximum number of tokens to include in the response.
|
|
4565
4611
|
*/
|
|
@@ -5431,11 +5477,22 @@ export declare interface ImageConfig {
|
|
|
5431
5477
|
outputCompressionQuality?: number;
|
|
5432
5478
|
}
|
|
5433
5479
|
|
|
5480
|
+
/**
|
|
5481
|
+
* The configuration for image interaction.
|
|
5482
|
+
*/
|
|
5483
|
+
declare interface ImageConfig_2 {
|
|
5484
|
+
aspect_ratio?: '1:1' | '2:3' | '3:2' | '3:4' | '4:3' | '4:5' | '5:4' | '9:16' | '16:9' | '21:9';
|
|
5485
|
+
image_size?: '1K' | '2K' | '4K';
|
|
5486
|
+
}
|
|
5487
|
+
|
|
5434
5488
|
/**
|
|
5435
5489
|
* An image content block.
|
|
5436
5490
|
*/
|
|
5437
5491
|
declare interface ImageContent {
|
|
5438
5492
|
type: 'image';
|
|
5493
|
+
/**
|
|
5494
|
+
* The image content.
|
|
5495
|
+
*/
|
|
5439
5496
|
data?: string;
|
|
5440
5497
|
/**
|
|
5441
5498
|
* The mime type of the image.
|
|
@@ -5445,6 +5502,9 @@ declare interface ImageContent {
|
|
|
5445
5502
|
* The resolution of the media.
|
|
5446
5503
|
*/
|
|
5447
5504
|
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
5505
|
+
/**
|
|
5506
|
+
* The URI of the image.
|
|
5507
|
+
*/
|
|
5448
5508
|
uri?: string;
|
|
5449
5509
|
}
|
|
5450
5510
|
|
|
@@ -5700,7 +5760,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
5700
5760
|
}
|
|
5701
5761
|
|
|
5702
5762
|
export declare namespace Interactions {
|
|
5703
|
-
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioMimeType as AudioMimeType, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DocumentMimeType as DocumentMimeType, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageContent as ImageContent, type ImageMimeType as ImageMimeType, type Interaction as Interaction, type InteractionEvent as InteractionEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoice as ToolChoice, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type VideoMimeType as VideoMimeType, 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, };
|
|
5763
|
+
export { type AllowedTools as AllowedTools, type Annotation as Annotation, type AudioContent as AudioContent, type AudioMimeType as AudioMimeType, type CodeExecutionCallArguments as CodeExecutionCallArguments, type CodeExecutionCallContent as CodeExecutionCallContent, type CodeExecutionResultContent as CodeExecutionResultContent, type Content_2 as Content, type ContentDelta as ContentDelta, type ContentStart as ContentStart, type ContentStop as ContentStop, type DeepResearchAgentConfig as DeepResearchAgentConfig, type DocumentContent as DocumentContent, type DocumentMimeType as DocumentMimeType, type DynamicAgentConfig as DynamicAgentConfig, type ErrorEvent_2 as ErrorEvent, type FileSearchCallContent as FileSearchCallContent, type FileSearchResultContent as FileSearchResultContent, type Function_2 as Function, type FunctionCallContent as FunctionCallContent, type FunctionResultContent as FunctionResultContent, type GenerationConfig_2 as GenerationConfig, type GoogleSearchCallArguments as GoogleSearchCallArguments, type GoogleSearchCallContent as GoogleSearchCallContent, type GoogleSearchResult as GoogleSearchResult, type GoogleSearchResultContent as GoogleSearchResultContent, type ImageConfig_2 as ImageConfig, type ImageContent as ImageContent, type ImageMimeType as ImageMimeType, type Interaction as Interaction, type InteractionEvent as InteractionEvent, type InteractionSSEEvent as InteractionSSEEvent, type InteractionStatusUpdate as InteractionStatusUpdate, type MCPServerToolCallContent as MCPServerToolCallContent, type MCPServerToolResultContent as MCPServerToolResultContent, type Model_2 as Model, type SpeechConfig_2 as SpeechConfig, type TextContent as TextContent, type ThinkingLevel_2 as ThinkingLevel, type ThoughtContent as ThoughtContent, type Tool_2 as Tool, type ToolChoice as ToolChoice, type ToolChoiceConfig as ToolChoiceConfig, type ToolChoiceType as ToolChoiceType, type Turn as Turn, type URLContextCallArguments as URLContextCallArguments, type URLContextCallContent as URLContextCallContent, type URLContextResult as URLContextResult, type URLContextResultContent as URLContextResultContent, type Usage as Usage, type VideoContent as VideoContent, type VideoMimeType as VideoMimeType, 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, };
|
|
5704
5764
|
}
|
|
5705
5765
|
|
|
5706
5766
|
declare namespace InteractionsAPI {
|
|
@@ -5723,6 +5783,7 @@ declare namespace InteractionsAPI {
|
|
|
5723
5783
|
DocumentMimeType,
|
|
5724
5784
|
DynamicAgentConfig,
|
|
5725
5785
|
ErrorEvent_2 as ErrorEvent,
|
|
5786
|
+
FileSearchCallContent,
|
|
5726
5787
|
FileSearchResultContent,
|
|
5727
5788
|
Function_2 as Function,
|
|
5728
5789
|
FunctionCallContent,
|
|
@@ -5732,6 +5793,7 @@ declare namespace InteractionsAPI {
|
|
|
5732
5793
|
GoogleSearchCallContent,
|
|
5733
5794
|
GoogleSearchResult,
|
|
5734
5795
|
GoogleSearchResultContent,
|
|
5796
|
+
ImageConfig_2 as ImageConfig,
|
|
5735
5797
|
ImageContent,
|
|
5736
5798
|
ImageMimeType,
|
|
5737
5799
|
Interaction,
|
|
@@ -6805,8 +6867,10 @@ export declare class LiveServerMessage {
|
|
|
6805
6867
|
goAway?: LiveServerGoAway;
|
|
6806
6868
|
/** Update of the session resumption state. */
|
|
6807
6869
|
sessionResumptionUpdate?: LiveServerSessionResumptionUpdate;
|
|
6808
|
-
/** Voice activity detection signal. */
|
|
6870
|
+
/** Voice activity detection signal. Allowlisted only. */
|
|
6809
6871
|
voiceActivityDetectionSignal?: VoiceActivityDetectionSignal;
|
|
6872
|
+
/** Voice activity signal. */
|
|
6873
|
+
voiceActivity?: VoiceActivity;
|
|
6810
6874
|
/**
|
|
6811
6875
|
* Returns the concatenation of all text parts from the server content if present.
|
|
6812
6876
|
*
|
|
@@ -9823,6 +9887,7 @@ declare namespace types {
|
|
|
9823
9887
|
TurnCompleteReason,
|
|
9824
9888
|
MediaModality,
|
|
9825
9889
|
VadSignalType,
|
|
9890
|
+
VoiceActivityType,
|
|
9826
9891
|
StartSensitivity,
|
|
9827
9892
|
EndSensitivity,
|
|
9828
9893
|
ActivityHandling,
|
|
@@ -10145,6 +10210,7 @@ declare namespace types {
|
|
|
10145
10210
|
LiveServerGoAway,
|
|
10146
10211
|
LiveServerSessionResumptionUpdate,
|
|
10147
10212
|
VoiceActivityDetectionSignal,
|
|
10213
|
+
VoiceActivity,
|
|
10148
10214
|
LiveServerMessage,
|
|
10149
10215
|
OperationFromAPIResponseParameters,
|
|
10150
10216
|
GenerationConfigThinkingConfig,
|
|
@@ -10192,6 +10258,8 @@ declare namespace types {
|
|
|
10192
10258
|
CreateAuthTokenConfig,
|
|
10193
10259
|
CreateAuthTokenParameters,
|
|
10194
10260
|
OperationGetParameters,
|
|
10261
|
+
CountTokensResult,
|
|
10262
|
+
ComputeTokensResult,
|
|
10195
10263
|
CreateTuningJobParameters,
|
|
10196
10264
|
UploadToFileSearchStoreResponse,
|
|
10197
10265
|
UploadToFileSearchStoreOperation,
|
|
@@ -10832,6 +10900,9 @@ export declare enum VideoCompressionQuality {
|
|
|
10832
10900
|
*/
|
|
10833
10901
|
declare interface VideoContent {
|
|
10834
10902
|
type: 'video';
|
|
10903
|
+
/**
|
|
10904
|
+
* The video content.
|
|
10905
|
+
*/
|
|
10835
10906
|
data?: string;
|
|
10836
10907
|
/**
|
|
10837
10908
|
* The mime type of the video.
|
|
@@ -10841,6 +10912,9 @@ declare interface VideoContent {
|
|
|
10841
10912
|
* The resolution of the media.
|
|
10842
10913
|
*/
|
|
10843
10914
|
resolution?: 'low' | 'medium' | 'high' | 'ultra_high';
|
|
10915
|
+
/**
|
|
10916
|
+
* The URI of the video.
|
|
10917
|
+
*/
|
|
10844
10918
|
uri?: string;
|
|
10845
10919
|
}
|
|
10846
10920
|
|
|
@@ -10920,11 +10994,33 @@ export declare interface VideoMetadata {
|
|
|
10920
10994
|
*/
|
|
10921
10995
|
declare type VideoMimeType = 'video/mp4' | 'video/mpeg' | 'video/mov' | 'video/avi' | 'video/x-flv' | 'video/mpg' | 'video/webm' | 'video/wmv' | 'video/3gpp' | (string & {});
|
|
10922
10996
|
|
|
10997
|
+
/** Voice activity signal. */
|
|
10998
|
+
export declare interface VoiceActivity {
|
|
10999
|
+
/** The type of the voice activity signal. */
|
|
11000
|
+
voiceActivityType?: VoiceActivityType;
|
|
11001
|
+
}
|
|
11002
|
+
|
|
10923
11003
|
export declare interface VoiceActivityDetectionSignal {
|
|
10924
11004
|
/** The type of the VAD signal. */
|
|
10925
11005
|
vadSignalType?: VadSignalType;
|
|
10926
11006
|
}
|
|
10927
11007
|
|
|
11008
|
+
/** The type of the voice activity signal. */
|
|
11009
|
+
export declare enum VoiceActivityType {
|
|
11010
|
+
/**
|
|
11011
|
+
* The default is VOICE_ACTIVITY_TYPE_UNSPECIFIED.
|
|
11012
|
+
*/
|
|
11013
|
+
TYPE_UNSPECIFIED = "TYPE_UNSPECIFIED",
|
|
11014
|
+
/**
|
|
11015
|
+
* Start of sentence signal.
|
|
11016
|
+
*/
|
|
11017
|
+
ACTIVITY_START = "ACTIVITY_START",
|
|
11018
|
+
/**
|
|
11019
|
+
* End of sentence signal.
|
|
11020
|
+
*/
|
|
11021
|
+
ACTIVITY_END = "ACTIVITY_END"
|
|
11022
|
+
}
|
|
11023
|
+
|
|
10928
11024
|
export declare interface VoiceConfig {
|
|
10929
11025
|
/** If true, the model will use a replicated voice for the response. */
|
|
10930
11026
|
replicatedVoiceConfig?: ReplicatedVoiceConfig;
|
package/dist/index.cjs
CHANGED
|
@@ -1578,6 +1578,22 @@ exports.VadSignalType = void 0;
|
|
|
1578
1578
|
*/
|
|
1579
1579
|
VadSignalType["VAD_SIGNAL_TYPE_EOS"] = "VAD_SIGNAL_TYPE_EOS";
|
|
1580
1580
|
})(exports.VadSignalType || (exports.VadSignalType = {}));
|
|
1581
|
+
/** The type of the voice activity signal. */
|
|
1582
|
+
exports.VoiceActivityType = void 0;
|
|
1583
|
+
(function (VoiceActivityType) {
|
|
1584
|
+
/**
|
|
1585
|
+
* The default is VOICE_ACTIVITY_TYPE_UNSPECIFIED.
|
|
1586
|
+
*/
|
|
1587
|
+
VoiceActivityType["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
1588
|
+
/**
|
|
1589
|
+
* Start of sentence signal.
|
|
1590
|
+
*/
|
|
1591
|
+
VoiceActivityType["ACTIVITY_START"] = "ACTIVITY_START";
|
|
1592
|
+
/**
|
|
1593
|
+
* End of sentence signal.
|
|
1594
|
+
*/
|
|
1595
|
+
VoiceActivityType["ACTIVITY_END"] = "ACTIVITY_END";
|
|
1596
|
+
})(exports.VoiceActivityType || (exports.VoiceActivityType = {}));
|
|
1581
1597
|
/** Start of speech sensitivity. */
|
|
1582
1598
|
exports.StartSensitivity = void 0;
|
|
1583
1599
|
(function (StartSensitivity) {
|
|
@@ -6889,7 +6905,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
6889
6905
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
6890
6906
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
6891
6907
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
6892
|
-
const SDK_VERSION = '1.
|
|
6908
|
+
const SDK_VERSION = '1.37.0'; // x-release-please-version
|
|
6893
6909
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
6894
6910
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
6895
6911
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -11196,6 +11212,12 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
11196
11212
|
if (fromVoiceActivityDetectionSignal != null) {
|
|
11197
11213
|
setValueByPath(toObject, ['voiceActivityDetectionSignal'], fromVoiceActivityDetectionSignal);
|
|
11198
11214
|
}
|
|
11215
|
+
const fromVoiceActivity = getValueByPath(fromObject, [
|
|
11216
|
+
'voiceActivity',
|
|
11217
|
+
]);
|
|
11218
|
+
if (fromVoiceActivity != null) {
|
|
11219
|
+
setValueByPath(toObject, ['voiceActivity'], voiceActivityFromVertex(fromVoiceActivity));
|
|
11220
|
+
}
|
|
11199
11221
|
return toObject;
|
|
11200
11222
|
}
|
|
11201
11223
|
function partToMldev$2(fromObject) {
|
|
@@ -11472,6 +11494,14 @@ function usageMetadataFromVertex(fromObject) {
|
|
|
11472
11494
|
}
|
|
11473
11495
|
return toObject;
|
|
11474
11496
|
}
|
|
11497
|
+
function voiceActivityFromVertex(fromObject) {
|
|
11498
|
+
const toObject = {};
|
|
11499
|
+
const fromVoiceActivityType = getValueByPath(fromObject, ['type']);
|
|
11500
|
+
if (fromVoiceActivityType != null) {
|
|
11501
|
+
setValueByPath(toObject, ['voiceActivityType'], fromVoiceActivityType);
|
|
11502
|
+
}
|
|
11503
|
+
return toObject;
|
|
11504
|
+
}
|
|
11475
11505
|
|
|
11476
11506
|
/**
|
|
11477
11507
|
* @license
|
package/dist/index.mjs
CHANGED
|
@@ -1576,6 +1576,22 @@ var VadSignalType;
|
|
|
1576
1576
|
*/
|
|
1577
1577
|
VadSignalType["VAD_SIGNAL_TYPE_EOS"] = "VAD_SIGNAL_TYPE_EOS";
|
|
1578
1578
|
})(VadSignalType || (VadSignalType = {}));
|
|
1579
|
+
/** The type of the voice activity signal. */
|
|
1580
|
+
var VoiceActivityType;
|
|
1581
|
+
(function (VoiceActivityType) {
|
|
1582
|
+
/**
|
|
1583
|
+
* The default is VOICE_ACTIVITY_TYPE_UNSPECIFIED.
|
|
1584
|
+
*/
|
|
1585
|
+
VoiceActivityType["TYPE_UNSPECIFIED"] = "TYPE_UNSPECIFIED";
|
|
1586
|
+
/**
|
|
1587
|
+
* Start of sentence signal.
|
|
1588
|
+
*/
|
|
1589
|
+
VoiceActivityType["ACTIVITY_START"] = "ACTIVITY_START";
|
|
1590
|
+
/**
|
|
1591
|
+
* End of sentence signal.
|
|
1592
|
+
*/
|
|
1593
|
+
VoiceActivityType["ACTIVITY_END"] = "ACTIVITY_END";
|
|
1594
|
+
})(VoiceActivityType || (VoiceActivityType = {}));
|
|
1579
1595
|
/** Start of speech sensitivity. */
|
|
1580
1596
|
var StartSensitivity;
|
|
1581
1597
|
(function (StartSensitivity) {
|
|
@@ -6887,7 +6903,7 @@ const CONTENT_TYPE_HEADER = 'Content-Type';
|
|
|
6887
6903
|
const SERVER_TIMEOUT_HEADER = 'X-Server-Timeout';
|
|
6888
6904
|
const USER_AGENT_HEADER = 'User-Agent';
|
|
6889
6905
|
const GOOGLE_API_CLIENT_HEADER = 'x-goog-api-client';
|
|
6890
|
-
const SDK_VERSION = '1.
|
|
6906
|
+
const SDK_VERSION = '1.37.0'; // x-release-please-version
|
|
6891
6907
|
const LIBRARY_LABEL = `google-genai-sdk/${SDK_VERSION}`;
|
|
6892
6908
|
const VERTEX_AI_API_DEFAULT_VERSION = 'v1beta1';
|
|
6893
6909
|
const GOOGLE_AI_API_DEFAULT_VERSION = 'v1beta';
|
|
@@ -11194,6 +11210,12 @@ function liveServerMessageFromVertex(fromObject) {
|
|
|
11194
11210
|
if (fromVoiceActivityDetectionSignal != null) {
|
|
11195
11211
|
setValueByPath(toObject, ['voiceActivityDetectionSignal'], fromVoiceActivityDetectionSignal);
|
|
11196
11212
|
}
|
|
11213
|
+
const fromVoiceActivity = getValueByPath(fromObject, [
|
|
11214
|
+
'voiceActivity',
|
|
11215
|
+
]);
|
|
11216
|
+
if (fromVoiceActivity != null) {
|
|
11217
|
+
setValueByPath(toObject, ['voiceActivity'], voiceActivityFromVertex(fromVoiceActivity));
|
|
11218
|
+
}
|
|
11197
11219
|
return toObject;
|
|
11198
11220
|
}
|
|
11199
11221
|
function partToMldev$2(fromObject) {
|
|
@@ -11470,6 +11492,14 @@ function usageMetadataFromVertex(fromObject) {
|
|
|
11470
11492
|
}
|
|
11471
11493
|
return toObject;
|
|
11472
11494
|
}
|
|
11495
|
+
function voiceActivityFromVertex(fromObject) {
|
|
11496
|
+
const toObject = {};
|
|
11497
|
+
const fromVoiceActivityType = getValueByPath(fromObject, ['type']);
|
|
11498
|
+
if (fromVoiceActivityType != null) {
|
|
11499
|
+
setValueByPath(toObject, ['voiceActivityType'], fromVoiceActivityType);
|
|
11500
|
+
}
|
|
11501
|
+
return toObject;
|
|
11502
|
+
}
|
|
11473
11503
|
|
|
11474
11504
|
/**
|
|
11475
11505
|
* @license
|
|
@@ -19158,5 +19188,5 @@ class GoogleGenAI {
|
|
|
19158
19188
|
}
|
|
19159
19189
|
}
|
|
19160
19190
|
|
|
19161
|
-
export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, RawReferenceImage, RecontextImageResponse, ReplayResponse, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, TrafficType, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
19191
|
+
export { ActivityHandling, AdapterSize, ApiError, ApiSpec, AuthType, Batches, Behavior, BlockedReason, Caches, CancelTuningJobResponse, Chat, Chats, ComputeTokensResponse, ContentReferenceImage, ControlReferenceImage, ControlReferenceType, CountTokensResponse, CreateFileResponse, DeleteCachedContentResponse, DeleteFileResponse, DeleteModelResponse, DocumentState, DynamicRetrievalConfigMode, EditImageResponse, EditMode, EmbedContentResponse, EndSensitivity, Environment, FeatureSelectionPreference, FileSource, FileState, Files, FinishReason, FunctionCallingConfigMode, FunctionResponse, FunctionResponseBlob, FunctionResponseFileData, FunctionResponsePart, FunctionResponseScheduling, GenerateContentResponse, GenerateContentResponsePromptFeedback, GenerateContentResponseUsageMetadata, GenerateImagesResponse, GenerateVideosOperation, GenerateVideosResponse, GoogleGenAI, HarmBlockMethod, HarmBlockThreshold, HarmCategory, HarmProbability, HarmSeverity, HttpElementLocation, HttpResponse, ImagePromptLanguage, ImportFileOperation, ImportFileResponse, InlinedEmbedContentResponse, InlinedResponse, JobState, Language, ListBatchJobsResponse, ListCachedContentsResponse, ListDocumentsResponse, ListFileSearchStoresResponse, ListFilesResponse, ListModelsResponse, ListTuningJobsResponse, Live, LiveClientToolResponse, LiveMusicPlaybackControl, LiveMusicServerMessage, LiveSendToolResponseParameters, LiveServerMessage, MaskReferenceImage, MaskReferenceMode, MediaModality, MediaResolution, Modality, Models, MusicGenerationMode, Operations, Outcome, PagedItem, Pager, PartMediaResolutionLevel, PersonGeneration, PhishBlockThreshold, RawReferenceImage, RecontextImageResponse, ReplayResponse, SafetyFilterLevel, Scale, SegmentImageResponse, SegmentMode, Session, SingleEmbedContentResponse, StartSensitivity, StyleReferenceImage, SubjectReferenceImage, SubjectReferenceType, ThinkingLevel, Tokens, TrafficType, TuningMethod, TuningMode, TuningTask, TurnCompleteReason, TurnCoverage, Type, UploadToFileSearchStoreOperation, UploadToFileSearchStoreResponse, UploadToFileSearchStoreResumableResponse, UpscaleImageResponse, UrlRetrievalStatus, VadSignalType, VideoCompressionQuality, VideoGenerationMaskMode, VideoGenerationReferenceType, VoiceActivityType, createFunctionResponsePartFromBase64, createFunctionResponsePartFromUri, createModelContent, createPartFromBase64, createPartFromCodeExecutionResult, createPartFromExecutableCode, createPartFromFunctionCall, createPartFromFunctionResponse, createPartFromText, createPartFromUri, createUserContent, mcpToTool, setDefaultBaseUrls };
|
|
19162
19192
|
//# sourceMappingURL=index.mjs.map
|