@google/genai 2.9.0-rc.0 → 2.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.
@@ -121,26 +121,6 @@ var Type;
121
121
  */
122
122
  Type["NULL"] = "NULL";
123
123
  })(Type || (Type = {}));
124
- /** The environment being operated. */
125
- var Environment;
126
- (function (Environment) {
127
- /**
128
- * Defaults to browser.
129
- */
130
- Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
131
- /**
132
- * Operates in a web browser.
133
- */
134
- Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
135
- /**
136
- * Operates in a mobile environment.
137
- */
138
- Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
139
- /**
140
- * Operates in a desktop environment.
141
- */
142
- Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
143
- })(Environment || (Environment = {}));
144
124
  /** Type of auth scheme. This enum is not supported in Gemini API. */
145
125
  var AuthType;
146
126
  (function (AuthType) {
@@ -211,6 +191,62 @@ var ApiSpec;
211
191
  */
212
192
  ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
213
193
  })(ApiSpec || (ApiSpec = {}));
194
+ /** The environment being operated. */
195
+ var Environment;
196
+ (function (Environment) {
197
+ /**
198
+ * Defaults to browser.
199
+ */
200
+ Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
201
+ /**
202
+ * Operates in a web browser.
203
+ */
204
+ Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
205
+ /**
206
+ * Operates in a mobile environment.
207
+ */
208
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
209
+ /**
210
+ * Operates in a desktop environment.
211
+ */
212
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
213
+ })(Environment || (Environment = {}));
214
+ /** SafetyPolicy */
215
+ var SafetyPolicy;
216
+ (function (SafetyPolicy) {
217
+ /**
218
+ * Unspecified safety policy.
219
+ */
220
+ SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
221
+ /**
222
+ * Safety policy for financial transactions.
223
+ */
224
+ SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
225
+ /**
226
+ * Safety policy for sensitive data modification.
227
+ */
228
+ SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
229
+ /**
230
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
231
+ */
232
+ SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
233
+ /**
234
+ * Safety policy for account creation.
235
+ */
236
+ SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
237
+ /**
238
+ * Safety policy for data modification.
239
+ */
240
+ SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
241
+ /**
242
+ * Safety policy for user consent management.
243
+ */
244
+ SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
245
+ /**
246
+ * Safety policy for legal terms and agreements.
247
+ */
248
+ SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
249
+ })(SafetyPolicy || (SafetyPolicy = {}));
214
250
  /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
215
251
  var PhishBlockThreshold;
216
252
  (function (PhishBlockThreshold) {
@@ -156,15 +156,12 @@ declare interface CodeExecutionResult {
156
156
  declare interface ComputerUse {
157
157
  /** Required. The environment being operated. */
158
158
  environment?: Environment;
159
- /** By default, predefined functions are included in the final model call.
160
- Some of them can be explicitly excluded from being automatically included.
161
- This can serve two purposes:
162
- 1. Using a more restricted / different action space.
163
- 2. Improving the definitions / instructions of predefined functions. */
159
+ /** Optional. By default, [predefined functions](https://cloud.google.com/vertex-ai/generative-ai/docs/computer-use#supported-actions) are included in the final model call. Some of them can be explicitly excluded from being automatically included. This can serve two purposes: 1. Using a more restricted / different action space. 2. Improving the definitions / instructions of predefined functions. */
164
160
  excludedPredefinedFunctions?: string[];
165
- /** Optional. Whether enable the prompt injection detection check on computer-use request.
166
- */
161
+ /** Optional. Enables the prompt injection detection check on computer-use request. */
167
162
  enablePromptInjectionDetection?: boolean;
163
+ /** Optional. Disabled safety policies for computer use. This field is not supported in Vertex AI. */
164
+ disabledSafetyPolicies?: SafetyPolicy[];
168
165
  }
169
166
 
170
167
  /** Local tokenizer compute tokens result. */
@@ -943,6 +940,42 @@ declare interface Retrieval {
943
940
  vertexRagStore?: VertexRagStore;
944
941
  }
945
942
 
943
+ /** SafetyPolicy */
944
+ declare enum SafetyPolicy {
945
+ /**
946
+ * Unspecified safety policy.
947
+ */
948
+ SAFETY_POLICY_UNSPECIFIED = "SAFETY_POLICY_UNSPECIFIED",
949
+ /**
950
+ * Safety policy for financial transactions.
951
+ */
952
+ FINANCIAL_TRANSACTIONS = "FINANCIAL_TRANSACTIONS",
953
+ /**
954
+ * Safety policy for sensitive data modification.
955
+ */
956
+ SENSITIVE_DATA_MODIFICATION = "SENSITIVE_DATA_MODIFICATION",
957
+ /**
958
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
959
+ */
960
+ COMMUNICATION_TOOL = "COMMUNICATION_TOOL",
961
+ /**
962
+ * Safety policy for account creation.
963
+ */
964
+ ACCOUNT_CREATION = "ACCOUNT_CREATION",
965
+ /**
966
+ * Safety policy for data modification.
967
+ */
968
+ DATA_MODIFICATION = "DATA_MODIFICATION",
969
+ /**
970
+ * Safety policy for user consent management.
971
+ */
972
+ USER_CONSENT_MANAGEMENT = "USER_CONSENT_MANAGEMENT",
973
+ /**
974
+ * Safety policy for legal terms and agreements.
975
+ */
976
+ LEGAL_TERMS_AND_AGREEMENTS = "LEGAL_TERMS_AND_AGREEMENTS"
977
+ }
978
+
946
979
  /** Schema is used to define the format of input/output data.
947
980
 
948
981
  Represents a select subset of an [OpenAPI 3.0 schema
@@ -1086,9 +1119,7 @@ export declare interface TokensInfo {
1086
1119
  declare interface Tool {
1087
1120
  /** Optional. Retrieval tool type. System will always execute the provided retrieval tool(s) to get external knowledge to answer the prompt. Retrieval results are presented to the model for generation. This field is not supported in Gemini API. */
1088
1121
  retrieval?: Retrieval;
1089
- /** Optional. Tool to support the model interacting directly with the
1090
- computer. If enabled, it automatically populates computer-use specific
1091
- Function Declarations. */
1122
+ /** Optional. Tool to support the model interacting directly with the computer. If enabled, it automatically populates computer-use specific Function Declarations. */
1092
1123
  computerUse?: ComputerUse;
1093
1124
  /** Optional. FileSearch tool type. Tool to retrieve knowledge from Semantic Retrieval corpora. This field is not supported in Vertex AI. */
1094
1125
  fileSearch?: FileSearch;
@@ -97,26 +97,6 @@ var Type;
97
97
  */
98
98
  Type["NULL"] = "NULL";
99
99
  })(Type || (Type = {}));
100
- /** The environment being operated. */
101
- var Environment;
102
- (function (Environment) {
103
- /**
104
- * Defaults to browser.
105
- */
106
- Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
107
- /**
108
- * Operates in a web browser.
109
- */
110
- Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
111
- /**
112
- * Operates in a mobile environment.
113
- */
114
- Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
115
- /**
116
- * Operates in a desktop environment.
117
- */
118
- Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
119
- })(Environment || (Environment = {}));
120
100
  /** Type of auth scheme. This enum is not supported in Gemini API. */
121
101
  var AuthType;
122
102
  (function (AuthType) {
@@ -187,6 +167,62 @@ var ApiSpec;
187
167
  */
188
168
  ApiSpec["ELASTIC_SEARCH"] = "ELASTIC_SEARCH";
189
169
  })(ApiSpec || (ApiSpec = {}));
170
+ /** The environment being operated. */
171
+ var Environment;
172
+ (function (Environment) {
173
+ /**
174
+ * Defaults to browser.
175
+ */
176
+ Environment["ENVIRONMENT_UNSPECIFIED"] = "ENVIRONMENT_UNSPECIFIED";
177
+ /**
178
+ * Operates in a web browser.
179
+ */
180
+ Environment["ENVIRONMENT_BROWSER"] = "ENVIRONMENT_BROWSER";
181
+ /**
182
+ * Operates in a mobile environment.
183
+ */
184
+ Environment["ENVIRONMENT_MOBILE"] = "ENVIRONMENT_MOBILE";
185
+ /**
186
+ * Operates in a desktop environment.
187
+ */
188
+ Environment["ENVIRONMENT_DESKTOP"] = "ENVIRONMENT_DESKTOP";
189
+ })(Environment || (Environment = {}));
190
+ /** SafetyPolicy */
191
+ var SafetyPolicy;
192
+ (function (SafetyPolicy) {
193
+ /**
194
+ * Unspecified safety policy.
195
+ */
196
+ SafetyPolicy["SAFETY_POLICY_UNSPECIFIED"] = "SAFETY_POLICY_UNSPECIFIED";
197
+ /**
198
+ * Safety policy for financial transactions.
199
+ */
200
+ SafetyPolicy["FINANCIAL_TRANSACTIONS"] = "FINANCIAL_TRANSACTIONS";
201
+ /**
202
+ * Safety policy for sensitive data modification.
203
+ */
204
+ SafetyPolicy["SENSITIVE_DATA_MODIFICATION"] = "SENSITIVE_DATA_MODIFICATION";
205
+ /**
206
+ * Safety policy for communication tools (e.g. Gmail, Chat, Meet).
207
+ */
208
+ SafetyPolicy["COMMUNICATION_TOOL"] = "COMMUNICATION_TOOL";
209
+ /**
210
+ * Safety policy for account creation.
211
+ */
212
+ SafetyPolicy["ACCOUNT_CREATION"] = "ACCOUNT_CREATION";
213
+ /**
214
+ * Safety policy for data modification.
215
+ */
216
+ SafetyPolicy["DATA_MODIFICATION"] = "DATA_MODIFICATION";
217
+ /**
218
+ * Safety policy for user consent management.
219
+ */
220
+ SafetyPolicy["USER_CONSENT_MANAGEMENT"] = "USER_CONSENT_MANAGEMENT";
221
+ /**
222
+ * Safety policy for legal terms and agreements.
223
+ */
224
+ SafetyPolicy["LEGAL_TERMS_AND_AGREEMENTS"] = "LEGAL_TERMS_AND_AGREEMENTS";
225
+ })(SafetyPolicy || (SafetyPolicy = {}));
190
226
  /** Sites with confidence level chosen & above this value will be blocked from the search results. This enum is not supported in Gemini API. */
191
227
  var PhishBlockThreshold;
192
228
  (function (PhishBlockThreshold) {