@google/genai 2.2.0 → 2.4.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 +384 -35
- package/dist/index.cjs +220 -88
- package/dist/index.mjs +220 -88
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +220 -88
- package/dist/node/index.mjs +220 -88
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +384 -35
- 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 +220 -88
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +384 -35
- package/package.json +1 -1
package/dist/web/web.d.ts
CHANGED
|
@@ -66,6 +66,225 @@ export declare enum AdapterSize {
|
|
|
66
66
|
ADAPTER_SIZE_THIRTY_TWO = "ADAPTER_SIZE_THIRTY_TWO"
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
/**
|
|
70
|
+
* An agent definition for the CreateAgent API. This message is the target for
|
|
71
|
+
* annotation-parser-based JSON parsing. New format: { "id": "customer-sentinel",
|
|
72
|
+
* "base_agent": "", "system_instruction": "...", "base_environment": { "type":
|
|
73
|
+
* "remote", "sources": [...] }, "tools": [ {"type": "code_execution"} ] }
|
|
74
|
+
*/
|
|
75
|
+
declare interface Agent {
|
|
76
|
+
/**
|
|
77
|
+
* The unique identifier for the agent.
|
|
78
|
+
*/
|
|
79
|
+
id?: string;
|
|
80
|
+
/**
|
|
81
|
+
* The base agent to extend.
|
|
82
|
+
*/
|
|
83
|
+
base_agent?: string;
|
|
84
|
+
/**
|
|
85
|
+
* The environment configuration for the agent.
|
|
86
|
+
*/
|
|
87
|
+
base_environment?: string | InteractionsAPI.Environment;
|
|
88
|
+
/**
|
|
89
|
+
* Agent description for developers to quickly read and understand.
|
|
90
|
+
*/
|
|
91
|
+
description?: string;
|
|
92
|
+
/**
|
|
93
|
+
* System instruction for the agent.
|
|
94
|
+
*/
|
|
95
|
+
system_instruction?: string;
|
|
96
|
+
/**
|
|
97
|
+
* The tools available to the agent.
|
|
98
|
+
*/
|
|
99
|
+
tools?: Array<Agent.CodeExecution | Agent.GoogleSearch | Agent.URLContext | Agent.MCPServer>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
declare namespace Agent {
|
|
103
|
+
/**
|
|
104
|
+
* A tool that can be used by the model to execute code.
|
|
105
|
+
*/
|
|
106
|
+
interface CodeExecution {
|
|
107
|
+
type: 'code_execution';
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* A tool that can be used by the model to search Google.
|
|
111
|
+
*/
|
|
112
|
+
interface GoogleSearch {
|
|
113
|
+
type: 'google_search';
|
|
114
|
+
/**
|
|
115
|
+
* The types of search grounding to enable.
|
|
116
|
+
*/
|
|
117
|
+
search_types?: Array<'web_search' | 'image_search' | 'enterprise_web_search'>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* A tool that can be used by the model to fetch URL context.
|
|
121
|
+
*/
|
|
122
|
+
interface URLContext {
|
|
123
|
+
type: 'url_context';
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* A MCPServer is a server that can be called by the model to perform actions.
|
|
127
|
+
*/
|
|
128
|
+
interface MCPServer {
|
|
129
|
+
type: 'mcp_server';
|
|
130
|
+
/**
|
|
131
|
+
* The allowed tools.
|
|
132
|
+
*/
|
|
133
|
+
allowed_tools?: Array<InteractionsAPI.AllowedTools>;
|
|
134
|
+
/**
|
|
135
|
+
* Optional: Fields for authentication headers, timeouts, etc., if needed.
|
|
136
|
+
*/
|
|
137
|
+
headers?: {
|
|
138
|
+
[key: string]: string;
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* The name of the MCPServer.
|
|
142
|
+
*/
|
|
143
|
+
name?: string;
|
|
144
|
+
/**
|
|
145
|
+
* The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
|
|
146
|
+
*/
|
|
147
|
+
url?: string;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
declare interface AgentCreateParams {
|
|
152
|
+
/**
|
|
153
|
+
* Path param: Which version of the API to use.
|
|
154
|
+
*/
|
|
155
|
+
api_version?: string;
|
|
156
|
+
/**
|
|
157
|
+
* Body param: The unique identifier for the agent.
|
|
158
|
+
*/
|
|
159
|
+
id?: string;
|
|
160
|
+
/**
|
|
161
|
+
* Body param: The base agent to extend.
|
|
162
|
+
*/
|
|
163
|
+
base_agent?: string;
|
|
164
|
+
/**
|
|
165
|
+
* Body param: The environment configuration for the agent.
|
|
166
|
+
*/
|
|
167
|
+
base_environment?: string | InteractionsAPI.Environment;
|
|
168
|
+
/**
|
|
169
|
+
* Body param: Agent description for developers to quickly read and understand.
|
|
170
|
+
*/
|
|
171
|
+
description?: string;
|
|
172
|
+
/**
|
|
173
|
+
* Body param: System instruction for the agent.
|
|
174
|
+
*/
|
|
175
|
+
system_instruction?: string;
|
|
176
|
+
/**
|
|
177
|
+
* Body param: The tools available to the agent.
|
|
178
|
+
*/
|
|
179
|
+
tools?: Array<AgentCreateParams.CodeExecution | AgentCreateParams.GoogleSearch | AgentCreateParams.URLContext | AgentCreateParams.MCPServer>;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare namespace AgentCreateParams {
|
|
183
|
+
/**
|
|
184
|
+
* A tool that can be used by the model to execute code.
|
|
185
|
+
*/
|
|
186
|
+
interface CodeExecution {
|
|
187
|
+
type: 'code_execution';
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* A tool that can be used by the model to search Google.
|
|
191
|
+
*/
|
|
192
|
+
interface GoogleSearch {
|
|
193
|
+
type: 'google_search';
|
|
194
|
+
/**
|
|
195
|
+
* The types of search grounding to enable.
|
|
196
|
+
*/
|
|
197
|
+
search_types?: Array<'web_search' | 'image_search' | 'enterprise_web_search'>;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* A tool that can be used by the model to fetch URL context.
|
|
201
|
+
*/
|
|
202
|
+
interface URLContext {
|
|
203
|
+
type: 'url_context';
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* A MCPServer is a server that can be called by the model to perform actions.
|
|
207
|
+
*/
|
|
208
|
+
interface MCPServer {
|
|
209
|
+
type: 'mcp_server';
|
|
210
|
+
/**
|
|
211
|
+
* The allowed tools.
|
|
212
|
+
*/
|
|
213
|
+
allowed_tools?: Array<InteractionsAPI.AllowedTools>;
|
|
214
|
+
/**
|
|
215
|
+
* Optional: Fields for authentication headers, timeouts, etc., if needed.
|
|
216
|
+
*/
|
|
217
|
+
headers?: {
|
|
218
|
+
[key: string]: string;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* The name of the MCPServer.
|
|
222
|
+
*/
|
|
223
|
+
name?: string;
|
|
224
|
+
/**
|
|
225
|
+
* The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"
|
|
226
|
+
*/
|
|
227
|
+
url?: string;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
declare interface AgentDeleteParams {
|
|
232
|
+
/**
|
|
233
|
+
* Which version of the API to use.
|
|
234
|
+
*/
|
|
235
|
+
api_version?: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/**
|
|
239
|
+
* A generic empty message that you can re-use to avoid defining duplicated empty
|
|
240
|
+
* messages in your APIs. A typical example is to use it as the request or the
|
|
241
|
+
* response type of an API method. For instance:
|
|
242
|
+
*
|
|
243
|
+
* service Foo {
|
|
244
|
+
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
245
|
+
* }
|
|
246
|
+
*/
|
|
247
|
+
declare interface AgentDeleteResponse {
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
declare interface AgentGetParams {
|
|
251
|
+
/**
|
|
252
|
+
* Which version of the API to use.
|
|
253
|
+
*/
|
|
254
|
+
api_version?: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
declare interface AgentListParams {
|
|
258
|
+
/**
|
|
259
|
+
* Path param: Which version of the API to use.
|
|
260
|
+
*/
|
|
261
|
+
api_version?: string;
|
|
262
|
+
/**
|
|
263
|
+
* Query param
|
|
264
|
+
*/
|
|
265
|
+
pageSize?: number;
|
|
266
|
+
/**
|
|
267
|
+
* Query param
|
|
268
|
+
*/
|
|
269
|
+
pageToken?: string;
|
|
270
|
+
/**
|
|
271
|
+
* Query param
|
|
272
|
+
*/
|
|
273
|
+
parent?: string;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
declare interface AgentListResponse {
|
|
277
|
+
agents?: Array<Agent>;
|
|
278
|
+
nextPageToken?: string;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export declare class Agents extends BaseAgents {
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
export declare namespace Agents {
|
|
285
|
+
export { type Agent as Agent, type AgentListResponse as AgentListResponse, type AgentDeleteResponse as AgentDeleteResponse, type AgentCreateParams as AgentCreateParams, type AgentListParams as AgentListParams, type AgentDeleteParams as AgentDeleteParams, type AgentGetParams as AgentGetParams, };
|
|
286
|
+
}
|
|
287
|
+
|
|
69
288
|
/** Aggregation metric. This enum is not supported in Gemini API. */
|
|
70
289
|
export declare enum AggregationMetric {
|
|
71
290
|
/**
|
|
@@ -671,6 +890,26 @@ export declare interface AvatarConfig {
|
|
|
671
890
|
declare class BadRequestError extends APIError<400, Headers> {
|
|
672
891
|
}
|
|
673
892
|
|
|
893
|
+
declare class BaseAgents extends APIResource {
|
|
894
|
+
static readonly _key: readonly ['agents'];
|
|
895
|
+
/**
|
|
896
|
+
* Creates a new Agent (Typed version for SDK).
|
|
897
|
+
*/
|
|
898
|
+
create(params?: AgentCreateParams | null | undefined, options?: RequestOptions): APIPromise<Agent>;
|
|
899
|
+
/**
|
|
900
|
+
* Lists all Agents.
|
|
901
|
+
*/
|
|
902
|
+
list(params?: AgentListParams | null | undefined, options?: RequestOptions): APIPromise<AgentListResponse>;
|
|
903
|
+
/**
|
|
904
|
+
* Deletes an Agent.
|
|
905
|
+
*/
|
|
906
|
+
delete(id: string, params?: AgentDeleteParams | null | undefined, options?: RequestOptions): APIPromise<AgentDeleteResponse>;
|
|
907
|
+
/**
|
|
908
|
+
* Gets a specific Agent.
|
|
909
|
+
*/
|
|
910
|
+
get(id: string, params?: AgentGetParams | null | undefined, options?: RequestOptions): APIPromise<Agent>;
|
|
911
|
+
}
|
|
912
|
+
|
|
674
913
|
declare interface BaseCreateAgentInteractionParams {
|
|
675
914
|
/**
|
|
676
915
|
* Path param: Which version of the API to use.
|
|
@@ -692,6 +931,12 @@ declare interface BaseCreateAgentInteractionParams {
|
|
|
692
931
|
* Body param: Input only. Whether to run the model interaction in the background.
|
|
693
932
|
*/
|
|
694
933
|
background?: boolean;
|
|
934
|
+
/**
|
|
935
|
+
* Body param: The environment configuration for the interaction. Can be an object
|
|
936
|
+
* specifying remote environment sources or a string referencing an existing
|
|
937
|
+
* environment ID.
|
|
938
|
+
*/
|
|
939
|
+
environment?: string | Environment_2;
|
|
695
940
|
/**
|
|
696
941
|
* Body param: The ID of the previous interaction, if any.
|
|
697
942
|
*/
|
|
@@ -700,10 +945,10 @@ declare interface BaseCreateAgentInteractionParams {
|
|
|
700
945
|
* Body param: Enforces that the generated response is a JSON object that complies
|
|
701
946
|
* with the JSON schema specified in this field.
|
|
702
947
|
*/
|
|
703
|
-
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat |
|
|
948
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
|
|
704
949
|
/**
|
|
705
|
-
* Body param: The mime type of the response. This is required if
|
|
706
|
-
* is set.
|
|
950
|
+
* @deprecated Body param: The mime type of the response. This is required if
|
|
951
|
+
* response_format is set.
|
|
707
952
|
*/
|
|
708
953
|
response_mime_type?: string;
|
|
709
954
|
/**
|
|
@@ -755,6 +1000,12 @@ declare interface BaseCreateModelInteractionParams {
|
|
|
755
1000
|
* Body param: Input only. Whether to run the model interaction in the background.
|
|
756
1001
|
*/
|
|
757
1002
|
background?: boolean;
|
|
1003
|
+
/**
|
|
1004
|
+
* Body param: The environment configuration for the interaction. Can be an object
|
|
1005
|
+
* specifying remote environment sources or a string referencing an existing
|
|
1006
|
+
* environment ID.
|
|
1007
|
+
*/
|
|
1008
|
+
environment?: string | Environment_2;
|
|
758
1009
|
/**
|
|
759
1010
|
* Body param: Input only. Configuration parameters for the model interaction.
|
|
760
1011
|
*/
|
|
@@ -767,10 +1018,10 @@ declare interface BaseCreateModelInteractionParams {
|
|
|
767
1018
|
* Body param: Enforces that the generated response is a JSON object that complies
|
|
768
1019
|
* with the JSON schema specified in this field.
|
|
769
1020
|
*/
|
|
770
|
-
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat |
|
|
1021
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
|
|
771
1022
|
/**
|
|
772
|
-
* Body param: The mime type of the response. This is required if
|
|
773
|
-
* is set.
|
|
1023
|
+
* @deprecated Body param: The mime type of the response. This is required if
|
|
1024
|
+
* response_format is set.
|
|
774
1025
|
*/
|
|
775
1026
|
response_mime_type?: string;
|
|
776
1027
|
/**
|
|
@@ -3264,6 +3515,77 @@ export declare enum Environment {
|
|
|
3264
3515
|
ENVIRONMENT_BROWSER = "ENVIRONMENT_BROWSER"
|
|
3265
3516
|
}
|
|
3266
3517
|
|
|
3518
|
+
/**
|
|
3519
|
+
* Configuration for a custom environment.
|
|
3520
|
+
*/
|
|
3521
|
+
declare interface Environment_2 {
|
|
3522
|
+
type: 'remote';
|
|
3523
|
+
/**
|
|
3524
|
+
* Network configuration for the environment.
|
|
3525
|
+
*/
|
|
3526
|
+
network?: 'disabled' | Environment_2.Allowlist;
|
|
3527
|
+
sources?: Array<Environment_2.Source>;
|
|
3528
|
+
}
|
|
3529
|
+
|
|
3530
|
+
declare namespace Environment_2 {
|
|
3531
|
+
/**
|
|
3532
|
+
* Outbound networking configuration for the sandbox. When specified, restricts
|
|
3533
|
+
* which external domains the sandbox can reach. Omit entirely to allow all
|
|
3534
|
+
* outbound traffic with no header injection.
|
|
3535
|
+
*/
|
|
3536
|
+
interface Allowlist {
|
|
3537
|
+
/**
|
|
3538
|
+
* List of allowed outbound domains. Only requests to listed domains are permitted.
|
|
3539
|
+
* Use [{'domain': '*'}] to allow all domains while still injecting headers on
|
|
3540
|
+
* specific ones.
|
|
3541
|
+
*/
|
|
3542
|
+
allowlist?: Array<Allowlist.Allowlist>;
|
|
3543
|
+
}
|
|
3544
|
+
namespace Allowlist {
|
|
3545
|
+
/**
|
|
3546
|
+
* A single domain allowlist rule with optional header injection.
|
|
3547
|
+
*/
|
|
3548
|
+
interface Allowlist {
|
|
3549
|
+
/**
|
|
3550
|
+
* Domain to allow outbound requests to. Supports wildcards (e.g.
|
|
3551
|
+
* '_.googleapis.com'). Use '_' to allow all domains.
|
|
3552
|
+
*/
|
|
3553
|
+
domain: string;
|
|
3554
|
+
/**
|
|
3555
|
+
* Headers to inject on all outbound requests matching this domain. Each entry is a
|
|
3556
|
+
* flat {header_name: header_value} object. The egress proxy injects these
|
|
3557
|
+
* automatically.
|
|
3558
|
+
*/
|
|
3559
|
+
transform?: Array<{
|
|
3560
|
+
[key: string]: string;
|
|
3561
|
+
}>;
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
3564
|
+
/**
|
|
3565
|
+
* A source to be mounted into the environment.
|
|
3566
|
+
*/
|
|
3567
|
+
interface Source {
|
|
3568
|
+
/**
|
|
3569
|
+
* The inline content if `type` is `INLINE`.
|
|
3570
|
+
*/
|
|
3571
|
+
content?: string;
|
|
3572
|
+
/**
|
|
3573
|
+
* Optional encoding for inline content (e.g. `base64`).
|
|
3574
|
+
*/
|
|
3575
|
+
encoding?: string;
|
|
3576
|
+
/**
|
|
3577
|
+
* The source of the environment. For GCS, this is the GCS path. For GitHub, this
|
|
3578
|
+
* is the GitHub path.
|
|
3579
|
+
*/
|
|
3580
|
+
source?: string;
|
|
3581
|
+
/**
|
|
3582
|
+
* Where the source should appear in the environment.
|
|
3583
|
+
*/
|
|
3584
|
+
target?: string;
|
|
3585
|
+
type?: 'gcs' | 'inline' | 'repository' | 'skill_registry';
|
|
3586
|
+
}
|
|
3587
|
+
}
|
|
3588
|
+
|
|
3267
3589
|
declare interface ErrorEvent_2 {
|
|
3268
3590
|
event_type: 'error';
|
|
3269
3591
|
/**
|
|
@@ -4848,7 +5170,7 @@ export declare interface GenerationConfig {
|
|
|
4848
5170
|
*/
|
|
4849
5171
|
declare interface GenerationConfig_2 {
|
|
4850
5172
|
/**
|
|
4851
|
-
* Configuration for image interaction.
|
|
5173
|
+
* @deprecated Configuration for image interaction.
|
|
4852
5174
|
*/
|
|
4853
5175
|
image_config?: ImageConfig_2;
|
|
4854
5176
|
/**
|
|
@@ -5141,10 +5463,12 @@ export declare class GoogleGenAI {
|
|
|
5141
5463
|
readonly fileSearchStores: FileSearchStores;
|
|
5142
5464
|
private _interactions;
|
|
5143
5465
|
private _webhooks;
|
|
5466
|
+
private _agents;
|
|
5144
5467
|
private _nextGenClient;
|
|
5145
5468
|
private getNextGenClient;
|
|
5146
5469
|
get interactions(): Interactions;
|
|
5147
5470
|
get webhooks(): Webhooks;
|
|
5471
|
+
get agents(): Agents;
|
|
5148
5472
|
constructor(options: GoogleGenAIOptions);
|
|
5149
5473
|
}
|
|
5150
5474
|
|
|
@@ -6269,6 +6593,16 @@ declare interface Interaction {
|
|
|
6269
6593
|
* Configuration parameters for the agent interaction.
|
|
6270
6594
|
*/
|
|
6271
6595
|
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
|
|
6596
|
+
/**
|
|
6597
|
+
* The environment configuration for the interaction. Can be an object specifying
|
|
6598
|
+
* remote environment sources or a string referencing an existing environment ID.
|
|
6599
|
+
*/
|
|
6600
|
+
environment?: string | Environment_2;
|
|
6601
|
+
/**
|
|
6602
|
+
* Output only. The environment ID for the interaction. Only populated if
|
|
6603
|
+
* environment config is set in the request.
|
|
6604
|
+
*/
|
|
6605
|
+
environment_id?: string;
|
|
6272
6606
|
/**
|
|
6273
6607
|
* The input for the interaction.
|
|
6274
6608
|
*/
|
|
@@ -6285,9 +6619,10 @@ declare interface Interaction {
|
|
|
6285
6619
|
* Enforces that the generated response is a JSON object that complies with the
|
|
6286
6620
|
* JSON schema specified in this field.
|
|
6287
6621
|
*/
|
|
6288
|
-
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat |
|
|
6622
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
|
|
6289
6623
|
/**
|
|
6290
|
-
* The mime type of the response. This is required if response_format
|
|
6624
|
+
* @deprecated The mime type of the response. This is required if response_format
|
|
6625
|
+
* is set.
|
|
6291
6626
|
*/
|
|
6292
6627
|
response_mime_type?: string;
|
|
6293
6628
|
/**
|
|
@@ -6319,6 +6654,30 @@ declare interface Interaction {
|
|
|
6319
6654
|
* completes.
|
|
6320
6655
|
*/
|
|
6321
6656
|
webhook_config?: WebhookConfig_2;
|
|
6657
|
+
/**
|
|
6658
|
+
* Concatenated text from the last model output in response to the current request.
|
|
6659
|
+
*
|
|
6660
|
+
* Note: this is added by the SDK.
|
|
6661
|
+
*/
|
|
6662
|
+
output_text?: string;
|
|
6663
|
+
/**
|
|
6664
|
+
* The last image generated by the model in response to the current request.
|
|
6665
|
+
*
|
|
6666
|
+
* Note: this is added by the SDK.
|
|
6667
|
+
*/
|
|
6668
|
+
output_image?: ImageContent;
|
|
6669
|
+
/**
|
|
6670
|
+
* The last audio generated by the model in response to the current request.
|
|
6671
|
+
*
|
|
6672
|
+
* Note: this is added by the SDK.
|
|
6673
|
+
*/
|
|
6674
|
+
output_audio?: AudioContent;
|
|
6675
|
+
/**
|
|
6676
|
+
* The last video generated by the model in response to the current request.
|
|
6677
|
+
*
|
|
6678
|
+
* Note: this is added by the SDK.
|
|
6679
|
+
*/
|
|
6680
|
+
output_video?: VideoContent;
|
|
6322
6681
|
}
|
|
6323
6682
|
|
|
6324
6683
|
declare interface InteractionCancelParams {
|
|
@@ -6413,7 +6772,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
6413
6772
|
}
|
|
6414
6773
|
|
|
6415
6774
|
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
|
|
6775
|
+
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 Environment_2 as Environment, 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
6776
|
}
|
|
6418
6777
|
|
|
6419
6778
|
declare namespace InteractionsAPI {
|
|
@@ -6431,6 +6790,7 @@ declare namespace InteractionsAPI {
|
|
|
6431
6790
|
DeepResearchAgentConfig,
|
|
6432
6791
|
DocumentContent,
|
|
6433
6792
|
DynamicAgentConfig,
|
|
6793
|
+
Environment_2 as Environment,
|
|
6434
6794
|
ErrorEvent_2 as ErrorEvent,
|
|
6435
6795
|
FileCitation,
|
|
6436
6796
|
FileSearchCallStep,
|
|
@@ -6480,7 +6840,6 @@ declare namespace InteractionsAPI {
|
|
|
6480
6840
|
Usage,
|
|
6481
6841
|
UserInputStep,
|
|
6482
6842
|
VideoContent,
|
|
6483
|
-
VideoResponseFormat,
|
|
6484
6843
|
WebhookConfig_2 as WebhookConfig,
|
|
6485
6844
|
InteractionDeleteResponse,
|
|
6486
6845
|
InteractionCreateParams,
|
|
@@ -7141,6 +7500,8 @@ export declare interface LiveConnectConfig {
|
|
|
7141
7500
|
response.
|
|
7142
7501
|
*/
|
|
7143
7502
|
safetySettings?: SafetySetting[];
|
|
7503
|
+
/** Config for stream translation. */
|
|
7504
|
+
streamTranslationConfig?: StreamTranslationConfig;
|
|
7144
7505
|
}
|
|
7145
7506
|
|
|
7146
7507
|
/** Config for LiveConnectConstraints for Auth Token creation. */
|
|
@@ -10242,6 +10603,17 @@ export declare interface StreamableHttpTransport {
|
|
|
10242
10603
|
url?: string;
|
|
10243
10604
|
}
|
|
10244
10605
|
|
|
10606
|
+
/** Config for stream translation. */
|
|
10607
|
+
export declare interface StreamTranslationConfig {
|
|
10608
|
+
/** If true, the model will generate audio when the target language is
|
|
10609
|
+
spoken, essentially it will parrot the input. If false, we will not produce
|
|
10610
|
+
audio for the target language. */
|
|
10611
|
+
echoTargetLanguage?: boolean;
|
|
10612
|
+
/** The target language for translation. Supported values are BCP-47
|
|
10613
|
+
language codes (e.g. "en", "es", "fr"). */
|
|
10614
|
+
targetLanguageCode?: string;
|
|
10615
|
+
}
|
|
10616
|
+
|
|
10245
10617
|
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
10246
10618
|
export declare interface StringList {
|
|
10247
10619
|
/** The string values of the metadata to store. */
|
|
@@ -11839,6 +12211,7 @@ declare namespace types {
|
|
|
11839
12211
|
LiveClientRealtimeInput,
|
|
11840
12212
|
LiveClientToolResponse,
|
|
11841
12213
|
LiveClientMessage,
|
|
12214
|
+
StreamTranslationConfig,
|
|
11842
12215
|
LiveConnectConfig,
|
|
11843
12216
|
LiveConnectParameters,
|
|
11844
12217
|
CreateChatParameters,
|
|
@@ -12696,30 +13069,6 @@ export declare interface VideoMetadata {
|
|
|
12696
13069
|
startOffset?: string;
|
|
12697
13070
|
}
|
|
12698
13071
|
|
|
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
13072
|
/** Voice activity signal. */
|
|
12724
13073
|
export declare interface VoiceActivity {
|
|
12725
13074
|
/** The type of the voice activity signal. */
|