@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/web/web.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;
|
|
@@ -3420,7 +3427,10 @@ export declare interface HttpOptions {
|
|
|
3420
3427
|
headers?: Record<string, string>;
|
|
3421
3428
|
/** Timeout for the request in milliseconds. */
|
|
3422
3429
|
timeout?: number;
|
|
3423
|
-
/** Extra parameters to add to the request body.
|
|
3430
|
+
/** Extra parameters to add to the request body.
|
|
3431
|
+
The structure must match the backend API's request structure.
|
|
3432
|
+
- VertexAI backend API docs: https://cloud.google.com/vertex-ai/docs/reference/rest
|
|
3433
|
+
- GeminiAPI backend API docs: https://ai.google.dev/api/rest */
|
|
3424
3434
|
extraBody?: Record<string, unknown>;
|
|
3425
3435
|
}
|
|
3426
3436
|
|
|
@@ -5080,18 +5090,6 @@ export declare interface MultiSpeakerVoiceConfig {
|
|
|
5080
5090
|
speakerVoiceConfigs?: SpeakerVoiceConfig[];
|
|
5081
5091
|
}
|
|
5082
5092
|
|
|
5083
|
-
/** A long-running operation. */
|
|
5084
|
-
export declare interface Operation {
|
|
5085
|
-
/** 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}`. */
|
|
5086
|
-
name?: string;
|
|
5087
|
-
/** 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. */
|
|
5088
|
-
metadata?: Record<string, unknown>;
|
|
5089
|
-
/** 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. */
|
|
5090
|
-
done?: boolean;
|
|
5091
|
-
/** The error result of the operation in case of failure or cancellation. */
|
|
5092
|
-
error?: Record<string, unknown>;
|
|
5093
|
-
}
|
|
5094
|
-
|
|
5095
5093
|
/** Parameters for the get method of the operations module. */
|
|
5096
5094
|
export declare interface OperationGetParameters {
|
|
5097
5095
|
/** The operation to be retrieved. */
|
|
@@ -6391,6 +6389,18 @@ export declare interface TuningJob {
|
|
|
6391
6389
|
tunedModelDisplayName?: string;
|
|
6392
6390
|
}
|
|
6393
6391
|
|
|
6392
|
+
/** A long-running operation. */
|
|
6393
|
+
export declare interface TuningOperation {
|
|
6394
|
+
/** 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}`. */
|
|
6395
|
+
name?: string;
|
|
6396
|
+
/** 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. */
|
|
6397
|
+
metadata?: Record<string, unknown>;
|
|
6398
|
+
/** 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. */
|
|
6399
|
+
done?: boolean;
|
|
6400
|
+
/** The error result of the operation in case of failure or cancellation. */
|
|
6401
|
+
error?: Record<string, unknown>;
|
|
6402
|
+
}
|
|
6403
|
+
|
|
6394
6404
|
declare class Tunings extends BaseModule {
|
|
6395
6405
|
private readonly apiClient;
|
|
6396
6406
|
constructor(apiClient: ApiClient);
|
|
@@ -6708,7 +6718,7 @@ declare namespace types {
|
|
|
6708
6718
|
TuningValidationDataset,
|
|
6709
6719
|
CreateTuningJobConfig,
|
|
6710
6720
|
CreateTuningJobParameters,
|
|
6711
|
-
|
|
6721
|
+
TuningOperation,
|
|
6712
6722
|
CreateCachedContentConfig,
|
|
6713
6723
|
CreateCachedContentParameters,
|
|
6714
6724
|
CachedContentUsageMetadata,
|
|
@@ -6837,7 +6847,8 @@ declare namespace types {
|
|
|
6837
6847
|
ToolUnion,
|
|
6838
6848
|
ToolListUnion,
|
|
6839
6849
|
DownloadableFileUnion,
|
|
6840
|
-
BatchJobSourceUnion
|
|
6850
|
+
BatchJobSourceUnion,
|
|
6851
|
+
BatchJobDestinationUnion
|
|
6841
6852
|
}
|
|
6842
6853
|
}
|
|
6843
6854
|
|