@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/node/node.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
|
*/
|
|
@@ -7618,6 +7638,7 @@ export declare namespace Interactions {
|
|
|
7618
7638
|
export type Tool = Tool$;
|
|
7619
7639
|
export type ToolChoiceConfig = ToolChoiceConfig$;
|
|
7620
7640
|
export type ToolChoiceType = ToolChoiceType$;
|
|
7641
|
+
export type TranscriptionConfig = TranscriptionConfig$;
|
|
7621
7642
|
export type URLCitation = URLCitation$;
|
|
7622
7643
|
export type URLContextCallArguments = URLContextCallArguments$;
|
|
7623
7644
|
export interface URLContextCallStep extends URLContextCallStep$ {
|
|
@@ -7632,6 +7653,7 @@ export declare namespace Interactions {
|
|
|
7632
7653
|
export type VideoContent = VideoContent$;
|
|
7633
7654
|
export type VideoResponseFormat = VideoResponseFormat$;
|
|
7634
7655
|
export type WebhookConfig = WebhookConfig$;
|
|
7656
|
+
export type WordInfo = WordInfo$;
|
|
7635
7657
|
export namespace CodeExecutionCallStep {
|
|
7636
7658
|
export type Arguments = Arguments$;
|
|
7637
7659
|
}
|
|
@@ -7945,6 +7967,7 @@ declare namespace interactions {
|
|
|
7945
7967
|
ToolChoiceConfig,
|
|
7946
7968
|
ToolChoiceType,
|
|
7947
7969
|
Tool_2 as Tool,
|
|
7970
|
+
TranscriptionConfig,
|
|
7948
7971
|
TurnContent,
|
|
7949
7972
|
Turn,
|
|
7950
7973
|
URLCitation,
|
|
@@ -7968,7 +7991,8 @@ declare namespace interactions {
|
|
|
7968
7991
|
VideoResponseFormatAspectRatio,
|
|
7969
7992
|
VideoResponseFormatDelivery,
|
|
7970
7993
|
VideoResponseFormat_2 as VideoResponseFormat,
|
|
7971
|
-
WebhookConfig_2 as WebhookConfig
|
|
7994
|
+
WebhookConfig_2 as WebhookConfig,
|
|
7995
|
+
WordInfo
|
|
7972
7996
|
}
|
|
7973
7997
|
}
|
|
7974
7998
|
|
|
@@ -8040,7 +8064,7 @@ declare type InteractionSSEStreamEvent = {
|
|
|
8040
8064
|
/**
|
|
8041
8065
|
* Required. Output only. The status of the interaction.
|
|
8042
8066
|
*/
|
|
8043
|
-
declare type InteractionStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | (string & {});
|
|
8067
|
+
declare type InteractionStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | "queued" | (string & {});
|
|
8044
8068
|
|
|
8045
8069
|
declare type InteractionStatusUpdate$ = InteractionStatusUpdate;
|
|
8046
8070
|
|
|
@@ -8058,7 +8082,7 @@ declare type InteractionStatusUpdate = {
|
|
|
8058
8082
|
status: InteractionStatusUpdateStatus;
|
|
8059
8083
|
};
|
|
8060
8084
|
|
|
8061
|
-
declare type InteractionStatusUpdateStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | (string & {});
|
|
8085
|
+
declare type InteractionStatusUpdateStatus = "in_progress" | "requires_action" | "completed" | "failed" | "cancelled" | "incomplete" | "budget_exceeded" | "queued" | (string & {});
|
|
8062
8086
|
|
|
8063
8087
|
/** Parameters for the private _Register method. */
|
|
8064
8088
|
export declare interface InternalRegisterFilesParameters {
|
|
@@ -9530,7 +9554,7 @@ declare type MCPServerToolResultStep = {
|
|
|
9530
9554
|
*/
|
|
9531
9555
|
name?: string | undefined;
|
|
9532
9556
|
/**
|
|
9533
|
-
* The output from the MCP server call. Can be simple text or rich content.
|
|
9557
|
+
* Required. The output from the MCP server call. Can be simple text or rich content.
|
|
9534
9558
|
*/
|
|
9535
9559
|
result: MCPServerToolResultStepResult | string | Array<FunctionResultSubcontent>;
|
|
9536
9560
|
/**
|
|
@@ -9543,7 +9567,7 @@ declare type MCPServerToolResultStep = {
|
|
|
9543
9567
|
declare type MCPServerToolResultStepResult = {};
|
|
9544
9568
|
|
|
9545
9569
|
/**
|
|
9546
|
-
* The output from the MCP server call. Can be simple text or rich content.
|
|
9570
|
+
* Required. The output from the MCP server call. Can be simple text or rich content.
|
|
9547
9571
|
*/
|
|
9548
9572
|
declare type MCPServerToolResultStepResultUnion = MCPServerToolResultStepResult | string | Array<FunctionResultSubcontent>;
|
|
9549
9573
|
|
|
@@ -13271,6 +13295,53 @@ export declare interface Transcription {
|
|
|
13271
13295
|
languageCode?: string;
|
|
13272
13296
|
}
|
|
13273
13297
|
|
|
13298
|
+
declare type TranscriptionConfig$ = TranscriptionConfig;
|
|
13299
|
+
|
|
13300
|
+
/**
|
|
13301
|
+
* @license
|
|
13302
|
+
* Copyright 2026 Google LLC
|
|
13303
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
13304
|
+
*
|
|
13305
|
+
* g3-prettier-ignore-file
|
|
13306
|
+
*/
|
|
13307
|
+
/**
|
|
13308
|
+
* Configuration for speech recognition (transcription).
|
|
13309
|
+
*/
|
|
13310
|
+
declare type TranscriptionConfig = {
|
|
13311
|
+
/**
|
|
13312
|
+
* Optional. A list of phrases to bias the ASR model towards.
|
|
13313
|
+
*
|
|
13314
|
+
* @deprecated field: This will be removed in a future release, please migrate away from it as soon as possible.
|
|
13315
|
+
*/
|
|
13316
|
+
adaptation_phrases?: Array<string> | undefined;
|
|
13317
|
+
/**
|
|
13318
|
+
* Optional. A list of custom vocabulary phrases to bias the speech recognition model
|
|
13319
|
+
*
|
|
13320
|
+
* @remarks
|
|
13321
|
+
* toward recognizing specific terms.
|
|
13322
|
+
*/
|
|
13323
|
+
custom_vocabulary?: Array<string> | undefined;
|
|
13324
|
+
/**
|
|
13325
|
+
* Optional. Configures speaker diarization. Supported values: "speaker".
|
|
13326
|
+
*/
|
|
13327
|
+
diarization_mode?: string | undefined;
|
|
13328
|
+
/**
|
|
13329
|
+
* Required. BCP-47 language codes providing hints about the languages present in the
|
|
13330
|
+
*
|
|
13331
|
+
* @remarks
|
|
13332
|
+
* audio. At least one must be specified, or set to ["auto"] to enable
|
|
13333
|
+
* automatic language detection.
|
|
13334
|
+
*/
|
|
13335
|
+
language_hints: Array<string>;
|
|
13336
|
+
/**
|
|
13337
|
+
* Optional. The granularity of timestamps to include in the transcription output.
|
|
13338
|
+
*
|
|
13339
|
+
* @remarks
|
|
13340
|
+
* Supported values: "word". If empty, no timestamps are generated.
|
|
13341
|
+
*/
|
|
13342
|
+
timestamp_granularities?: Array<string> | undefined;
|
|
13343
|
+
};
|
|
13344
|
+
|
|
13274
13345
|
/**
|
|
13275
13346
|
* @license
|
|
13276
13347
|
* Copyright 2026 Google LLC
|
|
@@ -16015,4 +16086,60 @@ export declare interface WhiteSpaceConfig {
|
|
|
16015
16086
|
maxOverlapTokens?: number;
|
|
16016
16087
|
}
|
|
16017
16088
|
|
|
16089
|
+
declare type WordInfo$ = WordInfo;
|
|
16090
|
+
|
|
16091
|
+
/**
|
|
16092
|
+
* @license
|
|
16093
|
+
* Copyright 2026 Google LLC
|
|
16094
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
16095
|
+
*
|
|
16096
|
+
* g3-prettier-ignore-file
|
|
16097
|
+
*/
|
|
16098
|
+
/**
|
|
16099
|
+
* Word-level ASR annotation for transcription output.
|
|
16100
|
+
*
|
|
16101
|
+
* @remarks
|
|
16102
|
+
* Carries the word text, optional timing, and optional speaker attribution.
|
|
16103
|
+
*/
|
|
16104
|
+
declare type WordInfo = {
|
|
16105
|
+
/**
|
|
16106
|
+
* End of the attributed segment, exclusive.
|
|
16107
|
+
*/
|
|
16108
|
+
end_index?: number | undefined;
|
|
16109
|
+
/**
|
|
16110
|
+
* End offset in time of the word relative to the start of the audio.
|
|
16111
|
+
*
|
|
16112
|
+
* @remarks
|
|
16113
|
+
* Present when timestamp_granularities contains "word".
|
|
16114
|
+
*/
|
|
16115
|
+
end_offset?: string | undefined;
|
|
16116
|
+
/**
|
|
16117
|
+
* Optional. Speaker label for this word (e.g. "spk_1", "spk_2").
|
|
16118
|
+
*
|
|
16119
|
+
* @remarks
|
|
16120
|
+
* Present when diarization_mode is set in TranscriptionConfig.
|
|
16121
|
+
*/
|
|
16122
|
+
speaker?: string | undefined;
|
|
16123
|
+
/**
|
|
16124
|
+
* Start of segment of the response that is attributed to this source.
|
|
16125
|
+
*
|
|
16126
|
+
* @remarks
|
|
16127
|
+
*
|
|
16128
|
+
* Index indicates the start of the segment, measured in bytes.
|
|
16129
|
+
*/
|
|
16130
|
+
start_index?: number | undefined;
|
|
16131
|
+
/**
|
|
16132
|
+
* Start offset in time of the word relative to the start of the audio.
|
|
16133
|
+
*
|
|
16134
|
+
* @remarks
|
|
16135
|
+
* Present when timestamp_granularities contains "word".
|
|
16136
|
+
*/
|
|
16137
|
+
start_offset?: string | undefined;
|
|
16138
|
+
/**
|
|
16139
|
+
* The transcribed word.
|
|
16140
|
+
*/
|
|
16141
|
+
text?: string | undefined;
|
|
16142
|
+
type: "word_info";
|
|
16143
|
+
};
|
|
16144
|
+
|
|
16018
16145
|
export { }
|