@google/genai 1.29.1 → 1.31.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 +160 -73
- package/dist/index.cjs +824 -434
- package/dist/index.mjs +824 -435
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +3996 -3606
- package/dist/node/index.mjs +3996 -3607
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +160 -73
- package/dist/web/index.mjs +3996 -3607
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +160 -73
- package/package.json +2 -2
package/dist/node/node.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
1
|
import type { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
3
2
|
import { GoogleAuthOptions } from 'google-auth-library';
|
|
4
3
|
|
|
@@ -437,6 +436,21 @@ export declare interface BaseUrlParameters {
|
|
|
437
436
|
export declare class Batches extends BaseModule {
|
|
438
437
|
private readonly apiClient;
|
|
439
438
|
constructor(apiClient: ApiClient);
|
|
439
|
+
/**
|
|
440
|
+
* Lists batch jobs.
|
|
441
|
+
*
|
|
442
|
+
* @param params - The parameters for the list request.
|
|
443
|
+
* @return - A pager of batch jobs.
|
|
444
|
+
*
|
|
445
|
+
* @example
|
|
446
|
+
* ```ts
|
|
447
|
+
* const batchJobs = await ai.batches.list({config: {'pageSize': 2}});
|
|
448
|
+
* for await (const batchJob of batchJobs) {
|
|
449
|
+
* console.log(batchJob);
|
|
450
|
+
* }
|
|
451
|
+
* ```
|
|
452
|
+
*/
|
|
453
|
+
list: (params?: types.ListBatchJobsParameters) => Promise<Pager<types.BatchJob>>;
|
|
440
454
|
/**
|
|
441
455
|
* Create batch job.
|
|
442
456
|
*
|
|
@@ -472,21 +486,6 @@ export declare class Batches extends BaseModule {
|
|
|
472
486
|
* ```
|
|
473
487
|
*/
|
|
474
488
|
createEmbeddings: (params: types.CreateEmbeddingsBatchJobParameters) => Promise<types.BatchJob>;
|
|
475
|
-
/**
|
|
476
|
-
* Lists batch job configurations.
|
|
477
|
-
*
|
|
478
|
-
* @param params - The parameters for the list request.
|
|
479
|
-
* @return The paginated results of the list of batch jobs.
|
|
480
|
-
*
|
|
481
|
-
* @example
|
|
482
|
-
* ```ts
|
|
483
|
-
* const batchJobs = await ai.batches.list({config: {'pageSize': 2}});
|
|
484
|
-
* for await (const batchJob of batchJobs) {
|
|
485
|
-
* console.log(batchJob);
|
|
486
|
-
* }
|
|
487
|
-
* ```
|
|
488
|
-
*/
|
|
489
|
-
list: (params?: types.ListBatchJobsParameters) => Promise<Pager<types.BatchJob>>;
|
|
490
489
|
private createInlinedGenerateContentRequest;
|
|
491
490
|
private getGcsUri;
|
|
492
491
|
private getBigqueryUri;
|
|
@@ -742,10 +741,10 @@ export declare class Caches extends BaseModule {
|
|
|
742
741
|
private readonly apiClient;
|
|
743
742
|
constructor(apiClient: ApiClient);
|
|
744
743
|
/**
|
|
745
|
-
* Lists cached
|
|
744
|
+
* Lists cached contents.
|
|
746
745
|
*
|
|
747
746
|
* @param params - The parameters for the list request.
|
|
748
|
-
* @return
|
|
747
|
+
* @return - A pager of cached contents.
|
|
749
748
|
*
|
|
750
749
|
* @example
|
|
751
750
|
* ```ts
|
|
@@ -901,6 +900,12 @@ export declare interface CancelTuningJobParameters {
|
|
|
901
900
|
config?: CancelTuningJobConfig;
|
|
902
901
|
}
|
|
903
902
|
|
|
903
|
+
/** Empty response for tunings.cancel method. */
|
|
904
|
+
export declare class CancelTuningJobResponse {
|
|
905
|
+
/** Used to retain the full HTTP response. */
|
|
906
|
+
sdkHttpResponse?: HttpResponse;
|
|
907
|
+
}
|
|
908
|
+
|
|
904
909
|
/** A response candidate generated from the model. */
|
|
905
910
|
export declare interface Candidate {
|
|
906
911
|
/** Contains the multi-part content of the response.
|
|
@@ -1558,7 +1563,7 @@ export declare function createModelContent(partOrString: PartListUnion | string)
|
|
|
1558
1563
|
/**
|
|
1559
1564
|
* Creates a `Part` object from a `base64` encoded `string`.
|
|
1560
1565
|
*/
|
|
1561
|
-
export declare function createPartFromBase64(data: string, mimeType: string): Part;
|
|
1566
|
+
export declare function createPartFromBase64(data: string, mimeType: string, mediaResolution?: PartMediaResolutionLevel): Part;
|
|
1562
1567
|
|
|
1563
1568
|
/**
|
|
1564
1569
|
* Creates a `Part` object from the `outcome` and `output` of a `CodeExecutionResult` object.
|
|
@@ -1588,7 +1593,7 @@ export declare function createPartFromText(text: string): Part;
|
|
|
1588
1593
|
/**
|
|
1589
1594
|
* Creates a `Part` object from a `URI` string.
|
|
1590
1595
|
*/
|
|
1591
|
-
export declare function createPartFromUri(uri: string, mimeType: string): Part;
|
|
1596
|
+
export declare function createPartFromUri(uri: string, mimeType: string, mediaResolution?: PartMediaResolutionLevel): Part;
|
|
1592
1597
|
|
|
1593
1598
|
/** Fine-tuning job creation request - optional fields. */
|
|
1594
1599
|
export declare interface CreateTuningJobConfig {
|
|
@@ -1923,7 +1928,7 @@ declare class Documents extends BaseModule {
|
|
|
1923
1928
|
*
|
|
1924
1929
|
* @example
|
|
1925
1930
|
* ```ts
|
|
1926
|
-
* const documents = await ai.documents.list({config: {'pageSize': 2}});
|
|
1931
|
+
* const documents = await ai.documents.list({parent:'rag_store_name', config: {'pageSize': 2}});
|
|
1927
1932
|
* for await (const document of documents) {
|
|
1928
1933
|
* console.log(document);
|
|
1929
1934
|
* }
|
|
@@ -1943,12 +1948,6 @@ declare class Documents extends BaseModule {
|
|
|
1943
1948
|
* @param params - The parameters for deleting a document.
|
|
1944
1949
|
*/
|
|
1945
1950
|
delete(params: types.DeleteDocumentParameters): Promise<void>;
|
|
1946
|
-
/**
|
|
1947
|
-
* Lists all Documents in a FileSearchStore.
|
|
1948
|
-
*
|
|
1949
|
-
* @param params - The parameters for listing documents.
|
|
1950
|
-
* @return ListDocumentsResponse.
|
|
1951
|
-
*/
|
|
1952
1951
|
private listInternal;
|
|
1953
1952
|
}
|
|
1954
1953
|
|
|
@@ -2363,19 +2362,16 @@ export declare class Files extends BaseModule {
|
|
|
2363
2362
|
private readonly apiClient;
|
|
2364
2363
|
constructor(apiClient: ApiClient);
|
|
2365
2364
|
/**
|
|
2366
|
-
* Lists
|
|
2365
|
+
* Lists files.
|
|
2367
2366
|
*
|
|
2368
|
-
* @param params - The parameters for the list request
|
|
2369
|
-
* @return
|
|
2367
|
+
* @param params - The parameters for the list request.
|
|
2368
|
+
* @return - A pager of files.
|
|
2370
2369
|
*
|
|
2371
2370
|
* @example
|
|
2372
|
-
* The following code prints the names of all files from the service, the
|
|
2373
|
-
* size of each page is 10.
|
|
2374
|
-
*
|
|
2375
2371
|
* ```ts
|
|
2376
|
-
* const
|
|
2377
|
-
* for await (const file of
|
|
2378
|
-
* console.log(file
|
|
2372
|
+
* const files = await ai.files.list({config: {'pageSize': 2}});
|
|
2373
|
+
* for await (const file of files) {
|
|
2374
|
+
* console.log(file);
|
|
2379
2375
|
* }
|
|
2380
2376
|
* ```
|
|
2381
2377
|
*/
|
|
@@ -2511,6 +2507,21 @@ declare class FileSearchStores extends BaseModule {
|
|
|
2511
2507
|
private readonly apiClient;
|
|
2512
2508
|
readonly documents: Documents;
|
|
2513
2509
|
constructor(apiClient: ApiClient, documents?: Documents);
|
|
2510
|
+
/**
|
|
2511
|
+
* Lists file search stores.
|
|
2512
|
+
*
|
|
2513
|
+
* @param params - The parameters for the list request.
|
|
2514
|
+
* @return - A pager of file search stores.
|
|
2515
|
+
*
|
|
2516
|
+
* @example
|
|
2517
|
+
* ```ts
|
|
2518
|
+
* const fileSearchStores = await ai.fileSearchStores.list({config: {'pageSize': 2}});
|
|
2519
|
+
* for await (const fileSearchStore of fileSearchStores) {
|
|
2520
|
+
* console.log(fileSearchStore);
|
|
2521
|
+
* }
|
|
2522
|
+
* ```
|
|
2523
|
+
*/
|
|
2524
|
+
list: (params?: types.ListFileSearchStoresParameters) => Promise<Pager<types.FileSearchStore>>;
|
|
2514
2525
|
/**
|
|
2515
2526
|
* Uploads a file asynchronously to a given File Search Store.
|
|
2516
2527
|
* This method is not available in Vertex AI.
|
|
@@ -2548,21 +2559,6 @@ declare class FileSearchStores extends BaseModule {
|
|
|
2548
2559
|
* ```
|
|
2549
2560
|
*/
|
|
2550
2561
|
uploadToFileSearchStore(params: types.UploadToFileSearchStoreParameters): Promise<types.UploadToFileSearchStoreOperation>;
|
|
2551
|
-
/**
|
|
2552
|
-
* Lists file search stores.
|
|
2553
|
-
*
|
|
2554
|
-
* @param params - The parameters for the list request.
|
|
2555
|
-
* @return - A pager of file search stores.
|
|
2556
|
-
*
|
|
2557
|
-
* @example
|
|
2558
|
-
* ```ts
|
|
2559
|
-
* const fileSearchStores = await ai.fileSearchStores.list({config: {'pageSize': 2}});
|
|
2560
|
-
* for await (const fileSearchStore of fileSearchStores) {
|
|
2561
|
-
* console.log(fileSearchStore);
|
|
2562
|
-
* }
|
|
2563
|
-
* ```
|
|
2564
|
-
*/
|
|
2565
|
-
list: (params?: types.ListFileSearchStoresParameters) => Promise<Pager<types.FileSearchStore>>;
|
|
2566
2562
|
/**
|
|
2567
2563
|
* Creates a File Search Store.
|
|
2568
2564
|
*
|
|
@@ -2583,12 +2579,6 @@ declare class FileSearchStores extends BaseModule {
|
|
|
2583
2579
|
* @param params - The parameters for deleting a File Search Store.
|
|
2584
2580
|
*/
|
|
2585
2581
|
delete(params: types.DeleteFileSearchStoreParameters): Promise<void>;
|
|
2586
|
-
/**
|
|
2587
|
-
* Lists all FileSearchStore owned by the user.
|
|
2588
|
-
*
|
|
2589
|
-
* @param params - The parameters for listing file search stores.
|
|
2590
|
-
* @return ListFileSearchStoresResponse.
|
|
2591
|
-
*/
|
|
2592
2582
|
private listInternal;
|
|
2593
2583
|
private uploadToFileSearchStoreInternal;
|
|
2594
2584
|
/**
|
|
@@ -2719,6 +2709,10 @@ export declare interface FunctionCall {
|
|
|
2719
2709
|
args?: Record<string, unknown>;
|
|
2720
2710
|
/** Optional. The name of the function to call. Matches [FunctionDeclaration.name]. */
|
|
2721
2711
|
name?: string;
|
|
2712
|
+
/** Optional. The partial argument value of the function call. If provided, represents the arguments/fields that are streamed incrementally. This field is not supported in Gemini API. */
|
|
2713
|
+
partialArgs?: PartialArg[];
|
|
2714
|
+
/** Optional. Whether this is the last part of the FunctionCall. If true, another partial message for the current FunctionCall is expected to follow. This field is not supported in Gemini API. */
|
|
2715
|
+
willContinue?: boolean;
|
|
2722
2716
|
}
|
|
2723
2717
|
|
|
2724
2718
|
/** Function calling config. */
|
|
@@ -2727,6 +2721,8 @@ export declare interface FunctionCallingConfig {
|
|
|
2727
2721
|
mode?: FunctionCallingConfigMode;
|
|
2728
2722
|
/** Optional. Function names to call. Only set when the Mode is ANY. Function names should match [FunctionDeclaration.name]. With mode set to ANY, model will predict a function call from the set of function names provided. */
|
|
2729
2723
|
allowedFunctionNames?: string[];
|
|
2724
|
+
/** Optional. When set to true, arguments of a single function call will be streamed out in multiple parts/contents/responses. Partial parameter results will be returned in the [FunctionCall.partial_args] field. This field is not supported in Gemini API. */
|
|
2725
|
+
streamFunctionCallArguments?: boolean;
|
|
2730
2726
|
}
|
|
2731
2727
|
|
|
2732
2728
|
/** Config for the function calling config mode. */
|
|
@@ -2801,6 +2797,9 @@ export declare class FunctionResponseBlob {
|
|
|
2801
2797
|
/** Required. Inline media bytes.
|
|
2802
2798
|
* @remarks Encoded as base64 string. */
|
|
2803
2799
|
data?: string;
|
|
2800
|
+
/** Optional. Display name of the blob.
|
|
2801
|
+
Used to provide a label or filename to distinguish blobs. */
|
|
2802
|
+
displayName?: string;
|
|
2804
2803
|
}
|
|
2805
2804
|
|
|
2806
2805
|
/** URI based data for function response. */
|
|
@@ -2809,6 +2808,9 @@ export declare class FunctionResponseFileData {
|
|
|
2809
2808
|
fileUri?: string;
|
|
2810
2809
|
/** Required. The IANA standard MIME type of the source data. */
|
|
2811
2810
|
mimeType?: string;
|
|
2811
|
+
/** Optional. Display name of the file.
|
|
2812
|
+
Used to provide a label or filename to distinguish files. */
|
|
2813
|
+
displayName?: string;
|
|
2812
2814
|
}
|
|
2813
2815
|
|
|
2814
2816
|
/** A datatype containing media that is part of a `FunctionResponse` message.
|
|
@@ -2948,6 +2950,9 @@ export declare interface GenerateContentConfig {
|
|
|
2948
2950
|
object](https://spec.openapis.org/oas/v3.0.3#schema).
|
|
2949
2951
|
If set, a compatible response_mime_type must also be set.
|
|
2950
2952
|
Compatible mimetypes: `application/json`: Schema for JSON response.
|
|
2953
|
+
|
|
2954
|
+
If `response_schema` doesn't process your schema correctly, try using
|
|
2955
|
+
`response_json_schema` instead.
|
|
2951
2956
|
*/
|
|
2952
2957
|
responseSchema?: SchemaUnion;
|
|
2953
2958
|
/** Optional. Output schema of the generated response.
|
|
@@ -3741,6 +3746,7 @@ export declare class GoogleGenAI {
|
|
|
3741
3746
|
private readonly project?;
|
|
3742
3747
|
private readonly location?;
|
|
3743
3748
|
private readonly apiVersion?;
|
|
3749
|
+
private readonly httpOptions?;
|
|
3744
3750
|
readonly models: Models;
|
|
3745
3751
|
readonly live: Live;
|
|
3746
3752
|
readonly batches: Batches;
|
|
@@ -4249,6 +4255,12 @@ export declare interface ImageConfig {
|
|
|
4249
4255
|
values are `1K`, `2K`, `4K`. If not specified, the model will use default
|
|
4250
4256
|
value `1K`. */
|
|
4251
4257
|
imageSize?: string;
|
|
4258
|
+
/** MIME type of the generated image. This field is not
|
|
4259
|
+
supported in Gemini API. */
|
|
4260
|
+
outputMimeType?: string;
|
|
4261
|
+
/** Compression quality of the generated image (for
|
|
4262
|
+
``image/jpeg`` only). This field is not supported in Gemini API. */
|
|
4263
|
+
outputCompressionQuality?: number;
|
|
4252
4264
|
}
|
|
4253
4265
|
|
|
4254
4266
|
/** Enum that specifies the language of the text in the prompt. */
|
|
@@ -6283,16 +6295,17 @@ export declare class Pager<T> implements AsyncIterable<T> {
|
|
|
6283
6295
|
of content being conveyed. Using multiple fields within the same `Part`
|
|
6284
6296
|
instance is considered invalid. */
|
|
6285
6297
|
export declare interface Part {
|
|
6286
|
-
/**
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
functionCall?: FunctionCall;
|
|
6298
|
+
/** Media resolution for the input media.
|
|
6299
|
+
*/
|
|
6300
|
+
mediaResolution?: PartMediaResolution;
|
|
6290
6301
|
/** Optional. Result of executing the [ExecutableCode]. */
|
|
6291
6302
|
codeExecutionResult?: CodeExecutionResult;
|
|
6292
6303
|
/** Optional. Code generated by the model that is meant to be executed. */
|
|
6293
6304
|
executableCode?: ExecutableCode;
|
|
6294
6305
|
/** Optional. URI based data. */
|
|
6295
6306
|
fileData?: FileData;
|
|
6307
|
+
/** Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values. */
|
|
6308
|
+
functionCall?: FunctionCall;
|
|
6296
6309
|
/** Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model. */
|
|
6297
6310
|
functionResponse?: FunctionResponse;
|
|
6298
6311
|
/** Optional. Inlined bytes data. */
|
|
@@ -6308,8 +6321,54 @@ export declare interface Part {
|
|
|
6308
6321
|
videoMetadata?: VideoMetadata;
|
|
6309
6322
|
}
|
|
6310
6323
|
|
|
6324
|
+
/** Partial argument value of the function call. This data type is not supported in Gemini API. */
|
|
6325
|
+
export declare interface PartialArg {
|
|
6326
|
+
/** Optional. Represents a null value. */
|
|
6327
|
+
nullValue?: 'NULL_VALUE';
|
|
6328
|
+
/** Optional. Represents a double value. */
|
|
6329
|
+
numberValue?: number;
|
|
6330
|
+
/** Optional. Represents a string value. */
|
|
6331
|
+
stringValue?: string;
|
|
6332
|
+
/** Optional. Represents a boolean value. */
|
|
6333
|
+
boolValue?: boolean;
|
|
6334
|
+
/** Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. "$.foo.bar[0].data". */
|
|
6335
|
+
jsonPath?: string;
|
|
6336
|
+
/** Optional. Whether this is not the last part of the same json_path. If true, another PartialArg message for the current json_path is expected to follow. */
|
|
6337
|
+
willContinue?: boolean;
|
|
6338
|
+
}
|
|
6339
|
+
|
|
6311
6340
|
export declare type PartListUnion = PartUnion[] | PartUnion;
|
|
6312
6341
|
|
|
6342
|
+
/** Media resolution for the input media. */
|
|
6343
|
+
export declare interface PartMediaResolution {
|
|
6344
|
+
/** The tokenization quality used for given media.
|
|
6345
|
+
*/
|
|
6346
|
+
level?: PartMediaResolutionLevel;
|
|
6347
|
+
/** Specifies the required sequence length for media tokenization.
|
|
6348
|
+
*/
|
|
6349
|
+
numTokens?: number;
|
|
6350
|
+
}
|
|
6351
|
+
|
|
6352
|
+
/** The tokenization quality used for given media. */
|
|
6353
|
+
export declare enum PartMediaResolutionLevel {
|
|
6354
|
+
/**
|
|
6355
|
+
* Media resolution has not been set.
|
|
6356
|
+
*/
|
|
6357
|
+
MEDIA_RESOLUTION_UNSPECIFIED = "MEDIA_RESOLUTION_UNSPECIFIED",
|
|
6358
|
+
/**
|
|
6359
|
+
* Media resolution set to low.
|
|
6360
|
+
*/
|
|
6361
|
+
MEDIA_RESOLUTION_LOW = "MEDIA_RESOLUTION_LOW",
|
|
6362
|
+
/**
|
|
6363
|
+
* Media resolution set to medium.
|
|
6364
|
+
*/
|
|
6365
|
+
MEDIA_RESOLUTION_MEDIUM = "MEDIA_RESOLUTION_MEDIUM",
|
|
6366
|
+
/**
|
|
6367
|
+
* Media resolution set to high.
|
|
6368
|
+
*/
|
|
6369
|
+
MEDIA_RESOLUTION_HIGH = "MEDIA_RESOLUTION_HIGH"
|
|
6370
|
+
}
|
|
6371
|
+
|
|
6313
6372
|
/** Tuning spec for Partner models. This data type is not supported in Gemini API. */
|
|
6314
6373
|
export declare interface PartnerModelTuningSpec {
|
|
6315
6374
|
/** Hyperparameters for tuning. The accepted hyper_parameters and their valid range of values will differ depending on the base model. */
|
|
@@ -7359,6 +7418,24 @@ export declare interface ThinkingConfig {
|
|
|
7359
7418
|
/** Indicates the thinking budget in tokens. 0 is DISABLED. -1 is AUTOMATIC. The default values and allowed ranges are model dependent.
|
|
7360
7419
|
*/
|
|
7361
7420
|
thinkingBudget?: number;
|
|
7421
|
+
/** Optional. The level of thoughts tokens that the model should generate. */
|
|
7422
|
+
thinkingLevel?: ThinkingLevel;
|
|
7423
|
+
}
|
|
7424
|
+
|
|
7425
|
+
/** The level of thoughts tokens that the model should generate. */
|
|
7426
|
+
export declare enum ThinkingLevel {
|
|
7427
|
+
/**
|
|
7428
|
+
* Default value.
|
|
7429
|
+
*/
|
|
7430
|
+
THINKING_LEVEL_UNSPECIFIED = "THINKING_LEVEL_UNSPECIFIED",
|
|
7431
|
+
/**
|
|
7432
|
+
* Low thinking level.
|
|
7433
|
+
*/
|
|
7434
|
+
LOW = "LOW",
|
|
7435
|
+
/**
|
|
7436
|
+
* High thinking level.
|
|
7437
|
+
*/
|
|
7438
|
+
HIGH = "HIGH"
|
|
7362
7439
|
}
|
|
7363
7440
|
|
|
7364
7441
|
export declare class Tokens extends BaseModule {
|
|
@@ -7705,25 +7782,30 @@ declare class Tunings extends BaseModule {
|
|
|
7705
7782
|
private readonly apiClient;
|
|
7706
7783
|
constructor(apiClient: ApiClient);
|
|
7707
7784
|
/**
|
|
7708
|
-
*
|
|
7785
|
+
* Lists tuning jobs.
|
|
7709
7786
|
*
|
|
7710
|
-
* @param
|
|
7711
|
-
* @return - A
|
|
7787
|
+
* @param params - The parameters for the list request.
|
|
7788
|
+
* @return - A pager of tuning jobs.
|
|
7712
7789
|
*
|
|
7713
|
-
* @
|
|
7714
|
-
*
|
|
7790
|
+
* @example
|
|
7791
|
+
* ```ts
|
|
7792
|
+
* const tuningJobs = await ai.tunings.list({config: {'pageSize': 2}});
|
|
7793
|
+
* for await (const tuningJob of tuningJobs) {
|
|
7794
|
+
* console.log(tuningJob);
|
|
7795
|
+
* }
|
|
7796
|
+
* ```
|
|
7715
7797
|
*/
|
|
7716
|
-
|
|
7798
|
+
list: (params?: types.ListTuningJobsParameters) => Promise<Pager<types.TuningJob>>;
|
|
7717
7799
|
/**
|
|
7718
|
-
*
|
|
7800
|
+
* Gets a TuningJob.
|
|
7719
7801
|
*
|
|
7720
|
-
* @param
|
|
7721
|
-
* @return - A
|
|
7802
|
+
* @param name - The resource name of the tuning job.
|
|
7803
|
+
* @return - A TuningJob object.
|
|
7722
7804
|
*
|
|
7723
7805
|
* @experimental - The SDK's tuning implementation is experimental, and may
|
|
7724
7806
|
* change in future versions.
|
|
7725
7807
|
*/
|
|
7726
|
-
|
|
7808
|
+
get: (params: types.GetTuningJobParameters) => Promise<types.TuningJob>;
|
|
7727
7809
|
/**
|
|
7728
7810
|
* Creates a supervised fine-tuning job.
|
|
7729
7811
|
*
|
|
@@ -7747,7 +7829,7 @@ declare class Tunings extends BaseModule {
|
|
|
7747
7829
|
* await ai.tunings.cancel({name: '...'}); // The server-generated resource name.
|
|
7748
7830
|
* ```
|
|
7749
7831
|
*/
|
|
7750
|
-
cancel(params: types.CancelTuningJobParameters): Promise<
|
|
7832
|
+
cancel(params: types.CancelTuningJobParameters): Promise<types.CancelTuningJobResponse>;
|
|
7751
7833
|
private tuneInternal;
|
|
7752
7834
|
private tuneMldevInternal;
|
|
7753
7835
|
}
|
|
@@ -7873,6 +7955,7 @@ declare namespace types {
|
|
|
7873
7955
|
AuthType,
|
|
7874
7956
|
HttpElementLocation,
|
|
7875
7957
|
PhishBlockThreshold,
|
|
7958
|
+
ThinkingLevel,
|
|
7876
7959
|
HarmCategory,
|
|
7877
7960
|
HarmBlockMethod,
|
|
7878
7961
|
HarmBlockThreshold,
|
|
@@ -7888,6 +7971,7 @@ declare namespace types {
|
|
|
7888
7971
|
AdapterSize,
|
|
7889
7972
|
JobState,
|
|
7890
7973
|
TuningTask,
|
|
7974
|
+
PartMediaResolutionLevel,
|
|
7891
7975
|
FeatureSelectionPreference,
|
|
7892
7976
|
Behavior,
|
|
7893
7977
|
DynamicRetrievalConfigMode,
|
|
@@ -7917,10 +8001,12 @@ declare namespace types {
|
|
|
7917
8001
|
Scale,
|
|
7918
8002
|
MusicGenerationMode,
|
|
7919
8003
|
LiveMusicPlaybackControl,
|
|
7920
|
-
|
|
8004
|
+
PartMediaResolution,
|
|
7921
8005
|
CodeExecutionResult,
|
|
7922
8006
|
ExecutableCode,
|
|
7923
8007
|
FileData,
|
|
8008
|
+
PartialArg,
|
|
8009
|
+
FunctionCall,
|
|
7924
8010
|
FunctionResponseBlob,
|
|
7925
8011
|
FunctionResponseFileData,
|
|
7926
8012
|
FunctionResponsePart,
|
|
@@ -8111,6 +8197,7 @@ declare namespace types {
|
|
|
8111
8197
|
ListTuningJobsResponse,
|
|
8112
8198
|
CancelTuningJobConfig,
|
|
8113
8199
|
CancelTuningJobParameters,
|
|
8200
|
+
CancelTuningJobResponse,
|
|
8114
8201
|
TuningExample,
|
|
8115
8202
|
TuningDataset,
|
|
8116
8203
|
TuningValidationDataset,
|