@google/genai 0.2.0 → 0.3.1
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 +120 -71
- package/dist/index.js +101 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +101 -75
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.js +109 -85
- package/dist/node/index.js.map +1 -1
- package/dist/node/node.d.ts +124 -77
- package/dist/web/index.mjs +103 -77
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +122 -73
- package/package.json +2 -1
package/dist/genai.d.ts
CHANGED
|
@@ -99,7 +99,7 @@ declare interface ApiClientInitOptions {
|
|
|
99
99
|
|
|
100
100
|
/**
|
|
101
101
|
* @license
|
|
102
|
-
* Copyright
|
|
102
|
+
* Copyright 2025 Google LLC
|
|
103
103
|
* SPDX-License-Identifier: Apache-2.0
|
|
104
104
|
*/
|
|
105
105
|
/**
|
|
@@ -114,11 +114,6 @@ declare interface Auth {
|
|
|
114
114
|
addAuthHeaders(headers: Headers): Promise<void>;
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
/**
|
|
118
|
-
* @license
|
|
119
|
-
* Copyright 2024 Google LLC
|
|
120
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
121
|
-
*/
|
|
122
117
|
declare class BaseModule {
|
|
123
118
|
}
|
|
124
119
|
|
|
@@ -182,7 +177,7 @@ export declare class Caches extends BaseModule {
|
|
|
182
177
|
*
|
|
183
178
|
* @example
|
|
184
179
|
* ```ts
|
|
185
|
-
* const cachedContents = await
|
|
180
|
+
* const cachedContents = await ai.caches.list({config: {'pageSize': 2}});
|
|
186
181
|
* for (const cachedContent of cachedContents) {
|
|
187
182
|
* console.log(cachedContent);
|
|
188
183
|
* }
|
|
@@ -198,7 +193,7 @@ export declare class Caches extends BaseModule {
|
|
|
198
193
|
* @example
|
|
199
194
|
* ```ts
|
|
200
195
|
* const contents = ...; // Initialize the content to cache.
|
|
201
|
-
* const response = await
|
|
196
|
+
* const response = await ai.caches.create({
|
|
202
197
|
* model: 'gemini-2.0-flash',
|
|
203
198
|
* config: {
|
|
204
199
|
* 'contents': contents,
|
|
@@ -218,7 +213,7 @@ export declare class Caches extends BaseModule {
|
|
|
218
213
|
*
|
|
219
214
|
* @example
|
|
220
215
|
* ```ts
|
|
221
|
-
* await
|
|
216
|
+
* await ai.caches.get({name: 'gemini-1.5-flash'});
|
|
222
217
|
* ```
|
|
223
218
|
*/
|
|
224
219
|
get(params: types.GetCachedContentParameters): Promise<types.CachedContent>;
|
|
@@ -230,7 +225,7 @@ export declare class Caches extends BaseModule {
|
|
|
230
225
|
*
|
|
231
226
|
* @example
|
|
232
227
|
* ```ts
|
|
233
|
-
* await
|
|
228
|
+
* await ai.caches.delete({name: 'gemini-1.5-flash'});
|
|
234
229
|
* ```
|
|
235
230
|
*/
|
|
236
231
|
delete(params: types.DeleteCachedContentParameters): Promise<types.DeleteCachedContentResponse>;
|
|
@@ -242,7 +237,7 @@ export declare class Caches extends BaseModule {
|
|
|
242
237
|
*
|
|
243
238
|
* @example
|
|
244
239
|
* ```ts
|
|
245
|
-
* const response = await
|
|
240
|
+
* const response = await ai.caches.update({
|
|
246
241
|
* name: 'gemini-1.5-flash',
|
|
247
242
|
* config: {'ttl': '7600s'}
|
|
248
243
|
* });
|
|
@@ -281,8 +276,11 @@ export declare interface Candidate {
|
|
|
281
276
|
}
|
|
282
277
|
|
|
283
278
|
/**
|
|
284
|
-
* Chat session that enables sending messages
|
|
285
|
-
*
|
|
279
|
+
* Chat session that enables sending messages to the model with previous
|
|
280
|
+
* conversation context.
|
|
281
|
+
*
|
|
282
|
+
* @remarks
|
|
283
|
+
* The session maintains all the turns between user and model.
|
|
286
284
|
*/
|
|
287
285
|
export declare class Chat {
|
|
288
286
|
private readonly apiClient;
|
|
@@ -302,6 +300,15 @@ export declare class Chat {
|
|
|
302
300
|
* @see {@link Chat#sendMessageStream} for streaming method.
|
|
303
301
|
* @param params - parameters for sending messages within a chat session.
|
|
304
302
|
* @returns The model's response.
|
|
303
|
+
*
|
|
304
|
+
* @example
|
|
305
|
+
* ```ts
|
|
306
|
+
* const chat = ai.chats.create({model: 'gemini-2.0-flash'});
|
|
307
|
+
* const response = await chat.sendMessage({
|
|
308
|
+
* message: 'Why is the sky blue?'
|
|
309
|
+
* });
|
|
310
|
+
* console.log(response.text);
|
|
311
|
+
* ```
|
|
305
312
|
*/
|
|
306
313
|
sendMessage(params: types.SendMessageParameters): Promise<types.GenerateContentResponse>;
|
|
307
314
|
/**
|
|
@@ -314,6 +321,17 @@ export declare class Chat {
|
|
|
314
321
|
* @see {@link Chat#sendMessage} for non-streaming method.
|
|
315
322
|
* @param params - parameters for sending the message.
|
|
316
323
|
* @return The model's response.
|
|
324
|
+
*
|
|
325
|
+
* @example
|
|
326
|
+
* ```ts
|
|
327
|
+
* const chat = ai.chats.create({model: 'gemini-2.0-flash'});
|
|
328
|
+
* const response = await chat.sendMessageStream({
|
|
329
|
+
* message: 'Why is the sky blue?'
|
|
330
|
+
* });
|
|
331
|
+
* for await (const chunk of response) {
|
|
332
|
+
* console.log(chunk.text);
|
|
333
|
+
* }
|
|
334
|
+
* ```
|
|
317
335
|
*/
|
|
318
336
|
sendMessageStream(params: types.SendMessageParameters): Promise<AsyncGenerator<types.GenerateContentResponse>>;
|
|
319
337
|
/**
|
|
@@ -354,8 +372,24 @@ export declare class Chats {
|
|
|
354
372
|
/**
|
|
355
373
|
* Creates a new chat session.
|
|
356
374
|
*
|
|
375
|
+
* @remarks
|
|
376
|
+
* The config in the params will be used for all requests within the chat
|
|
377
|
+
* session unless overridden by a per-request `config` in
|
|
378
|
+
* {@link ./types.SendMessageParameters}.
|
|
379
|
+
*
|
|
357
380
|
* @param params - Parameters for creating a chat session.
|
|
358
381
|
* @returns A new chat session.
|
|
382
|
+
*
|
|
383
|
+
* @example
|
|
384
|
+
* ```ts
|
|
385
|
+
* const chat = ai.chats.create({
|
|
386
|
+
* model: 'gemini-2.0-flash'
|
|
387
|
+
* config: {
|
|
388
|
+
* temperature: 0.5,
|
|
389
|
+
* maxOutputTokens: 1024,
|
|
390
|
+
* }
|
|
391
|
+
* });
|
|
392
|
+
* ```
|
|
359
393
|
*/
|
|
360
394
|
create(params: types.CreateChatParameters): Chat;
|
|
361
395
|
}
|
|
@@ -393,6 +427,16 @@ export declare interface CodeExecutionResult {
|
|
|
393
427
|
output?: string;
|
|
394
428
|
}
|
|
395
429
|
|
|
430
|
+
declare namespace common {
|
|
431
|
+
export {
|
|
432
|
+
formatMap,
|
|
433
|
+
setValueByPath,
|
|
434
|
+
getValueByPath,
|
|
435
|
+
BaseModule,
|
|
436
|
+
UploadFileParameters
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
|
|
396
440
|
/** Optional parameters for computing tokens. */
|
|
397
441
|
export declare interface ComputeTokensConfig {
|
|
398
442
|
/** Used to override HTTP request options. */
|
|
@@ -830,7 +874,7 @@ declare class Files extends BaseModule {
|
|
|
830
874
|
* size of each page is 10.
|
|
831
875
|
*
|
|
832
876
|
* ```ts
|
|
833
|
-
* const listResponse = await
|
|
877
|
+
* const listResponse = await ai.files.list({config: {'pageSize': 10}});
|
|
834
878
|
* for await (const file of listResponse) {
|
|
835
879
|
* console.log(file.name);
|
|
836
880
|
* }
|
|
@@ -860,26 +904,26 @@ declare class Files extends BaseModule {
|
|
|
860
904
|
*
|
|
861
905
|
* This section can contain multiple paragraphs and code examples.
|
|
862
906
|
*
|
|
863
|
-
* @param
|
|
864
|
-
*
|
|
865
|
-
*
|
|
907
|
+
* @param params - Optional parameters specified in the
|
|
908
|
+
* `common.UploadFileParameters` interface.
|
|
909
|
+
* Optional @see {@link common.UploadFileParameters}
|
|
866
910
|
* @return A promise that resolves to a `types.File` object.
|
|
867
911
|
* @throws An error if called on a Vertex AI client.
|
|
868
912
|
* @throws An error if the `mimeType` is not provided and can not be inferred,
|
|
869
|
-
* the `mimeType` can be provided in the `config` parameter.
|
|
913
|
+
* the `mimeType` can be provided in the `params.config` parameter.
|
|
870
914
|
* @throws An error occurs if a suitable upload location cannot be established.
|
|
871
915
|
*
|
|
872
916
|
* @example
|
|
873
917
|
* The following code uploads a file to Gemini API.
|
|
874
918
|
*
|
|
875
919
|
* ```ts
|
|
876
|
-
* const file = await
|
|
920
|
+
* const file = await ai.files.upload({file: 'file.txt', config: {
|
|
877
921
|
* mimeType: 'text/plain',
|
|
878
|
-
* });
|
|
922
|
+
* }});
|
|
879
923
|
* console.log(file.name);
|
|
880
924
|
* ```
|
|
881
925
|
*/
|
|
882
|
-
upload(
|
|
926
|
+
upload(params: common.UploadFileParameters): Promise<types.File>;
|
|
883
927
|
private listInternal;
|
|
884
928
|
private createInternal;
|
|
885
929
|
/**
|
|
@@ -893,7 +937,7 @@ declare class Files extends BaseModule {
|
|
|
893
937
|
* const config: GetFileParameters = {
|
|
894
938
|
* name: fileName,
|
|
895
939
|
* };
|
|
896
|
-
* file = await
|
|
940
|
+
* file = await ai.files.get(config);
|
|
897
941
|
* console.log(file.name);
|
|
898
942
|
* ```
|
|
899
943
|
*/
|
|
@@ -953,6 +997,8 @@ export declare enum FinishReason {
|
|
|
953
997
|
MALFORMED_FUNCTION_CALL = "MALFORMED_FUNCTION_CALL"
|
|
954
998
|
}
|
|
955
999
|
|
|
1000
|
+
declare function formatMap(templateString: string, valueMap: Record<string, unknown>): string;
|
|
1001
|
+
|
|
956
1002
|
/** A function call. */
|
|
957
1003
|
export declare interface FunctionCall {
|
|
958
1004
|
/** The unique id of the function call. If populated, the client to execute the
|
|
@@ -1461,6 +1507,8 @@ export declare interface GetFileParameters {
|
|
|
1461
1507
|
config?: GetFileConfig;
|
|
1462
1508
|
}
|
|
1463
1509
|
|
|
1510
|
+
declare function getValueByPath(data: unknown, keys: string[]): unknown;
|
|
1511
|
+
|
|
1464
1512
|
/**
|
|
1465
1513
|
* The Google GenAI SDK.
|
|
1466
1514
|
*
|
|
@@ -1564,13 +1612,6 @@ export declare interface GoogleGenAIOptions {
|
|
|
1564
1612
|
* Optional. A set of customizable configuration for HTTP requests.
|
|
1565
1613
|
*/
|
|
1566
1614
|
httpOptions?: HttpOptions;
|
|
1567
|
-
/**
|
|
1568
|
-
* The object used for adding authentication headers to API requests.
|
|
1569
|
-
*
|
|
1570
|
-
* @remarks
|
|
1571
|
-
* Only used for internal testing, will be removed in the future.
|
|
1572
|
-
*/
|
|
1573
|
-
auth?: Auth;
|
|
1574
1615
|
}
|
|
1575
1616
|
|
|
1576
1617
|
/** Tool to support Google Search in Model. Powered by Google. */
|
|
@@ -1841,20 +1882,14 @@ export declare class Live {
|
|
|
1841
1882
|
Establishes a connection to the specified model with the given
|
|
1842
1883
|
configuration and returns a Session object representing that connection.
|
|
1843
1884
|
|
|
1844
|
-
> [!CAUTION] This SDK does not yet support the live API for **Google Vertex AI**.
|
|
1845
|
-
|
|
1846
1885
|
@experimental
|
|
1847
1886
|
|
|
1848
|
-
@param
|
|
1849
|
-
@
|
|
1850
|
-
@param callbacks - Optional callbacks for websocket events. If not
|
|
1851
|
-
provided, default no-op callbacks will be used. Generally, prefer to
|
|
1852
|
-
provide explicit callbacks to allow for proper handling of websocket
|
|
1853
|
-
events (e.g. connection errors).
|
|
1887
|
+
@param params - The parameters for establishing a connection to the model.
|
|
1888
|
+
@return A live session.
|
|
1854
1889
|
|
|
1855
1890
|
@example
|
|
1856
1891
|
```ts
|
|
1857
|
-
const session = await
|
|
1892
|
+
const session = await ai.live.connect({
|
|
1858
1893
|
model: 'gemini-2.0-flash-exp',
|
|
1859
1894
|
config: {
|
|
1860
1895
|
responseModalities: [Modality.AUDIO],
|
|
@@ -1881,10 +1916,10 @@ export declare class Live {
|
|
|
1881
1916
|
|
|
1882
1917
|
/** Callbacks for the live API. */
|
|
1883
1918
|
export declare interface LiveCallbacks {
|
|
1884
|
-
onopen
|
|
1919
|
+
onopen?: (() => void) | null;
|
|
1885
1920
|
onmessage: (e: LiveServerMessage) => void;
|
|
1886
|
-
onerror
|
|
1887
|
-
onclose
|
|
1921
|
+
onerror?: ((e: ErrorEvent) => void) | null;
|
|
1922
|
+
onclose?: ((e: CloseEvent) => void) | null;
|
|
1888
1923
|
}
|
|
1889
1924
|
|
|
1890
1925
|
/** Incremental update of the current conversation delivered from the client.
|
|
@@ -2179,14 +2214,12 @@ export declare class Models extends BaseModule {
|
|
|
2179
2214
|
*
|
|
2180
2215
|
* Some models support multimodal input and output.
|
|
2181
2216
|
*
|
|
2182
|
-
* @param
|
|
2183
|
-
* @param contents - The input contents to use for generating content.
|
|
2184
|
-
* @param [config] - The configuration for generating content.
|
|
2217
|
+
* @param params - The parameters for generating content.
|
|
2185
2218
|
* @return The response from generating content.
|
|
2186
2219
|
*
|
|
2187
2220
|
* @example
|
|
2188
2221
|
* ```ts
|
|
2189
|
-
* const response = await
|
|
2222
|
+
* const response = await ai.models.generateContent({
|
|
2190
2223
|
* model: 'gemini-2.0-flash',
|
|
2191
2224
|
* contents: 'why is the sky blue?',
|
|
2192
2225
|
* config: {
|
|
@@ -2221,14 +2254,12 @@ export declare class Models extends BaseModule {
|
|
|
2221
2254
|
*
|
|
2222
2255
|
* Some models support multimodal input and output.
|
|
2223
2256
|
*
|
|
2224
|
-
* @param
|
|
2225
|
-
* @param contents - The input contents to use for generating content.
|
|
2226
|
-
* @param [config] - The configuration for generating content.
|
|
2257
|
+
* @param params - The parameters for generating content with streaming response.
|
|
2227
2258
|
* @return The response from generating content.
|
|
2228
2259
|
*
|
|
2229
2260
|
* @example
|
|
2230
2261
|
* ```ts
|
|
2231
|
-
* const response = await
|
|
2262
|
+
* const response = await ai.models.generateContentStream({
|
|
2232
2263
|
* model: 'gemini-2.0-flash',
|
|
2233
2264
|
* contents: 'why is the sky blue?',
|
|
2234
2265
|
* config: {
|
|
@@ -2246,14 +2277,12 @@ export declare class Models extends BaseModule {
|
|
|
2246
2277
|
/**
|
|
2247
2278
|
* Calculates embeddings for the given contents. Only text is supported.
|
|
2248
2279
|
*
|
|
2249
|
-
* @param
|
|
2250
|
-
* @param contents - The contents to embed.
|
|
2251
|
-
* @param [config] - The config for embedding contents.
|
|
2280
|
+
* @param params - The parameters for embedding contents.
|
|
2252
2281
|
* @return The response from the API.
|
|
2253
2282
|
*
|
|
2254
2283
|
* @example
|
|
2255
2284
|
* ```ts
|
|
2256
|
-
* const response = await
|
|
2285
|
+
* const response = await ai.models.embedContent({
|
|
2257
2286
|
* model: 'text-embedding-004',
|
|
2258
2287
|
* contents: [
|
|
2259
2288
|
* 'What is your name?',
|
|
@@ -2270,14 +2299,12 @@ export declare class Models extends BaseModule {
|
|
|
2270
2299
|
/**
|
|
2271
2300
|
* Generates an image based on a text description and configuration.
|
|
2272
2301
|
*
|
|
2273
|
-
* @param
|
|
2274
|
-
* @param prompt - A text description of the image to generate.
|
|
2275
|
-
* @param [config] - The config for image generation.
|
|
2302
|
+
* @param params - The parameters for generating images.
|
|
2276
2303
|
* @return The response from the API.
|
|
2277
2304
|
*
|
|
2278
2305
|
* @example
|
|
2279
2306
|
* ```ts
|
|
2280
|
-
* const response = await
|
|
2307
|
+
* const response = await ai.models.generateImages({
|
|
2281
2308
|
* model: 'imagen-3.0-generate-002',
|
|
2282
2309
|
* prompt: 'Robot holding a red skateboard',
|
|
2283
2310
|
* config: {
|
|
@@ -2293,14 +2320,12 @@ export declare class Models extends BaseModule {
|
|
|
2293
2320
|
* Counts the number of tokens in the given contents. Multimodal input is
|
|
2294
2321
|
* supported for Gemini models.
|
|
2295
2322
|
*
|
|
2296
|
-
* @param
|
|
2297
|
-
* @param contents - The contents to count tokens for.
|
|
2298
|
-
* @param [config] - The config for counting tokens.
|
|
2323
|
+
* @param params - The parameters for counting tokens.
|
|
2299
2324
|
* @return The response from the API.
|
|
2300
2325
|
*
|
|
2301
2326
|
* @example
|
|
2302
2327
|
* ```ts
|
|
2303
|
-
* const response = await
|
|
2328
|
+
* const response = await ai.models.countTokens({
|
|
2304
2329
|
* model: 'gemini-2.0-flash',
|
|
2305
2330
|
* contents: 'The quick brown fox jumps over the lazy dog.'
|
|
2306
2331
|
* });
|
|
@@ -2314,14 +2339,12 @@ export declare class Models extends BaseModule {
|
|
|
2314
2339
|
*
|
|
2315
2340
|
* This method is not supported by the Gemini Developer API.
|
|
2316
2341
|
*
|
|
2317
|
-
* @param
|
|
2318
|
-
* @param contents - The content to compute tokens for.
|
|
2319
|
-
* @param [config] - The config for computing tokens.
|
|
2342
|
+
* @param params - The parameters for computing tokens.
|
|
2320
2343
|
* @return The response from the API.
|
|
2321
2344
|
*
|
|
2322
2345
|
* @example
|
|
2323
2346
|
* ```ts
|
|
2324
|
-
* const response = await
|
|
2347
|
+
* const response = await ai.models.computeTokens({
|
|
2325
2348
|
* model: 'gemini-2.0-flash',
|
|
2326
2349
|
* contents: 'What is your name?'
|
|
2327
2350
|
* });
|
|
@@ -2333,7 +2356,7 @@ export declare class Models extends BaseModule {
|
|
|
2333
2356
|
|
|
2334
2357
|
/**
|
|
2335
2358
|
* @license
|
|
2336
|
-
* Copyright
|
|
2359
|
+
* Copyright 2025 Google LLC
|
|
2337
2360
|
* SPDX-License-Identifier: Apache-2.0
|
|
2338
2361
|
*/
|
|
2339
2362
|
export declare enum Outcome {
|
|
@@ -2345,7 +2368,7 @@ export declare enum Outcome {
|
|
|
2345
2368
|
|
|
2346
2369
|
/**
|
|
2347
2370
|
* @license
|
|
2348
|
-
* Copyright
|
|
2371
|
+
* Copyright 2025 Google LLC
|
|
2349
2372
|
* SPDX-License-Identifier: Apache-2.0
|
|
2350
2373
|
*/
|
|
2351
2374
|
/**
|
|
@@ -2359,6 +2382,22 @@ declare enum PagedItem {
|
|
|
2359
2382
|
PAGED_ITEM_CACHED_CONTENTS = "cachedContents"
|
|
2360
2383
|
}
|
|
2361
2384
|
|
|
2385
|
+
declare interface PagedItemConfig {
|
|
2386
|
+
config?: {
|
|
2387
|
+
pageToken?: string;
|
|
2388
|
+
pageSize?: number;
|
|
2389
|
+
};
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
declare interface PagedItemResponse<T> {
|
|
2393
|
+
nextPageToken?: string;
|
|
2394
|
+
batchJobs?: T[];
|
|
2395
|
+
models?: T[];
|
|
2396
|
+
tuningJobs?: T[];
|
|
2397
|
+
files?: T[];
|
|
2398
|
+
cachedContents?: T[];
|
|
2399
|
+
}
|
|
2400
|
+
|
|
2362
2401
|
/**
|
|
2363
2402
|
* Pager class for iterating through paginated results.
|
|
2364
2403
|
*/
|
|
@@ -2367,9 +2406,9 @@ declare class Pager<T> implements AsyncIterable<T> {
|
|
|
2367
2406
|
private pageInternal;
|
|
2368
2407
|
private paramsInternal;
|
|
2369
2408
|
private pageInternalSize;
|
|
2370
|
-
protected requestInternal: (params:
|
|
2409
|
+
protected requestInternal: (params: PagedItemConfig) => Promise<PagedItemResponse<T>>;
|
|
2371
2410
|
protected idxInternal: number;
|
|
2372
|
-
constructor(name: PagedItem, request: (params:
|
|
2411
|
+
constructor(name: PagedItem, request: (params: PagedItemConfig) => Promise<PagedItemResponse<T>>, response: PagedItemResponse<T>, params: PagedItemConfig);
|
|
2373
2412
|
private init;
|
|
2374
2413
|
private initNextPage;
|
|
2375
2414
|
/**
|
|
@@ -2399,7 +2438,7 @@ declare class Pager<T> implements AsyncIterable<T> {
|
|
|
2399
2438
|
* used to customize the API request. For example, the `pageToken` parameter
|
|
2400
2439
|
* contains the token to request the next page.
|
|
2401
2440
|
*/
|
|
2402
|
-
get params():
|
|
2441
|
+
get params(): PagedItemConfig;
|
|
2403
2442
|
/**
|
|
2404
2443
|
* Returns the total number of items in the current page.
|
|
2405
2444
|
*/
|
|
@@ -2791,7 +2830,7 @@ export declare class Session {
|
|
|
2791
2830
|
|
|
2792
2831
|
@example
|
|
2793
2832
|
```ts
|
|
2794
|
-
const session = await
|
|
2833
|
+
const session = await ai.live.connect({
|
|
2795
2834
|
model: 'gemini-2.0-flash-exp',
|
|
2796
2835
|
config: {
|
|
2797
2836
|
responseModalities: [Modality.AUDIO],
|
|
@@ -2826,6 +2865,8 @@ export declare class SessionSendToolResponseParameters {
|
|
|
2826
2865
|
functionResponses: FunctionResponse | FunctionResponse[];
|
|
2827
2866
|
}
|
|
2828
2867
|
|
|
2868
|
+
declare function setValueByPath(data: Record<string, unknown>, keys: string[], value: unknown): void;
|
|
2869
|
+
|
|
2829
2870
|
/** The speech generation configuration. */
|
|
2830
2871
|
export declare interface SpeechConfig {
|
|
2831
2872
|
/** The configuration for the speaker to use.
|
|
@@ -3220,6 +3261,14 @@ export declare interface UploadFileConfig {
|
|
|
3220
3261
|
displayName?: string;
|
|
3221
3262
|
}
|
|
3222
3263
|
|
|
3264
|
+
/** Parameters for the upload file method. */
|
|
3265
|
+
declare interface UploadFileParameters {
|
|
3266
|
+
/** The string path to the file to be uploaded or a Blob object. */
|
|
3267
|
+
file: string | Blob;
|
|
3268
|
+
/** Configuration that contains optional parameters. */
|
|
3269
|
+
config?: UploadFileConfig;
|
|
3270
|
+
}
|
|
3271
|
+
|
|
3223
3272
|
/** Configuration for upscaling an image.
|
|
3224
3273
|
|
|
3225
3274
|
For more information on this configuration, refer to
|