@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/node/node.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
|
/**
|
|
@@ -5148,10 +5470,12 @@ export declare class GoogleGenAI {
|
|
|
5148
5470
|
readonly fileSearchStores: FileSearchStores;
|
|
5149
5471
|
private _interactions;
|
|
5150
5472
|
private _webhooks;
|
|
5473
|
+
private _agents;
|
|
5151
5474
|
private _nextGenClient;
|
|
5152
5475
|
private getNextGenClient;
|
|
5153
5476
|
get interactions(): Interactions;
|
|
5154
5477
|
get webhooks(): Webhooks;
|
|
5478
|
+
get agents(): Agents;
|
|
5155
5479
|
constructor(options: GoogleGenAIOptions);
|
|
5156
5480
|
}
|
|
5157
5481
|
|
|
@@ -6276,6 +6600,16 @@ declare interface Interaction {
|
|
|
6276
6600
|
* Configuration parameters for the agent interaction.
|
|
6277
6601
|
*/
|
|
6278
6602
|
agent_config?: DynamicAgentConfig | DeepResearchAgentConfig;
|
|
6603
|
+
/**
|
|
6604
|
+
* The environment configuration for the interaction. Can be an object specifying
|
|
6605
|
+
* remote environment sources or a string referencing an existing environment ID.
|
|
6606
|
+
*/
|
|
6607
|
+
environment?: string | Environment_2;
|
|
6608
|
+
/**
|
|
6609
|
+
* Output only. The environment ID for the interaction. Only populated if
|
|
6610
|
+
* environment config is set in the request.
|
|
6611
|
+
*/
|
|
6612
|
+
environment_id?: string;
|
|
6279
6613
|
/**
|
|
6280
6614
|
* The input for the interaction.
|
|
6281
6615
|
*/
|
|
@@ -6292,9 +6626,10 @@ declare interface Interaction {
|
|
|
6292
6626
|
* Enforces that the generated response is a JSON object that complies with the
|
|
6293
6627
|
* JSON schema specified in this field.
|
|
6294
6628
|
*/
|
|
6295
|
-
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat |
|
|
6629
|
+
response_format?: Array<AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown> | AudioResponseFormat | TextResponseFormat | ImageResponseFormat | unknown;
|
|
6296
6630
|
/**
|
|
6297
|
-
* The mime type of the response. This is required if response_format
|
|
6631
|
+
* @deprecated The mime type of the response. This is required if response_format
|
|
6632
|
+
* is set.
|
|
6298
6633
|
*/
|
|
6299
6634
|
response_mime_type?: string;
|
|
6300
6635
|
/**
|
|
@@ -6326,6 +6661,30 @@ declare interface Interaction {
|
|
|
6326
6661
|
* completes.
|
|
6327
6662
|
*/
|
|
6328
6663
|
webhook_config?: WebhookConfig_2;
|
|
6664
|
+
/**
|
|
6665
|
+
* Concatenated text from the last model output in response to the current request.
|
|
6666
|
+
*
|
|
6667
|
+
* Note: this is added by the SDK.
|
|
6668
|
+
*/
|
|
6669
|
+
output_text?: string;
|
|
6670
|
+
/**
|
|
6671
|
+
* The last image generated by the model in response to the current request.
|
|
6672
|
+
*
|
|
6673
|
+
* Note: this is added by the SDK.
|
|
6674
|
+
*/
|
|
6675
|
+
output_image?: ImageContent;
|
|
6676
|
+
/**
|
|
6677
|
+
* The last audio generated by the model in response to the current request.
|
|
6678
|
+
*
|
|
6679
|
+
* Note: this is added by the SDK.
|
|
6680
|
+
*/
|
|
6681
|
+
output_audio?: AudioContent;
|
|
6682
|
+
/**
|
|
6683
|
+
* The last video generated by the model in response to the current request.
|
|
6684
|
+
*
|
|
6685
|
+
* Note: this is added by the SDK.
|
|
6686
|
+
*/
|
|
6687
|
+
output_video?: VideoContent;
|
|
6329
6688
|
}
|
|
6330
6689
|
|
|
6331
6690
|
declare interface InteractionCancelParams {
|
|
@@ -6420,7 +6779,7 @@ export declare class Interactions extends BaseInteractions {
|
|
|
6420
6779
|
}
|
|
6421
6780
|
|
|
6422
6781
|
export declare namespace Interactions {
|
|
6423
|
-
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
|
|
6782
|
+
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, };
|
|
6424
6783
|
}
|
|
6425
6784
|
|
|
6426
6785
|
declare namespace InteractionsAPI {
|
|
@@ -6438,6 +6797,7 @@ declare namespace InteractionsAPI {
|
|
|
6438
6797
|
DeepResearchAgentConfig,
|
|
6439
6798
|
DocumentContent,
|
|
6440
6799
|
DynamicAgentConfig,
|
|
6800
|
+
Environment_2 as Environment,
|
|
6441
6801
|
ErrorEvent_2 as ErrorEvent,
|
|
6442
6802
|
FileCitation,
|
|
6443
6803
|
FileSearchCallStep,
|
|
@@ -6487,7 +6847,6 @@ declare namespace InteractionsAPI {
|
|
|
6487
6847
|
Usage,
|
|
6488
6848
|
UserInputStep,
|
|
6489
6849
|
VideoContent,
|
|
6490
|
-
VideoResponseFormat,
|
|
6491
6850
|
WebhookConfig_2 as WebhookConfig,
|
|
6492
6851
|
InteractionDeleteResponse,
|
|
6493
6852
|
InteractionCreateParams,
|
|
@@ -7148,6 +7507,8 @@ export declare interface LiveConnectConfig {
|
|
|
7148
7507
|
response.
|
|
7149
7508
|
*/
|
|
7150
7509
|
safetySettings?: SafetySetting[];
|
|
7510
|
+
/** Config for stream translation. */
|
|
7511
|
+
streamTranslationConfig?: StreamTranslationConfig;
|
|
7151
7512
|
}
|
|
7152
7513
|
|
|
7153
7514
|
/** Config for LiveConnectConstraints for Auth Token creation. */
|
|
@@ -10249,6 +10610,17 @@ export declare interface StreamableHttpTransport {
|
|
|
10249
10610
|
url?: string;
|
|
10250
10611
|
}
|
|
10251
10612
|
|
|
10613
|
+
/** Config for stream translation. */
|
|
10614
|
+
export declare interface StreamTranslationConfig {
|
|
10615
|
+
/** If true, the model will generate audio when the target language is
|
|
10616
|
+
spoken, essentially it will parrot the input. If false, we will not produce
|
|
10617
|
+
audio for the target language. */
|
|
10618
|
+
echoTargetLanguage?: boolean;
|
|
10619
|
+
/** The target language for translation. Supported values are BCP-47
|
|
10620
|
+
language codes (e.g. "en", "es", "fr"). */
|
|
10621
|
+
targetLanguageCode?: string;
|
|
10622
|
+
}
|
|
10623
|
+
|
|
10252
10624
|
/** User provided string values assigned to a single metadata key. This data type is not supported in Vertex AI. */
|
|
10253
10625
|
export declare interface StringList {
|
|
10254
10626
|
/** The string values of the metadata to store. */
|
|
@@ -11846,6 +12218,7 @@ declare namespace types {
|
|
|
11846
12218
|
LiveClientRealtimeInput,
|
|
11847
12219
|
LiveClientToolResponse,
|
|
11848
12220
|
LiveClientMessage,
|
|
12221
|
+
StreamTranslationConfig,
|
|
11849
12222
|
LiveConnectConfig,
|
|
11850
12223
|
LiveConnectParameters,
|
|
11851
12224
|
CreateChatParameters,
|
|
@@ -12703,30 +13076,6 @@ export declare interface VideoMetadata {
|
|
|
12703
13076
|
startOffset?: string;
|
|
12704
13077
|
}
|
|
12705
13078
|
|
|
12706
|
-
/**
|
|
12707
|
-
* Configuration for video output format.
|
|
12708
|
-
*/
|
|
12709
|
-
declare interface VideoResponseFormat {
|
|
12710
|
-
type: 'video';
|
|
12711
|
-
/**
|
|
12712
|
-
* The aspect ratio for the video output.
|
|
12713
|
-
*/
|
|
12714
|
-
aspectRatio?: '16:9' | '9:16';
|
|
12715
|
-
/**
|
|
12716
|
-
* The delivery mode for the video output.
|
|
12717
|
-
*/
|
|
12718
|
-
delivery?: 'inline' | 'uri';
|
|
12719
|
-
/**
|
|
12720
|
-
* The duration for the video output.
|
|
12721
|
-
*/
|
|
12722
|
-
duration?: string;
|
|
12723
|
-
/**
|
|
12724
|
-
* The GCS URI to store the video output. Required for Vertex if delivery mode is
|
|
12725
|
-
* URI.
|
|
12726
|
-
*/
|
|
12727
|
-
gcsUri?: string;
|
|
12728
|
-
}
|
|
12729
|
-
|
|
12730
13079
|
/** Voice activity signal. */
|
|
12731
13080
|
export declare interface VoiceActivity {
|
|
12732
13081
|
/** The type of the voice activity signal. */
|