@google/genai 1.21.0 → 1.22.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 +76 -15
- package/dist/index.cjs +241 -107
- package/dist/index.mjs +242 -108
- package/dist/index.mjs.map +1 -1
- package/dist/node/index.cjs +241 -107
- package/dist/node/index.mjs +242 -108
- package/dist/node/index.mjs.map +1 -1
- package/dist/node/node.d.ts +76 -15
- package/dist/web/index.mjs +242 -108
- package/dist/web/index.mjs.map +1 -1
- package/dist/web/web.d.ts +76 -15
- package/package.json +1 -1
package/dist/web/web.d.ts
CHANGED
|
@@ -1069,6 +1069,18 @@ export declare interface CodeExecutionResult {
|
|
|
1069
1069
|
output?: string;
|
|
1070
1070
|
}
|
|
1071
1071
|
|
|
1072
|
+
/** Tool to support computer use. */
|
|
1073
|
+
export declare interface ComputerUse {
|
|
1074
|
+
/** Required. The environment being operated. */
|
|
1075
|
+
environment?: Environment;
|
|
1076
|
+
/** By default, predefined functions are included in the final model call.
|
|
1077
|
+
Some of them can be explicitly excluded from being automatically included.
|
|
1078
|
+
This can serve two purposes:
|
|
1079
|
+
1. Using a more restricted / different action space.
|
|
1080
|
+
2. Improving the definitions / instructions of predefined functions. */
|
|
1081
|
+
excludedPredefinedFunctions?: string[];
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1072
1084
|
/** Optional parameters for computing tokens. */
|
|
1073
1085
|
export declare interface ComputeTokensConfig {
|
|
1074
1086
|
/** Used to override HTTP request options. */
|
|
@@ -2344,7 +2356,11 @@ export declare enum FinishReason {
|
|
|
2344
2356
|
/**
|
|
2345
2357
|
* The tool call generated by the model is invalid.
|
|
2346
2358
|
*/
|
|
2347
|
-
UNEXPECTED_TOOL_CALL = "UNEXPECTED_TOOL_CALL"
|
|
2359
|
+
UNEXPECTED_TOOL_CALL = "UNEXPECTED_TOOL_CALL",
|
|
2360
|
+
/**
|
|
2361
|
+
* Image generation stopped because the generated images have prohibited content.
|
|
2362
|
+
*/
|
|
2363
|
+
IMAGE_PROHIBITED_CONTENT = "IMAGE_PROHIBITED_CONTENT"
|
|
2348
2364
|
}
|
|
2349
2365
|
|
|
2350
2366
|
/** A function call. */
|
|
@@ -2650,6 +2666,9 @@ export declare interface GenerateContentConfig {
|
|
|
2650
2666
|
/** The thinking features configuration.
|
|
2651
2667
|
*/
|
|
2652
2668
|
thinkingConfig?: ThinkingConfig;
|
|
2669
|
+
/** The image generation configuration.
|
|
2670
|
+
*/
|
|
2671
|
+
imageConfig?: ImageConfig;
|
|
2653
2672
|
}
|
|
2654
2673
|
|
|
2655
2674
|
/** Config for models.generate_content parameters. */
|
|
@@ -3776,6 +3795,13 @@ declare interface Image_2 {
|
|
|
3776
3795
|
}
|
|
3777
3796
|
export { Image_2 as Image }
|
|
3778
3797
|
|
|
3798
|
+
/** The image generation configuration to be used in GenerateContentConfig. */
|
|
3799
|
+
export declare interface ImageConfig {
|
|
3800
|
+
/** Aspect ratio of the generated images. Supported values are
|
|
3801
|
+
"1:1", "2:3", "3:2", "3:4", "4:3", "9:16", "16:9", and "21:9". */
|
|
3802
|
+
aspectRatio?: string;
|
|
3803
|
+
}
|
|
3804
|
+
|
|
3779
3805
|
/** Enum that specifies the language of the text in the prompt. */
|
|
3780
3806
|
export declare enum ImagePromptLanguage {
|
|
3781
3807
|
/**
|
|
@@ -4355,6 +4381,11 @@ export declare interface LiveConnectConfig {
|
|
|
4355
4381
|
/** The speech generation configuration.
|
|
4356
4382
|
*/
|
|
4357
4383
|
speechConfig?: SpeechConfig;
|
|
4384
|
+
/** Config for thinking features.
|
|
4385
|
+
An error will be returned if this field is set for models that don't
|
|
4386
|
+
support thinking.
|
|
4387
|
+
*/
|
|
4388
|
+
thinkingConfig?: ThinkingConfig;
|
|
4358
4389
|
/** If enabled, the model will detect emotions and adapt its responses accordingly. */
|
|
4359
4390
|
enableAffectiveDialog?: boolean;
|
|
4360
4391
|
/** The user provided system instructions for the model.
|
|
@@ -6820,7 +6851,7 @@ export declare interface Tool {
|
|
|
6820
6851
|
/** Optional. Tool to support the model interacting directly with the
|
|
6821
6852
|
computer. If enabled, it automatically populates computer-use specific
|
|
6822
6853
|
Function Declarations. */
|
|
6823
|
-
computerUse?:
|
|
6854
|
+
computerUse?: ComputerUse;
|
|
6824
6855
|
/** Optional. CodeExecution tool type. Enables the model to execute code as part of generation. */
|
|
6825
6856
|
codeExecution?: ToolCodeExecution;
|
|
6826
6857
|
}
|
|
@@ -6829,18 +6860,6 @@ export declare interface Tool {
|
|
|
6829
6860
|
export declare interface ToolCodeExecution {
|
|
6830
6861
|
}
|
|
6831
6862
|
|
|
6832
|
-
/** Tool to support computer use. */
|
|
6833
|
-
export declare interface ToolComputerUse {
|
|
6834
|
-
/** Required. The environment being operated. */
|
|
6835
|
-
environment?: Environment;
|
|
6836
|
-
/** By default, predefined functions are included in the final model call.
|
|
6837
|
-
Some of them can be explicitly excluded from being automatically included.
|
|
6838
|
-
This can serve two purposes:
|
|
6839
|
-
1. Using a more restricted / different action space.
|
|
6840
|
-
2. Improving the definitions / instructions of predefined functions. */
|
|
6841
|
-
excludedPredefinedFunctions?: string[];
|
|
6842
|
-
}
|
|
6843
|
-
|
|
6844
6863
|
/** Tool config.
|
|
6845
6864
|
|
|
6846
6865
|
This config is shared for all tools provided in the request.
|
|
@@ -6995,6 +7014,8 @@ export declare interface TuningJob {
|
|
|
6995
7014
|
serviceAccount?: string;
|
|
6996
7015
|
/** Optional. The display name of the TunedModel. The name can be up to 128 characters long and can consist of any UTF-8 characters. */
|
|
6997
7016
|
tunedModelDisplayName?: string;
|
|
7017
|
+
/** Tuning Spec for Veo Tuning. */
|
|
7018
|
+
veoTuningSpec?: VeoTuningSpec;
|
|
6998
7019
|
}
|
|
6999
7020
|
|
|
7000
7021
|
/** Tuning mode. */
|
|
@@ -7078,6 +7099,22 @@ declare class Tunings extends BaseModule {
|
|
|
7078
7099
|
private tuneMldevInternal;
|
|
7079
7100
|
}
|
|
7080
7101
|
|
|
7102
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
7103
|
+
export declare enum TuningTask {
|
|
7104
|
+
/**
|
|
7105
|
+
* Default value. This value is unused.
|
|
7106
|
+
*/
|
|
7107
|
+
TUNING_TASK_UNSPECIFIED = "TUNING_TASK_UNSPECIFIED",
|
|
7108
|
+
/**
|
|
7109
|
+
* Tuning task for image to video.
|
|
7110
|
+
*/
|
|
7111
|
+
TUNING_TASK_I2V = "TUNING_TASK_I2V",
|
|
7112
|
+
/**
|
|
7113
|
+
* Tuning task for text to video.
|
|
7114
|
+
*/
|
|
7115
|
+
TUNING_TASK_T2V = "TUNING_TASK_T2V"
|
|
7116
|
+
}
|
|
7117
|
+
|
|
7081
7118
|
export declare interface TuningValidationDataset {
|
|
7082
7119
|
/** GCS URI of the file containing validation dataset in JSONL format. */
|
|
7083
7120
|
gcsUri?: string;
|
|
@@ -7188,6 +7225,7 @@ declare namespace types {
|
|
|
7188
7225
|
JobState,
|
|
7189
7226
|
TuningMode,
|
|
7190
7227
|
AdapterSize,
|
|
7228
|
+
TuningTask,
|
|
7191
7229
|
FeatureSelectionPreference,
|
|
7192
7230
|
Behavior,
|
|
7193
7231
|
DynamicRetrievalConfigMode,
|
|
@@ -7246,7 +7284,7 @@ declare namespace types {
|
|
|
7246
7284
|
AuthConfig,
|
|
7247
7285
|
GoogleMaps,
|
|
7248
7286
|
UrlContext,
|
|
7249
|
-
|
|
7287
|
+
ComputerUse,
|
|
7250
7288
|
ApiAuthApiKeyConfig,
|
|
7251
7289
|
ApiAuth,
|
|
7252
7290
|
ExternalApiElasticSearchParams,
|
|
@@ -7276,6 +7314,7 @@ declare namespace types {
|
|
|
7276
7314
|
SpeechConfig,
|
|
7277
7315
|
AutomaticFunctionCallingConfig,
|
|
7278
7316
|
ThinkingConfig,
|
|
7317
|
+
ImageConfig,
|
|
7279
7318
|
GenerationConfigRoutingConfigAutoRoutingMode,
|
|
7280
7319
|
GenerationConfigRoutingConfigManualRoutingMode,
|
|
7281
7320
|
GenerationConfigRoutingConfig,
|
|
@@ -7398,6 +7437,8 @@ declare namespace types {
|
|
|
7398
7437
|
TuningDataStats,
|
|
7399
7438
|
EncryptionSpec,
|
|
7400
7439
|
PartnerModelTuningSpec,
|
|
7440
|
+
VeoHyperParameters,
|
|
7441
|
+
VeoTuningSpec,
|
|
7401
7442
|
TuningJob,
|
|
7402
7443
|
ListTuningJobsConfig,
|
|
7403
7444
|
ListTuningJobsParameters,
|
|
@@ -7775,6 +7816,26 @@ export declare interface UsageMetadata {
|
|
|
7775
7816
|
trafficType?: TrafficType;
|
|
7776
7817
|
}
|
|
7777
7818
|
|
|
7819
|
+
/** Hyperparameters for Veo. */
|
|
7820
|
+
export declare interface VeoHyperParameters {
|
|
7821
|
+
/** Optional. Number of complete passes the model makes over the entire training dataset during training. */
|
|
7822
|
+
epochCount?: string;
|
|
7823
|
+
/** Optional. Multiplier for adjusting the default learning rate. */
|
|
7824
|
+
learningRateMultiplier?: number;
|
|
7825
|
+
/** Optional. The tuning task. Either I2V or T2V. */
|
|
7826
|
+
tuningTask?: TuningTask;
|
|
7827
|
+
}
|
|
7828
|
+
|
|
7829
|
+
/** Tuning Spec for Veo Model Tuning. */
|
|
7830
|
+
export declare interface VeoTuningSpec {
|
|
7831
|
+
/** Optional. Hyperparameters for Veo. */
|
|
7832
|
+
hyperParameters?: VeoHyperParameters;
|
|
7833
|
+
/** Required. Training dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
|
|
7834
|
+
trainingDatasetUri?: string;
|
|
7835
|
+
/** Optional. Validation dataset used for tuning. The dataset can be specified as either a Cloud Storage path to a JSONL file or as the resource name of a Vertex Multimodal Dataset. */
|
|
7836
|
+
validationDatasetUri?: string;
|
|
7837
|
+
}
|
|
7838
|
+
|
|
7778
7839
|
/** Retrieve from Vertex AI Search datastore or engine for grounding. datastore and engine are mutually exclusive. See https://cloud.google.com/products/agent-builder */
|
|
7779
7840
|
export declare interface VertexAISearch {
|
|
7780
7841
|
/** Specifications that define the specific DataStores to be searched, along with configurations for those data stores. This is only considered for Engines with multiple data stores. It should only be set if engine is used. */
|