@google/genai 2.12.0 → 2.13.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 +136 -9
- package/dist/index.cjs +19 -8
- package/dist/index.mjs +19 -8
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +19 -8
- package/dist/node/index.mjs +19 -8
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +136 -9
- 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 +3 -1
- package/dist/vertex_internal/index.js +1 -1
- package/dist/vertex_internal/index.js.map +1 -1
- package/dist/web/index.mjs +19 -8
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +136 -9
- package/package.json +1 -1
package/dist/web/web.d.ts
CHANGED
|
@@ -80,6 +80,10 @@ declare type Agent$ = Agent;
|
|
|
80
80
|
* }
|
|
81
81
|
*/
|
|
82
82
|
declare type Agent = {
|
|
83
|
+
/**
|
|
84
|
+
* Configuration parameters for the agent.
|
|
85
|
+
*/
|
|
86
|
+
agent_config?: interactions.AntigravityAgentConfig | undefined;
|
|
83
87
|
/**
|
|
84
88
|
* The base agent to extend.
|
|
85
89
|
*/
|
|
@@ -106,6 +110,11 @@ declare type Agent = {
|
|
|
106
110
|
tools?: Array<AgentTool> | undefined;
|
|
107
111
|
};
|
|
108
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Configuration parameters for the agent.
|
|
115
|
+
*/
|
|
116
|
+
declare type AgentConfig = interactions.AntigravityAgentConfig;
|
|
117
|
+
|
|
109
118
|
declare type AgentCreateParams$ = CreateAgentParams;
|
|
110
119
|
|
|
111
120
|
declare type AgentDeleteParams$ = DeleteAgentParams;
|
|
@@ -150,6 +159,7 @@ declare namespace agents {
|
|
|
150
159
|
export {
|
|
151
160
|
AgentListResponse,
|
|
152
161
|
AgentTool,
|
|
162
|
+
AgentConfig,
|
|
153
163
|
BaseEnvironment,
|
|
154
164
|
Agent
|
|
155
165
|
}
|
|
@@ -284,7 +294,7 @@ declare type Annotation$ = Annotation;
|
|
|
284
294
|
/**
|
|
285
295
|
* Citation information for model-generated content.
|
|
286
296
|
*/
|
|
287
|
-
declare type Annotation = URLCitation | FileCitation | PlaceCitation;
|
|
297
|
+
declare type Annotation = URLCitation | FileCitation | PlaceCitation | WordInfo;
|
|
288
298
|
|
|
289
299
|
declare type AntigravityAgentConfig$ = AntigravityAgentConfig;
|
|
290
300
|
|
|
@@ -307,6 +317,10 @@ declare type AntigravityAgentConfig = {
|
|
|
307
317
|
* Max total tokens for the agent run.
|
|
308
318
|
*/
|
|
309
319
|
max_total_tokens?: string | undefined;
|
|
320
|
+
/**
|
|
321
|
+
* The model to use for agent reasoning.
|
|
322
|
+
*/
|
|
323
|
+
model?: string | undefined;
|
|
310
324
|
type: "antigravity";
|
|
311
325
|
};
|
|
312
326
|
|
|
@@ -744,7 +758,9 @@ export declare interface AudioTranscriptionConfig {
|
|
|
744
758
|
languageAuto?: LanguageAuto;
|
|
745
759
|
/** Specifies one or more languages in the audio. Do not use together with LanguageAuto. */
|
|
746
760
|
languageHints?: LanguageHints;
|
|
747
|
-
/** A list of
|
|
761
|
+
/** A list of custom vocabulary phrases, which biases the ASR model to improve recognition of these specific terms. */
|
|
762
|
+
customVocabulary?: string[];
|
|
763
|
+
/** Deprecated. A list of phrases used for speech adaptation, which biases the ASR model to improve recognition of these specific terms. */
|
|
748
764
|
adaptationPhrases?: string[];
|
|
749
765
|
}
|
|
750
766
|
|
|
@@ -4815,7 +4831,7 @@ declare type FunctionResultStep = {
|
|
|
4815
4831
|
*/
|
|
4816
4832
|
name?: string | undefined;
|
|
4817
4833
|
/**
|
|
4818
|
-
* The result of the tool call.
|
|
4834
|
+
* Required. The result of the tool call.
|
|
4819
4835
|
*/
|
|
4820
4836
|
result: FunctionResultStepResult | Array<FunctionResultSubcontent> | string;
|
|
4821
4837
|
type: "function_result";
|
|
@@ -4824,7 +4840,7 @@ declare type FunctionResultStep = {
|
|
|
4824
4840
|
declare type FunctionResultStepResult = {};
|
|
4825
4841
|
|
|
4826
4842
|
/**
|
|
4827
|
-
* The result of the tool call.
|
|
4843
|
+
* Required. The result of the tool call.
|
|
4828
4844
|
*/
|
|
4829
4845
|
declare type FunctionResultStepResultUnion = FunctionResultStepResult | Array<FunctionResultSubcontent> | string;
|
|
4830
4846
|
|
|
@@ -5644,6 +5660,10 @@ declare type GenerationConfig_2 = {
|
|
|
5644
5660
|
* The maximum cumulative probability of tokens to consider when sampling.
|
|
5645
5661
|
*/
|
|
5646
5662
|
top_p?: number | undefined;
|
|
5663
|
+
/**
|
|
5664
|
+
* Configuration for speech recognition (transcription).
|
|
5665
|
+
*/
|
|
5666
|
+
transcription_config?: TranscriptionConfig | undefined;
|
|
5647
5667
|
/**
|
|
5648
5668
|
* Configuration options for video generation.
|
|
5649
5669
|
*/
|
|
@@ -7611,6 +7631,7 @@ export declare namespace Interactions {
|
|
|
7611
7631
|
export type Tool = Tool$;
|
|
7612
7632
|
export type ToolChoiceConfig = ToolChoiceConfig$;
|
|
7613
7633
|
export type ToolChoiceType = ToolChoiceType$;
|
|
7634
|
+
export type TranscriptionConfig = TranscriptionConfig$;
|
|
7614
7635
|
export type URLCitation = URLCitation$;
|
|
7615
7636
|
export type URLContextCallArguments = URLContextCallArguments$;
|
|
7616
7637
|
export interface URLContextCallStep extends URLContextCallStep$ {
|
|
@@ -7625,6 +7646,7 @@ export declare namespace Interactions {
|
|
|
7625
7646
|
export type VideoContent = VideoContent$;
|
|
7626
7647
|
export type VideoResponseFormat = VideoResponseFormat$;
|
|
7627
7648
|
export type WebhookConfig = WebhookConfig$;
|
|
7649
|
+
export type WordInfo = WordInfo$;
|
|
7628
7650
|
export namespace CodeExecutionCallStep {
|
|
7629
7651
|
export type Arguments = Arguments$;
|
|
7630
7652
|
}
|
|
@@ -7938,6 +7960,7 @@ declare namespace interactions {
|
|
|
7938
7960
|
ToolChoiceConfig,
|
|
7939
7961
|
ToolChoiceType,
|
|
7940
7962
|
Tool_2 as Tool,
|
|
7963
|
+
TranscriptionConfig,
|
|
7941
7964
|
TurnContent,
|
|
7942
7965
|
Turn,
|
|
7943
7966
|
URLCitation,
|
|
@@ -7961,7 +7984,8 @@ declare namespace interactions {
|
|
|
7961
7984
|
VideoResponseFormatAspectRatio,
|
|
7962
7985
|
VideoResponseFormatDelivery,
|
|
7963
7986
|
VideoResponseFormat_2 as VideoResponseFormat,
|
|
7964
|
-
WebhookConfig_2 as WebhookConfig
|
|
7987
|
+
WebhookConfig_2 as WebhookConfig,
|
|
7988
|
+
WordInfo
|
|
7965
7989
|
}
|
|
7966
7990
|
}
|
|
7967
7991
|
|
|
@@ -8033,7 +8057,7 @@ declare type InteractionSSEStreamEvent = {
|
|
|
8033
8057
|
/**
|
|
8034
8058
|
* Required. Output only. The status of the interaction.
|
|
8035
8059
|
*/
|
|
8036
|
-
declare type InteractionStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | (string & {});
|
|
8060
|
+
declare type InteractionStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | "queued" | (string & {});
|
|
8037
8061
|
|
|
8038
8062
|
declare type InteractionStatusUpdate$ = InteractionStatusUpdate;
|
|
8039
8063
|
|
|
@@ -8051,7 +8075,7 @@ declare type InteractionStatusUpdate = {
|
|
|
8051
8075
|
status: InteractionStatusUpdateStatus;
|
|
8052
8076
|
};
|
|
8053
8077
|
|
|
8054
|
-
declare type InteractionStatusUpdateStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | (string & {});
|
|
8078
|
+
declare type InteractionStatusUpdateStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | "queued" | (string & {});
|
|
8055
8079
|
|
|
8056
8080
|
/** Parameters for the private _Register method. */
|
|
8057
8081
|
export declare interface InternalRegisterFilesParameters {
|
|
@@ -9523,7 +9547,7 @@ declare type MCPServerToolResultStep = {
|
|
|
9523
9547
|
*/
|
|
9524
9548
|
name?: string | undefined;
|
|
9525
9549
|
/**
|
|
9526
|
-
* The output from the MCP server call. Can be simple text or rich content.
|
|
9550
|
+
* Required. The output from the MCP server call. Can be simple text or rich content.
|
|
9527
9551
|
*/
|
|
9528
9552
|
result: MCPServerToolResultStepResult | string | Array<FunctionResultSubcontent>;
|
|
9529
9553
|
/**
|
|
@@ -9536,7 +9560,7 @@ declare type MCPServerToolResultStep = {
|
|
|
9536
9560
|
declare type MCPServerToolResultStepResult = {};
|
|
9537
9561
|
|
|
9538
9562
|
/**
|
|
9539
|
-
* The output from the MCP server call. Can be simple text or rich content.
|
|
9563
|
+
* Required. The output from the MCP server call. Can be simple text or rich content.
|
|
9540
9564
|
*/
|
|
9541
9565
|
declare type MCPServerToolResultStepResultUnion = MCPServerToolResultStepResult | string | Array<FunctionResultSubcontent>;
|
|
9542
9566
|
|
|
@@ -13264,6 +13288,53 @@ export declare interface Transcription {
|
|
|
13264
13288
|
languageCode?: string;
|
|
13265
13289
|
}
|
|
13266
13290
|
|
|
13291
|
+
declare type TranscriptionConfig$ = TranscriptionConfig;
|
|
13292
|
+
|
|
13293
|
+
/**
|
|
13294
|
+
* @license
|
|
13295
|
+
* Copyright 2026 Google LLC
|
|
13296
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
13297
|
+
*
|
|
13298
|
+
* g3-prettier-ignore-file
|
|
13299
|
+
*/
|
|
13300
|
+
/**
|
|
13301
|
+
* Configuration for speech recognition (transcription).
|
|
13302
|
+
*/
|
|
13303
|
+
declare type TranscriptionConfig = {
|
|
13304
|
+
/**
|
|
13305
|
+
* Optional. A list of phrases to bias the ASR model towards.
|
|
13306
|
+
*
|
|
13307
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
13308
|
+
*/
|
|
13309
|
+
adaptation_phrases?: Array<string> | undefined;
|
|
13310
|
+
/**
|
|
13311
|
+
* Optional. A list of custom vocabulary phrases to bias the speech recognition model
|
|
13312
|
+
*
|
|
13313
|
+
* @remarks
|
|
13314
|
+
* toward recognizing specific terms.
|
|
13315
|
+
*/
|
|
13316
|
+
custom_vocabulary?: Array<string> | undefined;
|
|
13317
|
+
/**
|
|
13318
|
+
* Optional. Configures speaker diarization. Supported values: "speaker".
|
|
13319
|
+
*/
|
|
13320
|
+
diarization_mode?: string | undefined;
|
|
13321
|
+
/**
|
|
13322
|
+
* Required. BCP-47 language codes providing hints about the languages present in the
|
|
13323
|
+
*
|
|
13324
|
+
* @remarks
|
|
13325
|
+
* audio. At least one must be specified, or set to ["auto"] to enable
|
|
13326
|
+
* automatic language detection.
|
|
13327
|
+
*/
|
|
13328
|
+
language_hints: Array<string>;
|
|
13329
|
+
/**
|
|
13330
|
+
* Optional. The granularity of timestamps to include in the transcription output.
|
|
13331
|
+
*
|
|
13332
|
+
* @remarks
|
|
13333
|
+
* Supported values: "word". If empty, no timestamps are generated.
|
|
13334
|
+
*/
|
|
13335
|
+
timestamp_granularities?: Array<string> | undefined;
|
|
13336
|
+
};
|
|
13337
|
+
|
|
13267
13338
|
/**
|
|
13268
13339
|
* @license
|
|
13269
13340
|
* Copyright 2026 Google LLC
|
|
@@ -16008,4 +16079,60 @@ export declare interface WhiteSpaceConfig {
|
|
|
16008
16079
|
maxOverlapTokens?: number;
|
|
16009
16080
|
}
|
|
16010
16081
|
|
|
16082
|
+
declare type WordInfo$ = WordInfo;
|
|
16083
|
+
|
|
16084
|
+
/**
|
|
16085
|
+
* @license
|
|
16086
|
+
* Copyright 2026 Google LLC
|
|
16087
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
16088
|
+
*
|
|
16089
|
+
* g3-prettier-ignore-file
|
|
16090
|
+
*/
|
|
16091
|
+
/**
|
|
16092
|
+
* Word-level ASR annotation for transcription output.
|
|
16093
|
+
*
|
|
16094
|
+
* @remarks
|
|
16095
|
+
* Carries the word text, optional timing, and optional speaker attribution.
|
|
16096
|
+
*/
|
|
16097
|
+
declare type WordInfo = {
|
|
16098
|
+
/**
|
|
16099
|
+
* End of the attributed segment, exclusive.
|
|
16100
|
+
*/
|
|
16101
|
+
end_index?: number | undefined;
|
|
16102
|
+
/**
|
|
16103
|
+
* End offset in time of the word relative to the start of the audio.
|
|
16104
|
+
*
|
|
16105
|
+
* @remarks
|
|
16106
|
+
* Present when timestamp_granularities contains "word".
|
|
16107
|
+
*/
|
|
16108
|
+
end_offset?: string | undefined;
|
|
16109
|
+
/**
|
|
16110
|
+
* Optional. Speaker label for this word (e.g. "spk_1", "spk_2").
|
|
16111
|
+
*
|
|
16112
|
+
* @remarks
|
|
16113
|
+
* Present when diarization_mode is set in TranscriptionConfig.
|
|
16114
|
+
*/
|
|
16115
|
+
speaker?: string | undefined;
|
|
16116
|
+
/**
|
|
16117
|
+
* Start of segment of the response that is attributed to this source.
|
|
16118
|
+
*
|
|
16119
|
+
* @remarks
|
|
16120
|
+
*
|
|
16121
|
+
* Index indicates the start of the segment, measured in bytes.
|
|
16122
|
+
*/
|
|
16123
|
+
start_index?: number | undefined;
|
|
16124
|
+
/**
|
|
16125
|
+
* Start offset in time of the word relative to the start of the audio.
|
|
16126
|
+
*
|
|
16127
|
+
* @remarks
|
|
16128
|
+
* Present when timestamp_granularities contains "word".
|
|
16129
|
+
*/
|
|
16130
|
+
start_offset?: string | undefined;
|
|
16131
|
+
/**
|
|
16132
|
+
* The transcribed word.
|
|
16133
|
+
*/
|
|
16134
|
+
text?: string | undefined;
|
|
16135
|
+
type: "word_info";
|
|
16136
|
+
};
|
|
16137
|
+
|
|
16011
16138
|
export { }
|