@bodhiapp/ts-client 0.1.26 → 0.1.28
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/anthropic.d.ts +1 -0
- package/dist/anthropic.js +20 -0
- package/dist/anthropic.mjs +2 -0
- package/dist/gemini.d.ts +1 -0
- package/dist/gemini.js +20 -0
- package/dist/gemini.mjs +2 -0
- package/dist/index.d.ts +3 -0
- package/dist/openai.d.ts +1 -0
- package/dist/openai.js +20 -0
- package/dist/openai.mjs +2 -0
- package/dist/openapi-typescript/openapi-schema-anthropic.d.ts +3391 -0
- package/dist/openapi-typescript/openapi-schema-anthropic.ts +3392 -0
- package/dist/openapi-typescript/openapi-schema-gemini.d.ts +3708 -0
- package/dist/openapi-typescript/openapi-schema-gemini.ts +3709 -0
- package/dist/openapi-typescript/openapi-schema-oai.d.ts +4371 -0
- package/dist/openapi-typescript/openapi-schema-oai.ts +4372 -0
- package/dist/openapi-typescript/openapi-schema.d.ts +1453 -3111
- package/dist/openapi-typescript/openapi-schema.ts +1453 -3111
- package/dist/types/types.gen.d.ts +477 -1731
- package/dist/types/types.gen.ts +516 -1903
- package/dist/types-anthropic/index.d.ts +1 -0
- package/dist/types-anthropic/index.ts +2 -0
- package/dist/types-anthropic/types.gen.d.ts +2241 -0
- package/dist/types-anthropic/types.gen.ts +2416 -0
- package/dist/types-gemini/index.d.ts +1 -0
- package/dist/types-gemini/index.ts +2 -0
- package/dist/types-gemini/types.gen.d.ts +4622 -0
- package/dist/types-gemini/types.gen.ts +4849 -0
- package/dist/types-oai/index.d.ts +1 -0
- package/dist/types-oai/index.ts +2 -0
- package/dist/types-oai/types.gen.d.ts +4428 -0
- package/dist/types-oai/types.gen.ts +4810 -0
- package/package.json +39 -7
|
@@ -0,0 +1,3709 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
export interface paths {
|
|
7
|
+
"/v1beta/models": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: {
|
|
10
|
+
/** @description Data format for response. */
|
|
11
|
+
$alt?: components["parameters"]["alt"];
|
|
12
|
+
/** @description JSONP */
|
|
13
|
+
$callback?: components["parameters"]["callback"];
|
|
14
|
+
/** @description Returns response with indentations and line breaks. */
|
|
15
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
16
|
+
/** @description V1 error format. */
|
|
17
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
18
|
+
};
|
|
19
|
+
header?: never;
|
|
20
|
+
path?: never;
|
|
21
|
+
cookie?: never;
|
|
22
|
+
};
|
|
23
|
+
/** @description Lists the [`Model`s](https://ai.google.dev/gemini-api/docs/models/gemini)
|
|
24
|
+
* available through the Gemini API. */
|
|
25
|
+
get: operations["ListModels"];
|
|
26
|
+
put?: never;
|
|
27
|
+
post?: never;
|
|
28
|
+
delete?: never;
|
|
29
|
+
options?: never;
|
|
30
|
+
head?: never;
|
|
31
|
+
patch?: never;
|
|
32
|
+
trace?: never;
|
|
33
|
+
};
|
|
34
|
+
"/v1beta/models/{model}:generateContent": {
|
|
35
|
+
parameters: {
|
|
36
|
+
query?: {
|
|
37
|
+
/** @description Data format for response. */
|
|
38
|
+
$alt?: components["parameters"]["alt"];
|
|
39
|
+
/** @description JSONP */
|
|
40
|
+
$callback?: components["parameters"]["callback"];
|
|
41
|
+
/** @description Returns response with indentations and line breaks. */
|
|
42
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
43
|
+
/** @description V1 error format. */
|
|
44
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
45
|
+
};
|
|
46
|
+
header?: never;
|
|
47
|
+
path?: never;
|
|
48
|
+
cookie?: never;
|
|
49
|
+
};
|
|
50
|
+
get?: never;
|
|
51
|
+
put?: never;
|
|
52
|
+
/** @description Generates a model response given an input `GenerateContentRequest`.
|
|
53
|
+
* Refer to the [text generation
|
|
54
|
+
* guide](https://ai.google.dev/gemini-api/docs/text-generation) for detailed
|
|
55
|
+
* usage information. Input capabilities differ between models, including
|
|
56
|
+
* tuned models. Refer to the [model
|
|
57
|
+
* guide](https://ai.google.dev/gemini-api/docs/models/gemini) and [tuning
|
|
58
|
+
* guide](https://ai.google.dev/gemini-api/docs/model-tuning) for details. */
|
|
59
|
+
post: operations["GenerateContent"];
|
|
60
|
+
delete?: never;
|
|
61
|
+
options?: never;
|
|
62
|
+
head?: never;
|
|
63
|
+
patch?: never;
|
|
64
|
+
trace?: never;
|
|
65
|
+
};
|
|
66
|
+
"/v1beta/models/{model}:embedContent": {
|
|
67
|
+
parameters: {
|
|
68
|
+
query?: {
|
|
69
|
+
/** @description Data format for response. */
|
|
70
|
+
$alt?: components["parameters"]["alt"];
|
|
71
|
+
/** @description JSONP */
|
|
72
|
+
$callback?: components["parameters"]["callback"];
|
|
73
|
+
/** @description Returns response with indentations and line breaks. */
|
|
74
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
75
|
+
/** @description V1 error format. */
|
|
76
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
77
|
+
};
|
|
78
|
+
header?: never;
|
|
79
|
+
path?: never;
|
|
80
|
+
cookie?: never;
|
|
81
|
+
};
|
|
82
|
+
get?: never;
|
|
83
|
+
put?: never;
|
|
84
|
+
/** @description Generates a text embedding vector from the input `Content` using the
|
|
85
|
+
* specified [Gemini Embedding
|
|
86
|
+
* model](https://ai.google.dev/gemini-api/docs/models/gemini#text-embedding). */
|
|
87
|
+
post: operations["EmbedContent"];
|
|
88
|
+
delete?: never;
|
|
89
|
+
options?: never;
|
|
90
|
+
head?: never;
|
|
91
|
+
patch?: never;
|
|
92
|
+
trace?: never;
|
|
93
|
+
};
|
|
94
|
+
"/v1beta/models/{model}:streamGenerateContent": {
|
|
95
|
+
parameters: {
|
|
96
|
+
query?: {
|
|
97
|
+
/** @description Data format for response. */
|
|
98
|
+
$alt?: components["parameters"]["alt"];
|
|
99
|
+
/** @description JSONP */
|
|
100
|
+
$callback?: components["parameters"]["callback"];
|
|
101
|
+
/** @description Returns response with indentations and line breaks. */
|
|
102
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
103
|
+
/** @description V1 error format. */
|
|
104
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
105
|
+
};
|
|
106
|
+
header?: never;
|
|
107
|
+
path?: never;
|
|
108
|
+
cookie?: never;
|
|
109
|
+
};
|
|
110
|
+
get?: never;
|
|
111
|
+
put?: never;
|
|
112
|
+
/** @description Generates a [streamed
|
|
113
|
+
* response](https://ai.google.dev/gemini-api/docs/text-generation?lang=python#generate-a-text-stream)
|
|
114
|
+
* from the model given an input `GenerateContentRequest`. */
|
|
115
|
+
post: operations["StreamGenerateContent"];
|
|
116
|
+
delete?: never;
|
|
117
|
+
options?: never;
|
|
118
|
+
head?: never;
|
|
119
|
+
patch?: never;
|
|
120
|
+
trace?: never;
|
|
121
|
+
};
|
|
122
|
+
"/v1beta/models/{model}": {
|
|
123
|
+
parameters: {
|
|
124
|
+
query?: {
|
|
125
|
+
/** @description Data format for response. */
|
|
126
|
+
$alt?: components["parameters"]["alt"];
|
|
127
|
+
/** @description JSONP */
|
|
128
|
+
$callback?: components["parameters"]["callback"];
|
|
129
|
+
/** @description Returns response with indentations and line breaks. */
|
|
130
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
131
|
+
/** @description V1 error format. */
|
|
132
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
133
|
+
};
|
|
134
|
+
header?: never;
|
|
135
|
+
path?: never;
|
|
136
|
+
cookie?: never;
|
|
137
|
+
};
|
|
138
|
+
/** @description Gets information about a specific `Model` such as its version number, token
|
|
139
|
+
* limits,
|
|
140
|
+
* [parameters](https://ai.google.dev/gemini-api/docs/models/generative-models#model-parameters)
|
|
141
|
+
* and other metadata. Refer to the [Gemini models
|
|
142
|
+
* guide](https://ai.google.dev/gemini-api/docs/models/gemini) for detailed
|
|
143
|
+
* model information. */
|
|
144
|
+
get: operations["GetModel"];
|
|
145
|
+
put?: never;
|
|
146
|
+
post?: never;
|
|
147
|
+
delete?: never;
|
|
148
|
+
options?: never;
|
|
149
|
+
head?: never;
|
|
150
|
+
patch?: never;
|
|
151
|
+
trace?: never;
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
export type webhooks = Record<string, never>;
|
|
155
|
+
export interface components {
|
|
156
|
+
schemas: {
|
|
157
|
+
/** @description A response from `CountTextTokens`.
|
|
158
|
+
*
|
|
159
|
+
* It returns the model's `token_count` for the `prompt`. */
|
|
160
|
+
CountTextTokensResponse: {
|
|
161
|
+
/**
|
|
162
|
+
* Format: int32
|
|
163
|
+
* @description The number of tokens that the `model` tokenizes the `prompt` into.
|
|
164
|
+
*
|
|
165
|
+
* Always non-negative.
|
|
166
|
+
*/
|
|
167
|
+
tokenCount?: number;
|
|
168
|
+
};
|
|
169
|
+
/** @description Config for thinking features. */
|
|
170
|
+
ThinkingConfig: {
|
|
171
|
+
/**
|
|
172
|
+
* @description Optional. Controls the maximum depth of the model's internal reasoning process before
|
|
173
|
+
* it produces a response. If not specified, the default is HIGH. Recommended
|
|
174
|
+
* for Gemini 3 or later models. Use with earlier models results in an error.
|
|
175
|
+
* @enum {string}
|
|
176
|
+
*/
|
|
177
|
+
thinkingLevel?: "THINKING_LEVEL_UNSPECIFIED" | "MINIMAL" | "LOW" | "MEDIUM" | "HIGH";
|
|
178
|
+
/**
|
|
179
|
+
* Format: int32
|
|
180
|
+
* @description The number of thoughts tokens that the model should generate.
|
|
181
|
+
*/
|
|
182
|
+
thinkingBudget?: number;
|
|
183
|
+
/** @description Indicates whether to include thoughts in the response.
|
|
184
|
+
* If true, thoughts are returned only when available. */
|
|
185
|
+
includeThoughts?: boolean;
|
|
186
|
+
};
|
|
187
|
+
/** @description Structured representation of a function declaration as defined by the
|
|
188
|
+
* [OpenAPI 3.03 specification](https://spec.openapis.org/oas/v3.0.3). Included
|
|
189
|
+
* in this declaration are the function name and parameters. This
|
|
190
|
+
* FunctionDeclaration is a representation of a block of code that can be used
|
|
191
|
+
* as a `Tool` by the model and executed by the client. */
|
|
192
|
+
FunctionDeclaration: {
|
|
193
|
+
/** @description Optional. Describes the output from this function in JSON Schema format. Reflects the
|
|
194
|
+
* Open API 3.03 Response Object. The Schema defines the type used for the
|
|
195
|
+
* response value of the function. */
|
|
196
|
+
response?: components["schemas"]["Schema"];
|
|
197
|
+
/** @description Optional. Describes the output from this function in JSON Schema format. The value
|
|
198
|
+
* specified by the schema is the response value of the function.
|
|
199
|
+
*
|
|
200
|
+
* This field is mutually exclusive with `response`. */
|
|
201
|
+
responseJsonSchema?: unknown;
|
|
202
|
+
/** @description Required. A brief description of the function. */
|
|
203
|
+
description: string;
|
|
204
|
+
/** @description Optional. Describes the parameters to the function in JSON Schema format. The schema
|
|
205
|
+
* must describe an object where the properties are the parameters to the
|
|
206
|
+
* function. For example:
|
|
207
|
+
*
|
|
208
|
+
* ```
|
|
209
|
+
* {
|
|
210
|
+
* "type": "object",
|
|
211
|
+
* "properties": {
|
|
212
|
+
* "name": { "type": "string" },
|
|
213
|
+
* "age": { "type": "integer" }
|
|
214
|
+
* },
|
|
215
|
+
* "additionalProperties": false,
|
|
216
|
+
* "required": ["name", "age"],
|
|
217
|
+
* "propertyOrdering": ["name", "age"]
|
|
218
|
+
* }
|
|
219
|
+
* ```
|
|
220
|
+
*
|
|
221
|
+
* This field is mutually exclusive with `parameters`. */
|
|
222
|
+
parametersJsonSchema?: unknown;
|
|
223
|
+
/** @description Required. The name of the function.
|
|
224
|
+
* Must be a-z, A-Z, 0-9, or contain underscores, colons, dots, and dashes,
|
|
225
|
+
* with a maximum length of 128. */
|
|
226
|
+
name: string;
|
|
227
|
+
/** @description Optional. Describes the parameters to this function. Reflects the Open API 3.03
|
|
228
|
+
* Parameter Object string Key: the name of the parameter. Parameter names are
|
|
229
|
+
* case sensitive. Schema Value: the Schema defining the type used for the
|
|
230
|
+
* parameter. */
|
|
231
|
+
parameters?: components["schemas"]["Schema"];
|
|
232
|
+
/**
|
|
233
|
+
* @description Optional. Specifies the function Behavior.
|
|
234
|
+
* Currently only supported by the BidiGenerateContent method.
|
|
235
|
+
* @enum {string}
|
|
236
|
+
*/
|
|
237
|
+
behavior?: "UNSPECIFIED" | "BLOCKING" | "NON_BLOCKING";
|
|
238
|
+
};
|
|
239
|
+
/** @description Response for `ImportFile` to import a File API file with a `FileSearchStore`. */
|
|
240
|
+
ImportFileResponse: {
|
|
241
|
+
/** @description The name of the `FileSearchStore` containing `Document`s.
|
|
242
|
+
* Example: `fileSearchStores/my-file-search-store-123` */
|
|
243
|
+
parent?: string;
|
|
244
|
+
/** @description Immutable. Identifier. The identifier for the `Document` imported.
|
|
245
|
+
* Example:
|
|
246
|
+
* `fileSearchStores/my-file-search-store-123/documents/my-awesome-doc-123a456b789c` */
|
|
247
|
+
documentName?: string;
|
|
248
|
+
};
|
|
249
|
+
/** @description Veo response. */
|
|
250
|
+
PredictLongRunningGeneratedVideoResponse: {
|
|
251
|
+
/** @description The generated samples. */
|
|
252
|
+
generatedSamples?: components["schemas"]["Media"][];
|
|
253
|
+
/**
|
|
254
|
+
* Format: int32
|
|
255
|
+
* @description Returns if any videos were filtered due to RAI policies.
|
|
256
|
+
*/
|
|
257
|
+
raiMediaFilteredCount?: number;
|
|
258
|
+
/** @description Returns rai failure reasons if any. */
|
|
259
|
+
raiMediaFilteredReasons?: string[];
|
|
260
|
+
};
|
|
261
|
+
/** @description Counts the number of tokens in the `prompt` sent to a model.
|
|
262
|
+
*
|
|
263
|
+
* Models may tokenize text differently, so each model may return a different
|
|
264
|
+
* `token_count`. */
|
|
265
|
+
CountTextTokensRequest: {
|
|
266
|
+
/** @description Required. The free-form input text given to the model as a prompt. */
|
|
267
|
+
prompt: components["schemas"]["TextPrompt"];
|
|
268
|
+
};
|
|
269
|
+
/** @description A `FileSearchStore` is a collection of `Document`s. */
|
|
270
|
+
FileSearchStore: {
|
|
271
|
+
/**
|
|
272
|
+
* Format: date-time
|
|
273
|
+
* @description Output only. The Timestamp of when the `FileSearchStore` was created.
|
|
274
|
+
*/
|
|
275
|
+
readonly createTime?: string;
|
|
276
|
+
/**
|
|
277
|
+
* Format: int64
|
|
278
|
+
* @description Output only. The number of documents in the `FileSearchStore` that have failed
|
|
279
|
+
* processing.
|
|
280
|
+
*/
|
|
281
|
+
readonly failedDocumentsCount?: string;
|
|
282
|
+
/**
|
|
283
|
+
* Format: int64
|
|
284
|
+
* @description Output only. The number of documents in the `FileSearchStore` that are being processed.
|
|
285
|
+
*/
|
|
286
|
+
readonly pendingDocumentsCount?: string;
|
|
287
|
+
/** @description Output only. Immutable. Identifier. The `FileSearchStore` resource name. It is an ID (name excluding the
|
|
288
|
+
* "fileSearchStores/" prefix) that can contain up to 40 characters that are
|
|
289
|
+
* lowercase alphanumeric or dashes
|
|
290
|
+
* (-). It is output only. The unique name will be derived from
|
|
291
|
+
* `display_name` along with a 12 character random suffix. Example:
|
|
292
|
+
* `fileSearchStores/my-awesome-file-search-store-123a456b789c`
|
|
293
|
+
* If `display_name` is not provided, the name will be randomly generated. */
|
|
294
|
+
readonly name?: string;
|
|
295
|
+
/** @description Optional. The human-readable display name for the `FileSearchStore`. The display name
|
|
296
|
+
* must be no more than 512 characters in length, including spaces. Example:
|
|
297
|
+
* "Docs on Semantic Retriever" */
|
|
298
|
+
displayName?: string;
|
|
299
|
+
/**
|
|
300
|
+
* Format: int64
|
|
301
|
+
* @description Output only. The number of documents in the `FileSearchStore` that are active and ready
|
|
302
|
+
* for retrieval.
|
|
303
|
+
*/
|
|
304
|
+
readonly activeDocumentsCount?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Format: date-time
|
|
307
|
+
* @description Output only. The Timestamp of when the `FileSearchStore` was last updated.
|
|
308
|
+
*/
|
|
309
|
+
readonly updateTime?: string;
|
|
310
|
+
/**
|
|
311
|
+
* Format: int64
|
|
312
|
+
* @description Output only. The size of raw bytes ingested into the `FileSearchStore`. This is the
|
|
313
|
+
* total size of all the documents in the `FileSearchStore`.
|
|
314
|
+
*/
|
|
315
|
+
readonly sizeBytes?: string;
|
|
316
|
+
};
|
|
317
|
+
/** @description Record for a single tuning step. */
|
|
318
|
+
TuningSnapshot: {
|
|
319
|
+
/**
|
|
320
|
+
* Format: date-time
|
|
321
|
+
* @description Output only. The timestamp when this metric was computed.
|
|
322
|
+
*/
|
|
323
|
+
readonly computeTime?: string;
|
|
324
|
+
/**
|
|
325
|
+
* Format: int32
|
|
326
|
+
* @description Output only. The epoch this step was part of.
|
|
327
|
+
*/
|
|
328
|
+
readonly epoch?: number;
|
|
329
|
+
/**
|
|
330
|
+
* Format: float
|
|
331
|
+
* @description Output only. The mean loss of the training examples for this step.
|
|
332
|
+
*/
|
|
333
|
+
readonly meanLoss?: number;
|
|
334
|
+
/**
|
|
335
|
+
* Format: int32
|
|
336
|
+
* @description Output only. The tuning step.
|
|
337
|
+
*/
|
|
338
|
+
readonly step?: number;
|
|
339
|
+
};
|
|
340
|
+
/** @description The request to be processed in the batch. */
|
|
341
|
+
InlinedEmbedContentRequest: {
|
|
342
|
+
/** @description Required. The request to be processed in the batch. */
|
|
343
|
+
request: components["schemas"]["EmbedContentRequest"];
|
|
344
|
+
/** @description Optional. The metadata to be associated with the request. */
|
|
345
|
+
metadata?: {
|
|
346
|
+
[key: string]: unknown;
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
/** @description An input/output example used to instruct the Model.
|
|
350
|
+
*
|
|
351
|
+
* It demonstrates how the model should respond or format its response. */
|
|
352
|
+
Example: {
|
|
353
|
+
/** @description Required. An example of an input `Message` from the user. */
|
|
354
|
+
input: components["schemas"]["Message"];
|
|
355
|
+
/** @description Required. An example of what the model should output given the input. */
|
|
356
|
+
output: components["schemas"]["Message"];
|
|
357
|
+
};
|
|
358
|
+
/** @description Request message for PredictionService.Predict. */
|
|
359
|
+
PredictRequest: {
|
|
360
|
+
/** @description Required. The instances that are the input to the prediction call. */
|
|
361
|
+
instances: unknown[];
|
|
362
|
+
/** @description Optional. The parameters that govern the prediction call. */
|
|
363
|
+
parameters?: unknown;
|
|
364
|
+
};
|
|
365
|
+
/** @description Raw media bytes.
|
|
366
|
+
*
|
|
367
|
+
* Text should not be sent as raw bytes, use the 'text' field. */
|
|
368
|
+
Blob: {
|
|
369
|
+
/** @description The IANA standard MIME type of the source data.
|
|
370
|
+
* Examples:
|
|
371
|
+
* - image/png
|
|
372
|
+
* - image/jpeg
|
|
373
|
+
* If an unsupported MIME type is provided, an error will be returned. For a
|
|
374
|
+
* complete list of supported types, see [Supported file
|
|
375
|
+
* formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats). */
|
|
376
|
+
mimeType?: string;
|
|
377
|
+
/**
|
|
378
|
+
* Format: byte
|
|
379
|
+
* @description Raw bytes for media formats.
|
|
380
|
+
*/
|
|
381
|
+
data?: string;
|
|
382
|
+
};
|
|
383
|
+
/** @enum {string} */
|
|
384
|
+
GenerativeLanguageModality: "MODALITY_UNSPECIFIED" | "TEXT" | "IMAGE" | "VIDEO" | "AUDIO" | "DOCUMENT";
|
|
385
|
+
/** @description Metadata on the generation request's token usage. */
|
|
386
|
+
UsageMetadata: {
|
|
387
|
+
/**
|
|
388
|
+
* Format: int32
|
|
389
|
+
* @description Total token count for the generation request (prompt + response
|
|
390
|
+
* candidates).
|
|
391
|
+
*/
|
|
392
|
+
totalTokenCount?: number;
|
|
393
|
+
/**
|
|
394
|
+
* Format: int32
|
|
395
|
+
* @description Output only. Number of tokens present in tool-use prompt(s).
|
|
396
|
+
*/
|
|
397
|
+
readonly toolUsePromptTokenCount?: number;
|
|
398
|
+
/** @description Output only. List of modalities of the cached content in the request input. */
|
|
399
|
+
readonly cacheTokensDetails?: components["schemas"]["ModalityTokenCount"][];
|
|
400
|
+
/**
|
|
401
|
+
* Format: int32
|
|
402
|
+
* @description Number of tokens in the prompt. When `cached_content` is set, this is
|
|
403
|
+
* still the total effective prompt size meaning this includes the number of
|
|
404
|
+
* tokens in the cached content.
|
|
405
|
+
*/
|
|
406
|
+
promptTokenCount?: number;
|
|
407
|
+
/** @description Output only. List of modalities that were returned in the response. */
|
|
408
|
+
readonly candidatesTokensDetails?: components["schemas"]["ModalityTokenCount"][];
|
|
409
|
+
/** @description Output only. List of modalities that were processed for tool-use request inputs. */
|
|
410
|
+
readonly toolUsePromptTokensDetails?: components["schemas"]["ModalityTokenCount"][];
|
|
411
|
+
/**
|
|
412
|
+
* Format: int32
|
|
413
|
+
* @description Number of tokens in the cached part of the prompt (the cached content)
|
|
414
|
+
*/
|
|
415
|
+
cachedContentTokenCount?: number;
|
|
416
|
+
/**
|
|
417
|
+
* Format: int32
|
|
418
|
+
* @description Output only. Number of tokens of thoughts for thinking models.
|
|
419
|
+
*/
|
|
420
|
+
readonly thoughtsTokenCount?: number;
|
|
421
|
+
/** @description Output only. List of modalities that were processed in the request input. */
|
|
422
|
+
readonly promptTokensDetails?: components["schemas"]["ModalityTokenCount"][];
|
|
423
|
+
/**
|
|
424
|
+
* Format: int32
|
|
425
|
+
* @description Total number of tokens across all the generated response candidates.
|
|
426
|
+
*/
|
|
427
|
+
candidatesTokenCount?: number;
|
|
428
|
+
};
|
|
429
|
+
/** @description Response from the model for a grounded answer. */
|
|
430
|
+
GenerateAnswerResponse: {
|
|
431
|
+
/** @description Candidate answer from the model.
|
|
432
|
+
*
|
|
433
|
+
* Note: The model *always* attempts to provide a grounded answer, even when
|
|
434
|
+
* the answer is unlikely to be answerable from the given passages.
|
|
435
|
+
* In that case, a low-quality or ungrounded answer may be provided, along
|
|
436
|
+
* with a low `answerable_probability`. */
|
|
437
|
+
answer?: components["schemas"]["Candidate"];
|
|
438
|
+
/**
|
|
439
|
+
* Format: float
|
|
440
|
+
* @description Output only. The model's estimate of the probability that its answer is correct and
|
|
441
|
+
* grounded in the input passages.
|
|
442
|
+
*
|
|
443
|
+
* A low `answerable_probability` indicates that the answer might not be
|
|
444
|
+
* grounded in the sources.
|
|
445
|
+
*
|
|
446
|
+
* When `answerable_probability` is low, you may want to:
|
|
447
|
+
*
|
|
448
|
+
* * Display a message to the effect of "We couldn’t answer that question" to
|
|
449
|
+
* the user.
|
|
450
|
+
* * Fall back to a general-purpose LLM that answers the question from world
|
|
451
|
+
* knowledge. The threshold and nature of such fallbacks will depend on
|
|
452
|
+
* individual use cases. `0.5` is a good starting threshold.
|
|
453
|
+
*/
|
|
454
|
+
readonly answerableProbability?: number;
|
|
455
|
+
/** @description Output only. Feedback related to the input data used to answer the question, as opposed
|
|
456
|
+
* to the model-generated response to the question.
|
|
457
|
+
*
|
|
458
|
+
* The input data can be one or more of the following:
|
|
459
|
+
*
|
|
460
|
+
* - Question specified by the last entry in `GenerateAnswerRequest.content`
|
|
461
|
+
* - Conversation history specified by the other entries in
|
|
462
|
+
* `GenerateAnswerRequest.content`
|
|
463
|
+
* - Grounding sources (`GenerateAnswerRequest.semantic_retriever` or
|
|
464
|
+
* `GenerateAnswerRequest.inline_passages`) */
|
|
465
|
+
readonly inputFeedback?: components["schemas"]["InputFeedback"];
|
|
466
|
+
};
|
|
467
|
+
/** @description Stats about the batch. */
|
|
468
|
+
EmbedContentBatchStats: {
|
|
469
|
+
/**
|
|
470
|
+
* Format: int64
|
|
471
|
+
* @description Output only. The number of requests in the batch.
|
|
472
|
+
*/
|
|
473
|
+
readonly requestCount?: string;
|
|
474
|
+
/**
|
|
475
|
+
* Format: int64
|
|
476
|
+
* @description Output only. The number of requests that were successfully processed.
|
|
477
|
+
*/
|
|
478
|
+
readonly successfulRequestCount?: string;
|
|
479
|
+
/**
|
|
480
|
+
* Format: int64
|
|
481
|
+
* @description Output only. The number of requests that are still pending processing.
|
|
482
|
+
*/
|
|
483
|
+
readonly pendingRequestCount?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Format: int64
|
|
486
|
+
* @description Output only. The number of requests that failed to be processed.
|
|
487
|
+
*/
|
|
488
|
+
readonly failedRequestCount?: string;
|
|
489
|
+
};
|
|
490
|
+
/** @description A fine-tuned model created using ModelService.CreateTunedModel. */
|
|
491
|
+
TunedModel: {
|
|
492
|
+
/** @description Optional. A short description of this model. */
|
|
493
|
+
description?: string;
|
|
494
|
+
/**
|
|
495
|
+
* Format: float
|
|
496
|
+
* @description Optional. Controls the randomness of the output.
|
|
497
|
+
*
|
|
498
|
+
* Values can range over `[0.0,1.0]`, inclusive. A value closer to `1.0` will
|
|
499
|
+
* produce responses that are more varied, while a value closer to `0.0` will
|
|
500
|
+
* typically result in less surprising responses from the model.
|
|
501
|
+
*
|
|
502
|
+
* This value specifies default to be the one used by the base model while
|
|
503
|
+
* creating the model.
|
|
504
|
+
*/
|
|
505
|
+
temperature?: number;
|
|
506
|
+
/** @description Optional. The name to display for this model in user interfaces.
|
|
507
|
+
* The display name must be up to 40 characters including spaces. */
|
|
508
|
+
displayName?: string;
|
|
509
|
+
/** @description Optional. List of project numbers that have read access to the tuned model. */
|
|
510
|
+
readerProjectNumbers?: string[];
|
|
511
|
+
/**
|
|
512
|
+
* Format: date-time
|
|
513
|
+
* @description Output only. The timestamp when this model was created.
|
|
514
|
+
*/
|
|
515
|
+
readonly createTime?: string;
|
|
516
|
+
/**
|
|
517
|
+
* Format: float
|
|
518
|
+
* @description Optional. For Nucleus sampling.
|
|
519
|
+
*
|
|
520
|
+
* Nucleus sampling considers the smallest set of tokens whose probability
|
|
521
|
+
* sum is at least `top_p`.
|
|
522
|
+
*
|
|
523
|
+
* This value specifies default to be the one used by the base model while
|
|
524
|
+
* creating the model.
|
|
525
|
+
*/
|
|
526
|
+
topP?: number;
|
|
527
|
+
/** @description Required. The tuning task that creates the tuned model. */
|
|
528
|
+
tuningTask: components["schemas"]["TuningTask"];
|
|
529
|
+
/**
|
|
530
|
+
* Format: date-time
|
|
531
|
+
* @description Output only. The timestamp when this model was updated.
|
|
532
|
+
*/
|
|
533
|
+
readonly updateTime?: string;
|
|
534
|
+
/** @description Output only. The tuned model name. A unique name will be generated on create.
|
|
535
|
+
* Example: `tunedModels/az2mb0bpw6i`
|
|
536
|
+
* If display_name is set on create, the id portion of the name will be set
|
|
537
|
+
* by concatenating the words of the display_name with hyphens and adding a
|
|
538
|
+
* random portion for uniqueness.
|
|
539
|
+
*
|
|
540
|
+
* Example:
|
|
541
|
+
*
|
|
542
|
+
* * display_name = `Sentence Translator`
|
|
543
|
+
* * name = `tunedModels/sentence-translator-u3b7m` */
|
|
544
|
+
readonly name?: string;
|
|
545
|
+
/**
|
|
546
|
+
* @description Output only. The state of the tuned model.
|
|
547
|
+
* @enum {string}
|
|
548
|
+
*/
|
|
549
|
+
readonly state?: "STATE_UNSPECIFIED" | "CREATING" | "ACTIVE" | "FAILED";
|
|
550
|
+
/** @description Immutable. The name of the `Model` to tune.
|
|
551
|
+
* Example: `models/gemini-1.5-flash-001` */
|
|
552
|
+
baseModel?: string;
|
|
553
|
+
/**
|
|
554
|
+
* Format: int32
|
|
555
|
+
* @description Optional. For Top-k sampling.
|
|
556
|
+
*
|
|
557
|
+
* Top-k sampling considers the set of `top_k` most probable tokens.
|
|
558
|
+
* This value specifies default to be used by the backend while making the
|
|
559
|
+
* call to the model.
|
|
560
|
+
*
|
|
561
|
+
* This value specifies default to be the one used by the base model while
|
|
562
|
+
* creating the model.
|
|
563
|
+
*/
|
|
564
|
+
topK?: number;
|
|
565
|
+
/** @description Optional. TunedModel to use as the starting point for training the new model. */
|
|
566
|
+
tunedModelSource?: components["schemas"]["TunedModelSource"];
|
|
567
|
+
};
|
|
568
|
+
/** @description Tuning tasks that create tuned models. */
|
|
569
|
+
TuningTask: {
|
|
570
|
+
/**
|
|
571
|
+
* Format: date-time
|
|
572
|
+
* @description Output only. The timestamp when tuning this model started.
|
|
573
|
+
*/
|
|
574
|
+
readonly startTime?: string;
|
|
575
|
+
/**
|
|
576
|
+
* Format: date-time
|
|
577
|
+
* @description Output only. The timestamp when tuning this model completed.
|
|
578
|
+
*/
|
|
579
|
+
readonly completeTime?: string;
|
|
580
|
+
/** @description Required. Input only. Immutable. The model training data. */
|
|
581
|
+
trainingData: components["schemas"]["Dataset"];
|
|
582
|
+
/** @description Output only. Metrics collected during tuning. */
|
|
583
|
+
readonly snapshots?: components["schemas"]["TuningSnapshot"][];
|
|
584
|
+
/** @description Immutable. Hyperparameters controlling the tuning process. If not provided, default
|
|
585
|
+
* values will be used. */
|
|
586
|
+
hyperparameters?: components["schemas"]["Hyperparameters"];
|
|
587
|
+
};
|
|
588
|
+
/** @description A response from `CountMessageTokens`.
|
|
589
|
+
*
|
|
590
|
+
* It returns the model's `token_count` for the `prompt`. */
|
|
591
|
+
CountMessageTokensResponse: {
|
|
592
|
+
/**
|
|
593
|
+
* Format: int32
|
|
594
|
+
* @description The number of tokens that the `model` tokenizes the `prompt` into.
|
|
595
|
+
*
|
|
596
|
+
* Always non-negative.
|
|
597
|
+
*/
|
|
598
|
+
tokenCount?: number;
|
|
599
|
+
};
|
|
600
|
+
/** @description The status of the underlying model. This is used to indicate the stage of the
|
|
601
|
+
* underlying model and the retirement time if applicable. */
|
|
602
|
+
ModelStatus: {
|
|
603
|
+
/**
|
|
604
|
+
* Format: date-time
|
|
605
|
+
* @description The time at which the model will be retired.
|
|
606
|
+
*/
|
|
607
|
+
retirementTime?: string;
|
|
608
|
+
/** @description The stage of the underlying model. */
|
|
609
|
+
modelStage?: components["schemas"]["ModelStage"];
|
|
610
|
+
/** @description A message explaining the model status. */
|
|
611
|
+
message?: string;
|
|
612
|
+
};
|
|
613
|
+
/** @description Response for `DownloadFile`. */
|
|
614
|
+
DownloadFileResponse: Record<string, never>;
|
|
615
|
+
/** @description Metadata about the state and progress of creating a tuned model returned from
|
|
616
|
+
* the long-running operation */
|
|
617
|
+
CreateTunedModelMetadata: {
|
|
618
|
+
/**
|
|
619
|
+
* Format: int32
|
|
620
|
+
* @description The total number of tuning steps.
|
|
621
|
+
*/
|
|
622
|
+
totalSteps?: number;
|
|
623
|
+
/**
|
|
624
|
+
* Format: int32
|
|
625
|
+
* @description The number of steps completed.
|
|
626
|
+
*/
|
|
627
|
+
completedSteps?: number;
|
|
628
|
+
/**
|
|
629
|
+
* Format: float
|
|
630
|
+
* @description The completed percentage for the tuning operation.
|
|
631
|
+
*/
|
|
632
|
+
completedPercent?: number;
|
|
633
|
+
/** @description Metrics collected during tuning. */
|
|
634
|
+
snapshots?: components["schemas"]["TuningSnapshot"][];
|
|
635
|
+
/** @description Name of the tuned model associated with the tuning operation. */
|
|
636
|
+
tunedModel?: string;
|
|
637
|
+
};
|
|
638
|
+
/** @description Metadata for LongRunning UploadToFileSearchStore Operations. */
|
|
639
|
+
UploadToFileSearchStoreMetadata: Record<string, never>;
|
|
640
|
+
/** @description A predicted `FunctionCall` returned from the model that contains
|
|
641
|
+
* a string representing the `FunctionDeclaration.name` with the
|
|
642
|
+
* arguments and their values. */
|
|
643
|
+
FunctionCall: {
|
|
644
|
+
/** @description Optional. The function parameters and values in JSON object format. */
|
|
645
|
+
args?: {
|
|
646
|
+
[key: string]: unknown;
|
|
647
|
+
};
|
|
648
|
+
/** @description Optional. Unique identifier of the function call. If populated, the client to
|
|
649
|
+
* execute the `function_call` and return the response with the matching `id`. */
|
|
650
|
+
id?: string;
|
|
651
|
+
/** @description Required. The name of the function to call.
|
|
652
|
+
* Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
|
|
653
|
+
* length of 128. */
|
|
654
|
+
name: string;
|
|
655
|
+
};
|
|
656
|
+
/** @description This resource represents a long-running operation where metadata and response fields are strongly typed. */
|
|
657
|
+
PredictLongRunningOperation: components["schemas"]["BaseOperation"] & {
|
|
658
|
+
metadata?: components["schemas"]["PredictLongRunningMetadata"];
|
|
659
|
+
response?: components["schemas"]["PredictLongRunningResponse"];
|
|
660
|
+
};
|
|
661
|
+
/** @description Chunk from context retrieved by the file search tool. */
|
|
662
|
+
RetrievedContext: {
|
|
663
|
+
/** @description Optional. Title of the document. */
|
|
664
|
+
title?: string;
|
|
665
|
+
/** @description Optional. Name of the `FileSearchStore` containing the document.
|
|
666
|
+
* Example: `fileSearchStores/123` */
|
|
667
|
+
fileSearchStore?: string;
|
|
668
|
+
/** @description Optional. URI reference of the semantic retrieval document. */
|
|
669
|
+
uri?: string;
|
|
670
|
+
/** @description Optional. Text of the chunk. */
|
|
671
|
+
text?: string;
|
|
672
|
+
/** @description Optional. User-provided metadata about the retrieved context. */
|
|
673
|
+
customMetadata?: components["schemas"]["GroundingChunkCustomMetadata"][];
|
|
674
|
+
};
|
|
675
|
+
/** @description Candidates with top log probabilities at each decoding step. */
|
|
676
|
+
TopCandidates: {
|
|
677
|
+
/** @description Sorted by log probability in descending order. */
|
|
678
|
+
candidates?: components["schemas"]["LogprobsResultCandidate"][];
|
|
679
|
+
};
|
|
680
|
+
/** @description Identifier for the source contributing to this attribution. */
|
|
681
|
+
AttributionSourceId: {
|
|
682
|
+
/** @description Identifier for an inline passage. */
|
|
683
|
+
groundingPassage?: components["schemas"]["GroundingPassageId"];
|
|
684
|
+
/** @description Identifier for a `Chunk` fetched via Semantic Retriever. */
|
|
685
|
+
semanticRetrieverChunk?: components["schemas"]["SemanticRetrieverChunk"];
|
|
686
|
+
};
|
|
687
|
+
/** @description Response from `TransferOwnership`. */
|
|
688
|
+
TransferOwnershipResponse: Record<string, never>;
|
|
689
|
+
/** @description A resource representing a batch of `EmbedContent` requests. */
|
|
690
|
+
EmbedContentBatch: {
|
|
691
|
+
/** @description Required. The name of the `Model` to use for generating the completion.
|
|
692
|
+
*
|
|
693
|
+
* Format: `models/{model}`. */
|
|
694
|
+
model: string;
|
|
695
|
+
/** @description Required. The user-defined name of this batch. */
|
|
696
|
+
displayName: string;
|
|
697
|
+
/** @description Output only. Identifier. Resource name of the batch.
|
|
698
|
+
*
|
|
699
|
+
* Format: `batches/{batch_id}`. */
|
|
700
|
+
readonly name?: string;
|
|
701
|
+
/** @description Output only. The output of the batch request. */
|
|
702
|
+
readonly output?: components["schemas"]["EmbedContentBatchOutput"];
|
|
703
|
+
/**
|
|
704
|
+
* Format: date-time
|
|
705
|
+
* @description Output only. The time at which the batch was last updated.
|
|
706
|
+
*/
|
|
707
|
+
readonly updateTime?: string;
|
|
708
|
+
/** @description Output only. Stats about the batch. */
|
|
709
|
+
readonly batchStats?: components["schemas"]["EmbedContentBatchStats"];
|
|
710
|
+
/**
|
|
711
|
+
* Format: date-time
|
|
712
|
+
* @description Output only. The time at which the batch was created.
|
|
713
|
+
*/
|
|
714
|
+
readonly createTime?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Format: date-time
|
|
717
|
+
* @description Output only. The time at which the batch processing completed.
|
|
718
|
+
*/
|
|
719
|
+
readonly endTime?: string;
|
|
720
|
+
/** @description Output only. The state of the batch. */
|
|
721
|
+
readonly state?: components["schemas"]["BatchState"];
|
|
722
|
+
/**
|
|
723
|
+
* Format: int64
|
|
724
|
+
* @description Optional. The priority of the batch. Batches with a higher priority value will be
|
|
725
|
+
* processed before batches with a lower priority value. Negative values are
|
|
726
|
+
* allowed. Default is 0.
|
|
727
|
+
*/
|
|
728
|
+
priority?: string;
|
|
729
|
+
/** @description Required. Input configuration of the instances on which batch processing
|
|
730
|
+
* are performed. */
|
|
731
|
+
inputConfig: components["schemas"]["InputEmbedContentConfig"];
|
|
732
|
+
};
|
|
733
|
+
/** @description Text given to the model as a prompt.
|
|
734
|
+
*
|
|
735
|
+
* The Model will use this TextPrompt to Generate a text completion. */
|
|
736
|
+
TextPrompt: {
|
|
737
|
+
/** @description Required. The prompt text. */
|
|
738
|
+
text: string;
|
|
739
|
+
};
|
|
740
|
+
/** @description The output from a server-side `ToolCall` execution. This message contains
|
|
741
|
+
* the results of a tool invocation that was initiated by a `ToolCall`
|
|
742
|
+
* from the model. The client should pass this `ToolResponse` back to the API
|
|
743
|
+
* in a subsequent turn within a `Content` message, along with the corresponding
|
|
744
|
+
* `ToolCall`. */
|
|
745
|
+
ToolResponse: {
|
|
746
|
+
/** @description Optional. The identifier of the tool call this response is for. */
|
|
747
|
+
id?: string;
|
|
748
|
+
/** @description Required. The type of tool that was called, matching the `tool_type` in the
|
|
749
|
+
* corresponding `ToolCall`. */
|
|
750
|
+
toolType: components["schemas"]["ToolType"];
|
|
751
|
+
/** @description Optional. The tool response. */
|
|
752
|
+
response?: {
|
|
753
|
+
[key: string]: unknown;
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
/** @description Configuration for retrieving grounding content from a `Corpus` or
|
|
757
|
+
* `Document` created using the Semantic Retriever API. */
|
|
758
|
+
SemanticRetrieverConfig: {
|
|
759
|
+
/** @description Optional. Filters for selecting `Document`s and/or `Chunk`s from the resource. */
|
|
760
|
+
metadataFilters?: components["schemas"]["MetadataFilter"][];
|
|
761
|
+
/** @description Required. Query to use for matching `Chunk`s in the given resource by similarity. */
|
|
762
|
+
query: components["schemas"]["Content"];
|
|
763
|
+
/** @description Required. Name of the resource for retrieval. Example: `corpora/123` or
|
|
764
|
+
* `corpora/123/documents/abc`. */
|
|
765
|
+
source: string;
|
|
766
|
+
/**
|
|
767
|
+
* Format: int32
|
|
768
|
+
* @description Optional. Maximum number of relevant `Chunk`s to retrieve.
|
|
769
|
+
*/
|
|
770
|
+
maxChunksCount?: number;
|
|
771
|
+
/**
|
|
772
|
+
* Format: float
|
|
773
|
+
* @description Optional. Minimum relevance score for retrieved relevant `Chunk`s.
|
|
774
|
+
*/
|
|
775
|
+
minimumRelevanceScore?: number;
|
|
776
|
+
};
|
|
777
|
+
/** @description Response for `RegisterFiles`. */
|
|
778
|
+
RegisterFilesResponse: {
|
|
779
|
+
/** @description The registered files to be used when calling GenerateContent. */
|
|
780
|
+
files?: components["schemas"]["File"][];
|
|
781
|
+
};
|
|
782
|
+
/** @description Logprobs Result */
|
|
783
|
+
LogprobsResult: {
|
|
784
|
+
/** @description Length = total number of decoding steps. */
|
|
785
|
+
topCandidates?: components["schemas"]["TopCandidates"][];
|
|
786
|
+
/** @description Length = total number of decoding steps.
|
|
787
|
+
* The chosen candidates may or may not be in top_candidates. */
|
|
788
|
+
chosenCandidates?: components["schemas"]["LogprobsResultCandidate"][];
|
|
789
|
+
/**
|
|
790
|
+
* Format: float
|
|
791
|
+
* @description Sum of log probabilities for all tokens.
|
|
792
|
+
*/
|
|
793
|
+
logProbabilitySum?: number;
|
|
794
|
+
};
|
|
795
|
+
/** @description Configures the input to the batch request. */
|
|
796
|
+
InputEmbedContentConfig: {
|
|
797
|
+
/** @description The requests to be processed in the batch. */
|
|
798
|
+
requests?: components["schemas"]["InlinedEmbedContentRequests"];
|
|
799
|
+
/** @description The name of the `File` containing the input requests. */
|
|
800
|
+
fileName?: string;
|
|
801
|
+
};
|
|
802
|
+
/** @description The configuration for a single speaker in a multi speaker setup. */
|
|
803
|
+
SpeakerVoiceConfig: {
|
|
804
|
+
/** @description Required. The name of the speaker to use. Should be the same as in the prompt. */
|
|
805
|
+
speaker: string;
|
|
806
|
+
/** @description Required. The configuration for the voice to use. */
|
|
807
|
+
voiceConfig: components["schemas"]["VoiceConfig"];
|
|
808
|
+
};
|
|
809
|
+
/** @description The response to an `EmbedContentRequest`. */
|
|
810
|
+
EmbedContentResponse: {
|
|
811
|
+
/** @description Output only. The embedding generated from the input content. */
|
|
812
|
+
readonly embedding?: components["schemas"]["ContentEmbedding"];
|
|
813
|
+
/** @description Output only. The usage metadata for the request. */
|
|
814
|
+
readonly usageMetadata?: components["schemas"]["EmbeddingUsageMetadata"];
|
|
815
|
+
};
|
|
816
|
+
/** @description A datatype containing media that is part of a multi-part `Content` message.
|
|
817
|
+
*
|
|
818
|
+
* A `Part` consists of data which has an associated datatype. A `Part` can only
|
|
819
|
+
* contain one of the accepted types in `Part.data`.
|
|
820
|
+
*
|
|
821
|
+
* A `Part` must have a fixed IANA MIME type identifying the type and subtype
|
|
822
|
+
* of the media if the `inline_data` field is filled with raw bytes. */
|
|
823
|
+
Part: {
|
|
824
|
+
/**
|
|
825
|
+
* Format: byte
|
|
826
|
+
* @description Optional. An opaque signature for the thought so it can be reused in subsequent
|
|
827
|
+
* requests.
|
|
828
|
+
*/
|
|
829
|
+
thoughtSignature?: string;
|
|
830
|
+
/** @description Inline text. */
|
|
831
|
+
text?: string;
|
|
832
|
+
/** @description Optional. Video metadata. The metadata should only be specified while the video
|
|
833
|
+
* data is presented in inline_data or file_data. */
|
|
834
|
+
videoMetadata?: components["schemas"]["VideoMetadata"];
|
|
835
|
+
/** @description Optional. Indicates if the part is thought from the model. */
|
|
836
|
+
thought?: boolean;
|
|
837
|
+
/** @description A predicted `FunctionCall` returned from the model that contains
|
|
838
|
+
* a string representing the `FunctionDeclaration.name` with the
|
|
839
|
+
* arguments and their values. */
|
|
840
|
+
functionCall?: components["schemas"]["FunctionCall"];
|
|
841
|
+
/** @description URI based data. */
|
|
842
|
+
fileData?: components["schemas"]["FileData"];
|
|
843
|
+
/** @description The result output of a `FunctionCall` that contains a string
|
|
844
|
+
* representing the `FunctionDeclaration.name` and a structured JSON
|
|
845
|
+
* object containing any output from the function is used as context to
|
|
846
|
+
* the model. */
|
|
847
|
+
functionResponse?: components["schemas"]["FunctionResponse"];
|
|
848
|
+
/** @description Result of executing the `ExecutableCode`. */
|
|
849
|
+
codeExecutionResult?: components["schemas"]["CodeExecutionResult"];
|
|
850
|
+
/** @description Code generated by the model that is meant to be executed. */
|
|
851
|
+
executableCode?: components["schemas"]["ExecutableCode"];
|
|
852
|
+
/** @description Custom metadata associated with the Part.
|
|
853
|
+
* Agents using genai.Part as content representation may need to keep track
|
|
854
|
+
* of the additional information. For example it can be name of a file/source
|
|
855
|
+
* from which the Part originates or a way to multiplex multiple Part streams. */
|
|
856
|
+
partMetadata?: {
|
|
857
|
+
[key: string]: unknown;
|
|
858
|
+
};
|
|
859
|
+
/** @description Optional. Media resolution for the input media. */
|
|
860
|
+
mediaResolution?: components["schemas"]["MediaResolution"];
|
|
861
|
+
/** @description Server-side tool call. This field is populated when the model
|
|
862
|
+
* predicts a tool invocation that should be executed on the server.
|
|
863
|
+
* The client is expected to echo this message back to the API. */
|
|
864
|
+
toolCall?: components["schemas"]["ToolCall"];
|
|
865
|
+
/** @description The output from a server-side `ToolCall` execution. This field is
|
|
866
|
+
* populated by the client with the results of executing the
|
|
867
|
+
* corresponding `ToolCall`. */
|
|
868
|
+
toolResponse?: components["schemas"]["ToolResponse"];
|
|
869
|
+
/** @description Inline media bytes. */
|
|
870
|
+
inlineData?: components["schemas"]["Blob"];
|
|
871
|
+
};
|
|
872
|
+
/** @description Response message for [PredictionService.PredictLongRunning] */
|
|
873
|
+
PredictLongRunningResponse: {
|
|
874
|
+
/** @description The response of the video generation prediction. */
|
|
875
|
+
generateVideoResponse?: components["schemas"]["PredictLongRunningGeneratedVideoResponse"];
|
|
876
|
+
};
|
|
877
|
+
/** @description A response candidate generated from the model. */
|
|
878
|
+
Candidate: {
|
|
879
|
+
/** @description Optional. Output only. Details the reason why the model stopped generating tokens.
|
|
880
|
+
* This is populated only when `finish_reason` is set. */
|
|
881
|
+
readonly finishMessage?: string;
|
|
882
|
+
/** @description Output only. Generated content returned from the model. */
|
|
883
|
+
readonly content?: components["schemas"]["Content"];
|
|
884
|
+
/**
|
|
885
|
+
* Format: int32
|
|
886
|
+
* @description Output only. Index of the candidate in the list of response candidates.
|
|
887
|
+
*/
|
|
888
|
+
readonly index?: number;
|
|
889
|
+
/**
|
|
890
|
+
* @description Optional. Output only. The reason why the model stopped generating tokens.
|
|
891
|
+
*
|
|
892
|
+
* If empty, the model has not stopped generating tokens.
|
|
893
|
+
* @enum {string}
|
|
894
|
+
*/
|
|
895
|
+
readonly finishReason?: "FINISH_REASON_UNSPECIFIED" | "STOP" | "MAX_TOKENS" | "SAFETY" | "RECITATION" | "LANGUAGE" | "OTHER" | "BLOCKLIST" | "PROHIBITED_CONTENT" | "SPII" | "MALFORMED_FUNCTION_CALL" | "IMAGE_SAFETY" | "IMAGE_PROHIBITED_CONTENT" | "IMAGE_OTHER" | "NO_IMAGE" | "IMAGE_RECITATION" | "UNEXPECTED_TOOL_CALL" | "TOO_MANY_TOOL_CALLS" | "MISSING_THOUGHT_SIGNATURE" | "MALFORMED_RESPONSE";
|
|
896
|
+
/** @description List of ratings for the safety of a response candidate.
|
|
897
|
+
*
|
|
898
|
+
* There is at most one rating per category. */
|
|
899
|
+
safetyRatings?: components["schemas"]["SafetyRating"][];
|
|
900
|
+
/** @description Output only. Attribution information for sources that contributed to a grounded answer.
|
|
901
|
+
*
|
|
902
|
+
* This field is populated for `GenerateAnswer` calls. */
|
|
903
|
+
readonly groundingAttributions?: components["schemas"]["GroundingAttribution"][];
|
|
904
|
+
/** @description Output only. Citation information for model-generated candidate.
|
|
905
|
+
*
|
|
906
|
+
* This field may be populated with recitation information for any text
|
|
907
|
+
* included in the `content`. These are passages that are "recited" from
|
|
908
|
+
* copyrighted material in the foundational LLM's training data. */
|
|
909
|
+
readonly citationMetadata?: components["schemas"]["CitationMetadata"];
|
|
910
|
+
/** @description Output only. Grounding metadata for the candidate.
|
|
911
|
+
*
|
|
912
|
+
* This field is populated for `GenerateContent` calls. */
|
|
913
|
+
readonly groundingMetadata?: components["schemas"]["GroundingMetadata"];
|
|
914
|
+
/**
|
|
915
|
+
* Format: double
|
|
916
|
+
* @description Output only. Average log probability score of the candidate.
|
|
917
|
+
*/
|
|
918
|
+
readonly avgLogprobs?: number;
|
|
919
|
+
/** @description Output only. Metadata related to url context retrieval tool. */
|
|
920
|
+
readonly urlContextMetadata?: components["schemas"]["UrlContextMetadata"];
|
|
921
|
+
/** @description Output only. Log-likelihood scores for the response tokens and top tokens */
|
|
922
|
+
readonly logprobsResult?: components["schemas"]["LogprobsResult"];
|
|
923
|
+
/**
|
|
924
|
+
* Format: int32
|
|
925
|
+
* @description Output only. Token count for this candidate.
|
|
926
|
+
*/
|
|
927
|
+
readonly tokenCount?: number;
|
|
928
|
+
};
|
|
929
|
+
/** @description A datatype containing media that is part of a `FunctionResponse` message.
|
|
930
|
+
*
|
|
931
|
+
* A `FunctionResponsePart` consists of data which has an associated datatype. A
|
|
932
|
+
* `FunctionResponsePart` can only contain one of the accepted types in
|
|
933
|
+
* `FunctionResponsePart.data`.
|
|
934
|
+
*
|
|
935
|
+
* A `FunctionResponsePart` must have a fixed IANA MIME type identifying the
|
|
936
|
+
* type and subtype of the media if the `inline_data` field is filled with raw
|
|
937
|
+
* bytes. */
|
|
938
|
+
FunctionResponsePart: {
|
|
939
|
+
/** @description Inline media bytes. */
|
|
940
|
+
inlineData?: components["schemas"]["FunctionResponseBlob"];
|
|
941
|
+
};
|
|
942
|
+
/** @description Content that has been preprocessed and can be used in subsequent request
|
|
943
|
+
* to GenerativeService.
|
|
944
|
+
*
|
|
945
|
+
* Cached content can be only used with model it was created for. */
|
|
946
|
+
CachedContent: {
|
|
947
|
+
/** @description Optional. Input only. Immutable. Developer set system instruction. Currently text only. */
|
|
948
|
+
systemInstruction?: components["schemas"]["Content"];
|
|
949
|
+
/** @description Output only. Metadata on the usage of the cached content. */
|
|
950
|
+
readonly usageMetadata?: components["schemas"]["CachedContentUsageMetadata"];
|
|
951
|
+
/**
|
|
952
|
+
* Format: date-time
|
|
953
|
+
* @description Output only. Creation time of the cache entry.
|
|
954
|
+
*/
|
|
955
|
+
readonly createTime?: string;
|
|
956
|
+
/**
|
|
957
|
+
* Format: date-time
|
|
958
|
+
* @description Timestamp in UTC of when this resource is considered expired.
|
|
959
|
+
* This is *always* provided on output, regardless of what was sent
|
|
960
|
+
* on input.
|
|
961
|
+
*/
|
|
962
|
+
expireTime?: string;
|
|
963
|
+
/** @description Optional. Input only. Immutable. The content to cache. */
|
|
964
|
+
contents?: components["schemas"]["Content"][];
|
|
965
|
+
/**
|
|
966
|
+
* Format: date-time
|
|
967
|
+
* @description Output only. When the cache entry was last updated in UTC time.
|
|
968
|
+
*/
|
|
969
|
+
readonly updateTime?: string;
|
|
970
|
+
/**
|
|
971
|
+
* Format: google-duration
|
|
972
|
+
* @description Input only. New TTL for this resource, input only.
|
|
973
|
+
*/
|
|
974
|
+
ttl?: string;
|
|
975
|
+
/** @description Optional. Input only. Immutable. A list of `Tools` the model may use to generate the next response */
|
|
976
|
+
tools?: components["schemas"]["Tool"][];
|
|
977
|
+
/** @description Output only. Identifier. The resource name referring to the cached content.
|
|
978
|
+
* Format: `cachedContents/{id}` */
|
|
979
|
+
readonly name?: string;
|
|
980
|
+
/** @description Optional. Immutable. The user-generated meaningful display name of the cached content. Maximum
|
|
981
|
+
* 128 Unicode characters. */
|
|
982
|
+
displayName?: string;
|
|
983
|
+
/** @description Required. Immutable. The name of the `Model` to use for cached content
|
|
984
|
+
* Format: `models/{model}` */
|
|
985
|
+
model: string;
|
|
986
|
+
/** @description Optional. Input only. Immutable. Tool config. This config is shared for all tools. */
|
|
987
|
+
toolConfig?: components["schemas"]["ToolConfig"];
|
|
988
|
+
};
|
|
989
|
+
/** @description Identifier for a part within a `GroundingPassage`. */
|
|
990
|
+
GroundingPassageId: {
|
|
991
|
+
/** @description Output only. ID of the passage matching the `GenerateAnswerRequest`'s
|
|
992
|
+
* `GroundingPassage.id`. */
|
|
993
|
+
readonly passageId?: string;
|
|
994
|
+
/**
|
|
995
|
+
* Format: int32
|
|
996
|
+
* @description Output only. Index of the part within the `GenerateAnswerRequest`'s
|
|
997
|
+
* `GroundingPassage.content`.
|
|
998
|
+
*/
|
|
999
|
+
readonly partIndex?: number;
|
|
1000
|
+
};
|
|
1001
|
+
/** @description Different types of search that can be enabled on the GoogleSearch tool. */
|
|
1002
|
+
SearchTypes: {
|
|
1003
|
+
/** @description Optional. Enables web search. Only text results are returned. */
|
|
1004
|
+
webSearch?: components["schemas"]["WebSearch"];
|
|
1005
|
+
/** @description Optional. Enables image search. Image bytes are returned. */
|
|
1006
|
+
imageSearch?: components["schemas"]["ImageSearch"];
|
|
1007
|
+
};
|
|
1008
|
+
/** @description A proto encapsulate various type of media. */
|
|
1009
|
+
Media: {
|
|
1010
|
+
/** @description Video as the only one for now. This is mimicking Vertex proto. */
|
|
1011
|
+
video?: components["schemas"]["Video"];
|
|
1012
|
+
};
|
|
1013
|
+
/** @description Request to generate a completion from the model. */
|
|
1014
|
+
GenerateContentRequest: {
|
|
1015
|
+
/** @description Required. The name of the `Model` to use for generating the completion.
|
|
1016
|
+
*
|
|
1017
|
+
* Format: `models/{model}`. */
|
|
1018
|
+
model: string;
|
|
1019
|
+
/** @description Optional. Tool configuration for any `Tool` specified in the request. Refer to the
|
|
1020
|
+
* [Function calling
|
|
1021
|
+
* guide](https://ai.google.dev/gemini-api/docs/function-calling#function_calling_mode)
|
|
1022
|
+
* for a usage example. */
|
|
1023
|
+
toolConfig?: components["schemas"]["ToolConfig"];
|
|
1024
|
+
/** @description Optional. Configuration options for model generation and outputs. */
|
|
1025
|
+
generationConfig?: components["schemas"]["GenerationConfig"];
|
|
1026
|
+
/** @description Optional. A list of `Tools` the `Model` may use to generate the next response.
|
|
1027
|
+
*
|
|
1028
|
+
* A `Tool` is a piece of code that enables the system to interact with
|
|
1029
|
+
* external systems to perform an action, or set of actions, outside of
|
|
1030
|
+
* knowledge and scope of the `Model`. Supported `Tool`s are `Function` and
|
|
1031
|
+
* `code_execution`. Refer to the [Function
|
|
1032
|
+
* calling](https://ai.google.dev/gemini-api/docs/function-calling) and the
|
|
1033
|
+
* [Code execution](https://ai.google.dev/gemini-api/docs/code-execution)
|
|
1034
|
+
* guides to learn more. */
|
|
1035
|
+
tools?: components["schemas"]["Tool"][];
|
|
1036
|
+
/** @description Required. The content of the current conversation with the model.
|
|
1037
|
+
*
|
|
1038
|
+
* For single-turn queries, this is a single instance. For multi-turn queries
|
|
1039
|
+
* like [chat](https://ai.google.dev/gemini-api/docs/text-generation#chat),
|
|
1040
|
+
* this is a repeated field that contains the conversation history and the
|
|
1041
|
+
* latest request. */
|
|
1042
|
+
contents: components["schemas"]["Content"][];
|
|
1043
|
+
/** @description Optional. The name of the content
|
|
1044
|
+
* [cached](https://ai.google.dev/gemini-api/docs/caching) to use as context
|
|
1045
|
+
* to serve the prediction. Format: `cachedContents/{cachedContent}` */
|
|
1046
|
+
cachedContent?: string;
|
|
1047
|
+
/** @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content.
|
|
1048
|
+
*
|
|
1049
|
+
* This will be enforced on the `GenerateContentRequest.contents` and
|
|
1050
|
+
* `GenerateContentResponse.candidates`. There should not be more than one
|
|
1051
|
+
* setting for each `SafetyCategory` type. The API will block any contents and
|
|
1052
|
+
* responses that fail to meet the thresholds set by these settings. This list
|
|
1053
|
+
* overrides the default settings for each `SafetyCategory` specified in the
|
|
1054
|
+
* safety_settings. If there is no `SafetySetting` for a given
|
|
1055
|
+
* `SafetyCategory` provided in the list, the API will use the default safety
|
|
1056
|
+
* setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH,
|
|
1057
|
+
* HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT,
|
|
1058
|
+
* HARM_CATEGORY_HARASSMENT, HARM_CATEGORY_CIVIC_INTEGRITY are supported.
|
|
1059
|
+
* Refer to the [guide](https://ai.google.dev/gemini-api/docs/safety-settings)
|
|
1060
|
+
* for detailed information on available safety settings. Also refer to the
|
|
1061
|
+
* [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to
|
|
1062
|
+
* learn how to incorporate safety considerations in your AI applications. */
|
|
1063
|
+
safetySettings?: components["schemas"]["SafetySetting"][];
|
|
1064
|
+
/** @description Optional. The service tier of the request. */
|
|
1065
|
+
serviceTier?: components["schemas"]["ServiceTier"];
|
|
1066
|
+
/** @description Optional. Developer set [system
|
|
1067
|
+
* instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions).
|
|
1068
|
+
* Currently, text only. */
|
|
1069
|
+
systemInstruction?: components["schemas"]["Content"];
|
|
1070
|
+
/** @description Optional. Configures the logging behavior for a given request. If set, it takes
|
|
1071
|
+
* precedence over the project-level logging config. */
|
|
1072
|
+
store?: boolean;
|
|
1073
|
+
};
|
|
1074
|
+
/** @description Counts the number of tokens in the `prompt` sent to a model.
|
|
1075
|
+
*
|
|
1076
|
+
* Models may tokenize text differently, so each model may return a different
|
|
1077
|
+
* `token_count`. */
|
|
1078
|
+
CountMessageTokensRequest: {
|
|
1079
|
+
/** @description Required. The prompt, whose token count is to be returned. */
|
|
1080
|
+
prompt: components["schemas"]["MessagePrompt"];
|
|
1081
|
+
};
|
|
1082
|
+
/** @enum {string} */
|
|
1083
|
+
ServiceTier: "unspecified" | "standard" | "flex" | "priority";
|
|
1084
|
+
/** @description This resource represents a long-running operation that is the result of a
|
|
1085
|
+
* network API call. */
|
|
1086
|
+
BaseOperation: {
|
|
1087
|
+
/** @description If the value is `false`, it means the operation is still in progress.
|
|
1088
|
+
* If `true`, the operation is completed, and either `error` or `response` is
|
|
1089
|
+
* available. */
|
|
1090
|
+
done?: boolean;
|
|
1091
|
+
/** @description The error result of the operation in case of failure or cancellation. */
|
|
1092
|
+
error?: components["schemas"]["Status"];
|
|
1093
|
+
/** @description The server-assigned name, which is only unique within the same service that
|
|
1094
|
+
* originally returns it. If you use the default HTTP mapping, the
|
|
1095
|
+
* `name` should be a resource name ending with `operations/{unique_id}`. */
|
|
1096
|
+
name?: string;
|
|
1097
|
+
};
|
|
1098
|
+
/** @description Collection of sources that provide answers about the features of a given
|
|
1099
|
+
* place in Google Maps. Each PlaceAnswerSources message corresponds to a
|
|
1100
|
+
* specific place in Google Maps. The Google Maps tool used these sources in
|
|
1101
|
+
* order to answer questions about features of the place (e.g: "does Bar Foo
|
|
1102
|
+
* have Wifi" or "is Foo Bar wheelchair accessible?"). Currently we only
|
|
1103
|
+
* support review snippets as sources. */
|
|
1104
|
+
PlaceAnswerSources: {
|
|
1105
|
+
/** @description Snippets of reviews that are used to generate answers about the
|
|
1106
|
+
* features of a given place in Google Maps. */
|
|
1107
|
+
reviewSnippets?: components["schemas"]["ReviewSnippet"][];
|
|
1108
|
+
};
|
|
1109
|
+
/** @description Metadata related to retrieval in the grounding flow. */
|
|
1110
|
+
RetrievalMetadata: {
|
|
1111
|
+
/**
|
|
1112
|
+
* Format: float
|
|
1113
|
+
* @description Optional. Score indicating how likely information from google search could help
|
|
1114
|
+
* answer the prompt. The score is in the range [0, 1], where 0 is the least
|
|
1115
|
+
* likely and 1 is the most likely. This score is only populated when
|
|
1116
|
+
* google search grounding and dynamic retrieval is enabled. It will be
|
|
1117
|
+
* compared to the threshold to determine whether to trigger google search.
|
|
1118
|
+
*/
|
|
1119
|
+
googleSearchDynamicRetrievalScore?: number;
|
|
1120
|
+
};
|
|
1121
|
+
/** @description Attribution for a source that contributed to an answer. */
|
|
1122
|
+
GroundingAttribution: {
|
|
1123
|
+
/** @description Output only. Identifier for the source contributing to this attribution. */
|
|
1124
|
+
readonly sourceId?: components["schemas"]["AttributionSourceId"];
|
|
1125
|
+
/** @description Grounding source content that makes up this attribution. */
|
|
1126
|
+
content?: components["schemas"]["Content"];
|
|
1127
|
+
};
|
|
1128
|
+
/** @description Parameters for telling the service how to chunk the file.
|
|
1129
|
+
* inspired by
|
|
1130
|
+
* google3/cloud/ai/platform/extension/lib/retrieval/config/chunker_config.proto */
|
|
1131
|
+
ChunkingConfig: {
|
|
1132
|
+
/** @description White space chunking configuration. */
|
|
1133
|
+
whiteSpaceConfig?: components["schemas"]["WhiteSpaceConfig"];
|
|
1134
|
+
};
|
|
1135
|
+
/** @description This resource represents a long-running operation where metadata and response fields are strongly typed. */
|
|
1136
|
+
BatchGenerateContentOperation: components["schemas"]["BaseOperation"] & {
|
|
1137
|
+
metadata?: components["schemas"]["GenerateContentBatch"];
|
|
1138
|
+
response?: components["schemas"]["BatchGenerateContentResponse"];
|
|
1139
|
+
};
|
|
1140
|
+
/** @description Response from `ListModel` containing a paginated list of Models. */
|
|
1141
|
+
ListModelsResponse: {
|
|
1142
|
+
/** @description A token, which can be sent as `page_token` to retrieve the next page.
|
|
1143
|
+
*
|
|
1144
|
+
* If this field is omitted, there are no more pages. */
|
|
1145
|
+
nextPageToken?: string;
|
|
1146
|
+
/** @description The returned Models. */
|
|
1147
|
+
models?: components["schemas"]["Model"][];
|
|
1148
|
+
};
|
|
1149
|
+
/** @description Response from `ListCorpora` containing a paginated list of `Corpora`.
|
|
1150
|
+
* The results are sorted by ascending `corpus.create_time`. */
|
|
1151
|
+
ListCorporaResponse: {
|
|
1152
|
+
/** @description The returned corpora. */
|
|
1153
|
+
corpora?: components["schemas"]["Corpus"][];
|
|
1154
|
+
/** @description A token, which can be sent as `page_token` to retrieve the next page.
|
|
1155
|
+
* If this field is omitted, there are no more pages. */
|
|
1156
|
+
nextPageToken?: string;
|
|
1157
|
+
};
|
|
1158
|
+
/** @description The response to a EmbedTextRequest. */
|
|
1159
|
+
BatchEmbedTextResponse: {
|
|
1160
|
+
/** @description Output only. The embeddings generated from the input text. */
|
|
1161
|
+
readonly embeddings?: components["schemas"]["Embedding"][];
|
|
1162
|
+
};
|
|
1163
|
+
/** @enum {string} */
|
|
1164
|
+
Type: "TYPE_UNSPECIFIED" | "STRING" | "NUMBER" | "INTEGER" | "BOOLEAN" | "ARRAY" | "OBJECT" | "NULL";
|
|
1165
|
+
/** @description Stats about the batch. */
|
|
1166
|
+
BatchStats: {
|
|
1167
|
+
/**
|
|
1168
|
+
* Format: int64
|
|
1169
|
+
* @description Output only. The number of requests that were successfully processed.
|
|
1170
|
+
*/
|
|
1171
|
+
readonly successfulRequestCount?: string;
|
|
1172
|
+
/**
|
|
1173
|
+
* Format: int64
|
|
1174
|
+
* @description Output only. The number of requests that are still pending processing.
|
|
1175
|
+
*/
|
|
1176
|
+
readonly pendingRequestCount?: string;
|
|
1177
|
+
/**
|
|
1178
|
+
* Format: int64
|
|
1179
|
+
* @description Output only. The number of requests that failed to be processed.
|
|
1180
|
+
*/
|
|
1181
|
+
readonly failedRequestCount?: string;
|
|
1182
|
+
/**
|
|
1183
|
+
* Format: int64
|
|
1184
|
+
* @description Output only. The number of requests in the batch.
|
|
1185
|
+
*/
|
|
1186
|
+
readonly requestCount?: string;
|
|
1187
|
+
};
|
|
1188
|
+
/** @description Request for `CreateFile`. */
|
|
1189
|
+
CreateFileRequest: {
|
|
1190
|
+
/** @description Optional. Metadata for the file to create. */
|
|
1191
|
+
file?: components["schemas"]["File"];
|
|
1192
|
+
};
|
|
1193
|
+
/** @description Request to transfer the ownership of the tuned model. */
|
|
1194
|
+
TransferOwnershipRequest: {
|
|
1195
|
+
/** @description Required. The email address of the user to whom the tuned model is being transferred
|
|
1196
|
+
* to. */
|
|
1197
|
+
emailAddress: string;
|
|
1198
|
+
};
|
|
1199
|
+
/** @description Config for image generation features. */
|
|
1200
|
+
ImageConfig: {
|
|
1201
|
+
/** @description Optional. The aspect ratio of the image to generate. Supported aspect ratios: `1:1`,
|
|
1202
|
+
* `1:4`, `4:1`, `1:8`, `8:1`, `2:3`, `3:2`, `3:4`, `4:3`, `4:5`, `5:4`,
|
|
1203
|
+
* `9:16`, `16:9`, or `21:9`.
|
|
1204
|
+
*
|
|
1205
|
+
* If not specified, the model will choose a default aspect ratio based on any
|
|
1206
|
+
* reference images provided. */
|
|
1207
|
+
aspectRatio?: string;
|
|
1208
|
+
/** @description Optional. Specifies the size of generated images. Supported values are `512`, `1K`,
|
|
1209
|
+
* `2K`, `4K`. If not specified, the model will use default value `1K`. */
|
|
1210
|
+
imageSize?: string;
|
|
1211
|
+
};
|
|
1212
|
+
/** @description Hyperparameters controlling the tuning process. Read more at
|
|
1213
|
+
* https://ai.google.dev/docs/model_tuning_guidance */
|
|
1214
|
+
Hyperparameters: {
|
|
1215
|
+
/**
|
|
1216
|
+
* Format: int32
|
|
1217
|
+
* @description Immutable. The batch size hyperparameter for tuning.
|
|
1218
|
+
* If not set, a default of 4 or 16 will be used based on the number of
|
|
1219
|
+
* training examples.
|
|
1220
|
+
*/
|
|
1221
|
+
batchSize?: number;
|
|
1222
|
+
/**
|
|
1223
|
+
* Format: float
|
|
1224
|
+
* @description Optional. Immutable. The learning rate hyperparameter for tuning.
|
|
1225
|
+
* If not set, a default of 0.001 or 0.0002 will be calculated based on the
|
|
1226
|
+
* number of training examples.
|
|
1227
|
+
*/
|
|
1228
|
+
learningRate?: number;
|
|
1229
|
+
/**
|
|
1230
|
+
* Format: float
|
|
1231
|
+
* @description Optional. Immutable. The learning rate multiplier is used to calculate a final learning_rate
|
|
1232
|
+
* based on the default (recommended) value.
|
|
1233
|
+
* Actual learning rate := learning_rate_multiplier * default learning rate
|
|
1234
|
+
* Default learning rate is dependent on base model and dataset size.
|
|
1235
|
+
* If not set, a default of 1.0 will be used.
|
|
1236
|
+
*/
|
|
1237
|
+
learningRateMultiplier?: number;
|
|
1238
|
+
/**
|
|
1239
|
+
* Format: int32
|
|
1240
|
+
* @description Immutable. The number of training epochs. An epoch is one pass through the training
|
|
1241
|
+
* data.
|
|
1242
|
+
* If not set, a default of 5 will be used.
|
|
1243
|
+
*/
|
|
1244
|
+
epochCount?: number;
|
|
1245
|
+
};
|
|
1246
|
+
/** @description Response from `ListFileSearchStores` containing a paginated list of
|
|
1247
|
+
* `FileSearchStores`. The results are sorted by ascending
|
|
1248
|
+
* `file_search_store.create_time`. */
|
|
1249
|
+
ListFileSearchStoresResponse: {
|
|
1250
|
+
/** @description The returned rag_stores. */
|
|
1251
|
+
fileSearchStores?: components["schemas"]["FileSearchStore"][];
|
|
1252
|
+
/** @description A token, which can be sent as `page_token` to retrieve the next page.
|
|
1253
|
+
* If this field is omitted, there are no more pages. */
|
|
1254
|
+
nextPageToken?: string;
|
|
1255
|
+
};
|
|
1256
|
+
/** @description The Tool configuration containing parameters for specifying `Tool` use
|
|
1257
|
+
* in the request. */
|
|
1258
|
+
ToolConfig: {
|
|
1259
|
+
/** @description Optional. Function calling config. */
|
|
1260
|
+
functionCallingConfig?: components["schemas"]["FunctionCallingConfig"];
|
|
1261
|
+
/** @description Optional. Retrieval config. */
|
|
1262
|
+
retrievalConfig?: components["schemas"]["RetrievalConfig"];
|
|
1263
|
+
/** @description Optional. If true, the API response will include the server-side tool calls and
|
|
1264
|
+
* responses within the `Content` message. This allows clients to
|
|
1265
|
+
* observe the server's tool interactions. */
|
|
1266
|
+
includeServerSideToolInvocations?: boolean;
|
|
1267
|
+
};
|
|
1268
|
+
/** @description Request for `ImportFile` to import a File API file with a `FileSearchStore`. */
|
|
1269
|
+
ImportFileRequest: {
|
|
1270
|
+
/** @description Optional. Config for telling the service how to chunk the file.
|
|
1271
|
+
* If not provided, the service will use default parameters. */
|
|
1272
|
+
chunkingConfig?: components["schemas"]["ChunkingConfig"];
|
|
1273
|
+
/** @description Required. The name of the `File` to import.
|
|
1274
|
+
* Example: `files/abc-123` */
|
|
1275
|
+
fileName: string;
|
|
1276
|
+
/** @description Custom metadata to be associated with the file. */
|
|
1277
|
+
customMetadata?: components["schemas"]["CustomMetadata"][];
|
|
1278
|
+
};
|
|
1279
|
+
/** @description Response from the model supporting multiple candidate responses.
|
|
1280
|
+
*
|
|
1281
|
+
* Safety ratings and content filtering are reported for both
|
|
1282
|
+
* prompt in `GenerateContentResponse.prompt_feedback` and for each candidate
|
|
1283
|
+
* in `finish_reason` and in `safety_ratings`. The API:
|
|
1284
|
+
* - Returns either all requested candidates or none of them
|
|
1285
|
+
* - Returns no candidates at all only if there was something wrong with the
|
|
1286
|
+
* prompt (check `prompt_feedback`)
|
|
1287
|
+
* - Reports feedback on each candidate in `finish_reason` and
|
|
1288
|
+
* `safety_ratings`. */
|
|
1289
|
+
GenerateContentResponse: {
|
|
1290
|
+
/** @description Candidate responses from the model. */
|
|
1291
|
+
candidates?: components["schemas"]["Candidate"][];
|
|
1292
|
+
/** @description Output only. The model version used to generate the response. */
|
|
1293
|
+
readonly modelVersion?: string;
|
|
1294
|
+
/** @description Output only. Metadata on the generation requests' token usage. */
|
|
1295
|
+
readonly usageMetadata?: components["schemas"]["UsageMetadata"];
|
|
1296
|
+
/** @description Returns the prompt's feedback related to the content filters. */
|
|
1297
|
+
promptFeedback?: components["schemas"]["PromptFeedback"];
|
|
1298
|
+
/** @description Output only. The current model status of this model. */
|
|
1299
|
+
readonly modelStatus?: components["schemas"]["ModelStatus"];
|
|
1300
|
+
/** @description Output only. response_id is used to identify each response. */
|
|
1301
|
+
readonly responseId?: string;
|
|
1302
|
+
};
|
|
1303
|
+
/** @description Google search entry point. */
|
|
1304
|
+
SearchEntryPoint: {
|
|
1305
|
+
/** @description Optional. Web content snippet that can be embedded in a web page or an app webview. */
|
|
1306
|
+
renderedContent?: string;
|
|
1307
|
+
/**
|
|
1308
|
+
* Format: byte
|
|
1309
|
+
* @description Optional. Base64 encoded JSON representing array of tuple.
|
|
1310
|
+
*/
|
|
1311
|
+
sdkBlob?: string;
|
|
1312
|
+
};
|
|
1313
|
+
/** @description An object that represents a latitude/longitude pair. This is expressed as a
|
|
1314
|
+
* pair of doubles to represent degrees latitude and degrees longitude. Unless
|
|
1315
|
+
* specified otherwise, this object must conform to the
|
|
1316
|
+
* WGS84 standard. Values must be within normalized ranges. */
|
|
1317
|
+
LatLng: {
|
|
1318
|
+
/**
|
|
1319
|
+
* Format: double
|
|
1320
|
+
* @description The latitude in degrees. It must be in the range [-90.0, +90.0].
|
|
1321
|
+
*/
|
|
1322
|
+
latitude?: number;
|
|
1323
|
+
/**
|
|
1324
|
+
* Format: double
|
|
1325
|
+
* @description The longitude in degrees. It must be in the range [-180.0, +180.0].
|
|
1326
|
+
*/
|
|
1327
|
+
longitude?: number;
|
|
1328
|
+
};
|
|
1329
|
+
/** @description A file uploaded to the API.
|
|
1330
|
+
* Next ID: 15 */
|
|
1331
|
+
File: {
|
|
1332
|
+
/** @description Output only. The uri of the `File`. */
|
|
1333
|
+
readonly uri?: string;
|
|
1334
|
+
/**
|
|
1335
|
+
* @description Output only. Processing state of the File.
|
|
1336
|
+
* @enum {string}
|
|
1337
|
+
*/
|
|
1338
|
+
readonly state?: "STATE_UNSPECIFIED" | "PROCESSING" | "ACTIVE" | "FAILED";
|
|
1339
|
+
/** @description Output only. The download uri of the `File`. */
|
|
1340
|
+
readonly downloadUri?: string;
|
|
1341
|
+
/** @description Immutable. Identifier. The `File` resource name. The ID (name excluding the "files/" prefix) can
|
|
1342
|
+
* contain up to 40 characters that are lowercase alphanumeric or dashes (-).
|
|
1343
|
+
* The ID cannot start or end with a dash. If the name is empty on create, a
|
|
1344
|
+
* unique name will be generated.
|
|
1345
|
+
* Example: `files/123-456` */
|
|
1346
|
+
name?: string;
|
|
1347
|
+
/** @description Output only. MIME type of the file. */
|
|
1348
|
+
readonly mimeType?: string;
|
|
1349
|
+
/**
|
|
1350
|
+
* @description Source of the File.
|
|
1351
|
+
* @enum {string}
|
|
1352
|
+
*/
|
|
1353
|
+
source?: "SOURCE_UNSPECIFIED" | "UPLOADED" | "GENERATED" | "REGISTERED";
|
|
1354
|
+
/**
|
|
1355
|
+
* Format: date-time
|
|
1356
|
+
* @description Output only. The timestamp of when the `File` was last updated.
|
|
1357
|
+
*/
|
|
1358
|
+
readonly updateTime?: string;
|
|
1359
|
+
/**
|
|
1360
|
+
* Format: date-time
|
|
1361
|
+
* @description Output only. The timestamp of when the `File` was created.
|
|
1362
|
+
*/
|
|
1363
|
+
readonly createTime?: string;
|
|
1364
|
+
/**
|
|
1365
|
+
* Format: int64
|
|
1366
|
+
* @description Output only. Size of the file in bytes.
|
|
1367
|
+
*/
|
|
1368
|
+
readonly sizeBytes?: string;
|
|
1369
|
+
/**
|
|
1370
|
+
* Format: byte
|
|
1371
|
+
* @description Output only. SHA-256 hash of the uploaded bytes.
|
|
1372
|
+
*/
|
|
1373
|
+
readonly sha256Hash?: string;
|
|
1374
|
+
/**
|
|
1375
|
+
* Format: date-time
|
|
1376
|
+
* @description Output only. The timestamp of when the `File` will be deleted. Only set if the `File` is
|
|
1377
|
+
* scheduled to expire.
|
|
1378
|
+
*/
|
|
1379
|
+
readonly expirationTime?: string;
|
|
1380
|
+
/** @description Output only. Metadata for a video. */
|
|
1381
|
+
readonly videoMetadata?: components["schemas"]["VideoFileMetadata"];
|
|
1382
|
+
/** @description Optional. The human-readable display name for the `File`. The display name must be
|
|
1383
|
+
* no more than 512 characters in length, including spaces.
|
|
1384
|
+
* Example: "Welcome Image" */
|
|
1385
|
+
displayName?: string;
|
|
1386
|
+
/** @description Output only. Error status if File processing failed. */
|
|
1387
|
+
readonly error?: components["schemas"]["Status"];
|
|
1388
|
+
};
|
|
1389
|
+
/** @description Feedback related to the input data used to answer the question, as opposed
|
|
1390
|
+
* to the model-generated response to the question. */
|
|
1391
|
+
InputFeedback: {
|
|
1392
|
+
/** @description Ratings for safety of the input.
|
|
1393
|
+
* There is at most one rating per category. */
|
|
1394
|
+
safetyRatings?: components["schemas"]["SafetyRating"][];
|
|
1395
|
+
/**
|
|
1396
|
+
* @description Optional. If set, the input was blocked and no candidates are returned.
|
|
1397
|
+
* Rephrase the input.
|
|
1398
|
+
* @enum {string}
|
|
1399
|
+
*/
|
|
1400
|
+
blockReason?: "BLOCK_REASON_UNSPECIFIED" | "SAFETY" | "OTHER";
|
|
1401
|
+
};
|
|
1402
|
+
/** @description Response from `ListTunedModels` containing a paginated list of Models. */
|
|
1403
|
+
ListTunedModelsResponse: {
|
|
1404
|
+
/** @description The returned Models. */
|
|
1405
|
+
tunedModels?: components["schemas"]["TunedModel"][];
|
|
1406
|
+
/** @description A token, which can be sent as `page_token` to retrieve the next page.
|
|
1407
|
+
*
|
|
1408
|
+
* If this field is omitted, there are no more pages. */
|
|
1409
|
+
nextPageToken?: string;
|
|
1410
|
+
};
|
|
1411
|
+
/** @enum {string} */
|
|
1412
|
+
ModelStage: "MODEL_STAGE_UNSPECIFIED" | "UNSTABLE_EXPERIMENTAL" | "EXPERIMENTAL" | "PREVIEW" | "STABLE" | "LEGACY" | "DEPRECATED" | "RETIRED";
|
|
1413
|
+
/** @description A repeated list of passages. */
|
|
1414
|
+
GroundingPassages: {
|
|
1415
|
+
/** @description List of passages. */
|
|
1416
|
+
passages?: components["schemas"]["GroundingPassage"][];
|
|
1417
|
+
};
|
|
1418
|
+
/** @description GoogleSearch tool type.
|
|
1419
|
+
* Tool to support Google Search in Model. Powered by Google. */
|
|
1420
|
+
GoogleSearch: {
|
|
1421
|
+
/** @description Optional. The set of search types to enable. If not set, web search is
|
|
1422
|
+
* enabled by default. */
|
|
1423
|
+
searchTypes?: components["schemas"]["SearchTypes"];
|
|
1424
|
+
/** @description Optional. Filter search results to a specific time range.
|
|
1425
|
+
* If customers set a start time, they must set an end time (and vice
|
|
1426
|
+
* versa). */
|
|
1427
|
+
timeRangeFilter?: components["schemas"]["Interval"];
|
|
1428
|
+
};
|
|
1429
|
+
/** @description A set of the feedback metadata the prompt specified in
|
|
1430
|
+
* `GenerateContentRequest.content`. */
|
|
1431
|
+
PromptFeedback: {
|
|
1432
|
+
/** @description Ratings for safety of the prompt.
|
|
1433
|
+
* There is at most one rating per category. */
|
|
1434
|
+
safetyRatings?: components["schemas"]["SafetyRating"][];
|
|
1435
|
+
/**
|
|
1436
|
+
* @description Optional. If set, the prompt was blocked and no candidates are returned.
|
|
1437
|
+
* Rephrase the prompt.
|
|
1438
|
+
* @enum {string}
|
|
1439
|
+
*/
|
|
1440
|
+
blockReason?: "BLOCK_REASON_UNSPECIFIED" | "SAFETY" | "OTHER" | "BLOCKLIST" | "PROHIBITED_CONTENT" | "IMAGE_SAFETY";
|
|
1441
|
+
};
|
|
1442
|
+
/** @description This resource represents a long-running operation where metadata and response fields are strongly typed. */
|
|
1443
|
+
UploadToFileSearchStoreOperation: components["schemas"]["BaseOperation"] & {
|
|
1444
|
+
metadata?: components["schemas"]["UploadToFileSearchStoreMetadata"];
|
|
1445
|
+
response?: components["schemas"]["UploadToFileSearchStoreResponse"];
|
|
1446
|
+
};
|
|
1447
|
+
/** @description Batch request to get a text embedding from the model. */
|
|
1448
|
+
BatchEmbedTextRequest: {
|
|
1449
|
+
/** @description Optional. Embed requests for the batch. Only one of `texts` or `requests` can be set. */
|
|
1450
|
+
requests?: components["schemas"]["EmbedTextRequest"][];
|
|
1451
|
+
/** @description Optional. The free-form input texts that the model will turn into an embedding. The
|
|
1452
|
+
* current limit is 100 texts, over which an error will be thrown. */
|
|
1453
|
+
texts?: string[];
|
|
1454
|
+
};
|
|
1455
|
+
/** @description A `GroundingChunk` represents a segment of supporting evidence that grounds
|
|
1456
|
+
* the model's response. It can be a chunk from the web, a retrieved context
|
|
1457
|
+
* from a file, or information from Google Maps. */
|
|
1458
|
+
GroundingChunk: {
|
|
1459
|
+
/** @description Grounding chunk from the web. */
|
|
1460
|
+
web?: components["schemas"]["Web"];
|
|
1461
|
+
/** @description Optional. Grounding chunk from context retrieved by the file search tool. */
|
|
1462
|
+
retrievedContext?: components["schemas"]["RetrievedContext"];
|
|
1463
|
+
/** @description Optional. Grounding chunk from image search. */
|
|
1464
|
+
image?: components["schemas"]["Image"];
|
|
1465
|
+
/** @description Optional. Grounding chunk from Google Maps. */
|
|
1466
|
+
maps?: components["schemas"]["Maps"];
|
|
1467
|
+
};
|
|
1468
|
+
/** @description User provided filter to limit retrieval based on `Chunk` or `Document` level
|
|
1469
|
+
* metadata values.
|
|
1470
|
+
* Example (genre = drama OR genre = action):
|
|
1471
|
+
* key = "document.custom_metadata.genre"
|
|
1472
|
+
* conditions = [{string_value = "drama", operation = EQUAL},
|
|
1473
|
+
* {string_value = "action", operation = EQUAL}] */
|
|
1474
|
+
MetadataFilter: {
|
|
1475
|
+
/** @description Required. The key of the metadata to filter on. */
|
|
1476
|
+
key: string;
|
|
1477
|
+
/** @description Required. The `Condition`s for the given key that will trigger this filter. Multiple
|
|
1478
|
+
* `Condition`s are joined by logical ORs. */
|
|
1479
|
+
conditions: components["schemas"]["Condition"][];
|
|
1480
|
+
};
|
|
1481
|
+
/** @description The response to a single request in the batch. */
|
|
1482
|
+
InlinedResponse: {
|
|
1483
|
+
/** @description Output only. The response to the request. */
|
|
1484
|
+
readonly response?: components["schemas"]["GenerateContentResponse"];
|
|
1485
|
+
/** @description Output only. The metadata associated with the request. */
|
|
1486
|
+
readonly metadata?: {
|
|
1487
|
+
[key: string]: unknown;
|
|
1488
|
+
};
|
|
1489
|
+
/** @description Output only. The error encountered while processing the request. */
|
|
1490
|
+
readonly error?: components["schemas"]["Status"];
|
|
1491
|
+
};
|
|
1492
|
+
/** @description The request to be processed in the batch. */
|
|
1493
|
+
InlinedRequest: {
|
|
1494
|
+
/** @description Optional. The metadata to be associated with the request. */
|
|
1495
|
+
metadata?: {
|
|
1496
|
+
[key: string]: unknown;
|
|
1497
|
+
};
|
|
1498
|
+
/** @description Required. The request to be processed in the batch. */
|
|
1499
|
+
request: components["schemas"]["GenerateContentRequest"];
|
|
1500
|
+
};
|
|
1501
|
+
/** @description A response from `CountTokens`.
|
|
1502
|
+
*
|
|
1503
|
+
* It returns the model's `token_count` for the `prompt`. */
|
|
1504
|
+
CountTokensResponse: {
|
|
1505
|
+
/** @description Output only. List of modalities that were processed in the request input. */
|
|
1506
|
+
readonly promptTokensDetails?: components["schemas"]["ModalityTokenCount"][];
|
|
1507
|
+
/**
|
|
1508
|
+
* Format: int32
|
|
1509
|
+
* @description The number of tokens that the `Model` tokenizes the `prompt` into. Always
|
|
1510
|
+
* non-negative.
|
|
1511
|
+
*/
|
|
1512
|
+
totalTokens?: number;
|
|
1513
|
+
/** @description Output only. List of modalities that were processed in the cached content. */
|
|
1514
|
+
readonly cacheTokensDetails?: components["schemas"]["ModalityTokenCount"][];
|
|
1515
|
+
/**
|
|
1516
|
+
* Format: int32
|
|
1517
|
+
* @description Number of tokens in the cached part of the prompt (the cached content).
|
|
1518
|
+
*/
|
|
1519
|
+
cachedContentTokenCount?: number;
|
|
1520
|
+
};
|
|
1521
|
+
/** @description Content filtering metadata associated with processing a single request.
|
|
1522
|
+
*
|
|
1523
|
+
* ContentFilter contains a reason and an optional supporting string. The reason
|
|
1524
|
+
* may be unspecified. */
|
|
1525
|
+
ContentFilter: {
|
|
1526
|
+
/**
|
|
1527
|
+
* @description The reason content was blocked during request processing.
|
|
1528
|
+
* @enum {string}
|
|
1529
|
+
*/
|
|
1530
|
+
reason?: "BLOCKED_REASON_UNSPECIFIED" | "SAFETY" | "OTHER";
|
|
1531
|
+
/** @description A string that describes the filtering behavior in more detail. */
|
|
1532
|
+
message?: string;
|
|
1533
|
+
};
|
|
1534
|
+
/** @description A collection of source attributions for a piece of content. */
|
|
1535
|
+
CitationMetadata: {
|
|
1536
|
+
/** @description Citations to sources for a specific response. */
|
|
1537
|
+
citationSources?: components["schemas"]["CitationSource"][];
|
|
1538
|
+
};
|
|
1539
|
+
/** @description Tool details that the model may use to generate response.
|
|
1540
|
+
*
|
|
1541
|
+
* A `Tool` is a piece of code that enables the system to interact with
|
|
1542
|
+
* external systems to perform an action, or set of actions, outside of
|
|
1543
|
+
* knowledge and scope of the model.
|
|
1544
|
+
*
|
|
1545
|
+
* Next ID: 16 */
|
|
1546
|
+
Tool: {
|
|
1547
|
+
/** @description Optional. MCP Servers to connect to. */
|
|
1548
|
+
mcpServers?: components["schemas"]["McpServer"][];
|
|
1549
|
+
/** @description Optional. GoogleSearch tool type.
|
|
1550
|
+
* Tool to support Google Search in Model. Powered by Google. */
|
|
1551
|
+
googleSearch?: components["schemas"]["GoogleSearch"];
|
|
1552
|
+
/** @description Optional. A list of `FunctionDeclarations` available to the model that can be used
|
|
1553
|
+
* for function calling.
|
|
1554
|
+
*
|
|
1555
|
+
* The model or system does not execute the function. Instead the defined
|
|
1556
|
+
* function may be returned as a FunctionCall
|
|
1557
|
+
* with arguments to the client side for execution. The model may decide to
|
|
1558
|
+
* call a subset of these functions by populating
|
|
1559
|
+
* FunctionCall in the response. The next
|
|
1560
|
+
* conversation turn may contain a
|
|
1561
|
+
* FunctionResponse
|
|
1562
|
+
* with the Content.role "function" generation context for the next model
|
|
1563
|
+
* turn. */
|
|
1564
|
+
functionDeclarations?: components["schemas"]["FunctionDeclaration"][];
|
|
1565
|
+
/** @description Optional. Retrieval tool that is powered by Google search. */
|
|
1566
|
+
googleSearchRetrieval?: components["schemas"]["GoogleSearchRetrieval"];
|
|
1567
|
+
/** @description Optional. Tool that allows grounding the model's response with geospatial context
|
|
1568
|
+
* related to the user's query. */
|
|
1569
|
+
googleMaps?: components["schemas"]["GoogleMaps"];
|
|
1570
|
+
/** @description Optional. Tool to support the model interacting directly with the computer.
|
|
1571
|
+
* If enabled, it automatically populates computer-use specific Function
|
|
1572
|
+
* Declarations. */
|
|
1573
|
+
computerUse?: components["schemas"]["ComputerUse"];
|
|
1574
|
+
/** @description Optional. Tool to support URL context retrieval. */
|
|
1575
|
+
urlContext?: components["schemas"]["UrlContext"];
|
|
1576
|
+
/** @description Optional. Enables the model to execute code as part of generation. */
|
|
1577
|
+
codeExecution?: components["schemas"]["CodeExecution"];
|
|
1578
|
+
/** @description Optional. FileSearch tool type.
|
|
1579
|
+
* Tool to retrieve knowledge from Semantic Retrieval corpora. */
|
|
1580
|
+
fileSearch?: components["schemas"]["FileSearch"];
|
|
1581
|
+
};
|
|
1582
|
+
/** @description The `Schema` object allows the definition of input and output data types.
|
|
1583
|
+
* These types can be objects, but also primitives and arrays.
|
|
1584
|
+
* Represents a select subset of an [OpenAPI 3.0 schema
|
|
1585
|
+
* object](https://spec.openapis.org/oas/v3.0.3#schema). */
|
|
1586
|
+
Schema: {
|
|
1587
|
+
/** @description Optional. The title of the schema. */
|
|
1588
|
+
title?: string;
|
|
1589
|
+
/** @description Optional. Schema of the elements of Type.ARRAY. */
|
|
1590
|
+
items?: components["schemas"]["Schema"];
|
|
1591
|
+
/** @description Optional. Properties of Type.OBJECT. */
|
|
1592
|
+
properties?: {
|
|
1593
|
+
[key: string]: components["schemas"]["Schema"];
|
|
1594
|
+
};
|
|
1595
|
+
/**
|
|
1596
|
+
* Format: int64
|
|
1597
|
+
* @description Optional. Maximum number of the properties for Type.OBJECT.
|
|
1598
|
+
*/
|
|
1599
|
+
maxProperties?: string;
|
|
1600
|
+
/**
|
|
1601
|
+
* Format: int64
|
|
1602
|
+
* @description Optional. Maximum length of the Type.STRING
|
|
1603
|
+
*/
|
|
1604
|
+
maxLength?: string;
|
|
1605
|
+
/** @description Optional. Possible values of the element of Type.STRING with enum format.
|
|
1606
|
+
* For example we can define an Enum Direction as :
|
|
1607
|
+
* {type:STRING, format:enum, enum:["EAST", NORTH", "SOUTH", "WEST"]} */
|
|
1608
|
+
enum?: string[];
|
|
1609
|
+
/** @description Optional. The value should be validated against any (one or more) of the subschemas
|
|
1610
|
+
* in the list. */
|
|
1611
|
+
anyOf?: components["schemas"]["Schema"][];
|
|
1612
|
+
/** @description Optional. Required properties of Type.OBJECT. */
|
|
1613
|
+
required?: string[];
|
|
1614
|
+
/** @description Optional. The format of the data. Any value is allowed, but most do not trigger any
|
|
1615
|
+
* special functionality. */
|
|
1616
|
+
format?: string;
|
|
1617
|
+
/**
|
|
1618
|
+
* Format: int64
|
|
1619
|
+
* @description Optional. Minimum number of the properties for Type.OBJECT.
|
|
1620
|
+
*/
|
|
1621
|
+
minProperties?: string;
|
|
1622
|
+
/**
|
|
1623
|
+
* Format: int64
|
|
1624
|
+
* @description Optional. Maximum number of the elements for Type.ARRAY.
|
|
1625
|
+
*/
|
|
1626
|
+
maxItems?: string;
|
|
1627
|
+
/** @description Optional. Indicates if the value may be null. */
|
|
1628
|
+
nullable?: boolean;
|
|
1629
|
+
/**
|
|
1630
|
+
* Format: double
|
|
1631
|
+
* @description Optional. Maximum value of the Type.INTEGER and Type.NUMBER
|
|
1632
|
+
*/
|
|
1633
|
+
maximum?: number;
|
|
1634
|
+
/** @description Optional. The order of the properties.
|
|
1635
|
+
* Not a standard field in open api spec. Used to determine the order of the
|
|
1636
|
+
* properties in the response. */
|
|
1637
|
+
propertyOrdering?: string[];
|
|
1638
|
+
/** @description Optional. Default value of the field. Per JSON Schema, this field is intended for
|
|
1639
|
+
* documentation generators and doesn't affect validation. Thus it's included
|
|
1640
|
+
* here and ignored so that developers who send schemas with a `default` field
|
|
1641
|
+
* don't get unknown-field errors. */
|
|
1642
|
+
default?: unknown;
|
|
1643
|
+
/**
|
|
1644
|
+
* Format: int64
|
|
1645
|
+
* @description Optional. Minimum number of the elements for Type.ARRAY.
|
|
1646
|
+
*/
|
|
1647
|
+
minItems?: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* Format: int64
|
|
1650
|
+
* @description Optional. SCHEMA FIELDS FOR TYPE STRING
|
|
1651
|
+
* Minimum length of the Type.STRING
|
|
1652
|
+
*/
|
|
1653
|
+
minLength?: string;
|
|
1654
|
+
/** @description Required. Data type. */
|
|
1655
|
+
type: components["schemas"]["Type"];
|
|
1656
|
+
/** @description Optional. Pattern of the Type.STRING to restrict a string to a regular expression. */
|
|
1657
|
+
pattern?: string;
|
|
1658
|
+
/** @description Optional. Example of the object. Will only populated when the object is the root. */
|
|
1659
|
+
example?: unknown;
|
|
1660
|
+
/** @description Optional. A brief description of the parameter. This could contain examples of use.
|
|
1661
|
+
* Parameter description may be formatted as Markdown. */
|
|
1662
|
+
description?: string;
|
|
1663
|
+
/**
|
|
1664
|
+
* Format: double
|
|
1665
|
+
* @description Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER
|
|
1666
|
+
* Minimum value of the Type.INTEGER and Type.NUMBER
|
|
1667
|
+
*/
|
|
1668
|
+
minimum?: number;
|
|
1669
|
+
};
|
|
1670
|
+
/** @description The FileSearch tool that retrieves knowledge from Semantic Retrieval corpora.
|
|
1671
|
+
* Files are imported to Semantic Retrieval corpora using the ImportFile API. */
|
|
1672
|
+
FileSearch: {
|
|
1673
|
+
/** @description Required. The names of the file_search_stores to retrieve from.
|
|
1674
|
+
* Example: `fileSearchStores/my-file-search-store-123` */
|
|
1675
|
+
fileSearchStoreNames: string[];
|
|
1676
|
+
/**
|
|
1677
|
+
* Format: int32
|
|
1678
|
+
* @description Optional. The number of semantic retrieval chunks to retrieve.
|
|
1679
|
+
*/
|
|
1680
|
+
topK?: number;
|
|
1681
|
+
/** @description Optional. Metadata filter to apply to the semantic retrieval documents and chunks. */
|
|
1682
|
+
metadataFilter?: string;
|
|
1683
|
+
};
|
|
1684
|
+
/** @description A file generated on behalf of a user. */
|
|
1685
|
+
GeneratedFile: {
|
|
1686
|
+
/** @description Identifier. The name of the generated file.
|
|
1687
|
+
* Example: `generatedFiles/abc-123` */
|
|
1688
|
+
name?: string;
|
|
1689
|
+
/** @description MIME type of the generatedFile. */
|
|
1690
|
+
mimeType?: string;
|
|
1691
|
+
/** @description Error details if the GeneratedFile ends up in the STATE_FAILED state. */
|
|
1692
|
+
error?: components["schemas"]["Status"];
|
|
1693
|
+
/**
|
|
1694
|
+
* @description Output only. The state of the GeneratedFile.
|
|
1695
|
+
* @enum {string}
|
|
1696
|
+
*/
|
|
1697
|
+
readonly state?: "STATE_UNSPECIFIED" | "GENERATING" | "GENERATED" | "FAILED";
|
|
1698
|
+
};
|
|
1699
|
+
/** @description The response from the model.
|
|
1700
|
+
*
|
|
1701
|
+
* This includes candidate messages and
|
|
1702
|
+
* conversation history in the form of chronologically-ordered messages. */
|
|
1703
|
+
GenerateMessageResponse: {
|
|
1704
|
+
/** @description A set of content filtering metadata for the prompt and response
|
|
1705
|
+
* text.
|
|
1706
|
+
*
|
|
1707
|
+
* This indicates which `SafetyCategory`(s) blocked a
|
|
1708
|
+
* candidate from this response, the lowest `HarmProbability`
|
|
1709
|
+
* that triggered a block, and the HarmThreshold setting for that category. */
|
|
1710
|
+
filters?: components["schemas"]["ContentFilter"][];
|
|
1711
|
+
/** @description Candidate response messages from the model. */
|
|
1712
|
+
candidates?: components["schemas"]["Message"][];
|
|
1713
|
+
/** @description The conversation history used by the model. */
|
|
1714
|
+
messages?: components["schemas"]["Message"][];
|
|
1715
|
+
};
|
|
1716
|
+
/** @description Represents token counting info for a single modality. */
|
|
1717
|
+
ModalityTokenCount: {
|
|
1718
|
+
/** @description The modality associated with this token count. */
|
|
1719
|
+
modality?: components["schemas"]["GenerativeLanguageModality"];
|
|
1720
|
+
/**
|
|
1721
|
+
* Format: int32
|
|
1722
|
+
* @description Number of tokens.
|
|
1723
|
+
*/
|
|
1724
|
+
tokenCount?: number;
|
|
1725
|
+
};
|
|
1726
|
+
/** @description Retrieval config. */
|
|
1727
|
+
RetrievalConfig: {
|
|
1728
|
+
/** @description Optional. The location of the user. */
|
|
1729
|
+
latLng?: components["schemas"]["LatLng"];
|
|
1730
|
+
/** @description Optional. The language code of the user.
|
|
1731
|
+
* Language code for content. Use language tags defined by
|
|
1732
|
+
* [BCP47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt). */
|
|
1733
|
+
languageCode?: string;
|
|
1734
|
+
};
|
|
1735
|
+
/** @description Request for `UploadToFileSearchStore`. */
|
|
1736
|
+
UploadToFileSearchStoreRequest: {
|
|
1737
|
+
/** @description Custom metadata to be associated with the data. */
|
|
1738
|
+
customMetadata?: components["schemas"]["CustomMetadata"][];
|
|
1739
|
+
/** @description Optional. Display name of the created document. */
|
|
1740
|
+
displayName?: string;
|
|
1741
|
+
/** @description Optional. Config for telling the service how to chunk the data.
|
|
1742
|
+
* If not provided, the service will use default parameters. */
|
|
1743
|
+
chunkingConfig?: components["schemas"]["ChunkingConfig"];
|
|
1744
|
+
/** @description Optional. MIME type of the data. If not provided, it will be inferred from the
|
|
1745
|
+
* uploaded content. */
|
|
1746
|
+
mimeType?: string;
|
|
1747
|
+
};
|
|
1748
|
+
/** @description Dataset for training or validation. */
|
|
1749
|
+
Dataset: {
|
|
1750
|
+
/** @description Optional. Inline examples with simple input/output text. */
|
|
1751
|
+
examples?: components["schemas"]["TuningExamples"];
|
|
1752
|
+
};
|
|
1753
|
+
/** @description The response from the model, including candidate completions. */
|
|
1754
|
+
GenerateTextResponse: {
|
|
1755
|
+
/** @description A set of content filtering metadata for the prompt and response
|
|
1756
|
+
* text.
|
|
1757
|
+
*
|
|
1758
|
+
* This indicates which `SafetyCategory`(s) blocked a
|
|
1759
|
+
* candidate from this response, the lowest `HarmProbability`
|
|
1760
|
+
* that triggered a block, and the HarmThreshold setting for that category.
|
|
1761
|
+
* This indicates the smallest change to the `SafetySettings` that would be
|
|
1762
|
+
* necessary to unblock at least 1 response.
|
|
1763
|
+
*
|
|
1764
|
+
* The blocking is configured by the `SafetySettings` in the request (or the
|
|
1765
|
+
* default `SafetySettings` of the API). */
|
|
1766
|
+
filters?: components["schemas"]["ContentFilter"][];
|
|
1767
|
+
/** @description Candidate responses from the model. */
|
|
1768
|
+
candidates?: components["schemas"]["TextCompletion"][];
|
|
1769
|
+
/** @description Returns any safety feedback related to content filtering. */
|
|
1770
|
+
safetyFeedback?: components["schemas"]["SafetyFeedback"][];
|
|
1771
|
+
};
|
|
1772
|
+
/** @description Identifier for a `Chunk` retrieved via Semantic Retriever specified in the
|
|
1773
|
+
* `GenerateAnswerRequest` using `SemanticRetrieverConfig`. */
|
|
1774
|
+
SemanticRetrieverChunk: {
|
|
1775
|
+
/** @description Output only. Name of the `Chunk` containing the attributed text.
|
|
1776
|
+
* Example: `corpora/123/documents/abc/chunks/xyz` */
|
|
1777
|
+
readonly chunk?: string;
|
|
1778
|
+
/** @description Output only. Name of the source matching the request's
|
|
1779
|
+
* `SemanticRetrieverConfig.source`. Example: `corpora/123` or
|
|
1780
|
+
* `corpora/123/documents/abc` */
|
|
1781
|
+
readonly source?: string;
|
|
1782
|
+
};
|
|
1783
|
+
/** @description The response to a EmbedTextRequest. */
|
|
1784
|
+
EmbedTextResponse: {
|
|
1785
|
+
/** @description Output only. The embedding generated from the input text. */
|
|
1786
|
+
readonly embedding?: components["schemas"]["Embedding"];
|
|
1787
|
+
};
|
|
1788
|
+
/** @description Computer Use tool type. */
|
|
1789
|
+
ComputerUse: {
|
|
1790
|
+
/**
|
|
1791
|
+
* @description Required. The environment being operated.
|
|
1792
|
+
* @enum {string}
|
|
1793
|
+
*/
|
|
1794
|
+
environment: "ENVIRONMENT_UNSPECIFIED" | "ENVIRONMENT_BROWSER";
|
|
1795
|
+
/** @description Optional. By default, predefined functions are included in the final model
|
|
1796
|
+
* call.
|
|
1797
|
+
* Some of them can be explicitly excluded from being automatically
|
|
1798
|
+
* included. This can serve two purposes:
|
|
1799
|
+
* 1. Using a more restricted / different action space.
|
|
1800
|
+
* 2. Improving the definitions / instructions of predefined functions. */
|
|
1801
|
+
excludedPredefinedFunctions?: string[];
|
|
1802
|
+
};
|
|
1803
|
+
/** @description A set of tuning examples. Can be training or validation data. */
|
|
1804
|
+
TuningExamples: {
|
|
1805
|
+
/** @description The examples. Example input can be for text or discuss, but all examples
|
|
1806
|
+
* in a set must be of the same type. */
|
|
1807
|
+
examples?: components["schemas"]["TuningExample"][];
|
|
1808
|
+
};
|
|
1809
|
+
/** @description The `Status` type defines a logical error model that is suitable for
|
|
1810
|
+
* different programming environments, including REST APIs and RPC APIs. It is
|
|
1811
|
+
* used by [gRPC](https://github.com/grpc). Each `Status` message contains
|
|
1812
|
+
* three pieces of data: error code, error message, and error details.
|
|
1813
|
+
*
|
|
1814
|
+
* You can find out more about this error model and how to work with it in the
|
|
1815
|
+
* [API Design Guide](https://cloud.google.com/apis/design/errors). */
|
|
1816
|
+
Status: {
|
|
1817
|
+
/** @description A developer-facing error message, which should be in English. Any
|
|
1818
|
+
* user-facing error message should be localized and sent in the
|
|
1819
|
+
* google.rpc.Status.details field, or localized by the client. */
|
|
1820
|
+
message?: string;
|
|
1821
|
+
/**
|
|
1822
|
+
* Format: int32
|
|
1823
|
+
* @description The status code, which should be an enum value of google.rpc.Code.
|
|
1824
|
+
*/
|
|
1825
|
+
code?: number;
|
|
1826
|
+
/** @description A list of messages that carry the error details. There is a common set of
|
|
1827
|
+
* message types for APIs to use. */
|
|
1828
|
+
details?: {
|
|
1829
|
+
[key: string]: unknown;
|
|
1830
|
+
}[];
|
|
1831
|
+
};
|
|
1832
|
+
/** @description Permission resource grants user, group or the rest of the world access to the
|
|
1833
|
+
* PaLM API resource (e.g. a tuned model, corpus).
|
|
1834
|
+
*
|
|
1835
|
+
* A role is a collection of permitted operations that allows users to perform
|
|
1836
|
+
* specific actions on PaLM API resources. To make them available to users,
|
|
1837
|
+
* groups, or service accounts, you assign roles. When you assign a role, you
|
|
1838
|
+
* grant permissions that the role contains.
|
|
1839
|
+
*
|
|
1840
|
+
* There are three concentric roles. Each role is a superset of the previous
|
|
1841
|
+
* role's permitted operations:
|
|
1842
|
+
*
|
|
1843
|
+
* - reader can use the resource (e.g. tuned model, corpus) for inference
|
|
1844
|
+
* - writer has reader's permissions and additionally can edit and share
|
|
1845
|
+
* - owner has writer's permissions and additionally can delete */
|
|
1846
|
+
Permission: {
|
|
1847
|
+
/** @description Optional. Immutable. The email address of the user of group which this permission refers.
|
|
1848
|
+
* Field is not set when permission's grantee type is EVERYONE. */
|
|
1849
|
+
emailAddress?: string;
|
|
1850
|
+
/**
|
|
1851
|
+
* @description Required. The role granted by this permission.
|
|
1852
|
+
* @enum {string}
|
|
1853
|
+
*/
|
|
1854
|
+
role: "ROLE_UNSPECIFIED" | "OWNER" | "WRITER" | "READER";
|
|
1855
|
+
/** @description Output only. Identifier. The permission name. A unique name will be generated on create.
|
|
1856
|
+
* Examples:
|
|
1857
|
+
* tunedModels/{tuned_model}/permissions/{permission}
|
|
1858
|
+
* corpora/{corpus}/permissions/{permission}
|
|
1859
|
+
* Output only. */
|
|
1860
|
+
readonly name?: string;
|
|
1861
|
+
/**
|
|
1862
|
+
* @description Optional. Immutable. The type of the grantee.
|
|
1863
|
+
* @enum {string}
|
|
1864
|
+
*/
|
|
1865
|
+
granteeType?: "GRANTEE_TYPE_UNSPECIFIED" | "USER" | "GROUP" | "EVERYONE";
|
|
1866
|
+
};
|
|
1867
|
+
/** @description The configuration for the voice to use. */
|
|
1868
|
+
VoiceConfig: {
|
|
1869
|
+
/** @description The configuration for the prebuilt voice to use. */
|
|
1870
|
+
prebuiltVoiceConfig?: components["schemas"]["PrebuiltVoiceConfig"];
|
|
1871
|
+
};
|
|
1872
|
+
/** @description Encapsulates a snippet of a user review that answers a question about
|
|
1873
|
+
* the features of a specific place in Google Maps. */
|
|
1874
|
+
ReviewSnippet: {
|
|
1875
|
+
/** @description A link that corresponds to the user review on Google Maps. */
|
|
1876
|
+
googleMapsUri?: string;
|
|
1877
|
+
/** @description The ID of the review snippet. */
|
|
1878
|
+
reviewId?: string;
|
|
1879
|
+
/** @description Title of the review. */
|
|
1880
|
+
title?: string;
|
|
1881
|
+
};
|
|
1882
|
+
/** @description A predicted server-side `ToolCall` returned from the model. This message
|
|
1883
|
+
* contains information about a tool that the model wants to invoke.
|
|
1884
|
+
* The client is NOT expected to execute this `ToolCall`. Instead, the
|
|
1885
|
+
* client should pass this `ToolCall` back to the API in a subsequent turn
|
|
1886
|
+
* within a `Content` message, along with the corresponding `ToolResponse`. */
|
|
1887
|
+
ToolCall: {
|
|
1888
|
+
/** @description Optional. The tool call arguments.
|
|
1889
|
+
* Example: {"arg1" : "value1", "arg2" : "value2" , ...} */
|
|
1890
|
+
args?: {
|
|
1891
|
+
[key: string]: unknown;
|
|
1892
|
+
};
|
|
1893
|
+
/** @description Required. The type of tool that was called. */
|
|
1894
|
+
toolType: components["schemas"]["ToolType"];
|
|
1895
|
+
/** @description Optional. Unique identifier of the tool call.
|
|
1896
|
+
* The server returns the tool response with the matching `id`. */
|
|
1897
|
+
id?: string;
|
|
1898
|
+
};
|
|
1899
|
+
/** @description A resource representing a batch of `GenerateContent` requests. */
|
|
1900
|
+
GenerateContentBatch: {
|
|
1901
|
+
/** @description Required. Input configuration of the instances on which batch processing
|
|
1902
|
+
* are performed. */
|
|
1903
|
+
inputConfig: components["schemas"]["InputConfig"];
|
|
1904
|
+
/**
|
|
1905
|
+
* Format: int64
|
|
1906
|
+
* @description Optional. The priority of the batch. Batches with a higher priority value will be
|
|
1907
|
+
* processed before batches with a lower priority value. Negative values are
|
|
1908
|
+
* allowed. Default is 0.
|
|
1909
|
+
*/
|
|
1910
|
+
priority?: string;
|
|
1911
|
+
/** @description Output only. The state of the batch. */
|
|
1912
|
+
readonly state?: components["schemas"]["BatchState"];
|
|
1913
|
+
/**
|
|
1914
|
+
* Format: date-time
|
|
1915
|
+
* @description Output only. The time at which the batch processing completed.
|
|
1916
|
+
*/
|
|
1917
|
+
readonly endTime?: string;
|
|
1918
|
+
/**
|
|
1919
|
+
* Format: date-time
|
|
1920
|
+
* @description Output only. The time at which the batch was created.
|
|
1921
|
+
*/
|
|
1922
|
+
readonly createTime?: string;
|
|
1923
|
+
/** @description Output only. The output of the batch request. */
|
|
1924
|
+
readonly output?: components["schemas"]["GenerateContentBatchOutput"];
|
|
1925
|
+
/**
|
|
1926
|
+
* Format: date-time
|
|
1927
|
+
* @description Output only. The time at which the batch was last updated.
|
|
1928
|
+
*/
|
|
1929
|
+
readonly updateTime?: string;
|
|
1930
|
+
/** @description Output only. Stats about the batch. */
|
|
1931
|
+
readonly batchStats?: components["schemas"]["BatchStats"];
|
|
1932
|
+
/** @description Output only. Identifier. Resource name of the batch.
|
|
1933
|
+
*
|
|
1934
|
+
* Format: `batches/{batch_id}`. */
|
|
1935
|
+
readonly name?: string;
|
|
1936
|
+
/** @description Required. The name of the `Model` to use for generating the completion.
|
|
1937
|
+
*
|
|
1938
|
+
* Format: `models/{model}`. */
|
|
1939
|
+
model: string;
|
|
1940
|
+
/** @description Required. The user-defined name of this batch. */
|
|
1941
|
+
displayName: string;
|
|
1942
|
+
};
|
|
1943
|
+
/** @description A single example for tuning. */
|
|
1944
|
+
TuningExample: {
|
|
1945
|
+
/** @description Optional. Text model input. */
|
|
1946
|
+
textInput?: string;
|
|
1947
|
+
/** @description Required. The expected model output. */
|
|
1948
|
+
output: string;
|
|
1949
|
+
};
|
|
1950
|
+
/** @description The GoogleMaps Tool that provides geospatial context for the user's query. */
|
|
1951
|
+
GoogleMaps: {
|
|
1952
|
+
/** @description Optional. Whether to return a widget context token in the GroundingMetadata of the
|
|
1953
|
+
* response. Developers can use the widget context token to render a Google
|
|
1954
|
+
* Maps widget with geospatial context related to the places that the model
|
|
1955
|
+
* references in the response. */
|
|
1956
|
+
enableWidget?: boolean;
|
|
1957
|
+
};
|
|
1958
|
+
/** @description Request message for [PredictionService.PredictLongRunning]. */
|
|
1959
|
+
PredictLongRunningRequest: {
|
|
1960
|
+
/** @description Required. The instances that are the input to the prediction call. */
|
|
1961
|
+
instances: unknown[];
|
|
1962
|
+
/** @description Optional. The parameters that govern the prediction call. */
|
|
1963
|
+
parameters?: unknown;
|
|
1964
|
+
};
|
|
1965
|
+
/** @description Metadata on the usage of the cached content. */
|
|
1966
|
+
CachedContentUsageMetadata: {
|
|
1967
|
+
/**
|
|
1968
|
+
* Format: int32
|
|
1969
|
+
* @description Total number of tokens that the cached content consumes.
|
|
1970
|
+
*/
|
|
1971
|
+
totalTokenCount?: number;
|
|
1972
|
+
};
|
|
1973
|
+
/** @description All of the structured input text passed to the model as a prompt.
|
|
1974
|
+
*
|
|
1975
|
+
* A `MessagePrompt` contains a structured set of fields that provide context
|
|
1976
|
+
* for the conversation, examples of user input/model output message pairs that
|
|
1977
|
+
* prime the model to respond in different ways, and the conversation history
|
|
1978
|
+
* or list of messages representing the alternating turns of the conversation
|
|
1979
|
+
* between the user and the model. */
|
|
1980
|
+
MessagePrompt: {
|
|
1981
|
+
/** @description Optional. Text that should be provided to the model first to ground the response.
|
|
1982
|
+
*
|
|
1983
|
+
* If not empty, this `context` will be given to the model first before the
|
|
1984
|
+
* `examples` and `messages`. When using a `context` be sure to provide it
|
|
1985
|
+
* with every request to maintain continuity.
|
|
1986
|
+
*
|
|
1987
|
+
* This field can be a description of your prompt to the model to help provide
|
|
1988
|
+
* context and guide the responses. Examples: "Translate the phrase from
|
|
1989
|
+
* English to French." or "Given a statement, classify the sentiment as happy,
|
|
1990
|
+
* sad or neutral."
|
|
1991
|
+
*
|
|
1992
|
+
* Anything included in this field will take precedence over message history
|
|
1993
|
+
* if the total input size exceeds the model's `input_token_limit` and the
|
|
1994
|
+
* input request is truncated. */
|
|
1995
|
+
context?: string;
|
|
1996
|
+
/** @description Optional. Examples of what the model should generate.
|
|
1997
|
+
*
|
|
1998
|
+
* This includes both user input and the response that the model should
|
|
1999
|
+
* emulate.
|
|
2000
|
+
*
|
|
2001
|
+
* These `examples` are treated identically to conversation messages except
|
|
2002
|
+
* that they take precedence over the history in `messages`:
|
|
2003
|
+
* If the total input size exceeds the model's `input_token_limit` the input
|
|
2004
|
+
* will be truncated. Items will be dropped from `messages` before `examples`. */
|
|
2005
|
+
examples?: components["schemas"]["Example"][];
|
|
2006
|
+
/** @description Required. A snapshot of the recent conversation history sorted chronologically.
|
|
2007
|
+
*
|
|
2008
|
+
* Turns alternate between two authors.
|
|
2009
|
+
*
|
|
2010
|
+
* If the total input size exceeds the model's `input_token_limit` the input
|
|
2011
|
+
* will be truncated: The oldest items will be dropped from `messages`. */
|
|
2012
|
+
messages: components["schemas"]["Message"][];
|
|
2013
|
+
};
|
|
2014
|
+
/** @description Response for a `BatchGenerateContent` operation. */
|
|
2015
|
+
AsyncBatchEmbedContentResponse: {
|
|
2016
|
+
/** @description Output only. The output of the batch request. */
|
|
2017
|
+
readonly output?: components["schemas"]["EmbedContentBatchOutput"];
|
|
2018
|
+
};
|
|
2019
|
+
/** @description Safety setting, affecting the safety-blocking behavior.
|
|
2020
|
+
*
|
|
2021
|
+
* Passing a safety setting for a category changes the allowed probability that
|
|
2022
|
+
* content is blocked. */
|
|
2023
|
+
SafetySetting: {
|
|
2024
|
+
/** @description Required. The category for this setting. */
|
|
2025
|
+
category: components["schemas"]["HarmCategory"];
|
|
2026
|
+
/**
|
|
2027
|
+
* @description Required. Controls the probability threshold at which harm is blocked.
|
|
2028
|
+
* @enum {string}
|
|
2029
|
+
*/
|
|
2030
|
+
threshold: "HARM_BLOCK_THRESHOLD_UNSPECIFIED" | "BLOCK_LOW_AND_ABOVE" | "BLOCK_MEDIUM_AND_ABOVE" | "BLOCK_ONLY_HIGH" | "BLOCK_NONE" | "OFF";
|
|
2031
|
+
};
|
|
2032
|
+
/** @description Describes the options to customize dynamic retrieval. */
|
|
2033
|
+
DynamicRetrievalConfig: {
|
|
2034
|
+
/**
|
|
2035
|
+
* @description The mode of the predictor to be used in dynamic retrieval.
|
|
2036
|
+
* @enum {string}
|
|
2037
|
+
*/
|
|
2038
|
+
mode?: "MODE_UNSPECIFIED" | "MODE_DYNAMIC";
|
|
2039
|
+
/**
|
|
2040
|
+
* Format: float
|
|
2041
|
+
* @description The threshold to be used in dynamic retrieval.
|
|
2042
|
+
* If not set, a system default value is used.
|
|
2043
|
+
*/
|
|
2044
|
+
dynamicThreshold?: number;
|
|
2045
|
+
};
|
|
2046
|
+
/** @description Representation of a video. */
|
|
2047
|
+
Video: {
|
|
2048
|
+
/**
|
|
2049
|
+
* Format: byte
|
|
2050
|
+
* @description Raw bytes.
|
|
2051
|
+
*/
|
|
2052
|
+
video?: string;
|
|
2053
|
+
/** @description Path to another storage. */
|
|
2054
|
+
uri?: string;
|
|
2055
|
+
};
|
|
2056
|
+
/** @description A generic empty message that you can re-use to avoid defining duplicated
|
|
2057
|
+
* empty messages in your APIs. A typical example is to use it as the request
|
|
2058
|
+
* or the response type of an API method. For instance:
|
|
2059
|
+
*
|
|
2060
|
+
* service Foo {
|
|
2061
|
+
* rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
|
2062
|
+
* } */
|
|
2063
|
+
Empty: Record<string, never>;
|
|
2064
|
+
/** @description This resource represents a long-running operation where metadata and response fields are strongly typed. */
|
|
2065
|
+
CreateTunedModelOperation: components["schemas"]["BaseOperation"] & {
|
|
2066
|
+
metadata?: components["schemas"]["CreateTunedModelMetadata"];
|
|
2067
|
+
response?: components["schemas"]["TunedModel"];
|
|
2068
|
+
};
|
|
2069
|
+
/** @description A list of floats representing an embedding. */
|
|
2070
|
+
ContentEmbedding: {
|
|
2071
|
+
/** @description The embedding values. This is for 3P users only and will not be populated
|
|
2072
|
+
* for 1P calls. */
|
|
2073
|
+
values?: number[];
|
|
2074
|
+
/** @description This field stores the soft tokens tensor frame shape
|
|
2075
|
+
* (e.g. [1, 1, 256, 2048]). */
|
|
2076
|
+
shape?: number[];
|
|
2077
|
+
};
|
|
2078
|
+
/** @description Response message for [PredictionService.Predict]. */
|
|
2079
|
+
PredictResponse: {
|
|
2080
|
+
/** @description The outputs of the prediction call. */
|
|
2081
|
+
predictions?: unknown[];
|
|
2082
|
+
};
|
|
2083
|
+
/** @description Chunk from the web. */
|
|
2084
|
+
Web: {
|
|
2085
|
+
/** @description Output only. URI reference of the chunk. */
|
|
2086
|
+
readonly uri?: string;
|
|
2087
|
+
/** @description Output only. Title of the chunk. */
|
|
2088
|
+
readonly title?: string;
|
|
2089
|
+
};
|
|
2090
|
+
/** @description Grounding support. */
|
|
2091
|
+
GoogleAiGenerativelanguageV1betaGroundingSupport: {
|
|
2092
|
+
/** @description Segment of the content this support belongs to. */
|
|
2093
|
+
segment?: components["schemas"]["GoogleAiGenerativelanguageV1betaSegment"];
|
|
2094
|
+
/** @description Optional. A list of indices (into 'grounding_chunk' in
|
|
2095
|
+
* `response.candidate.grounding_metadata`) specifying the citations
|
|
2096
|
+
* associated with the claim. For instance [1,3,4] means that
|
|
2097
|
+
* grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the
|
|
2098
|
+
* retrieved content attributed to the claim. If the response is streaming,
|
|
2099
|
+
* the grounding_chunk_indices refer to the indices across all responses.
|
|
2100
|
+
* It is the client's responsibility to accumulate the grounding chunks from
|
|
2101
|
+
* all responses (while maintaining the same order). */
|
|
2102
|
+
groundingChunkIndices?: number[];
|
|
2103
|
+
/** @description Optional. Confidence score of the support references. Ranges from 0 to 1. 1 is the
|
|
2104
|
+
* most confident. This list must have the same size as the
|
|
2105
|
+
* grounding_chunk_indices. */
|
|
2106
|
+
confidenceScores?: number[];
|
|
2107
|
+
/** @description Output only. Indices into the `parts` field of the candidate's content. These indices
|
|
2108
|
+
* specify which rendered parts are associated with this support source. */
|
|
2109
|
+
readonly renderedParts?: number[];
|
|
2110
|
+
};
|
|
2111
|
+
/** @description This resource represents a long-running operation where metadata and response fields are strongly typed. */
|
|
2112
|
+
ImportFileOperation: components["schemas"]["BaseOperation"] & {
|
|
2113
|
+
metadata?: components["schemas"]["ImportFileMetadata"];
|
|
2114
|
+
response?: components["schemas"]["ImportFileResponse"];
|
|
2115
|
+
};
|
|
2116
|
+
/** @description Safety feedback for an entire request.
|
|
2117
|
+
*
|
|
2118
|
+
* This field is populated if content in the input and/or response is blocked
|
|
2119
|
+
* due to safety settings. SafetyFeedback may not exist for every HarmCategory.
|
|
2120
|
+
* Each SafetyFeedback will return the safety settings used by the request as
|
|
2121
|
+
* well as the lowest HarmProbability that should be allowed in order to return
|
|
2122
|
+
* a result. */
|
|
2123
|
+
SafetyFeedback: {
|
|
2124
|
+
/** @description Safety rating evaluated from content. */
|
|
2125
|
+
rating?: components["schemas"]["SafetyRating"];
|
|
2126
|
+
/** @description Safety settings applied to the request. */
|
|
2127
|
+
setting?: components["schemas"]["SafetySetting"];
|
|
2128
|
+
};
|
|
2129
|
+
/** @description Filter condition applicable to a single key. */
|
|
2130
|
+
Condition: {
|
|
2131
|
+
/** @description The string value to filter the metadata on. */
|
|
2132
|
+
stringValue?: string;
|
|
2133
|
+
/**
|
|
2134
|
+
* Format: float
|
|
2135
|
+
* @description The numeric value to filter the metadata on.
|
|
2136
|
+
*/
|
|
2137
|
+
numericValue?: number;
|
|
2138
|
+
/**
|
|
2139
|
+
* @description Required. Operator applied to the given key-value pair to trigger the condition.
|
|
2140
|
+
* @enum {string}
|
|
2141
|
+
*/
|
|
2142
|
+
operation: "OPERATOR_UNSPECIFIED" | "LESS" | "LESS_EQUAL" | "EQUAL" | "GREATER_EQUAL" | "GREATER" | "NOT_EQUAL" | "INCLUDES" | "EXCLUDES";
|
|
2143
|
+
};
|
|
2144
|
+
/** @description A `Corpus` is a collection of `Document`s.
|
|
2145
|
+
* A project can create up to 10 corpora. */
|
|
2146
|
+
Corpus: {
|
|
2147
|
+
/**
|
|
2148
|
+
* Format: date-time
|
|
2149
|
+
* @description Output only. The Timestamp of when the `Corpus` was last updated.
|
|
2150
|
+
*/
|
|
2151
|
+
readonly updateTime?: string;
|
|
2152
|
+
/** @description Output only. Immutable. Identifier. The `Corpus` resource name. The ID (name excluding the "corpora/" prefix)
|
|
2153
|
+
* can contain up to 40 characters that are lowercase alphanumeric or dashes
|
|
2154
|
+
* (-). The ID cannot start or end with a dash. If the name is empty on
|
|
2155
|
+
* create, a unique name will be derived from `display_name` along with a 12
|
|
2156
|
+
* character random suffix.
|
|
2157
|
+
* Example: `corpora/my-awesome-corpora-123a456b789c` */
|
|
2158
|
+
readonly name?: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* Format: date-time
|
|
2161
|
+
* @description Output only. The Timestamp of when the `Corpus` was created.
|
|
2162
|
+
*/
|
|
2163
|
+
readonly createTime?: string;
|
|
2164
|
+
/** @description Optional. The human-readable display name for the `Corpus`. The display name must be
|
|
2165
|
+
* no more than 512 characters in length, including spaces.
|
|
2166
|
+
* Example: "Docs on Semantic Retriever" */
|
|
2167
|
+
displayName?: string;
|
|
2168
|
+
};
|
|
2169
|
+
/** @description Configuration for specifying function calling behavior. */
|
|
2170
|
+
FunctionCallingConfig: {
|
|
2171
|
+
/**
|
|
2172
|
+
* @description Optional. Specifies the mode in which function calling should execute. If
|
|
2173
|
+
* unspecified, the default value will be set to AUTO.
|
|
2174
|
+
* @enum {string}
|
|
2175
|
+
*/
|
|
2176
|
+
mode?: "MODE_UNSPECIFIED" | "AUTO" | "ANY" | "NONE" | "VALIDATED";
|
|
2177
|
+
/** @description Optional. A set of function names that, when provided, limits the functions the model
|
|
2178
|
+
* will call.
|
|
2179
|
+
*
|
|
2180
|
+
* This should only be set when the Mode is ANY or VALIDATED. Function names
|
|
2181
|
+
* should match [FunctionDeclaration.name]. When set, model will
|
|
2182
|
+
* predict a function call from only allowed function names. */
|
|
2183
|
+
allowedFunctionNames?: string[];
|
|
2184
|
+
};
|
|
2185
|
+
/** @description Response from `ListPermissions` containing a paginated list of
|
|
2186
|
+
* permissions. */
|
|
2187
|
+
ListPermissionsResponse: {
|
|
2188
|
+
/** @description A token, which can be sent as `page_token` to retrieve the next page.
|
|
2189
|
+
*
|
|
2190
|
+
* If this field is omitted, there are no more pages. */
|
|
2191
|
+
nextPageToken?: string;
|
|
2192
|
+
/** @description Returned permissions. */
|
|
2193
|
+
permissions?: components["schemas"]["Permission"][];
|
|
2194
|
+
};
|
|
2195
|
+
/** @description The requests to be processed in the batch if provided as part of the
|
|
2196
|
+
* batch creation request. */
|
|
2197
|
+
InlinedRequests: {
|
|
2198
|
+
/** @description Required. The requests to be processed in the batch. */
|
|
2199
|
+
requests: components["schemas"]["InlinedRequest"][];
|
|
2200
|
+
};
|
|
2201
|
+
/** @description Metadata on the usage of the embedding request. */
|
|
2202
|
+
EmbeddingUsageMetadata: {
|
|
2203
|
+
/**
|
|
2204
|
+
* Format: int32
|
|
2205
|
+
* @description Output only. Number of tokens in the prompt.
|
|
2206
|
+
*/
|
|
2207
|
+
readonly promptTokenCount?: number;
|
|
2208
|
+
/** @description Output only. List of modalities that were processed in the request input. */
|
|
2209
|
+
readonly promptTokenDetails?: components["schemas"]["ModalityTokenCount"][];
|
|
2210
|
+
};
|
|
2211
|
+
/** @description The requests to be processed in the batch if provided as part of the
|
|
2212
|
+
* batch creation request. */
|
|
2213
|
+
InlinedEmbedContentRequests: {
|
|
2214
|
+
/** @description Required. The requests to be processed in the batch. */
|
|
2215
|
+
requests: components["schemas"]["InlinedEmbedContentRequest"][];
|
|
2216
|
+
};
|
|
2217
|
+
/** @description Response from `ListDocuments` containing a paginated list of `Document`s.
|
|
2218
|
+
* The `Document`s are sorted by ascending `document.create_time`. */
|
|
2219
|
+
ListDocumentsResponse: {
|
|
2220
|
+
/** @description The returned `Document`s. */
|
|
2221
|
+
documents?: components["schemas"]["Document"][];
|
|
2222
|
+
/** @description A token, which can be sent as `page_token` to retrieve the next page.
|
|
2223
|
+
* If this field is omitted, there are no more pages. */
|
|
2224
|
+
nextPageToken?: string;
|
|
2225
|
+
};
|
|
2226
|
+
/** @enum {string} */
|
|
2227
|
+
HarmCategory: "HARM_CATEGORY_UNSPECIFIED" | "HARM_CATEGORY_DEROGATORY" | "HARM_CATEGORY_TOXICITY" | "HARM_CATEGORY_VIOLENCE" | "HARM_CATEGORY_SEXUAL" | "HARM_CATEGORY_MEDICAL" | "HARM_CATEGORY_DANGEROUS" | "HARM_CATEGORY_HARASSMENT" | "HARM_CATEGORY_HATE_SPEECH" | "HARM_CATEGORY_SEXUALLY_EXPLICIT" | "HARM_CATEGORY_DANGEROUS_CONTENT" | "HARM_CATEGORY_CIVIC_INTEGRITY";
|
|
2228
|
+
/** @description The output of a batch request. This is returned in the
|
|
2229
|
+
* `BatchGenerateContentResponse` or the `GenerateContentBatch.output` field. */
|
|
2230
|
+
GenerateContentBatchOutput: {
|
|
2231
|
+
/** @description Output only. The file ID of the file containing the responses.
|
|
2232
|
+
* The file will be a JSONL file with a single response per line.
|
|
2233
|
+
* The responses will be `GenerateContentResponse` messages formatted as
|
|
2234
|
+
* JSON.
|
|
2235
|
+
* The responses will be written in the same order as the input requests. */
|
|
2236
|
+
readonly responsesFile?: string;
|
|
2237
|
+
/** @description Output only. The responses to the requests in the batch. Returned when the batch was
|
|
2238
|
+
* built using inlined requests. The responses will be in the same order as
|
|
2239
|
+
* the input requests. */
|
|
2240
|
+
readonly inlinedResponses?: components["schemas"]["InlinedResponses"];
|
|
2241
|
+
};
|
|
2242
|
+
/** @description Request to generate a message response from the model. */
|
|
2243
|
+
GenerateMessageRequest: {
|
|
2244
|
+
/** @description Required. The structured textual input given to the model as a prompt.
|
|
2245
|
+
*
|
|
2246
|
+
* Given a
|
|
2247
|
+
* prompt, the model will return what it predicts is the next message in the
|
|
2248
|
+
* discussion. */
|
|
2249
|
+
prompt: components["schemas"]["MessagePrompt"];
|
|
2250
|
+
/**
|
|
2251
|
+
* Format: float
|
|
2252
|
+
* @description Optional. Controls the randomness of the output.
|
|
2253
|
+
*
|
|
2254
|
+
* Values can range over `[0.0,1.0]`,
|
|
2255
|
+
* inclusive. A value closer to `1.0` will produce responses that are more
|
|
2256
|
+
* varied, while a value closer to `0.0` will typically result in
|
|
2257
|
+
* less surprising responses from the model.
|
|
2258
|
+
*/
|
|
2259
|
+
temperature?: number;
|
|
2260
|
+
/**
|
|
2261
|
+
* Format: int32
|
|
2262
|
+
* @description Optional. The number of generated response messages to return.
|
|
2263
|
+
*
|
|
2264
|
+
* This value must be between
|
|
2265
|
+
* `[1, 8]`, inclusive. If unset, this will default to `1`.
|
|
2266
|
+
*/
|
|
2267
|
+
candidateCount?: number;
|
|
2268
|
+
/**
|
|
2269
|
+
* Format: float
|
|
2270
|
+
* @description Optional. The maximum cumulative probability of tokens to consider when sampling.
|
|
2271
|
+
*
|
|
2272
|
+
* The model uses combined Top-k and nucleus sampling.
|
|
2273
|
+
*
|
|
2274
|
+
* Nucleus sampling considers the smallest set of tokens whose probability
|
|
2275
|
+
* sum is at least `top_p`.
|
|
2276
|
+
*/
|
|
2277
|
+
topP?: number;
|
|
2278
|
+
/**
|
|
2279
|
+
* Format: int32
|
|
2280
|
+
* @description Optional. The maximum number of tokens to consider when sampling.
|
|
2281
|
+
*
|
|
2282
|
+
* The model uses combined Top-k and nucleus sampling.
|
|
2283
|
+
*
|
|
2284
|
+
* Top-k sampling considers the set of `top_k` most probable tokens.
|
|
2285
|
+
*/
|
|
2286
|
+
topK?: number;
|
|
2287
|
+
};
|
|
2288
|
+
/** @description Response for `ListGeneratedFiles`. */
|
|
2289
|
+
ListGeneratedFilesResponse: {
|
|
2290
|
+
/** @description The list of `GeneratedFile`s. */
|
|
2291
|
+
generatedFiles?: components["schemas"]["GeneratedFile"][];
|
|
2292
|
+
/** @description A token that can be sent as a `page_token` into a subsequent
|
|
2293
|
+
* `ListGeneratedFiles` call. */
|
|
2294
|
+
nextPageToken?: string;
|
|
2295
|
+
};
|
|
2296
|
+
/** @enum {string} */
|
|
2297
|
+
BatchState: "BATCH_STATE_UNSPECIFIED" | "BATCH_STATE_PENDING" | "BATCH_STATE_RUNNING" | "BATCH_STATE_SUCCEEDED" | "BATCH_STATE_FAILED" | "BATCH_STATE_CANCELLED" | "BATCH_STATE_EXPIRED";
|
|
2298
|
+
/** @description A list of string values. */
|
|
2299
|
+
GroundingChunkStringList: {
|
|
2300
|
+
/** @description The string values of the list. */
|
|
2301
|
+
values?: string[];
|
|
2302
|
+
};
|
|
2303
|
+
/** @description The response to a single request in the batch. */
|
|
2304
|
+
InlinedEmbedContentResponse: {
|
|
2305
|
+
/** @description Output only. The error encountered while processing the request. */
|
|
2306
|
+
readonly error?: components["schemas"]["Status"];
|
|
2307
|
+
/** @description Output only. The metadata associated with the request. */
|
|
2308
|
+
readonly metadata?: {
|
|
2309
|
+
[key: string]: unknown;
|
|
2310
|
+
};
|
|
2311
|
+
/** @description Output only. The response to the request. */
|
|
2312
|
+
readonly response?: components["schemas"]["EmbedContentResponse"];
|
|
2313
|
+
};
|
|
2314
|
+
/** @description A transport that can stream HTTP requests and responses.
|
|
2315
|
+
* Next ID: 6 */
|
|
2316
|
+
StreamableHttpTransport: {
|
|
2317
|
+
/** @description Optional: Fields for authentication headers, timeouts, etc., if needed. */
|
|
2318
|
+
headers?: {
|
|
2319
|
+
[key: string]: string;
|
|
2320
|
+
};
|
|
2321
|
+
/**
|
|
2322
|
+
* Format: google-duration
|
|
2323
|
+
* @description Timeout for SSE read operations.
|
|
2324
|
+
*/
|
|
2325
|
+
sseReadTimeout?: string;
|
|
2326
|
+
/** @description The full URL for the MCPServer endpoint.
|
|
2327
|
+
* Example: "https://api.example.com/mcp" */
|
|
2328
|
+
url?: string;
|
|
2329
|
+
/**
|
|
2330
|
+
* Format: google-duration
|
|
2331
|
+
* @description HTTP timeout for regular operations.
|
|
2332
|
+
*/
|
|
2333
|
+
timeout?: string;
|
|
2334
|
+
/** @description Whether to close the client session when the transport closes. */
|
|
2335
|
+
terminateOnClose?: boolean;
|
|
2336
|
+
};
|
|
2337
|
+
/** @description A citation to a source for a portion of a specific response. */
|
|
2338
|
+
CitationSource: {
|
|
2339
|
+
/**
|
|
2340
|
+
* Format: int32
|
|
2341
|
+
* @description Optional. End of the attributed segment, exclusive.
|
|
2342
|
+
*/
|
|
2343
|
+
endIndex?: number;
|
|
2344
|
+
/** @description Optional. URI that is attributed as a source for a portion of the text. */
|
|
2345
|
+
uri?: string;
|
|
2346
|
+
/** @description Optional. License for the GitHub project that is attributed as a source for segment.
|
|
2347
|
+
*
|
|
2348
|
+
* License info is required for code citations. */
|
|
2349
|
+
license?: string;
|
|
2350
|
+
/**
|
|
2351
|
+
* Format: int32
|
|
2352
|
+
* @description Optional. Start of segment of the response that is attributed to this source.
|
|
2353
|
+
*
|
|
2354
|
+
* Index indicates the start of the segment, measured in bytes.
|
|
2355
|
+
*/
|
|
2356
|
+
startIndex?: number;
|
|
2357
|
+
};
|
|
2358
|
+
/** @description The response to a `BatchEmbedContentsRequest`. */
|
|
2359
|
+
BatchEmbedContentsResponse: {
|
|
2360
|
+
/** @description Output only. The usage metadata for the request. */
|
|
2361
|
+
readonly usageMetadata?: components["schemas"]["EmbeddingUsageMetadata"];
|
|
2362
|
+
/** @description Output only. The embeddings for each request, in the same order as provided in the batch
|
|
2363
|
+
* request. */
|
|
2364
|
+
readonly embeddings?: components["schemas"]["ContentEmbedding"][];
|
|
2365
|
+
};
|
|
2366
|
+
/** @description Response with CachedContents list. */
|
|
2367
|
+
ListCachedContentsResponse: {
|
|
2368
|
+
/** @description List of cached contents. */
|
|
2369
|
+
cachedContents?: components["schemas"]["CachedContent"][];
|
|
2370
|
+
/** @description A token, which can be sent as `page_token` to retrieve the next page.
|
|
2371
|
+
* If this field is omitted, there are no subsequent pages. */
|
|
2372
|
+
nextPageToken?: string;
|
|
2373
|
+
};
|
|
2374
|
+
/** @description Request to generate a text completion response from the model. */
|
|
2375
|
+
GenerateTextRequest: {
|
|
2376
|
+
/**
|
|
2377
|
+
* Format: int32
|
|
2378
|
+
* @description Optional. The maximum number of tokens to include in a candidate.
|
|
2379
|
+
*
|
|
2380
|
+
* If unset, this will default to output_token_limit specified in the `Model`
|
|
2381
|
+
* specification.
|
|
2382
|
+
*/
|
|
2383
|
+
maxOutputTokens?: number;
|
|
2384
|
+
/**
|
|
2385
|
+
* Format: float
|
|
2386
|
+
* @description Optional. The maximum cumulative probability of tokens to consider when sampling.
|
|
2387
|
+
*
|
|
2388
|
+
* The model uses combined Top-k and nucleus sampling.
|
|
2389
|
+
*
|
|
2390
|
+
* Tokens are sorted based on their assigned probabilities so that only the
|
|
2391
|
+
* most likely tokens are considered. Top-k sampling directly limits the
|
|
2392
|
+
* maximum number of tokens to consider, while Nucleus sampling limits number
|
|
2393
|
+
* of tokens based on the cumulative probability.
|
|
2394
|
+
*
|
|
2395
|
+
* Note: The default value varies by model, see the `Model.top_p`
|
|
2396
|
+
* attribute of the `Model` returned the `getModel` function.
|
|
2397
|
+
*/
|
|
2398
|
+
topP?: number;
|
|
2399
|
+
/** @description Required. The free-form input text given to the model as a prompt.
|
|
2400
|
+
*
|
|
2401
|
+
* Given a prompt, the model will generate a TextCompletion response it
|
|
2402
|
+
* predicts as the completion of the input text. */
|
|
2403
|
+
prompt: components["schemas"]["TextPrompt"];
|
|
2404
|
+
/**
|
|
2405
|
+
* Format: float
|
|
2406
|
+
* @description Optional. Controls the randomness of the output.
|
|
2407
|
+
* Note: The default value varies by model, see the `Model.temperature`
|
|
2408
|
+
* attribute of the `Model` returned the `getModel` function.
|
|
2409
|
+
*
|
|
2410
|
+
* Values can range from [0.0,1.0],
|
|
2411
|
+
* inclusive. A value closer to 1.0 will produce responses that are more
|
|
2412
|
+
* varied and creative, while a value closer to 0.0 will typically result in
|
|
2413
|
+
* more straightforward responses from the model.
|
|
2414
|
+
*/
|
|
2415
|
+
temperature?: number;
|
|
2416
|
+
/**
|
|
2417
|
+
* Format: int32
|
|
2418
|
+
* @description Optional. Number of generated responses to return.
|
|
2419
|
+
*
|
|
2420
|
+
* This value must be between [1, 8], inclusive. If unset, this will default
|
|
2421
|
+
* to 1.
|
|
2422
|
+
*/
|
|
2423
|
+
candidateCount?: number;
|
|
2424
|
+
/** @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content.
|
|
2425
|
+
*
|
|
2426
|
+
* that will be enforced on the `GenerateTextRequest.prompt` and
|
|
2427
|
+
* `GenerateTextResponse.candidates`. There should not be more than one
|
|
2428
|
+
* setting for each `SafetyCategory` type. The API will block any prompts and
|
|
2429
|
+
* responses that fail to meet the thresholds set by these settings. This list
|
|
2430
|
+
* overrides the default settings for each `SafetyCategory` specified in the
|
|
2431
|
+
* safety_settings. If there is no `SafetySetting` for a given
|
|
2432
|
+
* `SafetyCategory` provided in the list, the API will use the default safety
|
|
2433
|
+
* setting for that category. Harm categories HARM_CATEGORY_DEROGATORY,
|
|
2434
|
+
* HARM_CATEGORY_TOXICITY, HARM_CATEGORY_VIOLENCE, HARM_CATEGORY_SEXUAL,
|
|
2435
|
+
* HARM_CATEGORY_MEDICAL, HARM_CATEGORY_DANGEROUS are supported in text
|
|
2436
|
+
* service. */
|
|
2437
|
+
safetySettings?: components["schemas"]["SafetySetting"][];
|
|
2438
|
+
/**
|
|
2439
|
+
* Format: int32
|
|
2440
|
+
* @description Optional. The maximum number of tokens to consider when sampling.
|
|
2441
|
+
*
|
|
2442
|
+
* The model uses combined Top-k and nucleus sampling.
|
|
2443
|
+
*
|
|
2444
|
+
* Top-k sampling considers the set of `top_k` most probable tokens.
|
|
2445
|
+
* Defaults to 40.
|
|
2446
|
+
*
|
|
2447
|
+
* Note: The default value varies by model, see the `Model.top_k`
|
|
2448
|
+
* attribute of the `Model` returned the `getModel` function.
|
|
2449
|
+
*/
|
|
2450
|
+
topK?: number;
|
|
2451
|
+
/** @description The set of character sequences (up to 5) that will stop output generation.
|
|
2452
|
+
* If specified, the API will stop at the first appearance of a stop
|
|
2453
|
+
* sequence. The stop sequence will not be included as part of the response. */
|
|
2454
|
+
stopSequences?: string[];
|
|
2455
|
+
};
|
|
2456
|
+
/** @description Batch request to get embeddings from the model for a list of prompts. */
|
|
2457
|
+
BatchEmbedContentsRequest: {
|
|
2458
|
+
/** @description Required. Embed requests for the batch. The model in each of these requests must
|
|
2459
|
+
* match the model specified `BatchEmbedContentsRequest.model`. */
|
|
2460
|
+
requests: components["schemas"]["EmbedContentRequest"][];
|
|
2461
|
+
};
|
|
2462
|
+
/** @description User provided string values assigned to a single metadata key. */
|
|
2463
|
+
StringList: {
|
|
2464
|
+
/** @description The string values of the metadata to store. */
|
|
2465
|
+
values?: string[];
|
|
2466
|
+
};
|
|
2467
|
+
/** @description Request for a `BatchGenerateContent` operation. */
|
|
2468
|
+
BatchGenerateContentRequest: {
|
|
2469
|
+
/** @description Required. The batch to create. */
|
|
2470
|
+
batch: components["schemas"]["GenerateContentBatch"];
|
|
2471
|
+
};
|
|
2472
|
+
CustomLongRunningOperation: {
|
|
2473
|
+
/** @description The normal, successful response of the operation. If the original
|
|
2474
|
+
* method returns no data on success, such as `Delete`, the response is
|
|
2475
|
+
* `google.protobuf.Empty`. If the original method is standard
|
|
2476
|
+
* `Get`/`Create`/`Update`, the response should be the resource. For other
|
|
2477
|
+
* methods, the response should have the type `XxxResponse`, where `Xxx`
|
|
2478
|
+
* is the original method name. For example, if the original method name
|
|
2479
|
+
* is `TakeSnapshot()`, the inferred response type is
|
|
2480
|
+
* `TakeSnapshotResponse`. */
|
|
2481
|
+
response?: {
|
|
2482
|
+
[key: string]: unknown;
|
|
2483
|
+
};
|
|
2484
|
+
/** @description Service-specific metadata associated with the operation. It typically
|
|
2485
|
+
* contains progress information and common metadata such as create time.
|
|
2486
|
+
* Some services might not provide such metadata. Any method that returns a
|
|
2487
|
+
* long-running operation should document the metadata type, if any. */
|
|
2488
|
+
metadata?: {
|
|
2489
|
+
[key: string]: unknown;
|
|
2490
|
+
};
|
|
2491
|
+
/** @description The server-assigned name, which is only unique within the same service that
|
|
2492
|
+
* originally returns it. If you use the default HTTP mapping, the
|
|
2493
|
+
* `name` should be a resource name ending with `operations/{unique_id}`. */
|
|
2494
|
+
name?: string;
|
|
2495
|
+
/** @description The error result of the operation in case of failure or cancellation. */
|
|
2496
|
+
error?: components["schemas"]["Status"];
|
|
2497
|
+
/** @description If the value is `false`, it means the operation is still in progress.
|
|
2498
|
+
* If `true`, the operation is completed, and either `error` or `response` is
|
|
2499
|
+
* available. */
|
|
2500
|
+
done?: boolean;
|
|
2501
|
+
};
|
|
2502
|
+
/** @description This resource represents a long-running operation where metadata and response fields are strongly typed. */
|
|
2503
|
+
AsyncBatchEmbedContentOperation: components["schemas"]["BaseOperation"] & {
|
|
2504
|
+
metadata?: components["schemas"]["EmbedContentBatch"];
|
|
2505
|
+
response?: components["schemas"]["AsyncBatchEmbedContentResponse"];
|
|
2506
|
+
};
|
|
2507
|
+
/** @description Tool that executes code generated by the model, and automatically returns
|
|
2508
|
+
* the result to the model.
|
|
2509
|
+
*
|
|
2510
|
+
* See also `ExecutableCode` and `CodeExecutionResult` which are only generated
|
|
2511
|
+
* when using this tool. */
|
|
2512
|
+
CodeExecution: Record<string, never>;
|
|
2513
|
+
/** @description Metadata for PredictLongRunning long running operations. */
|
|
2514
|
+
PredictLongRunningMetadata: Record<string, never>;
|
|
2515
|
+
/** @description Configuration for a white space chunking algorithm [white space delimited]. */
|
|
2516
|
+
WhiteSpaceConfig: {
|
|
2517
|
+
/**
|
|
2518
|
+
* Format: int32
|
|
2519
|
+
* @description Maximum number of overlapping tokens between two adjacent chunks.
|
|
2520
|
+
*/
|
|
2521
|
+
maxOverlapTokens?: number;
|
|
2522
|
+
/**
|
|
2523
|
+
* Format: int32
|
|
2524
|
+
* @description Maximum number of tokens per chunk.
|
|
2525
|
+
* Tokens are defined as words for this chunking algorithm.
|
|
2526
|
+
* Note: we are defining tokens as words split by whitespace as opposed to
|
|
2527
|
+
* the output of a tokenizer. The context window of the latest gemini
|
|
2528
|
+
* embedding model as of 2025-04-17 is currently 8192 tokens. We assume that
|
|
2529
|
+
* the average word is 5 characters. Therefore, we set the upper limit to
|
|
2530
|
+
* 2**9, which is 512 words, or 2560 tokens, assuming worst case a
|
|
2531
|
+
* character per token. This is a conservative estimate meant to prevent
|
|
2532
|
+
* context window overflow.
|
|
2533
|
+
*/
|
|
2534
|
+
maxTokensPerChunk?: number;
|
|
2535
|
+
};
|
|
2536
|
+
/** @description Safety rating for a piece of content.
|
|
2537
|
+
*
|
|
2538
|
+
* The safety rating contains the category of harm and the
|
|
2539
|
+
* harm probability level in that category for a piece of content.
|
|
2540
|
+
* Content is classified for safety across a number of
|
|
2541
|
+
* harm categories and the probability of the harm classification is included
|
|
2542
|
+
* here. */
|
|
2543
|
+
SafetyRating: {
|
|
2544
|
+
/**
|
|
2545
|
+
* @description Required. The probability of harm for this content.
|
|
2546
|
+
* @enum {string}
|
|
2547
|
+
*/
|
|
2548
|
+
probability: "HARM_PROBABILITY_UNSPECIFIED" | "NEGLIGIBLE" | "LOW" | "MEDIUM" | "HIGH";
|
|
2549
|
+
/** @description Required. The category for this rating. */
|
|
2550
|
+
category: components["schemas"]["HarmCategory"];
|
|
2551
|
+
/** @description Was this content blocked because of this rating? */
|
|
2552
|
+
blocked?: boolean;
|
|
2553
|
+
};
|
|
2554
|
+
/** @description URI based data. */
|
|
2555
|
+
FileData: {
|
|
2556
|
+
/** @description Optional. The IANA standard MIME type of the source data. */
|
|
2557
|
+
mimeType?: string;
|
|
2558
|
+
/** @description Required. URI. */
|
|
2559
|
+
fileUri: string;
|
|
2560
|
+
};
|
|
2561
|
+
/** @description Tool to support URL context retrieval. */
|
|
2562
|
+
UrlContext: Record<string, never>;
|
|
2563
|
+
/** @description The configuration for the prebuilt speaker to use. */
|
|
2564
|
+
PrebuiltVoiceConfig: {
|
|
2565
|
+
/** @description The name of the preset voice to use. */
|
|
2566
|
+
voiceName?: string;
|
|
2567
|
+
};
|
|
2568
|
+
/** @description Response from UploadToFileSearchStore. */
|
|
2569
|
+
UploadToFileSearchStoreResponse: {
|
|
2570
|
+
/** @description The name of the `FileSearchStore` containing `Document`s.
|
|
2571
|
+
* Example: `fileSearchStores/my-file-search-store-123` */
|
|
2572
|
+
parent?: string;
|
|
2573
|
+
/** @description Immutable. Identifier. The identifier for the `Document` imported.
|
|
2574
|
+
* Example: `fileSearchStores/my-file-search-store-123a456b789c` */
|
|
2575
|
+
documentName?: string;
|
|
2576
|
+
/** @description MIME type of the file. */
|
|
2577
|
+
mimeType?: string;
|
|
2578
|
+
/**
|
|
2579
|
+
* Format: int64
|
|
2580
|
+
* @description Size of the file in bytes.
|
|
2581
|
+
*/
|
|
2582
|
+
sizeBytes?: string;
|
|
2583
|
+
};
|
|
2584
|
+
/** @description Metadata returned to client when grounding is enabled. */
|
|
2585
|
+
GroundingMetadata: {
|
|
2586
|
+
/** @description Optional. Google search entry for the following-up web searches. */
|
|
2587
|
+
searchEntryPoint?: components["schemas"]["SearchEntryPoint"];
|
|
2588
|
+
/** @description Web search queries for the following-up web search. */
|
|
2589
|
+
webSearchQueries?: string[];
|
|
2590
|
+
/** @description List of supporting references retrieved from specified grounding source.
|
|
2591
|
+
* When streaming, this only contains the grounding chunks that have not been
|
|
2592
|
+
* included in the grounding metadata of previous responses. */
|
|
2593
|
+
groundingChunks?: components["schemas"]["GroundingChunk"][];
|
|
2594
|
+
/** @description Image search queries used for grounding. */
|
|
2595
|
+
imageSearchQueries?: string[];
|
|
2596
|
+
/** @description List of grounding support. */
|
|
2597
|
+
groundingSupports?: components["schemas"]["GoogleAiGenerativelanguageV1betaGroundingSupport"][];
|
|
2598
|
+
/** @description Metadata related to retrieval in the grounding flow. */
|
|
2599
|
+
retrievalMetadata?: components["schemas"]["RetrievalMetadata"];
|
|
2600
|
+
/** @description Optional. Resource name of the Google Maps widget context token that can be used
|
|
2601
|
+
* with the PlacesContextElement widget in order to render contextual data.
|
|
2602
|
+
* Only populated in the case that grounding with Google Maps is enabled. */
|
|
2603
|
+
googleMapsWidgetContextToken?: string;
|
|
2604
|
+
};
|
|
2605
|
+
/** @description Output text returned from a model. */
|
|
2606
|
+
TextCompletion: {
|
|
2607
|
+
/** @description Output only. The generated text returned from the model. */
|
|
2608
|
+
readonly output?: string;
|
|
2609
|
+
/** @description Output only. Citation information for model-generated `output` in this
|
|
2610
|
+
* `TextCompletion`.
|
|
2611
|
+
*
|
|
2612
|
+
* This field may be populated with attribution information for any text
|
|
2613
|
+
* included in the `output`. */
|
|
2614
|
+
readonly citationMetadata?: components["schemas"]["CitationMetadata"];
|
|
2615
|
+
/** @description Ratings for the safety of a response.
|
|
2616
|
+
*
|
|
2617
|
+
* There is at most one rating per category. */
|
|
2618
|
+
safetyRatings?: components["schemas"]["SafetyRating"][];
|
|
2619
|
+
};
|
|
2620
|
+
/** @description Request containing the `Content` for the model to embed. */
|
|
2621
|
+
EmbedContentRequest: {
|
|
2622
|
+
/** @description Required. The content to embed. Only the `parts.text` fields will be counted. */
|
|
2623
|
+
content: components["schemas"]["Content"];
|
|
2624
|
+
/** @description Optional. Optional task type for which the embeddings will be used. Not supported on
|
|
2625
|
+
* earlier models (`models/embedding-001`). */
|
|
2626
|
+
taskType?: components["schemas"]["TaskType"];
|
|
2627
|
+
/** @description Optional. An optional title for the text. Only applicable when TaskType is
|
|
2628
|
+
* `RETRIEVAL_DOCUMENT`.
|
|
2629
|
+
*
|
|
2630
|
+
* Note: Specifying a `title` for `RETRIEVAL_DOCUMENT` provides better quality
|
|
2631
|
+
* embeddings for retrieval. */
|
|
2632
|
+
title?: string;
|
|
2633
|
+
/** @description Required. The model's resource name. This serves as an ID for the Model to use.
|
|
2634
|
+
*
|
|
2635
|
+
* This name should match a model name returned by the `ListModels` method.
|
|
2636
|
+
*
|
|
2637
|
+
* Format: `models/{model}` */
|
|
2638
|
+
model: string;
|
|
2639
|
+
/**
|
|
2640
|
+
* Format: int32
|
|
2641
|
+
* @description Optional. Optional reduced dimension for the output embedding. If set, excessive
|
|
2642
|
+
* values in the output embedding are truncated from the end. Supported by
|
|
2643
|
+
* newer models since 2024 only. You cannot set this value if using the
|
|
2644
|
+
* earlier model (`models/embedding-001`).
|
|
2645
|
+
*/
|
|
2646
|
+
outputDimensionality?: number;
|
|
2647
|
+
};
|
|
2648
|
+
/** @description User provided metadata stored as key-value pairs. */
|
|
2649
|
+
CustomMetadata: {
|
|
2650
|
+
/** @description The string value of the metadata to store. */
|
|
2651
|
+
stringValue?: string;
|
|
2652
|
+
/** @description The StringList value of the metadata to store. */
|
|
2653
|
+
stringListValue?: components["schemas"]["StringList"];
|
|
2654
|
+
/**
|
|
2655
|
+
* Format: float
|
|
2656
|
+
* @description The numeric value of the metadata to store.
|
|
2657
|
+
*/
|
|
2658
|
+
numericValue?: number;
|
|
2659
|
+
/** @description Required. The key of the metadata to store. */
|
|
2660
|
+
key: string;
|
|
2661
|
+
};
|
|
2662
|
+
/** @description Standard web search for grounding and related configurations. */
|
|
2663
|
+
WebSearch: Record<string, never>;
|
|
2664
|
+
/** @description Chunk from image search. */
|
|
2665
|
+
Image: {
|
|
2666
|
+
/** @description The title of the web page that the image is from. */
|
|
2667
|
+
title?: string;
|
|
2668
|
+
/** @description The root domain of the web page that the image is from, e.g.
|
|
2669
|
+
* "example.com". */
|
|
2670
|
+
domain?: string;
|
|
2671
|
+
/** @description The web page URI for attribution. */
|
|
2672
|
+
sourceUri?: string;
|
|
2673
|
+
/** @description The image asset URL. */
|
|
2674
|
+
imageUri?: string;
|
|
2675
|
+
};
|
|
2676
|
+
/** @description The response message for Operations.ListOperations. */
|
|
2677
|
+
ListOperationsResponse: {
|
|
2678
|
+
/** @description A list of operations that matches the specified filter in the request. */
|
|
2679
|
+
operations?: components["schemas"]["Operation"][];
|
|
2680
|
+
/** @description The standard List next-page token. */
|
|
2681
|
+
nextPageToken?: string;
|
|
2682
|
+
/** @description Unordered list. Unreachable resources. Populated when the request sets
|
|
2683
|
+
* `ListOperationsRequest.return_partial_success` and reads across
|
|
2684
|
+
* collections. For example, when attempting to list all resources across all
|
|
2685
|
+
* supported locations. */
|
|
2686
|
+
unreachable?: string[];
|
|
2687
|
+
};
|
|
2688
|
+
/** @description The responses to the requests in the batch. */
|
|
2689
|
+
InlinedEmbedContentResponses: {
|
|
2690
|
+
/** @description Output only. The responses to the requests in the batch. */
|
|
2691
|
+
readonly inlinedResponses?: components["schemas"]["InlinedEmbedContentResponse"][];
|
|
2692
|
+
};
|
|
2693
|
+
/** @description Request to generate a grounded answer from the `Model`. */
|
|
2694
|
+
GenerateAnswerRequest: {
|
|
2695
|
+
/** @description Required. The content of the current conversation with the `Model`. For single-turn
|
|
2696
|
+
* queries, this is a single question to answer. For multi-turn queries, this
|
|
2697
|
+
* is a repeated field that contains conversation history and the last
|
|
2698
|
+
* `Content` in the list containing the question.
|
|
2699
|
+
*
|
|
2700
|
+
* Note: `GenerateAnswer` only supports queries in English. */
|
|
2701
|
+
contents: components["schemas"]["Content"][];
|
|
2702
|
+
/** @description Content retrieved from resources created via the Semantic Retriever
|
|
2703
|
+
* API. */
|
|
2704
|
+
semanticRetriever?: components["schemas"]["SemanticRetrieverConfig"];
|
|
2705
|
+
/** @description Optional. A list of unique `SafetySetting` instances for blocking unsafe content.
|
|
2706
|
+
*
|
|
2707
|
+
* This will be enforced on the `GenerateAnswerRequest.contents` and
|
|
2708
|
+
* `GenerateAnswerResponse.candidate`. There should not be more than one
|
|
2709
|
+
* setting for each `SafetyCategory` type. The API will block any contents and
|
|
2710
|
+
* responses that fail to meet the thresholds set by these settings. This list
|
|
2711
|
+
* overrides the default settings for each `SafetyCategory` specified in the
|
|
2712
|
+
* safety_settings. If there is no `SafetySetting` for a given
|
|
2713
|
+
* `SafetyCategory` provided in the list, the API will use the default safety
|
|
2714
|
+
* setting for that category. Harm categories HARM_CATEGORY_HATE_SPEECH,
|
|
2715
|
+
* HARM_CATEGORY_SEXUALLY_EXPLICIT, HARM_CATEGORY_DANGEROUS_CONTENT,
|
|
2716
|
+
* HARM_CATEGORY_HARASSMENT are supported.
|
|
2717
|
+
* Refer to the
|
|
2718
|
+
* [guide](https://ai.google.dev/gemini-api/docs/safety-settings)
|
|
2719
|
+
* for detailed information on available safety settings. Also refer to the
|
|
2720
|
+
* [Safety guidance](https://ai.google.dev/gemini-api/docs/safety-guidance) to
|
|
2721
|
+
* learn how to incorporate safety considerations in your AI applications. */
|
|
2722
|
+
safetySettings?: components["schemas"]["SafetySetting"][];
|
|
2723
|
+
/**
|
|
2724
|
+
* Format: float
|
|
2725
|
+
* @description Optional. Controls the randomness of the output.
|
|
2726
|
+
*
|
|
2727
|
+
* Values can range from [0.0,1.0], inclusive. A value closer to 1.0 will
|
|
2728
|
+
* produce responses that are more varied and creative, while a value closer
|
|
2729
|
+
* to 0.0 will typically result in more straightforward responses from the
|
|
2730
|
+
* model. A low temperature (~0.2) is usually recommended for
|
|
2731
|
+
* Attributed-Question-Answering use cases.
|
|
2732
|
+
*/
|
|
2733
|
+
temperature?: number;
|
|
2734
|
+
/**
|
|
2735
|
+
* @description Required. Style in which answers should be returned.
|
|
2736
|
+
* @enum {string}
|
|
2737
|
+
*/
|
|
2738
|
+
answerStyle: "ANSWER_STYLE_UNSPECIFIED" | "ABSTRACTIVE" | "EXTRACTIVE" | "VERBOSE";
|
|
2739
|
+
/** @description Passages provided inline with the request. */
|
|
2740
|
+
inlinePassages?: components["schemas"]["GroundingPassages"];
|
|
2741
|
+
};
|
|
2742
|
+
/**
|
|
2743
|
+
* @deprecated
|
|
2744
|
+
* @description Deprecated: Use `GenerateContentRequest.processing_options` instead. Metadata
|
|
2745
|
+
* describes the input video content.
|
|
2746
|
+
*/
|
|
2747
|
+
VideoMetadata: {
|
|
2748
|
+
/**
|
|
2749
|
+
* Format: double
|
|
2750
|
+
* @description Optional. The frame rate of the video sent to the model. If not specified, the
|
|
2751
|
+
* default value will be 1.0.
|
|
2752
|
+
* The fps range is (0.0, 24.0].
|
|
2753
|
+
*/
|
|
2754
|
+
fps?: number;
|
|
2755
|
+
/**
|
|
2756
|
+
* Format: google-duration
|
|
2757
|
+
* @description Optional. The end offset of the video.
|
|
2758
|
+
*/
|
|
2759
|
+
endOffset?: string;
|
|
2760
|
+
/**
|
|
2761
|
+
* Format: google-duration
|
|
2762
|
+
* @description Optional. The start offset of the video.
|
|
2763
|
+
*/
|
|
2764
|
+
startOffset?: string;
|
|
2765
|
+
};
|
|
2766
|
+
/** @description The configuration for the multi-speaker setup. */
|
|
2767
|
+
MultiSpeakerVoiceConfig: {
|
|
2768
|
+
/** @description Required. All the enabled speaker voices. */
|
|
2769
|
+
speakerVoiceConfigs: components["schemas"]["SpeakerVoiceConfig"][];
|
|
2770
|
+
};
|
|
2771
|
+
/** @description Represents a time interval, encoded as a Timestamp start (inclusive) and a
|
|
2772
|
+
* Timestamp end (exclusive).
|
|
2773
|
+
*
|
|
2774
|
+
* The start must be less than or equal to the end.
|
|
2775
|
+
* When the start equals the end, the interval is empty (matches no time).
|
|
2776
|
+
* When both start and end are unspecified, the interval matches any time. */
|
|
2777
|
+
Interval: {
|
|
2778
|
+
/**
|
|
2779
|
+
* Format: date-time
|
|
2780
|
+
* @description Optional. Inclusive start of the interval.
|
|
2781
|
+
*
|
|
2782
|
+
* If specified, a Timestamp matching this interval will have to be the same
|
|
2783
|
+
* or after the start.
|
|
2784
|
+
*/
|
|
2785
|
+
startTime?: string;
|
|
2786
|
+
/**
|
|
2787
|
+
* Format: date-time
|
|
2788
|
+
* @description Optional. Exclusive end of the interval.
|
|
2789
|
+
*
|
|
2790
|
+
* If specified, a Timestamp matching this interval will have to be before the
|
|
2791
|
+
* end.
|
|
2792
|
+
*/
|
|
2793
|
+
endTime?: string;
|
|
2794
|
+
};
|
|
2795
|
+
/** @description The output of a batch request. This is returned in the
|
|
2796
|
+
* `AsyncBatchEmbedContentResponse` or the `EmbedContentBatch.output` field. */
|
|
2797
|
+
EmbedContentBatchOutput: {
|
|
2798
|
+
/** @description Output only. The file ID of the file containing the responses.
|
|
2799
|
+
* The file will be a JSONL file with a single response per line.
|
|
2800
|
+
* The responses will be `EmbedContentResponse` messages formatted as JSON.
|
|
2801
|
+
* The responses will be written in the same order as the input requests. */
|
|
2802
|
+
readonly responsesFile?: string;
|
|
2803
|
+
/** @description Output only. The responses to the requests in the batch. Returned when the batch was
|
|
2804
|
+
* built using inlined requests. The responses will be in the same order as
|
|
2805
|
+
* the input requests. */
|
|
2806
|
+
readonly inlinedResponses?: components["schemas"]["InlinedEmbedContentResponses"];
|
|
2807
|
+
};
|
|
2808
|
+
/** @description Response for `CreateFile`. */
|
|
2809
|
+
CreateFileResponse: {
|
|
2810
|
+
/** @description Metadata for the created file. */
|
|
2811
|
+
file?: components["schemas"]["File"];
|
|
2812
|
+
};
|
|
2813
|
+
/** @description The responses to the requests in the batch. */
|
|
2814
|
+
InlinedResponses: {
|
|
2815
|
+
/** @description Output only. The responses to the requests in the batch. */
|
|
2816
|
+
readonly inlinedResponses?: components["schemas"]["InlinedResponse"][];
|
|
2817
|
+
};
|
|
2818
|
+
/** @description A MCPServer is a server that can be called by the model to perform actions.
|
|
2819
|
+
* It is a server that implements the MCP protocol.
|
|
2820
|
+
* Next ID: 5 */
|
|
2821
|
+
McpServer: {
|
|
2822
|
+
/** @description A transport that can stream HTTP requests and responses. */
|
|
2823
|
+
streamableHttpTransport?: components["schemas"]["StreamableHttpTransport"];
|
|
2824
|
+
/** @description The name of the MCPServer. */
|
|
2825
|
+
name?: string;
|
|
2826
|
+
};
|
|
2827
|
+
/** @description Result of executing the `ExecutableCode`.
|
|
2828
|
+
*
|
|
2829
|
+
* Generated only when the `CodeExecution` tool is used. */
|
|
2830
|
+
CodeExecutionResult: {
|
|
2831
|
+
/** @description Optional. The identifier of the `ExecutableCode` part this result is for.
|
|
2832
|
+
* Only populated if the corresponding `ExecutableCode` has an id. */
|
|
2833
|
+
id?: string;
|
|
2834
|
+
/**
|
|
2835
|
+
* @description Required. Outcome of the code execution.
|
|
2836
|
+
* @enum {string}
|
|
2837
|
+
*/
|
|
2838
|
+
outcome: "OUTCOME_UNSPECIFIED" | "OUTCOME_OK" | "OUTCOME_FAILED" | "OUTCOME_DEADLINE_EXCEEDED";
|
|
2839
|
+
/** @description Optional. Contains stdout when code execution is successful, stderr or other
|
|
2840
|
+
* description otherwise. */
|
|
2841
|
+
output?: string;
|
|
2842
|
+
};
|
|
2843
|
+
/** @description Metadata related to url context retrieval tool. */
|
|
2844
|
+
UrlContextMetadata: {
|
|
2845
|
+
/** @description List of url context. */
|
|
2846
|
+
urlMetadata?: components["schemas"]["UrlMetadata"][];
|
|
2847
|
+
};
|
|
2848
|
+
/** @description Segment of the content. */
|
|
2849
|
+
GoogleAiGenerativelanguageV1betaSegment: {
|
|
2850
|
+
/**
|
|
2851
|
+
* Format: int32
|
|
2852
|
+
* @description The index of a Part object within its parent Content object.
|
|
2853
|
+
*/
|
|
2854
|
+
partIndex?: number;
|
|
2855
|
+
/**
|
|
2856
|
+
* Format: int32
|
|
2857
|
+
* @description End index in the given Part, measured in bytes. Offset from the start of
|
|
2858
|
+
* the Part, exclusive, starting at zero.
|
|
2859
|
+
*/
|
|
2860
|
+
endIndex?: number;
|
|
2861
|
+
/**
|
|
2862
|
+
* Format: int32
|
|
2863
|
+
* @description Start index in the given Part, measured in bytes. Offset from the start of
|
|
2864
|
+
* the Part, inclusive, starting at zero.
|
|
2865
|
+
*/
|
|
2866
|
+
startIndex?: number;
|
|
2867
|
+
/** @description The text corresponding to the segment from the response. */
|
|
2868
|
+
text?: string;
|
|
2869
|
+
};
|
|
2870
|
+
/** @description Configuration options for model generation and outputs. Not all parameters
|
|
2871
|
+
* are configurable for every model. */
|
|
2872
|
+
GenerationConfig: {
|
|
2873
|
+
/** @description Optional. If true, export the logprobs results in response. */
|
|
2874
|
+
responseLogprobs?: boolean;
|
|
2875
|
+
/**
|
|
2876
|
+
* Format: int32
|
|
2877
|
+
* @description Optional. The maximum number of tokens to include in a response candidate.
|
|
2878
|
+
*
|
|
2879
|
+
* Note: The default value varies by model, see the `Model.output_token_limit`
|
|
2880
|
+
* attribute of the `Model` returned from the `getModel` function.
|
|
2881
|
+
*/
|
|
2882
|
+
maxOutputTokens?: number;
|
|
2883
|
+
/**
|
|
2884
|
+
* Format: float
|
|
2885
|
+
* @description Optional. The maximum cumulative probability of tokens to consider when sampling.
|
|
2886
|
+
*
|
|
2887
|
+
* The model uses combined Top-k and Top-p (nucleus) sampling.
|
|
2888
|
+
*
|
|
2889
|
+
* Tokens are sorted based on their assigned probabilities so that only the
|
|
2890
|
+
* most likely tokens are considered. Top-k sampling directly limits the
|
|
2891
|
+
* maximum number of tokens to consider, while Nucleus sampling limits the
|
|
2892
|
+
* number of tokens based on the cumulative probability.
|
|
2893
|
+
*
|
|
2894
|
+
* Note: The default value varies by `Model` and is specified by
|
|
2895
|
+
* the`Model.top_p` attribute returned from the `getModel` function. An empty
|
|
2896
|
+
* `top_k` attribute indicates that the model doesn't apply top-k sampling
|
|
2897
|
+
* and doesn't allow setting `top_k` on requests.
|
|
2898
|
+
*/
|
|
2899
|
+
topP?: number;
|
|
2900
|
+
/**
|
|
2901
|
+
* Format: int32
|
|
2902
|
+
* @description Optional. Seed used in decoding. If not set, the request uses a randomly generated
|
|
2903
|
+
* seed.
|
|
2904
|
+
*/
|
|
2905
|
+
seed?: number;
|
|
2906
|
+
/**
|
|
2907
|
+
* Format: float
|
|
2908
|
+
* @description Optional. Frequency penalty applied to the next token's logprobs, multiplied by the
|
|
2909
|
+
* number of times each token has been seen in the respponse so far.
|
|
2910
|
+
*
|
|
2911
|
+
* A positive penalty will discourage the use of tokens that have already
|
|
2912
|
+
* been used, proportional to the number of times the token has been used:
|
|
2913
|
+
* The more a token is used, the more difficult it is for the model to use
|
|
2914
|
+
* that token again increasing the vocabulary of responses.
|
|
2915
|
+
*
|
|
2916
|
+
* Caution: A _negative_ penalty will encourage the model to reuse tokens
|
|
2917
|
+
* proportional to the number of times the token has been used. Small
|
|
2918
|
+
* negative values will reduce the vocabulary of a response. Larger negative
|
|
2919
|
+
* values will cause the model to start repeating a common token until it
|
|
2920
|
+
* hits the max_output_tokens
|
|
2921
|
+
* limit.
|
|
2922
|
+
*/
|
|
2923
|
+
frequencyPenalty?: number;
|
|
2924
|
+
/** @description Optional. The speech generation config. */
|
|
2925
|
+
speechConfig?: components["schemas"]["SpeechConfig"];
|
|
2926
|
+
/**
|
|
2927
|
+
* Format: float
|
|
2928
|
+
* @description Optional. Controls the randomness of the output.
|
|
2929
|
+
*
|
|
2930
|
+
* Note: The default value varies by model, see the `Model.temperature`
|
|
2931
|
+
* attribute of the `Model` returned from the `getModel` function.
|
|
2932
|
+
*
|
|
2933
|
+
* Values can range from [0.0, 2.0].
|
|
2934
|
+
*/
|
|
2935
|
+
temperature?: number;
|
|
2936
|
+
/** @description Optional. MIME type of the generated candidate text.
|
|
2937
|
+
* Supported MIME types are:
|
|
2938
|
+
* `text/plain`: (default) Text output.
|
|
2939
|
+
* `application/json`: JSON response in the response candidates.
|
|
2940
|
+
* `text/x.enum`: ENUM as a string response in the response candidates.
|
|
2941
|
+
* Refer to the
|
|
2942
|
+
* [docs](https://ai.google.dev/gemini-api/docs/prompting_with_media#plain_text_formats)
|
|
2943
|
+
* for a list of all supported text MIME types. */
|
|
2944
|
+
responseMimeType?: string;
|
|
2945
|
+
/** @description Optional. An internal detail. Use `responseJsonSchema` rather than this field. */
|
|
2946
|
+
responseJsonSchema?: unknown;
|
|
2947
|
+
/** @description Optional. Enables enhanced civic answers. It may not be available for all models. */
|
|
2948
|
+
enableEnhancedCivicAnswers?: boolean;
|
|
2949
|
+
/**
|
|
2950
|
+
* Format: int32
|
|
2951
|
+
* @description Optional. The maximum number of tokens to consider when sampling.
|
|
2952
|
+
*
|
|
2953
|
+
* Gemini models use Top-p (nucleus) sampling or a combination of Top-k and
|
|
2954
|
+
* nucleus sampling. Top-k sampling considers the set of `top_k` most probable
|
|
2955
|
+
* tokens. Models running with nucleus sampling don't allow top_k setting.
|
|
2956
|
+
*
|
|
2957
|
+
* Note: The default value varies by `Model` and is specified by
|
|
2958
|
+
* the`Model.top_p` attribute returned from the `getModel` function. An empty
|
|
2959
|
+
* `top_k` attribute indicates that the model doesn't apply top-k sampling
|
|
2960
|
+
* and doesn't allow setting `top_k` on requests.
|
|
2961
|
+
*/
|
|
2962
|
+
topK?: number;
|
|
2963
|
+
/**
|
|
2964
|
+
* @description Optional. If specified, the media resolution specified will be used.
|
|
2965
|
+
* @enum {string}
|
|
2966
|
+
*/
|
|
2967
|
+
mediaResolution?: "MEDIA_RESOLUTION_UNSPECIFIED" | "MEDIA_RESOLUTION_LOW" | "MEDIA_RESOLUTION_MEDIUM" | "MEDIA_RESOLUTION_HIGH";
|
|
2968
|
+
/**
|
|
2969
|
+
* Format: float
|
|
2970
|
+
* @description Optional. Presence penalty applied to the next token's logprobs if the token has
|
|
2971
|
+
* already been seen in the response.
|
|
2972
|
+
*
|
|
2973
|
+
* This penalty is binary on/off and not dependant on the number of times the
|
|
2974
|
+
* token is used (after the first). Use
|
|
2975
|
+
* frequency_penalty
|
|
2976
|
+
* for a penalty that increases with each use.
|
|
2977
|
+
*
|
|
2978
|
+
* A positive penalty will discourage the use of tokens that have already
|
|
2979
|
+
* been used in the response, increasing the vocabulary.
|
|
2980
|
+
*
|
|
2981
|
+
* A negative penalty will encourage the use of tokens that have already been
|
|
2982
|
+
* used in the response, decreasing the vocabulary.
|
|
2983
|
+
*/
|
|
2984
|
+
presencePenalty?: number;
|
|
2985
|
+
/**
|
|
2986
|
+
* Format: int32
|
|
2987
|
+
* @description Optional. Only valid if response_logprobs=True.
|
|
2988
|
+
* This sets the number of top logprobs, including the chosen candidate, to
|
|
2989
|
+
* return at each decoding step in the Candidate.logprobs_result. The
|
|
2990
|
+
* number must be in the range of [0, 20].
|
|
2991
|
+
*/
|
|
2992
|
+
logprobs?: number;
|
|
2993
|
+
/** @description Optional. Config for image generation.
|
|
2994
|
+
* An error will be returned if this field is set for models that don't
|
|
2995
|
+
* support these config options. */
|
|
2996
|
+
imageConfig?: components["schemas"]["ImageConfig"];
|
|
2997
|
+
/** @description Optional. Output schema of the generated response. This is an alternative to
|
|
2998
|
+
* `response_schema` that accepts [JSON Schema](https://json-schema.org/).
|
|
2999
|
+
*
|
|
3000
|
+
* If set, `response_schema` must be omitted, but `response_mime_type` is
|
|
3001
|
+
* required.
|
|
3002
|
+
*
|
|
3003
|
+
* While the full JSON Schema may be sent, not all features are supported.
|
|
3004
|
+
* Specifically, only the following properties are supported:
|
|
3005
|
+
*
|
|
3006
|
+
* - `$id`
|
|
3007
|
+
* - `$defs`
|
|
3008
|
+
* - `$ref`
|
|
3009
|
+
* - `$anchor`
|
|
3010
|
+
* - `type`
|
|
3011
|
+
* - `format`
|
|
3012
|
+
* - `title`
|
|
3013
|
+
* - `description`
|
|
3014
|
+
* - `enum` (for strings and numbers)
|
|
3015
|
+
* - `items`
|
|
3016
|
+
* - `prefixItems`
|
|
3017
|
+
* - `minItems`
|
|
3018
|
+
* - `maxItems`
|
|
3019
|
+
* - `minimum`
|
|
3020
|
+
* - `maximum`
|
|
3021
|
+
* - `anyOf`
|
|
3022
|
+
* - `oneOf` (interpreted the same as `anyOf`)
|
|
3023
|
+
* - `properties`
|
|
3024
|
+
* - `additionalProperties`
|
|
3025
|
+
* - `required`
|
|
3026
|
+
*
|
|
3027
|
+
* The non-standard `propertyOrdering` property may also be set.
|
|
3028
|
+
*
|
|
3029
|
+
* Cyclic references are unrolled to a limited degree and, as such, may only
|
|
3030
|
+
* be used within non-required properties. (Nullable properties are not
|
|
3031
|
+
* sufficient.) If `$ref` is set on a sub-schema, no other properties, except
|
|
3032
|
+
* for than those starting as a `$`, may be set. */
|
|
3033
|
+
_responseJsonSchema?: unknown;
|
|
3034
|
+
/**
|
|
3035
|
+
* Format: int32
|
|
3036
|
+
* @description Optional. Number of generated responses to return. If unset, this will default
|
|
3037
|
+
* to 1. Please note that this doesn't work for previous generation
|
|
3038
|
+
* models (Gemini 1.0 family)
|
|
3039
|
+
*/
|
|
3040
|
+
candidateCount?: number;
|
|
3041
|
+
/** @description Optional. The requested modalities of the response. Represents the set of modalities
|
|
3042
|
+
* that the model can return, and should be expected in the response. This is
|
|
3043
|
+
* an exact match to the modalities of the response.
|
|
3044
|
+
*
|
|
3045
|
+
* A model may have multiple combinations of supported modalities. If the
|
|
3046
|
+
* requested modalities do not match any of the supported combinations, an
|
|
3047
|
+
* error will be returned.
|
|
3048
|
+
*
|
|
3049
|
+
* An empty list is equivalent to requesting only text. */
|
|
3050
|
+
responseModalities?: ("MODALITY_UNSPECIFIED" | "TEXT" | "IMAGE" | "AUDIO")[];
|
|
3051
|
+
/** @description Optional. Config for thinking features.
|
|
3052
|
+
* An error will be returned if this field is set for models that don't
|
|
3053
|
+
* support thinking. */
|
|
3054
|
+
thinkingConfig?: components["schemas"]["ThinkingConfig"];
|
|
3055
|
+
/** @description Optional. Output schema of the generated candidate text. Schemas must be a
|
|
3056
|
+
* subset of the [OpenAPI schema](https://spec.openapis.org/oas/v3.0.3#schema)
|
|
3057
|
+
* and can be objects, primitives or arrays.
|
|
3058
|
+
*
|
|
3059
|
+
* If set, a compatible `response_mime_type` must also be set.
|
|
3060
|
+
* Compatible MIME types:
|
|
3061
|
+
* `application/json`: Schema for JSON response.
|
|
3062
|
+
* Refer to the [JSON text generation
|
|
3063
|
+
* guide](https://ai.google.dev/gemini-api/docs/json-mode) for more details. */
|
|
3064
|
+
responseSchema?: components["schemas"]["Schema"];
|
|
3065
|
+
/** @description Optional. The set of character sequences (up to 5) that will stop output generation.
|
|
3066
|
+
* If specified, the API will stop at the first appearance of a
|
|
3067
|
+
* `stop_sequence`. The stop sequence will not be included as part of the
|
|
3068
|
+
* response. */
|
|
3069
|
+
stopSequences?: string[];
|
|
3070
|
+
};
|
|
3071
|
+
/** @description A `Document` is a collection of `Chunk`s. */
|
|
3072
|
+
Document: {
|
|
3073
|
+
/** @description Immutable. Identifier. The `Document` resource name. The ID (name excluding the
|
|
3074
|
+
* "fileSearchStores/*\/documents/" prefix) can contain up to 40 characters
|
|
3075
|
+
* that are lowercase alphanumeric or dashes (-). The ID cannot start or end
|
|
3076
|
+
* with a dash. If the name is empty on create, a unique name will be derived
|
|
3077
|
+
* from `display_name` along with a 12 character random suffix. Example:
|
|
3078
|
+
* `fileSearchStores/{file_search_store_id}/documents/my-awesome-doc-123a456b789c` */
|
|
3079
|
+
name?: string;
|
|
3080
|
+
/** @description Optional. The human-readable display name for the `Document`. The display name must
|
|
3081
|
+
* be no more than 512 characters in length, including spaces.
|
|
3082
|
+
* Example: "Semantic Retriever Documentation" */
|
|
3083
|
+
displayName?: string;
|
|
3084
|
+
/**
|
|
3085
|
+
* Format: date-time
|
|
3086
|
+
* @description Output only. The Timestamp of when the `Document` was last updated.
|
|
3087
|
+
*/
|
|
3088
|
+
readonly updateTime?: string;
|
|
3089
|
+
/**
|
|
3090
|
+
* Format: int64
|
|
3091
|
+
* @description Output only. The size of raw bytes ingested into the Document.
|
|
3092
|
+
*/
|
|
3093
|
+
readonly sizeBytes?: string;
|
|
3094
|
+
/** @description Output only. The mime type of the Document. */
|
|
3095
|
+
readonly mimeType?: string;
|
|
3096
|
+
/** @description Optional. User provided custom metadata stored as key-value pairs used for querying.
|
|
3097
|
+
* A `Document` can have a maximum of 20 `CustomMetadata`. */
|
|
3098
|
+
customMetadata?: components["schemas"]["CustomMetadata"][];
|
|
3099
|
+
/**
|
|
3100
|
+
* Format: date-time
|
|
3101
|
+
* @description Output only. The Timestamp of when the `Document` was created.
|
|
3102
|
+
*/
|
|
3103
|
+
readonly createTime?: string;
|
|
3104
|
+
/**
|
|
3105
|
+
* @description Output only. Current state of the `Document`.
|
|
3106
|
+
* @enum {string}
|
|
3107
|
+
*/
|
|
3108
|
+
readonly state?: "STATE_UNSPECIFIED" | "STATE_PENDING" | "STATE_ACTIVE" | "STATE_FAILED";
|
|
3109
|
+
};
|
|
3110
|
+
/** @description Candidate for the logprobs token and score. */
|
|
3111
|
+
LogprobsResultCandidate: {
|
|
3112
|
+
/**
|
|
3113
|
+
* Format: float
|
|
3114
|
+
* @description The candidate's log probability.
|
|
3115
|
+
*/
|
|
3116
|
+
logProbability?: number;
|
|
3117
|
+
/** @description The candidate’s token string value. */
|
|
3118
|
+
token?: string;
|
|
3119
|
+
/**
|
|
3120
|
+
* Format: int32
|
|
3121
|
+
* @description The candidate’s token id value.
|
|
3122
|
+
*/
|
|
3123
|
+
tokenId?: number;
|
|
3124
|
+
};
|
|
3125
|
+
/** @description Metadata for a video `File`. */
|
|
3126
|
+
VideoFileMetadata: {
|
|
3127
|
+
/**
|
|
3128
|
+
* Format: google-duration
|
|
3129
|
+
* @description Duration of the video.
|
|
3130
|
+
*/
|
|
3131
|
+
videoDuration?: string;
|
|
3132
|
+
};
|
|
3133
|
+
/** @description Response for `ListFiles`. */
|
|
3134
|
+
ListFilesResponse: {
|
|
3135
|
+
/** @description The list of `File`s. */
|
|
3136
|
+
files?: components["schemas"]["File"][];
|
|
3137
|
+
/** @description A token that can be sent as a `page_token` into a subsequent `ListFiles`
|
|
3138
|
+
* call. */
|
|
3139
|
+
nextPageToken?: string;
|
|
3140
|
+
};
|
|
3141
|
+
/** @description Counts the number of tokens in the `prompt` sent to a model.
|
|
3142
|
+
*
|
|
3143
|
+
* Models may tokenize text differently, so each model may return a different
|
|
3144
|
+
* `token_count`. */
|
|
3145
|
+
CountTokensRequest: {
|
|
3146
|
+
/** @description Optional. The input given to the model as a prompt. This field is ignored when
|
|
3147
|
+
* `generate_content_request` is set. */
|
|
3148
|
+
contents?: components["schemas"]["Content"][];
|
|
3149
|
+
/** @description Optional. The overall input given to the `Model`. This includes the prompt as well as
|
|
3150
|
+
* other model steering information like [system
|
|
3151
|
+
* instructions](https://ai.google.dev/gemini-api/docs/system-instructions),
|
|
3152
|
+
* and/or function declarations for [function
|
|
3153
|
+
* calling](https://ai.google.dev/gemini-api/docs/function-calling).
|
|
3154
|
+
* `Model`s/`Content`s and `generate_content_request`s are mutually
|
|
3155
|
+
* exclusive. You can either send `Model` + `Content`s or a
|
|
3156
|
+
* `generate_content_request`, but never both. */
|
|
3157
|
+
generateContentRequest?: components["schemas"]["GenerateContentRequest"];
|
|
3158
|
+
};
|
|
3159
|
+
/** @enum {string} */
|
|
3160
|
+
TaskType: "TASK_TYPE_UNSPECIFIED" | "RETRIEVAL_QUERY" | "RETRIEVAL_DOCUMENT" | "SEMANTIC_SIMILARITY" | "CLASSIFICATION" | "CLUSTERING" | "QUESTION_ANSWERING" | "FACT_VERIFICATION" | "CODE_RETRIEVAL_QUERY";
|
|
3161
|
+
/** @description Passage included inline with a grounding configuration. */
|
|
3162
|
+
GroundingPassage: {
|
|
3163
|
+
/** @description Identifier for the passage for attributing this passage in grounded
|
|
3164
|
+
* answers. */
|
|
3165
|
+
id?: string;
|
|
3166
|
+
/** @description Content of the passage. */
|
|
3167
|
+
content?: components["schemas"]["Content"];
|
|
3168
|
+
};
|
|
3169
|
+
/** @description A grounding chunk from Google Maps. A Maps chunk corresponds to a single
|
|
3170
|
+
* place. */
|
|
3171
|
+
Maps: {
|
|
3172
|
+
/** @description Title of the place. */
|
|
3173
|
+
title?: string;
|
|
3174
|
+
/** @description The ID of the place, in `places/{place_id}` format. A user can use this
|
|
3175
|
+
* ID to look up that place. */
|
|
3176
|
+
placeId?: string;
|
|
3177
|
+
/** @description Text description of the place answer. */
|
|
3178
|
+
text?: string;
|
|
3179
|
+
/** @description URI reference of the place. */
|
|
3180
|
+
uri?: string;
|
|
3181
|
+
/** @description Sources that provide answers about the features of a given place in
|
|
3182
|
+
* Google Maps. */
|
|
3183
|
+
placeAnswerSources?: components["schemas"]["PlaceAnswerSources"];
|
|
3184
|
+
};
|
|
3185
|
+
/** @description Information about a Generative Language Model. */
|
|
3186
|
+
Model: {
|
|
3187
|
+
/** @description Required. The resource name of the `Model`. Refer to [Model
|
|
3188
|
+
* variants](https://ai.google.dev/gemini-api/docs/models/gemini#model-variations)
|
|
3189
|
+
* for all allowed values.
|
|
3190
|
+
*
|
|
3191
|
+
* Format: `models/{model}` with a `{model}` naming convention of:
|
|
3192
|
+
*
|
|
3193
|
+
* * "{base_model_id}-{version}"
|
|
3194
|
+
*
|
|
3195
|
+
* Examples:
|
|
3196
|
+
*
|
|
3197
|
+
* * `models/gemini-1.5-flash-001` */
|
|
3198
|
+
name: string;
|
|
3199
|
+
/** @description Required. The version number of the model.
|
|
3200
|
+
*
|
|
3201
|
+
* This represents the major version (`1.0` or `1.5`) */
|
|
3202
|
+
version: string;
|
|
3203
|
+
/** @description The model's supported generation methods.
|
|
3204
|
+
*
|
|
3205
|
+
* The corresponding API method names are defined as Pascal case
|
|
3206
|
+
* strings, such as `generateMessage` and `generateContent`. */
|
|
3207
|
+
supportedGenerationMethods?: string[];
|
|
3208
|
+
/**
|
|
3209
|
+
* Format: float
|
|
3210
|
+
* @description The maximum temperature this model can use.
|
|
3211
|
+
*/
|
|
3212
|
+
maxTemperature?: number;
|
|
3213
|
+
/**
|
|
3214
|
+
* Format: int32
|
|
3215
|
+
* @description For Top-k sampling.
|
|
3216
|
+
*
|
|
3217
|
+
* Top-k sampling considers the set of `top_k` most probable tokens.
|
|
3218
|
+
* This value specifies default to be used by the backend while making the
|
|
3219
|
+
* call to the model.
|
|
3220
|
+
* If empty, indicates the model doesn't use top-k sampling, and `top_k` isn't
|
|
3221
|
+
* allowed as a generation parameter.
|
|
3222
|
+
*/
|
|
3223
|
+
topK?: number;
|
|
3224
|
+
/**
|
|
3225
|
+
* Format: int32
|
|
3226
|
+
* @description Maximum number of input tokens allowed for this model.
|
|
3227
|
+
*/
|
|
3228
|
+
inputTokenLimit?: number;
|
|
3229
|
+
/** @description Whether the model supports thinking. */
|
|
3230
|
+
thinking?: boolean;
|
|
3231
|
+
/** @description The human-readable name of the model. E.g. "Gemini 1.5 Flash".
|
|
3232
|
+
*
|
|
3233
|
+
* The name can be up to 128 characters long and can consist of any UTF-8
|
|
3234
|
+
* characters. */
|
|
3235
|
+
displayName?: string;
|
|
3236
|
+
/**
|
|
3237
|
+
* Format: float
|
|
3238
|
+
* @description Controls the randomness of the output.
|
|
3239
|
+
*
|
|
3240
|
+
* Values can range over `[0.0,max_temperature]`, inclusive. A higher value
|
|
3241
|
+
* will produce responses that are more varied, while a value closer to `0.0`
|
|
3242
|
+
* will typically result in less surprising responses from the model.
|
|
3243
|
+
* This value specifies default to be used by the backend while making the
|
|
3244
|
+
* call to the model.
|
|
3245
|
+
*/
|
|
3246
|
+
temperature?: number;
|
|
3247
|
+
/** @description A short description of the model. */
|
|
3248
|
+
description?: string;
|
|
3249
|
+
/**
|
|
3250
|
+
* Format: float
|
|
3251
|
+
* @description For [Nucleus
|
|
3252
|
+
* sampling](https://ai.google.dev/gemini-api/docs/prompting-strategies#top-p).
|
|
3253
|
+
*
|
|
3254
|
+
* Nucleus sampling considers the smallest set of tokens whose probability
|
|
3255
|
+
* sum is at least `top_p`.
|
|
3256
|
+
* This value specifies default to be used by the backend while making the
|
|
3257
|
+
* call to the model.
|
|
3258
|
+
*/
|
|
3259
|
+
topP?: number;
|
|
3260
|
+
/**
|
|
3261
|
+
* Format: int32
|
|
3262
|
+
* @description Maximum number of output tokens available for this model.
|
|
3263
|
+
*/
|
|
3264
|
+
outputTokenLimit?: number;
|
|
3265
|
+
};
|
|
3266
|
+
/** @description User provided metadata about the GroundingFact. */
|
|
3267
|
+
GroundingChunkCustomMetadata: {
|
|
3268
|
+
/** @description Optional. A list of string values for the metadata. */
|
|
3269
|
+
stringListValue?: components["schemas"]["GroundingChunkStringList"];
|
|
3270
|
+
/**
|
|
3271
|
+
* Format: float
|
|
3272
|
+
* @description Optional. The numeric value of the metadata.
|
|
3273
|
+
* The expected range for this value depends on the specific `key` used.
|
|
3274
|
+
*/
|
|
3275
|
+
numericValue?: number;
|
|
3276
|
+
/** @description The key of the metadata. */
|
|
3277
|
+
key?: string;
|
|
3278
|
+
/** @description Optional. The string value of the metadata. */
|
|
3279
|
+
stringValue?: string;
|
|
3280
|
+
};
|
|
3281
|
+
/** @description Tuned model as a source for training a new model. */
|
|
3282
|
+
TunedModelSource: {
|
|
3283
|
+
/** @description Immutable. The name of the `TunedModel` to use as the starting point for
|
|
3284
|
+
* training the new model.
|
|
3285
|
+
* Example: `tunedModels/my-tuned-model` */
|
|
3286
|
+
tunedModel?: string;
|
|
3287
|
+
/** @description Output only. The name of the base `Model` this `TunedModel` was tuned from.
|
|
3288
|
+
* Example: `models/gemini-1.5-flash-001` */
|
|
3289
|
+
readonly baseModel?: string;
|
|
3290
|
+
};
|
|
3291
|
+
/** @description A list of floats representing the embedding. */
|
|
3292
|
+
Embedding: {
|
|
3293
|
+
/** @description The embedding values. */
|
|
3294
|
+
value?: number[];
|
|
3295
|
+
};
|
|
3296
|
+
/** @description Request for an `AsyncBatchEmbedContent` operation. */
|
|
3297
|
+
AsyncBatchEmbedContentRequest: {
|
|
3298
|
+
/** @description Required. The batch to create. */
|
|
3299
|
+
batch: components["schemas"]["EmbedContentBatch"];
|
|
3300
|
+
};
|
|
3301
|
+
/** @description Request to get a text embedding from the model. */
|
|
3302
|
+
EmbedTextRequest: {
|
|
3303
|
+
/** @description Required. The model name to use with the format model=models/{model}. */
|
|
3304
|
+
model: string;
|
|
3305
|
+
/** @description Optional. The free-form input text that the model will turn into an embedding. */
|
|
3306
|
+
text?: string;
|
|
3307
|
+
};
|
|
3308
|
+
/** @description Context of the a single url retrieval. */
|
|
3309
|
+
UrlMetadata: {
|
|
3310
|
+
/** @description Retrieved url by the tool. */
|
|
3311
|
+
retrievedUrl?: string;
|
|
3312
|
+
/**
|
|
3313
|
+
* @description Status of the url retrieval.
|
|
3314
|
+
* @enum {string}
|
|
3315
|
+
*/
|
|
3316
|
+
urlRetrievalStatus?: "URL_RETRIEVAL_STATUS_UNSPECIFIED" | "URL_RETRIEVAL_STATUS_SUCCESS" | "URL_RETRIEVAL_STATUS_ERROR" | "URL_RETRIEVAL_STATUS_PAYWALL" | "URL_RETRIEVAL_STATUS_UNSAFE";
|
|
3317
|
+
};
|
|
3318
|
+
/** @description Image search for grounding and related configurations. */
|
|
3319
|
+
ImageSearch: Record<string, never>;
|
|
3320
|
+
/** @description Metadata for LongRunning ImportFile Operations. */
|
|
3321
|
+
ImportFileMetadata: Record<string, never>;
|
|
3322
|
+
/** @description Response for a `BatchGenerateContent` operation. */
|
|
3323
|
+
BatchGenerateContentResponse: {
|
|
3324
|
+
/** @description Output only. The output of the batch request. */
|
|
3325
|
+
readonly output?: components["schemas"]["GenerateContentBatchOutput"];
|
|
3326
|
+
};
|
|
3327
|
+
/** @description The base unit of structured text.
|
|
3328
|
+
*
|
|
3329
|
+
* A `Message` includes an `author` and the `content` of
|
|
3330
|
+
* the `Message`.
|
|
3331
|
+
*
|
|
3332
|
+
* The `author` is used to tag messages when they are fed to the
|
|
3333
|
+
* model as text. */
|
|
3334
|
+
Message: {
|
|
3335
|
+
/** @description Output only. Citation information for model-generated `content` in this `Message`.
|
|
3336
|
+
*
|
|
3337
|
+
* If this `Message` was generated as output from the model, this field may be
|
|
3338
|
+
* populated with attribution information for any text included in the
|
|
3339
|
+
* `content`. This field is used only on output. */
|
|
3340
|
+
readonly citationMetadata?: components["schemas"]["CitationMetadata"];
|
|
3341
|
+
/** @description Optional. The author of this Message.
|
|
3342
|
+
*
|
|
3343
|
+
* This serves as a key for tagging
|
|
3344
|
+
* the content of this Message when it is fed to the model as text.
|
|
3345
|
+
*
|
|
3346
|
+
* The author can be any alphanumeric string. */
|
|
3347
|
+
author?: string;
|
|
3348
|
+
/** @description Required. The text content of the structured `Message`. */
|
|
3349
|
+
content: string;
|
|
3350
|
+
};
|
|
3351
|
+
/** @description This resource represents a long-running operation that is the result of a
|
|
3352
|
+
* network API call. */
|
|
3353
|
+
Operation: components["schemas"]["BaseOperation"] & {
|
|
3354
|
+
/** @description Service-specific metadata associated with the operation. It typically
|
|
3355
|
+
* contains progress information and common metadata such as create time.
|
|
3356
|
+
* Some services might not provide such metadata. Any method that returns a
|
|
3357
|
+
* long-running operation should document the metadata type, if any. */
|
|
3358
|
+
metadata?: {
|
|
3359
|
+
[key: string]: unknown;
|
|
3360
|
+
};
|
|
3361
|
+
/** @description The normal, successful response of the operation. If the original
|
|
3362
|
+
* method returns no data on success, such as `Delete`, the response is
|
|
3363
|
+
* `google.protobuf.Empty`. If the original method is standard
|
|
3364
|
+
* `Get`/`Create`/`Update`, the response should be the resource. For other
|
|
3365
|
+
* methods, the response should have the type `XxxResponse`, where `Xxx`
|
|
3366
|
+
* is the original method name. For example, if the original method name
|
|
3367
|
+
* is `TakeSnapshot()`, the inferred response type is
|
|
3368
|
+
* `TakeSnapshotResponse`. */
|
|
3369
|
+
response?: {
|
|
3370
|
+
[key: string]: unknown;
|
|
3371
|
+
};
|
|
3372
|
+
};
|
|
3373
|
+
/** @description Tool to retrieve public web data for grounding, powered by Google. */
|
|
3374
|
+
GoogleSearchRetrieval: {
|
|
3375
|
+
/** @description Specifies the dynamic retrieval configuration for the given source. */
|
|
3376
|
+
dynamicRetrievalConfig?: components["schemas"]["DynamicRetrievalConfig"];
|
|
3377
|
+
};
|
|
3378
|
+
/** @description Config for speech generation and transcription. */
|
|
3379
|
+
SpeechConfig: {
|
|
3380
|
+
/** @description Optional. The IETF [BCP-47](https://www.rfc-editor.org/rfc/bcp/bcp47.txt) language
|
|
3381
|
+
* code that the user configured the app to use. Used for speech recognition
|
|
3382
|
+
* and synthesis.
|
|
3383
|
+
*
|
|
3384
|
+
* Valid values are: `de-DE`, `en-AU`, `en-GB`, `en-IN`, `en-US`, `es-US`,
|
|
3385
|
+
* `fr-FR`, `hi-IN`, `pt-BR`, `ar-XA`, `es-ES`, `fr-CA`, `id-ID`, `it-IT`,
|
|
3386
|
+
* `ja-JP`, `tr-TR`, `vi-VN`, `bn-IN`, `gu-IN`, `kn-IN`, `ml-IN`, `mr-IN`,
|
|
3387
|
+
* `ta-IN`, `te-IN`, `nl-NL`, `ko-KR`, `cmn-CN`, `pl-PL`, `ru-RU`, and
|
|
3388
|
+
* `th-TH`. */
|
|
3389
|
+
languageCode?: string;
|
|
3390
|
+
/** @description Optional. The configuration for the multi-speaker setup.
|
|
3391
|
+
* It is mutually exclusive with the voice_config field. */
|
|
3392
|
+
multiSpeakerVoiceConfig?: components["schemas"]["MultiSpeakerVoiceConfig"];
|
|
3393
|
+
/** @description The configuration in case of single-voice output. */
|
|
3394
|
+
voiceConfig?: components["schemas"]["VoiceConfig"];
|
|
3395
|
+
};
|
|
3396
|
+
/** @description Request for `RegisterFiles`. */
|
|
3397
|
+
RegisterFilesRequest: {
|
|
3398
|
+
/** @description Required. The Google Cloud Storage URIs to register. Example: `gs://bucket/object`. */
|
|
3399
|
+
uris: string[];
|
|
3400
|
+
};
|
|
3401
|
+
/** @description The result output from a `FunctionCall` that contains a string
|
|
3402
|
+
* representing the `FunctionDeclaration.name` and a structured JSON
|
|
3403
|
+
* object containing any output from the function is used as context to
|
|
3404
|
+
* the model. This should contain the result of a`FunctionCall` made
|
|
3405
|
+
* based on model prediction. */
|
|
3406
|
+
FunctionResponse: {
|
|
3407
|
+
/** @description Required. The function response in JSON object format.
|
|
3408
|
+
* Callers can use any keys of their choice that fit the function's syntax
|
|
3409
|
+
* to return the function output, e.g. "output", "result", etc.
|
|
3410
|
+
* In particular, if the function call failed to execute, the response can
|
|
3411
|
+
* have an "error" key to return error details to the model. */
|
|
3412
|
+
response: {
|
|
3413
|
+
[key: string]: unknown;
|
|
3414
|
+
};
|
|
3415
|
+
/** @description Optional. The identifier of the function call this response is for. Populated by the
|
|
3416
|
+
* client to match the corresponding function call `id`. */
|
|
3417
|
+
id?: string;
|
|
3418
|
+
/** @description Optional. Ordered `Parts` that constitute a function response. Parts may have
|
|
3419
|
+
* different IANA MIME types. */
|
|
3420
|
+
parts?: components["schemas"]["FunctionResponsePart"][];
|
|
3421
|
+
/**
|
|
3422
|
+
* @description Optional. Specifies how the response should be scheduled in the conversation.
|
|
3423
|
+
* Only applicable to NON_BLOCKING function calls, is ignored otherwise.
|
|
3424
|
+
* Defaults to WHEN_IDLE.
|
|
3425
|
+
* @enum {string}
|
|
3426
|
+
*/
|
|
3427
|
+
scheduling?: "SCHEDULING_UNSPECIFIED" | "SILENT" | "WHEN_IDLE" | "INTERRUPT";
|
|
3428
|
+
/** @description Required. The name of the function to call.
|
|
3429
|
+
* Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum
|
|
3430
|
+
* length of 128. */
|
|
3431
|
+
name: string;
|
|
3432
|
+
/** @description Optional. Signals that function call continues, and more responses will be
|
|
3433
|
+
* returned, turning the function call into a generator.
|
|
3434
|
+
* Is only applicable to NON_BLOCKING function calls, is ignored otherwise.
|
|
3435
|
+
* If set to false, future responses will not be considered.
|
|
3436
|
+
* It is allowed to return empty `response` with `will_continue=False` to
|
|
3437
|
+
* signal that the function call is finished. This may still trigger the model
|
|
3438
|
+
* generation. To avoid triggering the generation and finish the function
|
|
3439
|
+
* call, additionally set `scheduling` to `SILENT`. */
|
|
3440
|
+
willContinue?: boolean;
|
|
3441
|
+
};
|
|
3442
|
+
/** @description Code generated by the model that is meant to be executed, and the result
|
|
3443
|
+
* returned to the model.
|
|
3444
|
+
*
|
|
3445
|
+
* Only generated when using the `CodeExecution` tool, in which the code will
|
|
3446
|
+
* be automatically executed, and a corresponding `CodeExecutionResult` will
|
|
3447
|
+
* also be generated. */
|
|
3448
|
+
ExecutableCode: {
|
|
3449
|
+
/**
|
|
3450
|
+
* @description Required. Programming language of the `code`.
|
|
3451
|
+
* @enum {string}
|
|
3452
|
+
*/
|
|
3453
|
+
language: "LANGUAGE_UNSPECIFIED" | "PYTHON";
|
|
3454
|
+
/** @description Required. The code to be executed. */
|
|
3455
|
+
code: string;
|
|
3456
|
+
/** @description Optional. Unique identifier of the `ExecutableCode` part.
|
|
3457
|
+
* The server returns the `CodeExecutionResult` with the matching `id`. */
|
|
3458
|
+
id?: string;
|
|
3459
|
+
};
|
|
3460
|
+
/** @description Configures the input to the batch request. */
|
|
3461
|
+
InputConfig: {
|
|
3462
|
+
/** @description The name of the `File` containing the input requests. */
|
|
3463
|
+
fileName?: string;
|
|
3464
|
+
/** @description The requests to be processed in the batch. */
|
|
3465
|
+
requests?: components["schemas"]["InlinedRequests"];
|
|
3466
|
+
};
|
|
3467
|
+
/** @description The base structured datatype containing multi-part content of a message.
|
|
3468
|
+
*
|
|
3469
|
+
* A `Content` includes a `role` field designating the producer of the `Content`
|
|
3470
|
+
* and a `parts` field containing multi-part data that contains the content of
|
|
3471
|
+
* the message turn. */
|
|
3472
|
+
Content: {
|
|
3473
|
+
/** @description Ordered `Parts` that constitute a single message. Parts may have different
|
|
3474
|
+
* MIME types. */
|
|
3475
|
+
parts?: components["schemas"]["Part"][];
|
|
3476
|
+
/** @description Optional. The producer of the content. Must be either 'user' or 'model'.
|
|
3477
|
+
*
|
|
3478
|
+
* Useful to set for multi-turn conversations, otherwise can be left blank
|
|
3479
|
+
* or unset. */
|
|
3480
|
+
role?: string;
|
|
3481
|
+
};
|
|
3482
|
+
/** @description Raw media bytes for function response.
|
|
3483
|
+
*
|
|
3484
|
+
* Text should not be sent as raw bytes, use the 'FunctionResponse.response'
|
|
3485
|
+
* field. */
|
|
3486
|
+
FunctionResponseBlob: {
|
|
3487
|
+
/** @description The IANA standard MIME type of the source data.
|
|
3488
|
+
* Examples:
|
|
3489
|
+
* - image/png
|
|
3490
|
+
* - image/jpeg
|
|
3491
|
+
* If an unsupported MIME type is provided, an error will be returned. For a
|
|
3492
|
+
* complete list of supported types, see [Supported file
|
|
3493
|
+
* formats](https://ai.google.dev/gemini-api/docs/prompting_with_media#supported_file_formats). */
|
|
3494
|
+
mimeType?: string;
|
|
3495
|
+
/**
|
|
3496
|
+
* Format: byte
|
|
3497
|
+
* @description Raw bytes for media formats.
|
|
3498
|
+
*/
|
|
3499
|
+
data?: string;
|
|
3500
|
+
};
|
|
3501
|
+
/** @description Stub for ToolType (missing in upstream spec) */
|
|
3502
|
+
ToolType: string;
|
|
3503
|
+
/** @description Stub for MediaResolution (missing in upstream spec) */
|
|
3504
|
+
MediaResolution: string;
|
|
3505
|
+
};
|
|
3506
|
+
responses: never;
|
|
3507
|
+
parameters: {
|
|
3508
|
+
/** @description V1 error format. */
|
|
3509
|
+
"_.xgafv": "1" | "2";
|
|
3510
|
+
/** @description Data format for response. */
|
|
3511
|
+
alt: "json" | "media" | "proto";
|
|
3512
|
+
/** @description JSONP */
|
|
3513
|
+
callback: string;
|
|
3514
|
+
/** @description Returns response with indentations and line breaks. */
|
|
3515
|
+
prettyPrint: boolean;
|
|
3516
|
+
};
|
|
3517
|
+
requestBodies: never;
|
|
3518
|
+
headers: never;
|
|
3519
|
+
pathItems: never;
|
|
3520
|
+
}
|
|
3521
|
+
export type $defs = Record<string, never>;
|
|
3522
|
+
export interface operations {
|
|
3523
|
+
ListModels: {
|
|
3524
|
+
parameters: {
|
|
3525
|
+
query?: {
|
|
3526
|
+
/** @description Data format for response. */
|
|
3527
|
+
$alt?: components["parameters"]["alt"];
|
|
3528
|
+
/** @description JSONP */
|
|
3529
|
+
$callback?: components["parameters"]["callback"];
|
|
3530
|
+
/** @description Returns response with indentations and line breaks. */
|
|
3531
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
3532
|
+
/** @description V1 error format. */
|
|
3533
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
3534
|
+
/** @description The maximum number of `Models` to return (per page).
|
|
3535
|
+
*
|
|
3536
|
+
* If unspecified, 50 models will be returned per page.
|
|
3537
|
+
* This method returns at most 1000 models per page, even if you pass a larger
|
|
3538
|
+
* page_size. */
|
|
3539
|
+
pageSize?: number;
|
|
3540
|
+
/** @description A page token, received from a previous `ListModels` call.
|
|
3541
|
+
*
|
|
3542
|
+
* Provide the `page_token` returned by one request as an argument to the next
|
|
3543
|
+
* request to retrieve the next page.
|
|
3544
|
+
*
|
|
3545
|
+
* When paginating, all other parameters provided to `ListModels` must match
|
|
3546
|
+
* the call that provided the page token. */
|
|
3547
|
+
pageToken?: string;
|
|
3548
|
+
};
|
|
3549
|
+
header?: never;
|
|
3550
|
+
path?: never;
|
|
3551
|
+
cookie?: never;
|
|
3552
|
+
};
|
|
3553
|
+
requestBody?: never;
|
|
3554
|
+
responses: {
|
|
3555
|
+
/** @description Successful operation */
|
|
3556
|
+
default: {
|
|
3557
|
+
headers: {
|
|
3558
|
+
[name: string]: unknown;
|
|
3559
|
+
};
|
|
3560
|
+
content: {
|
|
3561
|
+
"application/json": components["schemas"]["ListModelsResponse"];
|
|
3562
|
+
};
|
|
3563
|
+
};
|
|
3564
|
+
};
|
|
3565
|
+
};
|
|
3566
|
+
GenerateContent: {
|
|
3567
|
+
parameters: {
|
|
3568
|
+
query?: {
|
|
3569
|
+
/** @description Data format for response. */
|
|
3570
|
+
$alt?: components["parameters"]["alt"];
|
|
3571
|
+
/** @description JSONP */
|
|
3572
|
+
$callback?: components["parameters"]["callback"];
|
|
3573
|
+
/** @description Returns response with indentations and line breaks. */
|
|
3574
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
3575
|
+
/** @description V1 error format. */
|
|
3576
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
3577
|
+
};
|
|
3578
|
+
header?: never;
|
|
3579
|
+
path: {
|
|
3580
|
+
/** @description Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */
|
|
3581
|
+
model: string;
|
|
3582
|
+
};
|
|
3583
|
+
cookie?: never;
|
|
3584
|
+
};
|
|
3585
|
+
/** @description The request body. */
|
|
3586
|
+
requestBody?: {
|
|
3587
|
+
content: {
|
|
3588
|
+
"application/json": components["schemas"]["GenerateContentRequest"];
|
|
3589
|
+
};
|
|
3590
|
+
};
|
|
3591
|
+
responses: {
|
|
3592
|
+
/** @description Successful operation */
|
|
3593
|
+
default: {
|
|
3594
|
+
headers: {
|
|
3595
|
+
[name: string]: unknown;
|
|
3596
|
+
};
|
|
3597
|
+
content: {
|
|
3598
|
+
"application/json": components["schemas"]["GenerateContentResponse"];
|
|
3599
|
+
};
|
|
3600
|
+
};
|
|
3601
|
+
};
|
|
3602
|
+
};
|
|
3603
|
+
EmbedContent: {
|
|
3604
|
+
parameters: {
|
|
3605
|
+
query?: {
|
|
3606
|
+
/** @description Data format for response. */
|
|
3607
|
+
$alt?: components["parameters"]["alt"];
|
|
3608
|
+
/** @description JSONP */
|
|
3609
|
+
$callback?: components["parameters"]["callback"];
|
|
3610
|
+
/** @description Returns response with indentations and line breaks. */
|
|
3611
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
3612
|
+
/** @description V1 error format. */
|
|
3613
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
3614
|
+
};
|
|
3615
|
+
header?: never;
|
|
3616
|
+
path: {
|
|
3617
|
+
/** @description Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */
|
|
3618
|
+
model: string;
|
|
3619
|
+
};
|
|
3620
|
+
cookie?: never;
|
|
3621
|
+
};
|
|
3622
|
+
/** @description The request body. */
|
|
3623
|
+
requestBody?: {
|
|
3624
|
+
content: {
|
|
3625
|
+
"application/json": components["schemas"]["EmbedContentRequest"];
|
|
3626
|
+
};
|
|
3627
|
+
};
|
|
3628
|
+
responses: {
|
|
3629
|
+
/** @description Successful operation */
|
|
3630
|
+
default: {
|
|
3631
|
+
headers: {
|
|
3632
|
+
[name: string]: unknown;
|
|
3633
|
+
};
|
|
3634
|
+
content: {
|
|
3635
|
+
"application/json": components["schemas"]["EmbedContentResponse"];
|
|
3636
|
+
};
|
|
3637
|
+
};
|
|
3638
|
+
};
|
|
3639
|
+
};
|
|
3640
|
+
StreamGenerateContent: {
|
|
3641
|
+
parameters: {
|
|
3642
|
+
query?: {
|
|
3643
|
+
/** @description Data format for response. */
|
|
3644
|
+
$alt?: components["parameters"]["alt"];
|
|
3645
|
+
/** @description JSONP */
|
|
3646
|
+
$callback?: components["parameters"]["callback"];
|
|
3647
|
+
/** @description Returns response with indentations and line breaks. */
|
|
3648
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
3649
|
+
/** @description V1 error format. */
|
|
3650
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
3651
|
+
};
|
|
3652
|
+
header?: never;
|
|
3653
|
+
path: {
|
|
3654
|
+
/** @description Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */
|
|
3655
|
+
model: string;
|
|
3656
|
+
};
|
|
3657
|
+
cookie?: never;
|
|
3658
|
+
};
|
|
3659
|
+
/** @description The request body. */
|
|
3660
|
+
requestBody?: {
|
|
3661
|
+
content: {
|
|
3662
|
+
"application/json": components["schemas"]["GenerateContentRequest"];
|
|
3663
|
+
};
|
|
3664
|
+
};
|
|
3665
|
+
responses: {
|
|
3666
|
+
/** @description Successful operation */
|
|
3667
|
+
default: {
|
|
3668
|
+
headers: {
|
|
3669
|
+
[name: string]: unknown;
|
|
3670
|
+
};
|
|
3671
|
+
content: {
|
|
3672
|
+
"application/json": components["schemas"]["GenerateContentResponse"];
|
|
3673
|
+
};
|
|
3674
|
+
};
|
|
3675
|
+
};
|
|
3676
|
+
};
|
|
3677
|
+
GetModel: {
|
|
3678
|
+
parameters: {
|
|
3679
|
+
query?: {
|
|
3680
|
+
/** @description Data format for response. */
|
|
3681
|
+
$alt?: components["parameters"]["alt"];
|
|
3682
|
+
/** @description JSONP */
|
|
3683
|
+
$callback?: components["parameters"]["callback"];
|
|
3684
|
+
/** @description Returns response with indentations and line breaks. */
|
|
3685
|
+
$prettyPrint?: components["parameters"]["prettyPrint"];
|
|
3686
|
+
/** @description V1 error format. */
|
|
3687
|
+
"$.xgafv"?: components["parameters"]["_.xgafv"];
|
|
3688
|
+
};
|
|
3689
|
+
header?: never;
|
|
3690
|
+
path: {
|
|
3691
|
+
/** @description Resource ID segment making up resource `name`. It identifies the resource within its parent collection as described in https://google.aip.dev/122. */
|
|
3692
|
+
model: string;
|
|
3693
|
+
};
|
|
3694
|
+
cookie?: never;
|
|
3695
|
+
};
|
|
3696
|
+
requestBody?: never;
|
|
3697
|
+
responses: {
|
|
3698
|
+
/** @description Successful operation */
|
|
3699
|
+
default: {
|
|
3700
|
+
headers: {
|
|
3701
|
+
[name: string]: unknown;
|
|
3702
|
+
};
|
|
3703
|
+
content: {
|
|
3704
|
+
"application/json": components["schemas"]["Model"];
|
|
3705
|
+
};
|
|
3706
|
+
};
|
|
3707
|
+
};
|
|
3708
|
+
};
|
|
3709
|
+
}
|