@google/genai 1.9.0 → 1.10.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 +7 -12
- package/dist/genai.d.ts +28 -17
- package/dist/index.cjs +1254 -1182
- package/dist/index.mjs +1254 -1182
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +1254 -1182
- package/dist/node/index.mjs +1254 -1182
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +28 -17
- package/dist/web/index.mjs +1254 -1182
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +28 -17
- package/package.json +1 -1
package/dist/node/node.d.ts
CHANGED
|
@@ -560,6 +560,8 @@ export declare interface BatchJobDestination {
|
|
|
560
560
|
inlinedResponses?: InlinedResponse[];
|
|
561
561
|
}
|
|
562
562
|
|
|
563
|
+
export declare type BatchJobDestinationUnion = BatchJobDestination | string;
|
|
564
|
+
|
|
563
565
|
/** Config for `src` parameter. */
|
|
564
566
|
export declare interface BatchJobSource {
|
|
565
567
|
/** Storage format of the input files. Must be one of:
|
|
@@ -1229,7 +1231,7 @@ export declare interface CreateBatchJobConfig {
|
|
|
1229
1231
|
/** GCS or BigQuery URI prefix for the output predictions. Example:
|
|
1230
1232
|
"gs://path/to/output/data" or "bq://projectId.bqDatasetId.bqTableId".
|
|
1231
1233
|
*/
|
|
1232
|
-
dest?:
|
|
1234
|
+
dest?: BatchJobDestinationUnion;
|
|
1233
1235
|
}
|
|
1234
1236
|
|
|
1235
1237
|
/** Config for batches.create parameters. */
|
|
@@ -1745,6 +1747,9 @@ export declare interface EditImageConfig {
|
|
|
1745
1747
|
only).
|
|
1746
1748
|
*/
|
|
1747
1749
|
outputCompressionQuality?: number;
|
|
1750
|
+
/** Whether to add a watermark to the generated images.
|
|
1751
|
+
*/
|
|
1752
|
+
addWatermark?: boolean;
|
|
1748
1753
|
/** Describes the editing mode for the request. */
|
|
1749
1754
|
editMode?: EditMode;
|
|
1750
1755
|
/** The number of sampling steps. A higher value has better image
|
|
@@ -2480,6 +2485,8 @@ export declare interface GenerateContentParameters {
|
|
|
2480
2485
|
|
|
2481
2486
|
/** Response message for PredictionService.GenerateContent. */
|
|
2482
2487
|
export declare class GenerateContentResponse {
|
|
2488
|
+
/** Used to retain the full HTTP response. */
|
|
2489
|
+
sdkHttpResponse?: HttpResponse;
|
|
2483
2490
|
/** Response variations returned by the model.
|
|
2484
2491
|
*/
|
|
2485
2492
|
candidates?: Candidate[];
|
|
@@ -2800,7 +2807,7 @@ export declare interface GenerateVideosConfig {
|
|
|
2800
2807
|
seed?: number;
|
|
2801
2808
|
/** The aspect ratio for the generated video. 16:9 (landscape) and 9:16 (portrait) are supported. */
|
|
2802
2809
|
aspectRatio?: string;
|
|
2803
|
-
/** The resolution for the generated video.
|
|
2810
|
+
/** The resolution for the generated video. 720p and 1080p are supported. */
|
|
2804
2811
|
resolution?: string;
|
|
2805
2812
|
/** Whether allow to generate person videos, and restrict to specific ages. Supported values are: dont_allow, allow_adult. */
|
|
2806
2813
|
personGeneration?: string;
|
|
@@ -3427,7 +3434,10 @@ export declare interface HttpOptions {
|
|
|
3427
3434
|
headers?: Record<string, string>;
|
|
3428
3435
|
/** Timeout for the request in milliseconds. */
|
|
3429
3436
|
timeout?: number;
|
|
3430
|
-
/** Extra parameters to add to the request body.
|
|
3437
|
+
/** Extra parameters to add to the request body.
|
|
3438
|
+
The structure must match the backend API's request structure.
|
|
3439
|
+
- VertexAI backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest
|
|
3440
|
+
- GeminiAPI backend API docs: https://ai.google.dev/api/rest */
|
|
3431
3441
|
extraBody?: Record<string, unknown>;
|
|
3432
3442
|
}
|
|
3433
3443
|
|
|
@@ -5087,18 +5097,6 @@ export declare interface MultiSpeakerVoiceConfig {
|
|
|
5087
5097
|
speakerVoiceConfigs?: SpeakerVoiceConfig[];
|
|
5088
5098
|
}
|
|
5089
5099
|
|
|
5090
|
-
/** A long-running operation. */
|
|
5091
|
-
export declare interface Operation {
|
|
5092
|
-
/** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
|
|
5093
|
-
name?: string;
|
|
5094
|
-
/** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */
|
|
5095
|
-
metadata?: Record<string, unknown>;
|
|
5096
|
-
/** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
|
|
5097
|
-
done?: boolean;
|
|
5098
|
-
/** The error result of the operation in case of failure or cancellation. */
|
|
5099
|
-
error?: Record<string, unknown>;
|
|
5100
|
-
}
|
|
5101
|
-
|
|
5102
5100
|
/** Parameters for the get method of the operations module. */
|
|
5103
5101
|
export declare interface OperationGetParameters {
|
|
5104
5102
|
/** The operation to be retrieved. */
|
|
@@ -6398,6 +6396,18 @@ export declare interface TuningJob {
|
|
|
6398
6396
|
tunedModelDisplayName?: string;
|
|
6399
6397
|
}
|
|
6400
6398
|
|
|
6399
|
+
/** A long-running operation. */
|
|
6400
|
+
export declare interface TuningOperation {
|
|
6401
|
+
/** The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. */
|
|
6402
|
+
name?: string;
|
|
6403
|
+
/** Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. */
|
|
6404
|
+
metadata?: Record<string, unknown>;
|
|
6405
|
+
/** If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. */
|
|
6406
|
+
done?: boolean;
|
|
6407
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
6408
|
+
error?: Record<string, unknown>;
|
|
6409
|
+
}
|
|
6410
|
+
|
|
6401
6411
|
declare class Tunings extends BaseModule {
|
|
6402
6412
|
private readonly apiClient;
|
|
6403
6413
|
constructor(apiClient: ApiClient);
|
|
@@ -6715,7 +6725,7 @@ declare namespace types {
|
|
|
6715
6725
|
TuningValidationDataset,
|
|
6716
6726
|
CreateTuningJobConfig,
|
|
6717
6727
|
CreateTuningJobParameters,
|
|
6718
|
-
|
|
6728
|
+
TuningOperation,
|
|
6719
6729
|
CreateCachedContentConfig,
|
|
6720
6730
|
CreateCachedContentParameters,
|
|
6721
6731
|
CachedContentUsageMetadata,
|
|
@@ -6844,7 +6854,8 @@ declare namespace types {
|
|
|
6844
6854
|
ToolUnion,
|
|
6845
6855
|
ToolListUnion,
|
|
6846
6856
|
DownloadableFileUnion,
|
|
6847
|
-
BatchJobSourceUnion
|
|
6857
|
+
BatchJobSourceUnion,
|
|
6858
|
+
BatchJobDestinationUnion
|
|
6848
6859
|
}
|
|
6849
6860
|
}
|
|
6850
6861
|
|