@bodhiapp/ts-client 0.1.27 → 0.1.29

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