diff --git a/docs/genai.html b/docs/genai.html index 69f538d6a..1991b8b58 100644 --- a/docs/genai.html +++ b/docs/genai.html @@ -4147,6 +4147,1118 @@

Submodules +
+class genai.types.AggregationMetric(*values)
+

Bases: CaseInSensitiveEnum

+

Aggregation metric. This enum is not supported in Gemini API.

+
+
+AGGREGATION_METRIC_UNSPECIFIED = 'AGGREGATION_METRIC_UNSPECIFIED'
+

Unspecified aggregation metric.

+
+ +
+
+AVERAGE = 'AVERAGE'
+

Average aggregation metric. Not supported for Pairwise metric.

+
+ +
+
+MAXIMUM = 'MAXIMUM'
+

Maximum aggregation metric. Not supported for pairwise metric.

+
+ +
+
+MEDIAN = 'MEDIAN'
+

Median aggregation metric. Not supported for pairwise metric.

+
+ +
+
+MINIMUM = 'MINIMUM'
+

Minimum aggregation metric. Not supported for pairwise metric.

+
+ +
+
+MODE = 'MODE'
+

Mode aggregation metric.

+
+ +
+
+PERCENTILE_P90 = 'PERCENTILE_P90'
+

90th percentile aggregation metric. Not supported for pairwise metric.

+
+ +
+
+PERCENTILE_P95 = 'PERCENTILE_P95'
+

95th percentile aggregation metric. Not supported for pairwise metric.

+
+ +
+
+PERCENTILE_P99 = 'PERCENTILE_P99'
+

99th percentile aggregation metric. Not supported for pairwise metric.

+
+ +
+
+STANDARD_DEVIATION = 'STANDARD_DEVIATION'
+

Standard deviation aggregation metric. Not supported for pairwise metric.

+
+ +
+
+VARIANCE = 'VARIANCE'
+

Variance aggregation metric. Not supported for pairwise metric.

+
+ +
+ +
+
+pydantic model genai.types.AggregationOutput
+

Bases: BaseModel

+

The aggregation result for the entire dataset and all metrics.

+

This data type is not supported in Gemini API.

+

Create a new model by parsing and validating input data from keyword arguments.

+

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be +validated to form a valid model.

+

self is explicitly positional-only to allow self as a field name.

+

+Show JSON schema
{
+   "title": "AggregationOutput",
+   "description": "The aggregation result for the entire dataset and all metrics.\n\nThis data type is not supported in Gemini API.",
+   "type": "object",
+   "properties": {
+      "aggregationResults": {
+         "anyOf": [
+            {
+               "items": {
+                  "$ref": "#/$defs/AggregationResult"
+               },
+               "type": "array"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "One AggregationResult per metric.",
+         "title": "Aggregationresults"
+      },
+      "dataset": {
+         "anyOf": [
+            {
+               "$ref": "#/$defs/EvaluationDataset"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "The dataset used for evaluation & aggregation."
+      }
+   },
+   "$defs": {
+      "AggregationMetric": {
+         "description": "Aggregation metric. This enum is not supported in Gemini API.",
+         "enum": [
+            "AGGREGATION_METRIC_UNSPECIFIED",
+            "AVERAGE",
+            "MODE",
+            "STANDARD_DEVIATION",
+            "VARIANCE",
+            "MINIMUM",
+            "MAXIMUM",
+            "MEDIAN",
+            "PERCENTILE_P90",
+            "PERCENTILE_P95",
+            "PERCENTILE_P99"
+         ],
+         "title": "AggregationMetric",
+         "type": "string"
+      },
+      "AggregationResult": {
+         "additionalProperties": false,
+         "description": "The aggregation result for a single metric.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "aggregationMetric": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/AggregationMetric"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Aggregation metric."
+            },
+            "bleuMetricValue": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/BleuMetricValue"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Results for bleu metric."
+            },
+            "customCodeExecutionResult": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/CustomCodeExecutionResult"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Result for code execution metric."
+            },
+            "exactMatchMetricValue": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/ExactMatchMetricValue"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Results for exact match metric."
+            },
+            "pairwiseMetricResult": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/PairwiseMetricResult"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Result for pairwise metric."
+            },
+            "pointwiseMetricResult": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/PointwiseMetricResult"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Result for pointwise metric."
+            },
+            "rougeMetricValue": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/RougeMetricValue"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Results for rouge metric."
+            }
+         },
+         "title": "AggregationResult",
+         "type": "object"
+      },
+      "BigQuerySource": {
+         "additionalProperties": false,
+         "description": "The BigQuery location for the input content.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "inputUri": {
+               "anyOf": [
+                  {
+                     "type": "string"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.",
+               "title": "Inputuri"
+            }
+         },
+         "title": "BigQuerySource",
+         "type": "object"
+      },
+      "BleuMetricValue": {
+         "additionalProperties": false,
+         "description": "Bleu metric value for an instance.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Bleu score.",
+               "title": "Score"
+            }
+         },
+         "title": "BleuMetricValue",
+         "type": "object"
+      },
+      "CustomCodeExecutionResult": {
+         "additionalProperties": false,
+         "description": "Result for custom code execution metric.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Custom code execution score.",
+               "title": "Score"
+            }
+         },
+         "title": "CustomCodeExecutionResult",
+         "type": "object"
+      },
+      "CustomOutput": {
+         "additionalProperties": false,
+         "description": "Spec for custom output. This data type is not supported in Gemini API.",
+         "properties": {
+            "rawOutputs": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/RawOutput"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. List of raw output strings."
+            }
+         },
+         "title": "CustomOutput",
+         "type": "object"
+      },
+      "EvaluationDataset": {
+         "additionalProperties": false,
+         "description": "The dataset used for evaluation.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "bigquerySource": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/BigQuerySource"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "BigQuery source holds the dataset."
+            },
+            "gcsSource": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/GcsSource"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Cloud storage source holds the dataset. Currently only one Cloud Storage file path is supported."
+            }
+         },
+         "title": "EvaluationDataset",
+         "type": "object"
+      },
+      "ExactMatchMetricValue": {
+         "additionalProperties": false,
+         "description": "Exact match metric value for an instance.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Exact match score.",
+               "title": "Score"
+            }
+         },
+         "title": "ExactMatchMetricValue",
+         "type": "object"
+      },
+      "GcsSource": {
+         "additionalProperties": false,
+         "description": "The Google Cloud Storage location for the input content.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "uris": {
+               "anyOf": [
+                  {
+                     "items": {
+                        "type": "string"
+                     },
+                     "type": "array"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Required. Google Cloud Storage URI(-s) to the input file(s). May contain wildcards. For more information on wildcards, see https://cloud.google.com/storage/docs/wildcards.",
+               "title": "Uris"
+            }
+         },
+         "title": "GcsSource",
+         "type": "object"
+      },
+      "PairwiseChoice": {
+         "description": "Output only.\n\nPairwise metric choice. This enum is not supported in Gemini API.",
+         "enum": [
+            "PAIRWISE_CHOICE_UNSPECIFIED",
+            "BASELINE",
+            "CANDIDATE",
+            "TIE"
+         ],
+         "title": "PairwiseChoice",
+         "type": "string"
+      },
+      "PairwiseMetricResult": {
+         "additionalProperties": false,
+         "description": "Spec for pairwise metric result.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "customOutput": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/CustomOutput"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Spec for custom output."
+            },
+            "explanation": {
+               "anyOf": [
+                  {
+                     "type": "string"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Explanation for pairwise metric score.",
+               "title": "Explanation"
+            },
+            "pairwiseChoice": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/PairwiseChoice"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Pairwise metric choice."
+            }
+         },
+         "title": "PairwiseMetricResult",
+         "type": "object"
+      },
+      "PointwiseMetricResult": {
+         "additionalProperties": false,
+         "description": "Spec for pointwise metric result.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "customOutput": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/CustomOutput"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Spec for custom output."
+            },
+            "explanation": {
+               "anyOf": [
+                  {
+                     "type": "string"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Explanation for pointwise metric score.",
+               "title": "Explanation"
+            },
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Pointwise metric score.",
+               "title": "Score"
+            }
+         },
+         "title": "PointwiseMetricResult",
+         "type": "object"
+      },
+      "RawOutput": {
+         "additionalProperties": false,
+         "description": "Raw output. This data type is not supported in Gemini API.",
+         "properties": {
+            "rawOutput": {
+               "anyOf": [
+                  {
+                     "items": {
+                        "type": "string"
+                     },
+                     "type": "array"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Raw output string.",
+               "title": "Rawoutput"
+            }
+         },
+         "title": "RawOutput",
+         "type": "object"
+      },
+      "RougeMetricValue": {
+         "additionalProperties": false,
+         "description": "Rouge metric value for an instance.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Rouge score.",
+               "title": "Score"
+            }
+         },
+         "title": "RougeMetricValue",
+         "type": "object"
+      }
+   },
+   "additionalProperties": false
+}
+
+
+

+
Fields:
+
+
+
Validators:
+

+
+
+
+field aggregation_results: Optional[list[AggregationResult]] = None (alias 'aggregationResults')
+

One AggregationResult per metric.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+
+field dataset: Optional[EvaluationDataset] = None
+

The dataset used for evaluation & aggregation.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+ +
+
+class genai.types.AggregationOutputDict
+

Bases: TypedDict

+

The aggregation result for the entire dataset and all metrics.

+

This data type is not supported in Gemini API.

+
+
+aggregation_results: Optional[list[AggregationResultDict]]
+

One AggregationResult per metric.

+
+ +
+
+dataset: Optional[EvaluationDatasetDict]
+

The dataset used for evaluation & aggregation.

+
+ +
+ +
+
+pydantic model genai.types.AggregationResult
+

Bases: BaseModel

+

The aggregation result for a single metric.

+

This data type is not supported in Gemini API.

+

Create a new model by parsing and validating input data from keyword arguments.

+

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be +validated to form a valid model.

+

self is explicitly positional-only to allow self as a field name.

+

+Show JSON schema
{
+   "title": "AggregationResult",
+   "description": "The aggregation result for a single metric.\n\nThis data type is not supported in Gemini API.",
+   "type": "object",
+   "properties": {
+      "aggregationMetric": {
+         "anyOf": [
+            {
+               "$ref": "#/$defs/AggregationMetric"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Aggregation metric."
+      },
+      "bleuMetricValue": {
+         "anyOf": [
+            {
+               "$ref": "#/$defs/BleuMetricValue"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Results for bleu metric."
+      },
+      "customCodeExecutionResult": {
+         "anyOf": [
+            {
+               "$ref": "#/$defs/CustomCodeExecutionResult"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Result for code execution metric."
+      },
+      "exactMatchMetricValue": {
+         "anyOf": [
+            {
+               "$ref": "#/$defs/ExactMatchMetricValue"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Results for exact match metric."
+      },
+      "pairwiseMetricResult": {
+         "anyOf": [
+            {
+               "$ref": "#/$defs/PairwiseMetricResult"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Result for pairwise metric."
+      },
+      "pointwiseMetricResult": {
+         "anyOf": [
+            {
+               "$ref": "#/$defs/PointwiseMetricResult"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Result for pointwise metric."
+      },
+      "rougeMetricValue": {
+         "anyOf": [
+            {
+               "$ref": "#/$defs/RougeMetricValue"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Results for rouge metric."
+      }
+   },
+   "$defs": {
+      "AggregationMetric": {
+         "description": "Aggregation metric. This enum is not supported in Gemini API.",
+         "enum": [
+            "AGGREGATION_METRIC_UNSPECIFIED",
+            "AVERAGE",
+            "MODE",
+            "STANDARD_DEVIATION",
+            "VARIANCE",
+            "MINIMUM",
+            "MAXIMUM",
+            "MEDIAN",
+            "PERCENTILE_P90",
+            "PERCENTILE_P95",
+            "PERCENTILE_P99"
+         ],
+         "title": "AggregationMetric",
+         "type": "string"
+      },
+      "BleuMetricValue": {
+         "additionalProperties": false,
+         "description": "Bleu metric value for an instance.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Bleu score.",
+               "title": "Score"
+            }
+         },
+         "title": "BleuMetricValue",
+         "type": "object"
+      },
+      "CustomCodeExecutionResult": {
+         "additionalProperties": false,
+         "description": "Result for custom code execution metric.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Custom code execution score.",
+               "title": "Score"
+            }
+         },
+         "title": "CustomCodeExecutionResult",
+         "type": "object"
+      },
+      "CustomOutput": {
+         "additionalProperties": false,
+         "description": "Spec for custom output. This data type is not supported in Gemini API.",
+         "properties": {
+            "rawOutputs": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/RawOutput"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. List of raw output strings."
+            }
+         },
+         "title": "CustomOutput",
+         "type": "object"
+      },
+      "ExactMatchMetricValue": {
+         "additionalProperties": false,
+         "description": "Exact match metric value for an instance.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Exact match score.",
+               "title": "Score"
+            }
+         },
+         "title": "ExactMatchMetricValue",
+         "type": "object"
+      },
+      "PairwiseChoice": {
+         "description": "Output only.\n\nPairwise metric choice. This enum is not supported in Gemini API.",
+         "enum": [
+            "PAIRWISE_CHOICE_UNSPECIFIED",
+            "BASELINE",
+            "CANDIDATE",
+            "TIE"
+         ],
+         "title": "PairwiseChoice",
+         "type": "string"
+      },
+      "PairwiseMetricResult": {
+         "additionalProperties": false,
+         "description": "Spec for pairwise metric result.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "customOutput": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/CustomOutput"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Spec for custom output."
+            },
+            "explanation": {
+               "anyOf": [
+                  {
+                     "type": "string"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Explanation for pairwise metric score.",
+               "title": "Explanation"
+            },
+            "pairwiseChoice": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/PairwiseChoice"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Pairwise metric choice."
+            }
+         },
+         "title": "PairwiseMetricResult",
+         "type": "object"
+      },
+      "PointwiseMetricResult": {
+         "additionalProperties": false,
+         "description": "Spec for pointwise metric result.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "customOutput": {
+               "anyOf": [
+                  {
+                     "$ref": "#/$defs/CustomOutput"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Spec for custom output."
+            },
+            "explanation": {
+               "anyOf": [
+                  {
+                     "type": "string"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Explanation for pointwise metric score.",
+               "title": "Explanation"
+            },
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Pointwise metric score.",
+               "title": "Score"
+            }
+         },
+         "title": "PointwiseMetricResult",
+         "type": "object"
+      },
+      "RawOutput": {
+         "additionalProperties": false,
+         "description": "Raw output. This data type is not supported in Gemini API.",
+         "properties": {
+            "rawOutput": {
+               "anyOf": [
+                  {
+                     "items": {
+                        "type": "string"
+                     },
+                     "type": "array"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Raw output string.",
+               "title": "Rawoutput"
+            }
+         },
+         "title": "RawOutput",
+         "type": "object"
+      },
+      "RougeMetricValue": {
+         "additionalProperties": false,
+         "description": "Rouge metric value for an instance.\n\nThis data type is not supported in Gemini API.",
+         "properties": {
+            "score": {
+               "anyOf": [
+                  {
+                     "type": "number"
+                  },
+                  {
+                     "type": "null"
+                  }
+               ],
+               "default": null,
+               "description": "Output only. Rouge score.",
+               "title": "Score"
+            }
+         },
+         "title": "RougeMetricValue",
+         "type": "object"
+      }
+   },
+   "additionalProperties": false
+}
+
+
+

+
Fields:
+
+
+
Validators:
+

+
+
+
+field aggregation_metric: Optional[AggregationMetric] = None (alias 'aggregationMetric')
+

Aggregation metric.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+
+field bleu_metric_value: Optional[BleuMetricValue] = None (alias 'bleuMetricValue')
+

Results for bleu metric.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+
+field custom_code_execution_result: Optional[CustomCodeExecutionResult] = None (alias 'customCodeExecutionResult')
+

Result for code execution metric.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+
+field exact_match_metric_value: Optional[ExactMatchMetricValue] = None (alias 'exactMatchMetricValue')
+

Results for exact match metric.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+
+field pairwise_metric_result: Optional[PairwiseMetricResult] = None (alias 'pairwiseMetricResult')
+

Result for pairwise metric.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+
+field pointwise_metric_result: Optional[PointwiseMetricResult] = None (alias 'pointwiseMetricResult')
+

Result for pointwise metric.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+
+field rouge_metric_value: Optional[RougeMetricValue] = None (alias 'rougeMetricValue')
+

Results for rouge metric.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+ +
+
+class genai.types.AggregationResultDict
+

Bases: TypedDict

+

The aggregation result for a single metric.

+

This data type is not supported in Gemini API.

+
+
+aggregation_metric: Optional[AggregationMetric]
+

Aggregation metric.

+
+ +
+
+bleu_metric_value: Optional[BleuMetricValueDict]
+

Results for bleu metric.

+
+ +
+
+custom_code_execution_result: Optional[CustomCodeExecutionResultDict]
+

Result for code execution metric.

+
+ +
+
+exact_match_metric_value: Optional[ExactMatchMetricValueDict]
+

Results for exact match metric.

+
+ +
+
+pairwise_metric_result: Optional[PairwiseMetricResultDict]
+

Result for pairwise metric.

+
+ +
+
+pointwise_metric_result: Optional[PointwiseMetricResultDict]
+

Result for pointwise metric.

+
+ +
+
+rouge_metric_value: Optional[RougeMetricValueDict]
+

Results for rouge metric.

+
+ +
+
pydantic model genai.types.ApiAuth
@@ -5018,30 +6130,70 @@

Submodules "title": "AudioTranscriptionConfig", "description": "The audio transcription configuration in Setup.", "type": "object", - "properties": {}, + "properties": { + "languageCodes": { + "anyOf": [ + { + "items": { + "type": "string" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "The language codes of the audio. BCP-47 language code. If not set, the transcription will be in the language detected by the model. If set, the server will use the language code specified in the model config as a hint for the language of the audio\n ", + "title": "Languagecodes" + } + }, "additionalProperties": false }

-
Validators:
-

+
Fields:
+
+
+
Validators:
+

+
+
+
+field language_codes: Optional[list[str]] = None (alias 'languageCodes')
+

The language codes of the audio. BCP-47 language code. If not set, the transcription will be in the language detected by the model. If set, the server will use the language code specified in the model config as a hint for the language of the audio

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+

+
class genai.types.AudioTranscriptionConfigDict

Bases: TypedDict

The audio transcription configuration in Setup.

+
+
+language_codes: Optional[list[str]]
+

The language codes of the audio. BCP-47 language code. If not set, the transcription will be in the language detected by the model. If set, the server will use the language code specified in the model config as a hint for the language of the audio

+
+
pydantic model genai.types.AuthConfig

Bases: BaseModel

-

Auth configuration to run the extension.

-

This data type is not supported in Gemini API.

+

The authentication config to access the API.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

@@ -5049,9 +6201,22 @@

Submodules Show JSON schema

+
+
+field api_key: Optional[str] = None (alias 'apiKey')
+

The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+
field api_key_config: Optional[ApiKeyConfig] = None (alias 'apiKeyConfig')
@@ -5425,8 +6604,13 @@

Submodules class genai.types.AuthConfigDict

Bases: TypedDict

-

Auth configuration to run the extension.

-

This data type is not supported in Gemini API.

+

The authentication config to access the API.

+
+
+api_key: Optional[str]
+

The authentication config to access the API. Only API key is supported. This field is not supported in Gemini API.

+
+
api_key_config: Optional[ApiKeyConfigDict]
@@ -6453,7 +7637,7 @@

Submodules } ], "default": null, - "description": "Optional. If enabled, audio timestamp will be included in the request to the model. This field is not supported in Gemini API.", + "description": "Optional. If enabled, audio timestamps will be included in the request to the model. This can be useful for synchronizing audio with other modalities in the response. This field is not supported in Gemini API.", "title": "Audiotimestamp" }, "candidateCount": { @@ -6466,7 +7650,7 @@

Submodules } ], "default": null, - "description": "Optional. Number of candidates to generate.", + "description": "Optional. The number of candidate responses to generate. A higher `candidate_count` can provide more options to choose from, but it also consumes more resources. This can be useful for generating a variety of responses and selecting the best one.", "title": "Candidatecount" }, "enableAffectiveDialog": { @@ -6479,7 +7663,7 @@

Submodules } ], "default": null, - "description": "Optional. If enabled, the model will detect emotions and adapt its responses accordingly. This field is not supported in Gemini API.", + "description": "Optional. If enabled, the model will detect emotions and adapt its responses accordingly. For example, if the model detects that the user is frustrated, it may provide a more empathetic response. This field is not supported in Gemini API.", "title": "Enableaffectivedialog" }, "frequencyPenalty": { @@ -6492,7 +7676,7 @@

Submodules } ], "default": null, - "description": "Optional. Frequency penalties.", + "description": "Optional. Penalizes tokens based on their frequency in the generated text. A positive value helps to reduce the repetition of words and phrases. Valid values can range from [-2.0, 2.0].", "title": "Frequencypenalty" }, "logprobs": { @@ -6505,7 +7689,7 @@

Submodules } ], "default": null, - "description": "Optional. Logit probabilities.", + "description": "Optional. The number of top log probabilities to return for each token. This can be used to see which other tokens were considered likely candidates for a given position. A higher value will return more options, but it will also increase the size of the response.", "title": "Logprobs" }, "maxOutputTokens": { @@ -6518,7 +7702,7 @@

Submodules } ], "default": null, - "description": "Optional. The maximum number of output tokens to generate per message.", + "description": "Optional. The maximum number of tokens to generate in the response. A token is approximately four characters. The default value varies by model. This parameter can be used to control the length of the generated text and prevent overly long responses.", "title": "Maxoutputtokens" }, "mediaResolution": { @@ -6531,7 +7715,7 @@

Submodules } ], "default": null, - "description": "Optional. If specified, the media resolution specified will be used." + "description": "Optional. The token resolution at which input media content is sampled. This is used to control the trade-off between the quality of the response and the number of tokens used to represent the media. A higher resolution allows the model to perceive more detail, which can lead to a more nuanced response, but it will also use more tokens. This does not affect the image dimensions sent to the model." }, "presencePenalty": { "anyOf": [ @@ -6543,7 +7727,7 @@

Submodules } ], "default": null, - "description": "Optional. Positive penalties.", + "description": "Optional. Penalizes tokens that have already appeared in the generated text. A positive value encourages the model to generate more diverse and less repetitive text. Valid values can range from [-2.0, 2.0].", "title": "Presencepenalty" }, "responseLogprobs": { @@ -6556,7 +7740,7 @@

Submodules } ], "default": null, - "description": "Optional. If true, export the logprobs results in response.", + "description": "Optional. If set to true, the log probabilities of the output tokens are returned. Log probabilities are the logarithm of the probability of a token appearing in the output. A higher log probability means the token is more likely to be generated. This can be useful for analyzing the model's confidence in its own output and for debugging.", "title": "Responselogprobs" }, "responseMimeType": { @@ -6569,7 +7753,7 @@

Submodules } ], "default": null, - "description": "Optional. Output response mimetype of the generated candidate text. Supported mimetype: - `text/plain`: (default) Text output. - `application/json`: JSON response in the candidates. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", + "description": "Optional. The IANA standard MIME type of the response. The model will generate output that conforms to this MIME type. Supported values include 'text/plain' (default) and 'application/json'. The model needs to be prompted to output the appropriate response type, otherwise the behavior is undefined. This is a preview feature.", "title": "Responsemimetype" }, "responseModalities": { @@ -6585,7 +7769,7 @@

Submodules } ], "default": null, - "description": "Optional. The modalities of the response.", + "description": "Optional. The modalities of the response. The model will generate a response that includes all the specified modalities. For example, if this is set to `[TEXT, IMAGE]`, the response will include both text and an image.", "title": "Responsemodalities" }, "responseSchema": { @@ -6598,7 +7782,7 @@

Submodules } ], "default": null, - "description": "Optional. The `Schema` object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. Represents a select subset of an [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema). If set, a compatible response_mime_type must also be set. Compatible mimetypes: `application/json`: Schema for JSON response." + "description": "Optional. Lets you to specify a schema for the model's response, ensuring that the output conforms to a particular structure. This is useful for generating structured data such as JSON. The schema is a subset of the [OpenAPI 3.0 schema object](https://spec.openapis.org/oas/v3.0.3#schema) object. When this field is set, you must also set the `response_mime_type` to `application/json`." }, "routingConfig": { "anyOf": [ @@ -6622,7 +7806,7 @@

Submodules } ], "default": null, - "description": "Optional. Seed.", + "description": "Optional. A seed for the random number generator. By setting a seed, you can make the model's output mostly deterministic. For a given prompt and parameters (like temperature, top_p, etc.), the model will produce the same response every time. However, it's not a guaranteed absolute deterministic behavior. This is different from parameters like `temperature`, which control the *level* of randomness. `seed` ensures that the \"random\" choices the model makes are the same on every run, making it essential for testing and ensuring reproducible results.", "title": "Seed" }, "speechConfig": { @@ -6650,7 +7834,7 @@

Submodules } ], "default": null, - "description": "Optional. Stop sequences.", + "description": "Optional. A list of character sequences that will stop the model from generating further tokens. If a stop sequence is generated, the output will end at that point. This is useful for controlling the length and structure of the output. For example, you can use [\"\n\", \"###\"] to stop generation at a new line or a specific marker.", "title": "Stopsequences" }, "temperature": { @@ -6663,7 +7847,7 @@

Submodules } ], "default": null, - "description": "Optional. Controls the randomness of predictions.", + "description": "Optional. Controls the randomness of the output. A higher temperature results in more creative and diverse responses, while a lower temperature makes the output more predictable and focused. The valid range is (0.0, 2.0].", "title": "Temperature" }, "thinkingConfig": { @@ -6676,7 +7860,7 @@

Submodules } ], "default": null, - "description": "Optional. Config for thinking features. An error will be returned if this field is set for models that don't support thinking." + "description": "Optional. Configuration for thinking features. An error will be returned if this field is set for models that don't support thinking." }, "topK": { "anyOf": [ @@ -6688,7 +7872,7 @@

Submodules } ], "default": null, - "description": "Optional. If specified, top-k sampling will be used.", + "description": "Optional. Specifies the top-k sampling threshold. The model considers only the top k most probable tokens for the next token. This can be useful for generating more coherent and less random text. For example, a `top_k` of 40 means the model will choose the next word from the 40 most likely words.", "title": "Topk" }, "topP": { @@ -6701,7 +7885,7 @@

Submodules } ], "default": null, - "description": "Optional. If specified, nucleus sampling will be used.", + "description": "Optional. Specifies the nucleus sampling threshold. The model considers only the smallest set of tokens whose cumulative probability is at least `top_p`. This helps generate more diverse and less repetitive responses. For example, a `top_p` of 0.9 means the model considers tokens until the cumulative probability of the tokens to select from reaches 0.9. It's recommended to adjust either temperature or `top_p`, but not both.", "title": "Topp" }, "enableEnhancedCivicAnswers": { @@ -6723,7 +7907,7 @@

Submodules }, "GenerationConfigRoutingConfig": { "additionalProperties": false, - "description": "The configuration for routing the request to a specific model.\n\nThis data type is not supported in Gemini API.", + "description": "The configuration for routing the request to a specific model.\n\nThis can be used to control which model is used for the generation, either\nautomatically or by specifying a model name. This data type is not supported\nin Gemini API.", "properties": { "autoMode": { "anyOf": [ @@ -6735,7 +7919,7 @@

Submodules } ], "default": null, - "description": "Automated routing." + "description": "In this mode, the model is selected automatically based on the content of the request." }, "manualMode": { "anyOf": [ @@ -6747,7 +7931,7 @@

Submodules } ], "default": null, - "description": "Manual routing." + "description": "In this mode, the model is specified manually." } }, "title": "GenerationConfigRoutingConfig", @@ -6755,7 +7939,7 @@

Submodules }, "GenerationConfigRoutingConfigAutoRoutingMode": { "additionalProperties": false, - "description": "When automated routing is specified, the routing will be determined by the pretrained routing model and customer provided model routing preference.\n\nThis data type is not supported in Gemini API.", + "description": "The configuration for automated routing.\n\nWhen automated routing is specified, the routing will be determined by the\npretrained routing model and customer provided model routing preference. This\ndata type is not supported in Gemini API.", "properties": { "modelRoutingPreference": { "anyOf": [ @@ -6782,7 +7966,7 @@

Submodules }, "GenerationConfigRoutingConfigManualRoutingMode": { "additionalProperties": false, - "description": "When manual routing is set, the specified model will be used directly.\n\nThis data type is not supported in Gemini API.", + "description": "The configuration for manual routing.\n\nWhen manual routing is specified, the model will be selected based on the\nmodel name provided. This data type is not supported in Gemini API.", "properties": { "modelName": { "anyOf": [ @@ -6794,7 +7978,7 @@

Submodules } ], "default": null, - "description": "The model name to use. Only the public LLM models are accepted. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models).", + "description": "The name of the model to use. Only public LLM models are accepted.", "title": "Modelname" } }, @@ -6869,7 +8053,7 @@

Submodules }, "PrebuiltVoiceConfig": { "additionalProperties": false, - "description": "The configuration for the prebuilt speaker to use.", + "description": "Configuration for a prebuilt voice.", "properties": { "voiceName": { "anyOf": [ @@ -6881,7 +8065,7 @@

Submodules } ], "default": null, - "description": "The name of the preset voice to use.", + "description": "The name of the prebuilt voice to use.", "title": "Voicename" } }, @@ -6980,7 +8164,7 @@

Submodules } ], "default": null, - "description": "Optional. The value should be validated against any (one or more) of the subschemas in the list.", + "description": "Optional. The instance must be valid against any (one or more) of the subschemas listed in `any_of`.", "title": "Anyof" }, "default": { @@ -6991,7 +8175,7 @@

Submodules } ], "default": null, - "description": "Optional. Default value of the data.", + "description": "Optional. Default value to use if the field is not specified.", "title": "Default" }, "description": { @@ -7004,7 +8188,7 @@

Submodules } ], "default": null, - "description": "Optional. The description of the data.", + "description": "Optional. Description of the schema.", "title": "Description" }, "enum": { @@ -7020,7 +8204,7 @@

Submodules } ], "default": null, - "description": "Optional. Possible values of the element of primitive type with enum format. Examples: 1. We can define direction as : {type:STRING, format:enum, enum:[\"EAST\", NORTH\", \"SOUTH\", \"WEST\"]} 2. We can define apartment number as : {type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]}", + "description": "Optional. Possible values of the field. This field can be used to restrict a value to a fixed set of values. To mark a field as an enum, set `format` to `enum` and provide the list of possible values in `enum`. For example: 1. To define directions: `{type:STRING, format:enum, enum:[\"EAST\", \"NORTH\", \"SOUTH\", \"WEST\"]}` 2. To define apartment numbers: `{type:INTEGER, format:enum, enum:[\"101\", \"201\", \"301\"]}`", "title": "Enum" }, "example": { @@ -7031,7 +8215,7 @@

Submodules } ], "default": null, - "description": "Optional. Example of the object. Will only populated when the object is the root.", + "description": "Optional. Example of an instance of this schema.", "title": "Example" }, "format": { @@ -7044,7 +8228,7 @@

Submodules } ], "default": null, - "description": "Optional. The format of the data. Supported formats: for NUMBER type: \"float\", \"double\" for INTEGER type: \"int32\", \"int64\" for STRING type: \"email\", \"byte\", etc", + "description": "Optional. The format of the data. For `NUMBER` type, format can be `float` or `double`. For `INTEGER` type, format can be `int32` or `int64`. For `STRING` type, format can be `email`, `byte`, `date`, `date-time`, `password`, and other formats to further refine the data type.", "title": "Format" }, "items": { @@ -7057,7 +8241,7 @@

Submodules } ], "default": null, - "description": "Optional. SCHEMA FIELDS FOR TYPE ARRAY Schema of the elements of Type.ARRAY." + "description": "Optional. If type is `ARRAY`, `items` specifies the schema of elements in the array." }, "maxItems": { "anyOf": [ @@ -7069,7 +8253,7 @@

Submodules } ], "default": null, - "description": "Optional. Maximum number of the elements for Type.ARRAY.", + "description": "Optional. If type is `ARRAY`, `max_items` specifies the maximum number of items in an array.", "title": "Maxitems" }, "maxLength": { @@ -7082,7 +8266,7 @@

Submodules } ], "default": null, - "description": "Optional. Maximum length of the Type.STRING", + "description": "Optional. If type is `STRING`, `max_length` specifies the maximum length of the string.", "title": "Maxlength" }, "maxProperties": { @@ -7095,7 +8279,7 @@

Submodules } ], "default": null, - "description": "Optional. Maximum number of the properties for Type.OBJECT.", + "description": "Optional. If type is `OBJECT`, `max_properties` specifies the maximum number of properties that can be provided.", "title": "Maxproperties" }, "maximum": { @@ -7108,7 +8292,7 @@

Submodules } ], "default": null, - "description": "Optional. Maximum value of the Type.INTEGER and Type.NUMBER", + "description": "Optional. If type is `INTEGER` or `NUMBER`, `maximum` specifies the maximum allowed value.", "title": "Maximum" }, "minItems": { @@ -7121,7 +8305,7 @@

Submodules } ], "default": null, - "description": "Optional. Minimum number of the elements for Type.ARRAY.", + "description": "Optional. If type is `ARRAY`, `min_items` specifies the minimum number of items in an array.", "title": "Minitems" }, "minLength": { @@ -7134,7 +8318,7 @@

Submodules } ], "default": null, - "description": "Optional. SCHEMA FIELDS FOR TYPE STRING Minimum length of the Type.STRING", + "description": "Optional. If type is `STRING`, `min_length` specifies the minimum length of the string.", "title": "Minlength" }, "minProperties": { @@ -7147,7 +8331,7 @@

Submodules } ], "default": null, - "description": "Optional. Minimum number of the properties for Type.OBJECT.", + "description": "Optional. If type is `OBJECT`, `min_properties` specifies the minimum number of properties that can be provided.", "title": "Minproperties" }, "minimum": { @@ -7160,7 +8344,7 @@

Submodules } ], "default": null, - "description": "Optional. SCHEMA FIELDS FOR TYPE INTEGER and NUMBER Minimum value of the Type.INTEGER and Type.NUMBER", + "description": "Optional. If type is `INTEGER` or `NUMBER`, `minimum` specifies the minimum allowed value.", "title": "Minimum" }, "nullable": { @@ -7173,7 +8357,7 @@

Submodules } ], "default": null, - "description": "Optional. Indicates if the value may be null.", + "description": "Optional. Indicates if the value of this field can be null.", "title": "Nullable" }, "pattern": { @@ -7186,7 +8370,7 @@

Submodules } ], "default": null, - "description": "Optional. Pattern of the Type.STRING to restrict a string to a regular expression.", + "description": "Optional. If type is `STRING`, `pattern` specifies a regular expression that the string must match.", "title": "Pattern" }, "properties": { @@ -7202,7 +8386,7 @@

Submodules } ], "default": null, - "description": "Optional. SCHEMA FIELDS FOR TYPE OBJECT Properties of Type.OBJECT.", + "description": "Optional. If type is `OBJECT`, `properties` is a map of property names to schema definitions for each property of the object.", "title": "Properties" }, "propertyOrdering": { @@ -7218,7 +8402,7 @@

Submodules } ], "default": null, - "description": "Optional. The order of the properties. Not a standard field in open api spec. Only used to support the order of the properties.", + "description": "Optional. Order of properties displayed or used where order matters. This is not a standard field in OpenAPI specification, but can be used to control the order of properties.", "title": "Propertyordering" }, "required": { @@ -7234,7 +8418,7 @@

Submodules } ], "default": null, - "description": "Optional. Required properties of Type.OBJECT.", + "description": "Optional. If type is `OBJECT`, `required` lists the names of properties that must be present.", "title": "Required" }, "title": { @@ -7247,7 +8431,7 @@

Submodules } ], "default": null, - "description": "Optional. The title of the Schema.", + "description": "Optional. Title for the schema.", "title": "Title" }, "type": { @@ -7260,7 +8444,7 @@

Submodules } ], "default": null, - "description": "Optional. The type of the data." + "description": "Optional. Data type of the schema field." } }, "title": "Schema", @@ -7268,7 +8452,7 @@

Submodules }, "SpeakerVoiceConfig": { "additionalProperties": false, - "description": "Configuration for a single speaker in a multi speaker setup.", + "description": "Configuration for a single speaker in a multi-speaker setup.", "properties": { "speaker": { "anyOf": [ @@ -7324,7 +8508,7 @@

Submodules } ], "default": null, - "description": "Optional. Language code (ISO 639. e.g. en-US) for the speech synthesization.", + "description": "Optional. The language code (ISO 639-1) for the speech synthesis.", "title": "Languagecode" }, "multiSpeakerVoiceConfig": { @@ -7402,7 +8586,7 @@

Submodules "type": "string" }, "Type": { - "description": "The type of the data.", + "description": "Data type of the schema field.", "enum": [ "TYPE_UNSPECIFIED", "STRING", @@ -7441,7 +8625,7 @@

Submodules } ], "default": null, - "description": "The configuration for the prebuilt voice to use." + "description": "The configuration for a prebuilt voice." } }, "title": "VoiceConfig", @@ -7835,7 +9019,7 @@

Submodules }, "Blob": { "additionalProperties": false, - "description": "Content blob.", + "description": "A content blob.\n\nA Blob contains data of a specific media type. It is used to represent images,\naudio, and video.", "properties": { "data": { "anyOf": [ @@ -7848,7 +9032,7 @@

Submodules } ], "default": null, - "description": "Required. Raw bytes.", + "description": "Required. The raw bytes of the data.", "title": "Data" }, "displayName": { @@ -7861,7 +9045,7 @@

Submodules } ], "default": null, - "description": "Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.", + "description": "Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API.", "title": "Displayname" }, "mimeType": { @@ -7984,7 +9168,7 @@

Submodules } ], "default": null, - "description": "Output only. Average log probability score of the candidate.", + "description": "Output only. The average log probability of the tokens in this candidate. This is a length-normalized score that can be used to compare the quality of candidates of different lengths. A higher average log probability suggests a more confident and coherent response.", "title": "Avglogprobs" }, "index": { @@ -7997,7 +9181,7 @@

Submodules } ], "default": null, - "description": "Output only. Index of the candidate.", + "description": "Output only. The 0-based index of this candidate in the list of generated responses. This is useful for distinguishing between multiple candidates when `candidate_count` > 1.", "title": "Index" }, "logprobsResult": { @@ -8010,7 +9194,7 @@

Submodules } ], "default": null, - "description": "Output only. Log-likelihood scores for the response tokens and top tokens" + "description": "Output only. The detailed log probability information for the tokens in this candidate. This is useful for debugging, understanding model uncertainty, and identifying potential \"hallucinations\"." }, "safetyRatings": { "anyOf": [ @@ -8025,7 +9209,7 @@

Submodules } ], "default": null, - "description": "Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.", + "description": "Output only. A list of ratings for the safety of a response candidate. There is at most one rating per category.", "title": "Safetyratings" }, "urlContextMetadata": { @@ -8038,7 +9222,7 @@

Submodules } ], "default": null, - "description": "Output only. Metadata related to url context retrieval tool." + "description": "Output only. Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL." } }, "title": "Candidate", @@ -8046,7 +9230,7 @@

Submodules }, "Citation": { "additionalProperties": false, - "description": "Source attributions for content.\n\nThis data type is not supported in Gemini API.", + "description": "A citation for a piece of generatedcontent.\n\nThis data type is not supported in Gemini API.", "properties": { "endIndex": { "anyOf": [ @@ -8058,7 +9242,7 @@

Submodules } ], "default": null, - "description": "Output only. End index into the content.", + "description": "Output only. The end index of the citation in the content.", "title": "Endindex" }, "license": { @@ -8071,7 +9255,7 @@

Submodules } ], "default": null, - "description": "Output only. License of the attribution.", + "description": "Output only. The license of the source of the citation.", "title": "License" }, "publicationDate": { @@ -8084,7 +9268,7 @@

Submodules } ], "default": null, - "description": "Output only. Publication date of the attribution." + "description": "Output only. The publication date of the source of the citation." }, "startIndex": { "anyOf": [ @@ -8096,7 +9280,7 @@

Submodules } ], "default": null, - "description": "Output only. Start index into the content.", + "description": "Output only. The start index of the citation in the content.", "title": "Startindex" }, "title": { @@ -8109,7 +9293,7 @@

Submodules } ], "default": null, - "description": "Output only. Title of the attribution.", + "description": "Output only. The title of the source of the citation.", "title": "Title" }, "uri": { @@ -8122,7 +9306,7 @@

Submodules } ], "default": null, - "description": "Output only. Url reference of the attribution.", + "description": "Output only. The URI of the source of the citation.", "title": "Uri" } }, @@ -8276,7 +9460,7 @@

Submodules } ], "default": null, - "description": "Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset.", + "description": "Optional. The producer of the content. Must be either 'user' or 'model'. If not set, the service will default to 'user'.", "title": "Role" } }, @@ -8388,7 +9572,7 @@

Submodules }, "FileData": { "additionalProperties": false, - "description": "URI based data.", + "description": "URI-based data.\n\nA FileData message contains a URI pointing to data of a specific media type.\nIt is used to represent images, audio, and video stored in Google Cloud\nStorage.", "properties": { "displayName": { "anyOf": [ @@ -8400,7 +9584,7 @@

Submodules } ], "default": null, - "description": "Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.", + "description": "Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API.", "title": "Displayname" }, "fileUri": { @@ -8413,7 +9597,7 @@

Submodules } ], "default": null, - "description": "Required. URI.", + "description": "Required. The URI of the file in Google Cloud Storage.", "title": "Fileuri" }, "mimeType": { @@ -9182,7 +10366,7 @@

Submodules } ], "default": null, - "description": "Grounding chunk from Google Maps. This field is not supported in Gemini API." + "description": "A `Maps` chunk is a piece of evidence that comes from Google Maps.\n\n It contains information about a place, such as its name, address, and\n reviews. This is used to provide the user with rich, location-based\n information." }, "retrievedContext": { "anyOf": [ @@ -9194,7 +10378,7 @@

Submodules } ], "default": null, - "description": "Grounding chunk from context retrieved by the retrieval tools. This field is not supported in Gemini API." + "description": "A grounding chunk from a data source retrieved by a retrieval tool, such as Vertex AI Search. See the `RetrievedContext` message for details. This field is not supported in Gemini API." }, "web": { "anyOf": [ @@ -9206,7 +10390,7 @@

Submodules } ], "default": null, - "description": "Grounding chunk from the web." + "description": "A grounding chunk from a web page, typically from Google Search. See the `Web` message for details." } }, "title": "GroundingChunk", @@ -9274,7 +10458,7 @@

Submodules }, "GroundingChunkMaps": { "additionalProperties": false, - "description": "Chunk from Google Maps. This data type is not supported in Gemini API.", + "description": "A `Maps` chunk is a piece of evidence that comes from Google Maps.\n\nIt contains information about a place, such as its name, address, and reviews.\nThis is used to provide the user with rich, location-based information.", "properties": { "placeAnswerSources": { "anyOf": [ @@ -9286,7 +10470,7 @@

Submodules } ], "default": null, - "description": "Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content." + "description": "The sources that were used to generate the place answer.\n\n This includes review snippets and photos that were used to generate the\n answer, as well as URIs to flag content." }, "placeId": { "anyOf": [ @@ -9298,7 +10482,7 @@

Submodules } ], "default": null, - "description": "This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place.", + "description": "This Place's resource name, in `places/{place_id}` format.\n\n This can be used to look up the place in the Google Maps API.", "title": "Placeid" }, "text": { @@ -9311,7 +10495,7 @@

Submodules } ], "default": null, - "description": "Text of the place answer.", + "description": "The text of the place answer.", "title": "Text" }, "title": { @@ -9324,7 +10508,7 @@

Submodules } ], "default": null, - "description": "Title of the place.", + "description": "The title of the place.", "title": "Title" }, "uri": { @@ -9337,7 +10521,7 @@

Submodules } ], "default": null, - "description": "URI reference of the place.", + "description": "The URI of the place.", "title": "Uri" } }, @@ -9346,8 +10530,24 @@

Submodules }, "GroundingChunkMapsPlaceAnswerSources": { "additionalProperties": false, - "description": "Sources used to generate the place answer.\n\nThis data type is not supported in Gemini API.", + "description": "The sources that were used to generate the place answer.\n\nThis includes review snippets and photos that were used to generate the\nanswer, as well as URIs to flag content.", "properties": { + "reviewSnippet": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/GroundingChunkMapsPlaceAnswerSourcesReviewSnippet" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Snippets of reviews that were used to generate the answer.", + "title": "Reviewsnippet" + }, "flagContentUri": { "anyOf": [ { @@ -9374,7 +10574,7 @@

Submodules } ], "default": null, - "description": "Snippets of reviews that are used to generate the answer.", + "description": "Snippets of reviews that were used to generate the answer.", "title": "Reviewsnippets" } }, @@ -9383,7 +10583,7 @@

Submodules }, "GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution": { "additionalProperties": false, - "description": "Author attribution for a photo or review.\n\nThis data type is not supported in Gemini API.", + "description": "Author attribution for a photo or review.", "properties": { "displayName": { "anyOf": [ @@ -9430,7 +10630,7 @@

Submodules }, "GroundingChunkMapsPlaceAnswerSourcesReviewSnippet": { "additionalProperties": false, - "description": "Encapsulates a review snippet.\n\nThis data type is not supported in Gemini API.", + "description": "Encapsulates a review snippet.", "properties": { "authorAttribution": { "anyOf": [ @@ -9528,7 +10728,7 @@

Submodules }, "GroundingChunkRetrievedContext": { "additionalProperties": false, - "description": "Chunk from context retrieved by the retrieval tools.\n\nThis data type is not supported in Gemini API.", + "description": "Context retrieved from a data source to ground the model's response.\n\nThis is used when a retrieval tool fetches information from a user-provided\ncorpus or a public dataset. This data type is not supported in Gemini API.", "properties": { "documentName": { "anyOf": [ @@ -9540,7 +10740,7 @@

Submodules } ], "default": null, - "description": "Output only. The full document name for the referenced Vertex AI Search document.", + "description": "Output only. The full resource name of the referenced Vertex AI Search document. This is used to identify the specific document that was retrieved. The format is `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.", "title": "Documentname" }, "ragChunk": { @@ -9553,7 +10753,7 @@

Submodules } ], "default": null, - "description": "Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool." + "description": "Additional context for a Retrieval-Augmented Generation (RAG) retrieval result. This is populated only when the RAG retrieval tool is used." }, "text": { "anyOf": [ @@ -9565,7 +10765,7 @@

Submodules } ], "default": null, - "description": "Text of the attribution.", + "description": "The content of the retrieved data source.", "title": "Text" }, "title": { @@ -9578,7 +10778,7 @@

Submodules } ], "default": null, - "description": "Title of the attribution.", + "description": "The title of the retrieved data source.", "title": "Title" }, "uri": { @@ -9591,7 +10791,7 @@

Submodules } ], "default": null, - "description": "URI reference of the attribution.", + "description": "The URI of the retrieved data source.", "title": "Uri" } }, @@ -9600,7 +10800,7 @@

Submodules }, "GroundingChunkWeb": { "additionalProperties": false, - "description": "Chunk from the web.", + "description": "A `Web` chunk is a piece of evidence that comes from a web page.\n\nIt contains the URI of the web page, the title of the page, and the domain of\nthe page. This is used to provide the user with a link to the source of the\ninformation.", "properties": { "domain": { "anyOf": [ @@ -9612,7 +10812,7 @@

Submodules } ], "default": null, - "description": "Domain of the (original) URI. This field is not supported in Gemini API.", + "description": "The domain of the web page that contains the evidence. This can be used to filter out low-quality sources. This field is not supported in Gemini API.", "title": "Domain" }, "title": { @@ -9625,7 +10825,7 @@

Submodules } ], "default": null, - "description": "Title of the chunk.", + "description": "The title of the web page that contains the evidence.", "title": "Title" }, "uri": { @@ -9638,7 +10838,7 @@

Submodules } ], "default": null, - "description": "URI reference of the chunk.", + "description": "The URI of the web page that contains the evidence.", "title": "Uri" } }, @@ -9647,6 +10847,7 @@

Submodules }, "GroundingMetadata": { "additionalProperties": false, + "description": "Information for various kinds of grounding.", "properties": { "imageSearchQueries": { "anyOf": [ @@ -9680,48 +10881,47 @@

Submodules "description": "A list of supporting references retrieved from the grounding\n source. This field is populated when the grounding source is Google\n Search, Vertex AI Search, or Google Maps.\n ", "title": "Groundingchunks" }, - "googleMapsWidgetContextToken": { + "groundingSupports": { "anyOf": [ { - "type": "string" + "items": { + "$ref": "#/$defs/GroundingSupport" + }, + "type": "array" }, { "type": "null" } ], "default": null, - "description": "Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding. This field is not supported in Gemini API.", - "title": "Googlemapswidgetcontexttoken" + "description": "List of grounding support.", + "title": "Groundingsupports" }, - "groundingSupports": { + "retrievalMetadata": { "anyOf": [ { - "items": { - "$ref": "#/$defs/GroundingSupport" - }, - "type": "array" + "$ref": "#/$defs/RetrievalMetadata" }, { "type": "null" } ], "default": null, - "description": "Optional. List of grounding support.", - "title": "Groundingsupports" + "description": "Metadata related to retrieval in the grounding flow." }, - "retrievalMetadata": { + "searchEntryPoint": { "anyOf": [ { - "$ref": "#/$defs/RetrievalMetadata" + "$ref": "#/$defs/SearchEntryPoint" }, { "type": "null" } ], "default": null, - "description": "Optional. Output only. Retrieval metadata." + "description": "Optional. Google search entry for the following-up web\n searches." }, - "retrievalQueries": { + "webSearchQueries": { "anyOf": [ { "items": { @@ -9734,26 +10934,27 @@

Submodules } ], "default": null, - "description": "Optional. Queries executed by the retrieval tools. This field is not supported in Gemini API.", - "title": "Retrievalqueries" + "description": "Web search queries for the following-up web search.", + "title": "Websearchqueries" }, - "searchEntryPoint": { + "googleMapsWidgetContextToken": { "anyOf": [ { - "$ref": "#/$defs/SearchEntryPoint" + "type": "string" }, { "type": "null" } ], "default": null, - "description": "Optional. Google search entry for the following-up web searches." + "description": "Optional. Output only. A token that can be used to render a Google Maps widget with the contextual data. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API.", + "title": "Googlemapswidgetcontexttoken" }, - "sourceFlaggingUris": { + "retrievalQueries": { "anyOf": [ { "items": { - "$ref": "#/$defs/GroundingMetadataSourceFlaggingUri" + "type": "string" }, "type": "array" }, @@ -9762,14 +10963,14 @@

Submodules } ], "default": null, - "description": "Optional. Output only. List of source flagging uris. This is currently populated only for Google Maps grounding. This field is not supported in Gemini API.", - "title": "Sourceflagginguris" + "description": "Optional. The queries that were executed by the retrieval tools. This field is populated only when the grounding source is a retrieval tool, such as Vertex AI Search. This field is not supported in Gemini API.", + "title": "Retrievalqueries" }, - "webSearchQueries": { + "sourceFlaggingUris": { "anyOf": [ { "items": { - "type": "string" + "$ref": "#/$defs/GroundingMetadataSourceFlaggingUri" }, "type": "array" }, @@ -9778,8 +10979,8 @@

Submodules } ], "default": null, - "description": "Optional. Web search queries for the following-up web search.", - "title": "Websearchqueries" + "description": "Optional. Output only. A list of URIs that can be used to flag a place or review for inappropriate content. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API.", + "title": "Sourceflagginguris" } }, "title": "GroundingMetadata", @@ -9787,7 +10988,7 @@

Submodules }, "GroundingMetadataSourceFlaggingUri": { "additionalProperties": false, - "description": "Source content flagging uri for a place or review.\n\nThis is currently populated only for Google Maps grounding. This data type is\nnot supported in Gemini API.", + "description": "A URI that can be used to flag a place or review for inappropriate content.\n\nThis is populated only when the grounding source is Google Maps. This data\ntype is not supported in Gemini API.", "properties": { "flagContentUri": { "anyOf": [ @@ -9799,7 +11000,7 @@

Submodules } ], "default": null, - "description": "A link where users can flag a problem with the source (place or review).", + "description": "The URI that can be used to flag the content.", "title": "Flagcontenturi" }, "sourceId": { @@ -9812,7 +11013,7 @@

Submodules } ], "default": null, - "description": "Id of the place or review.", + "description": "The ID of the place or review.", "title": "Sourceid" } }, @@ -9836,7 +11037,7 @@

Submodules } ], "default": null, - "description": "Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. For Gemini 2.0 and before, this list must have the same size as the grounding_chunk_indices. For Gemini 2.5 and after, this list will be empty and should be ignored.", + "description": "Confidence score of the support references.\n\n Ranges from 0 to 1. 1 is the most confident. This list must have the\n same size as the grounding_chunk_indices.", "title": "Confidencescores" }, "groundingChunkIndices": { @@ -9852,7 +11053,7 @@

Submodules } ], "default": null, - "description": "A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim.", + "description": "A list of indices (into 'grounding_chunk') specifying the\n citations associated with the claim. For instance [1,3,4] means that\n grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the\n retrieved content attributed to the claim.", "title": "Groundingchunkindices" }, "segment": { @@ -9872,7 +11073,7 @@

Submodules "type": "object" }, "HarmBlockThreshold": { - "description": "The harm block threshold.", + "description": "The threshold for blocking content.\n\nIf the harm probability exceeds this threshold, the content will be blocked.", "enum": [ "HARM_BLOCK_THRESHOLD_UNSPECIFIED", "BLOCK_LOW_AND_ABOVE", @@ -9885,7 +11086,7 @@

Submodules "type": "string" }, "HarmCategory": { - "description": "Harm category.", + "description": "The harm category to be blocked.", "enum": [ "HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HARASSMENT", @@ -9903,7 +11104,7 @@

Submodules "type": "string" }, "HarmProbability": { - "description": "Output only. Harm probability levels in the content.", + "description": "Output only. The probability of harm for this category.", "enum": [ "HARM_PROBABILITY_UNSPECIFIED", "NEGLIGIBLE", @@ -9915,7 +11116,7 @@

Submodules "type": "string" }, "HarmSeverity": { - "description": "Output only.\n\nHarm severity levels in the content. This enum is not supported in Gemini API.", + "description": "Output only.\n\nThe severity of harm for this category. This enum is not supported in Gemini\nAPI.", "enum": [ "HARM_SEVERITY_UNSPECIFIED", "HARM_SEVERITY_NEGLIGIBLE", @@ -10123,7 +11324,7 @@

Submodules }, "LogprobsResult": { "additionalProperties": false, - "description": "Logprobs Result", + "description": "The log probabilities of the tokens generated by the model.\n\nThis is useful for understanding the model's confidence in its predictions and\nfor debugging. For example, you can use log probabilities to identify when the\nmodel is making a less confident prediction or to explore alternative\nresponses that the model considered. A low log probability can also indicate\nthat the model is \"hallucinating\" or generating factually incorrect\ninformation.", "properties": { "chosenCandidates": { "anyOf": [ @@ -10138,7 +11339,7 @@

Submodules } ], "default": null, - "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates.", + "description": "A list of the chosen candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps. Note that the chosen candidate might not be in `top_candidates`.", "title": "Chosencandidates" }, "topCandidates": { @@ -10154,7 +11355,7 @@

Submodules } ], "default": null, - "description": "Length = total number of decoding steps.", + "description": "A list of the top candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps.", "title": "Topcandidates" } }, @@ -10163,7 +11364,7 @@

Submodules }, "LogprobsResultCandidate": { "additionalProperties": false, - "description": "Candidate for the logprobs token and score.", + "description": "A single token and its associated log probability.", "properties": { "logProbability": { "anyOf": [ @@ -10175,7 +11376,7 @@

Submodules } ], "default": null, - "description": "The candidate's log probability.", + "description": "The log probability of this token. A higher value indicates that the model was more confident in this token. The log probability can be used to assess the relative likelihood of different tokens and to identify when the model is uncertain.", "title": "Logprobability" }, "token": { @@ -10188,7 +11389,7 @@

Submodules } ], "default": null, - "description": "The candidate's token string value.", + "description": "The token's string representation.", "title": "Token" }, "tokenId": { @@ -10201,7 +11402,7 @@

Submodules } ], "default": null, - "description": "The candidate's token id value.", + "description": "The token's numerical ID. While the `token` field provides the string representation of the token, the `token_id` is the numerical representation that the model uses internally. This can be useful for developers who want to build custom logic based on the model's vocabulary.", "title": "Tokenid" } }, @@ -10210,7 +11411,7 @@

Submodules }, "LogprobsResultTopCandidates": { "additionalProperties": false, - "description": "Candidates with top log probabilities at each decoding step.", + "description": "A list of the top candidate tokens and their log probabilities at each decoding step.\n\nThis can be used to see what other tokens the model considered.", "properties": { "candidates": { "anyOf": [ @@ -10225,7 +11426,7 @@

Submodules } ], "default": null, - "description": "Sorted by log probability in descending order.", + "description": "The list of candidate tokens, sorted by log probability in descending order.", "title": "Candidates" } }, @@ -10271,7 +11472,7 @@

Submodules } ], "default": null, - "description": "Number of tokens.", + "description": "The number of tokens counted for this modality.", "title": "Tokencount" } }, @@ -10315,7 +11516,7 @@

Submodules } ], "default": null, - "description": "Optional. Result of executing the [ExecutableCode]." + "description": "Optional. The result of executing the ExecutableCode." }, "executableCode": { "anyOf": [ @@ -10327,7 +11528,7 @@

Submodules } ], "default": null, - "description": "Optional. Code generated by the model that is meant to be executed." + "description": "Optional. Code generated by the model that is intended to be executed." }, "fileData": { "anyOf": [ @@ -10339,7 +11540,7 @@

Submodules } ], "default": null, - "description": "Optional. URI based data." + "description": "Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage." }, "functionCall": { "anyOf": [ @@ -10351,7 +11552,7 @@

Submodules } ], "default": null, - "description": "Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values." + "description": "Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function." }, "functionResponse": { "anyOf": [ @@ -10363,7 +11564,7 @@

Submodules } ], "default": null, - "description": "Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model." + "description": "Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted." }, "inlineData": { "anyOf": [ @@ -10375,7 +11576,7 @@

Submodules } ], "default": null, - "description": "Optional. Inlined bytes data." + "description": "Optional. The inline data content of the part. This can be used to include images, audio, or video in a request." }, "text": { "anyOf": [ @@ -10387,7 +11588,7 @@

Submodules } ], "default": null, - "description": "Optional. Text part (can be code).", + "description": "Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.", "title": "Text" }, "thought": { @@ -10400,7 +11601,7 @@

Submodules } ], "default": null, - "description": "Optional. Indicates if the part is thought from the model.", + "description": "Optional. Indicates whether the `part` represents the model's thought process or reasoning.", "title": "Thought" }, "thoughtSignature": { @@ -10482,36 +11683,36 @@

Submodules "additionalProperties": false, "description": "Partial argument value of the function call.\n\nThis data type is not supported in Gemini API.", "properties": { - "nullValue": { + "boolValue": { "anyOf": [ { - "const": "NULL_VALUE", - "type": "string" + "type": "boolean" }, { "type": "null" } ], "default": null, - "description": "Optional. Represents a null value.", - "title": "Nullvalue" + "description": "Optional. Represents a boolean value.", + "title": "Boolvalue" }, - "numberValue": { + "jsonPath": { "anyOf": [ { - "type": "number" + "type": "string" }, { "type": "null" } ], "default": null, - "description": "Optional. Represents a double value.", - "title": "Numbervalue" + "description": "Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. \"$.foo.bar[0].data\".", + "title": "Jsonpath" }, - "stringValue": { + "nullValue": { "anyOf": [ { + "const": "NULL_VALUE", "type": "string" }, { @@ -10519,23 +11720,23 @@

Submodules } ], "default": null, - "description": "Optional. Represents a string value.", - "title": "Stringvalue" + "description": "Optional. Represents a null value.", + "title": "Nullvalue" }, - "boolValue": { + "numberValue": { "anyOf": [ { - "type": "boolean" + "type": "number" }, { "type": "null" } ], "default": null, - "description": "Optional. Represents a boolean value.", - "title": "Boolvalue" + "description": "Optional. Represents a double value.", + "title": "Numbervalue" }, - "jsonPath": { + "stringValue": { "anyOf": [ { "type": "string" @@ -10545,8 +11746,8 @@

Submodules } ], "default": null, - "description": "Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. \"$.foo.bar[0].data\".", - "title": "Jsonpath" + "description": "Optional. Represents a string value.", + "title": "Stringvalue" }, "willContinue": { "anyOf": [ @@ -10634,7 +11835,7 @@

Submodules }, "RetrievalMetadata": { "additionalProperties": false, - "description": "Metadata related to retrieval in the grounding flow.", + "description": "Metadata returned to client when grounding is enabled.", "properties": { "googleSearchDynamicRetrievalScore": { "anyOf": [ @@ -10646,7 +11847,7 @@

Submodules } ], "default": null, - "description": "Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search.", + "description": "Optional. Score indicating how likely information from google\n search could help answer the prompt. The score is in the range [0, 1],\n where 0 is the least likely and 1 is the most likely. This score is only\n populated when google search grounding and dynamic retrieval is enabled.\n It will be compared to the threshold to determine whether to trigger\n Google search.", "title": "Googlesearchdynamicretrievalscore" } }, @@ -10655,7 +11856,7 @@

Submodules }, "SafetyRating": { "additionalProperties": false, - "description": "Safety rating corresponding to the generated content.", + "description": "A safety rating for a piece of content.\n\nThe safety rating contains the harm category and the harm probability level.", "properties": { "blocked": { "anyOf": [ @@ -10667,7 +11868,7 @@

Submodules } ], "default": null, - "description": "Output only. Indicates whether the content was filtered out because of this rating.", + "description": "Output only. Indicates whether the content was blocked because of this rating.", "title": "Blocked" }, "category": { @@ -10680,7 +11881,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm category." + "description": "Output only. The harm category of this rating." }, "overwrittenThreshold": { "anyOf": [ @@ -10704,7 +11905,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm probability levels in the content." + "description": "Output only. The probability of harm for this category." }, "probabilityScore": { "anyOf": [ @@ -10716,7 +11917,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm probability score. This field is not supported in Gemini API.", + "description": "Output only. The probability score of harm for this category. This field is not supported in Gemini API.", "title": "Probabilityscore" }, "severity": { @@ -10729,7 +11930,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm severity levels in the content. This field is not supported in Gemini API." + "description": "Output only. The severity of harm for this category. This field is not supported in Gemini API." }, "severityScore": { "anyOf": [ @@ -10741,7 +11942,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm severity score. This field is not supported in Gemini API.", + "description": "Output only. The severity score of harm for this category. This field is not supported in Gemini API.", "title": "Severityscore" } }, @@ -10750,7 +11951,7 @@

Submodules }, "SearchEntryPoint": { "additionalProperties": false, - "description": "Google search entry point.", + "description": "The entry point used to search for grounding sources.", "properties": { "renderedContent": { "anyOf": [ @@ -10762,7 +11963,7 @@

Submodules } ], "default": null, - "description": "Optional. Web content snippet that can be embedded in a web page or an app webview.", + "description": "Optional. Web content snippet that can be embedded in a web page\n or an app webview.", "title": "Renderedcontent" }, "sdkBlob": { @@ -10776,7 +11977,7 @@

Submodules } ], "default": null, - "description": "Optional. Base64 encoded JSON representing array of tuple.", + "description": "Optional. JSON representing array of tuples.", "title": "Sdkblob" } }, @@ -10785,9 +11986,9 @@

Submodules }, "Segment": { "additionalProperties": false, - "description": "Segment of the content.", + "description": "Segment of the content this support belongs to.", "properties": { - "endIndex": { + "startIndex": { "anyOf": [ { "type": "integer" @@ -10797,10 +11998,10 @@

Submodules } ], "default": null, - "description": "Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.", - "title": "Endindex" + "description": "Output only. Start index in the given Part, measured in bytes.\n\n Offset from the start of the Part, inclusive, starting at zero.", + "title": "Startindex" }, - "partIndex": { + "endIndex": { "anyOf": [ { "type": "integer" @@ -10810,10 +12011,10 @@

Submodules } ], "default": null, - "description": "Output only. The index of a Part object within its parent Content object.", - "title": "Partindex" + "description": "Output only. End index in the given Part, measured in bytes.\n\n Offset from the start of the Part, exclusive, starting at zero.", + "title": "Endindex" }, - "startIndex": { + "partIndex": { "anyOf": [ { "type": "integer" @@ -10823,8 +12024,8 @@

Submodules } ], "default": null, - "description": "Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.", - "title": "Startindex" + "description": "Output only. The index of a Part object within its parent\n Content object.", + "title": "Partindex" }, "text": { "anyOf": [ @@ -10836,7 +12037,7 @@

Submodules } ], "default": null, - "description": "Output only. The text corresponding to the segment from the response.", + "description": "Output only. The text corresponding to the segment from the\n response.", "title": "Text" } }, @@ -10881,6 +12082,8 @@

Submodules "enum": [ "TRAFFIC_TYPE_UNSPECIFIED", "ON_DEMAND", + "ON_DEMAND_PRIORITY", + "ON_DEMAND_FLEX", "PROVISIONED_THROUGHPUT" ], "title": "TrafficType", @@ -10888,7 +12091,7 @@

Submodules }, "UrlContextMetadata": { "additionalProperties": false, - "description": "Metadata related to url context retrieval tool.", + "description": "Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL.", "properties": { "urlMetadata": { "anyOf": [ @@ -10903,7 +12106,7 @@

Submodules } ], "default": null, - "description": "Output only. List of url context.", + "description": "Output only. A list of URL metadata, with one entry for each URL retrieved by the tool.", "title": "Urlmetadata" } }, @@ -10912,7 +12115,7 @@

Submodules }, "UrlMetadata": { "additionalProperties": false, - "description": "Context of the a single url retrieval.", + "description": "The metadata for a single URL retrieval.", "properties": { "retrievedUrl": { "anyOf": [ @@ -10924,7 +12127,7 @@

Submodules } ], "default": null, - "description": "Retrieved url by the tool.", + "description": "The URL retrieved by the tool.", "title": "Retrievedurl" }, "urlRetrievalStatus": { @@ -10937,14 +12140,14 @@

Submodules } ], "default": null, - "description": "Status of the url retrieval." + "description": "The status of the URL retrieval." } }, "title": "UrlMetadata", "type": "object" }, "UrlRetrievalStatus": { - "description": "Status of the url retrieval.", + "description": "The status of the URL retrieval.", "enum": [ "URL_RETRIEVAL_STATUS_UNSPECIFIED", "URL_RETRIEVAL_STATUS_SUCCESS", @@ -10957,7 +12160,7 @@

Submodules }, "VideoMetadata": { "additionalProperties": false, - "description": "Metadata describes the input video content.", + "description": "Provides metadata for a video, including the start and end offsets for clipping and the frame rate.", "properties": { "endOffset": { "anyOf": [ @@ -10982,7 +12185,7 @@

Submodules } ], "default": null, - "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0].", + "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].", "title": "Fps" }, "startOffset": { @@ -11299,7 +12502,7 @@

Submodules }, "Blob": { "additionalProperties": false, - "description": "Content blob.", + "description": "A content blob.\n\nA Blob contains data of a specific media type. It is used to represent images,\naudio, and video.", "properties": { "data": { "anyOf": [ @@ -11312,7 +12515,7 @@

Submodules } ], "default": null, - "description": "Required. Raw bytes.", + "description": "Required. The raw bytes of the data.", "title": "Data" }, "displayName": { @@ -11325,7 +12528,7 @@

Submodules } ], "default": null, - "description": "Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.", + "description": "Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API.", "title": "Displayname" }, "mimeType": { @@ -11448,7 +12651,7 @@

Submodules } ], "default": null, - "description": "Output only. Average log probability score of the candidate.", + "description": "Output only. The average log probability of the tokens in this candidate. This is a length-normalized score that can be used to compare the quality of candidates of different lengths. A higher average log probability suggests a more confident and coherent response.", "title": "Avglogprobs" }, "index": { @@ -11461,7 +12664,7 @@

Submodules } ], "default": null, - "description": "Output only. Index of the candidate.", + "description": "Output only. The 0-based index of this candidate in the list of generated responses. This is useful for distinguishing between multiple candidates when `candidate_count` > 1.", "title": "Index" }, "logprobsResult": { @@ -11474,7 +12677,7 @@

Submodules } ], "default": null, - "description": "Output only. Log-likelihood scores for the response tokens and top tokens" + "description": "Output only. The detailed log probability information for the tokens in this candidate. This is useful for debugging, understanding model uncertainty, and identifying potential \"hallucinations\"." }, "safetyRatings": { "anyOf": [ @@ -11489,7 +12692,7 @@

Submodules } ], "default": null, - "description": "Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.", + "description": "Output only. A list of ratings for the safety of a response candidate. There is at most one rating per category.", "title": "Safetyratings" }, "urlContextMetadata": { @@ -11502,7 +12705,7 @@

Submodules } ], "default": null, - "description": "Output only. Metadata related to url context retrieval tool." + "description": "Output only. Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL." } }, "title": "Candidate", @@ -11510,7 +12713,7 @@

Submodules }, "Citation": { "additionalProperties": false, - "description": "Source attributions for content.\n\nThis data type is not supported in Gemini API.", + "description": "A citation for a piece of generatedcontent.\n\nThis data type is not supported in Gemini API.", "properties": { "endIndex": { "anyOf": [ @@ -11522,7 +12725,7 @@

Submodules } ], "default": null, - "description": "Output only. End index into the content.", + "description": "Output only. The end index of the citation in the content.", "title": "Endindex" }, "license": { @@ -11535,7 +12738,7 @@

Submodules } ], "default": null, - "description": "Output only. License of the attribution.", + "description": "Output only. The license of the source of the citation.", "title": "License" }, "publicationDate": { @@ -11548,7 +12751,7 @@

Submodules } ], "default": null, - "description": "Output only. Publication date of the attribution." + "description": "Output only. The publication date of the source of the citation." }, "startIndex": { "anyOf": [ @@ -11560,7 +12763,7 @@

Submodules } ], "default": null, - "description": "Output only. Start index into the content.", + "description": "Output only. The start index of the citation in the content.", "title": "Startindex" }, "title": { @@ -11573,7 +12776,7 @@

Submodules } ], "default": null, - "description": "Output only. Title of the attribution.", + "description": "Output only. The title of the source of the citation.", "title": "Title" }, "uri": { @@ -11586,7 +12789,7 @@

Submodules } ], "default": null, - "description": "Output only. Url reference of the attribution.", + "description": "Output only. The URI of the source of the citation.", "title": "Uri" } }, @@ -11680,7 +12883,7 @@

Submodules } ], "default": null, - "description": "Optional. The producer of the content. Must be either 'user' or 'model'. Useful to set for multi-turn conversations, otherwise can be left blank or unset.", + "description": "Optional. The producer of the content. Must be either 'user' or 'model'. If not set, the service will default to 'user'.", "title": "Role" } }, @@ -11792,7 +12995,7 @@

Submodules }, "FileData": { "additionalProperties": false, - "description": "URI based data.", + "description": "URI-based data.\n\nA FileData message contains a URI pointing to data of a specific media type.\nIt is used to represent images, audio, and video stored in Google Cloud\nStorage.", "properties": { "displayName": { "anyOf": [ @@ -11804,7 +13007,7 @@

Submodules } ], "default": null, - "description": "Optional. Display name of the file data. Used to provide a label or filename to distinguish file datas. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.", + "description": "Optional. The display name of the file. Used to provide a label or filename to distinguish files. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API.", "title": "Displayname" }, "fileUri": { @@ -11817,7 +13020,7 @@

Submodules } ], "default": null, - "description": "Required. URI.", + "description": "Required. The URI of the file in Google Cloud Storage.", "title": "Fileuri" }, "mimeType": { @@ -12586,7 +13789,7 @@

Submodules } ], "default": null, - "description": "Grounding chunk from Google Maps. This field is not supported in Gemini API." + "description": "A `Maps` chunk is a piece of evidence that comes from Google Maps.\n\n It contains information about a place, such as its name, address, and\n reviews. This is used to provide the user with rich, location-based\n information." }, "retrievedContext": { "anyOf": [ @@ -12598,7 +13801,7 @@

Submodules } ], "default": null, - "description": "Grounding chunk from context retrieved by the retrieval tools. This field is not supported in Gemini API." + "description": "A grounding chunk from a data source retrieved by a retrieval tool, such as Vertex AI Search. See the `RetrievedContext` message for details. This field is not supported in Gemini API." }, "web": { "anyOf": [ @@ -12610,7 +13813,7 @@

Submodules } ], "default": null, - "description": "Grounding chunk from the web." + "description": "A grounding chunk from a web page, typically from Google Search. See the `Web` message for details." } }, "title": "GroundingChunk", @@ -12678,7 +13881,7 @@

Submodules }, "GroundingChunkMaps": { "additionalProperties": false, - "description": "Chunk from Google Maps. This data type is not supported in Gemini API.", + "description": "A `Maps` chunk is a piece of evidence that comes from Google Maps.\n\nIt contains information about a place, such as its name, address, and reviews.\nThis is used to provide the user with rich, location-based information.", "properties": { "placeAnswerSources": { "anyOf": [ @@ -12690,7 +13893,7 @@

Submodules } ], "default": null, - "description": "Sources used to generate the place answer. This includes review snippets and photos that were used to generate the answer, as well as uris to flag content." + "description": "The sources that were used to generate the place answer.\n\n This includes review snippets and photos that were used to generate the\n answer, as well as URIs to flag content." }, "placeId": { "anyOf": [ @@ -12702,7 +13905,7 @@

Submodules } ], "default": null, - "description": "This Place's resource name, in `places/{place_id}` format. Can be used to look up the Place.", + "description": "This Place's resource name, in `places/{place_id}` format.\n\n This can be used to look up the place in the Google Maps API.", "title": "Placeid" }, "text": { @@ -12715,7 +13918,7 @@

Submodules } ], "default": null, - "description": "Text of the place answer.", + "description": "The text of the place answer.", "title": "Text" }, "title": { @@ -12728,7 +13931,7 @@

Submodules } ], "default": null, - "description": "Title of the place.", + "description": "The title of the place.", "title": "Title" }, "uri": { @@ -12741,7 +13944,7 @@

Submodules } ], "default": null, - "description": "URI reference of the place.", + "description": "The URI of the place.", "title": "Uri" } }, @@ -12750,8 +13953,24 @@

Submodules }, "GroundingChunkMapsPlaceAnswerSources": { "additionalProperties": false, - "description": "Sources used to generate the place answer.\n\nThis data type is not supported in Gemini API.", + "description": "The sources that were used to generate the place answer.\n\nThis includes review snippets and photos that were used to generate the\nanswer, as well as URIs to flag content.", "properties": { + "reviewSnippet": { + "anyOf": [ + { + "items": { + "$ref": "#/$defs/GroundingChunkMapsPlaceAnswerSourcesReviewSnippet" + }, + "type": "array" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Snippets of reviews that were used to generate the answer.", + "title": "Reviewsnippet" + }, "flagContentUri": { "anyOf": [ { @@ -12778,7 +13997,7 @@

Submodules } ], "default": null, - "description": "Snippets of reviews that are used to generate the answer.", + "description": "Snippets of reviews that were used to generate the answer.", "title": "Reviewsnippets" } }, @@ -12787,7 +14006,7 @@

Submodules }, "GroundingChunkMapsPlaceAnswerSourcesAuthorAttribution": { "additionalProperties": false, - "description": "Author attribution for a photo or review.\n\nThis data type is not supported in Gemini API.", + "description": "Author attribution for a photo or review.", "properties": { "displayName": { "anyOf": [ @@ -12834,7 +14053,7 @@

Submodules }, "GroundingChunkMapsPlaceAnswerSourcesReviewSnippet": { "additionalProperties": false, - "description": "Encapsulates a review snippet.\n\nThis data type is not supported in Gemini API.", + "description": "Encapsulates a review snippet.", "properties": { "authorAttribution": { "anyOf": [ @@ -12932,7 +14151,7 @@

Submodules }, "GroundingChunkRetrievedContext": { "additionalProperties": false, - "description": "Chunk from context retrieved by the retrieval tools.\n\nThis data type is not supported in Gemini API.", + "description": "Context retrieved from a data source to ground the model's response.\n\nThis is used when a retrieval tool fetches information from a user-provided\ncorpus or a public dataset. This data type is not supported in Gemini API.", "properties": { "documentName": { "anyOf": [ @@ -12944,7 +14163,7 @@

Submodules } ], "default": null, - "description": "Output only. The full document name for the referenced Vertex AI Search document.", + "description": "Output only. The full resource name of the referenced Vertex AI Search document. This is used to identify the specific document that was retrieved. The format is `projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/branches/{branch}/documents/{document}`.", "title": "Documentname" }, "ragChunk": { @@ -12957,7 +14176,7 @@

Submodules } ], "default": null, - "description": "Additional context for the RAG retrieval result. This is only populated when using the RAG retrieval tool." + "description": "Additional context for a Retrieval-Augmented Generation (RAG) retrieval result. This is populated only when the RAG retrieval tool is used." }, "text": { "anyOf": [ @@ -12969,7 +14188,7 @@

Submodules } ], "default": null, - "description": "Text of the attribution.", + "description": "The content of the retrieved data source.", "title": "Text" }, "title": { @@ -12982,7 +14201,7 @@

Submodules } ], "default": null, - "description": "Title of the attribution.", + "description": "The title of the retrieved data source.", "title": "Title" }, "uri": { @@ -12995,7 +14214,7 @@

Submodules } ], "default": null, - "description": "URI reference of the attribution.", + "description": "The URI of the retrieved data source.", "title": "Uri" } }, @@ -13004,7 +14223,7 @@

Submodules }, "GroundingChunkWeb": { "additionalProperties": false, - "description": "Chunk from the web.", + "description": "A `Web` chunk is a piece of evidence that comes from a web page.\n\nIt contains the URI of the web page, the title of the page, and the domain of\nthe page. This is used to provide the user with a link to the source of the\ninformation.", "properties": { "domain": { "anyOf": [ @@ -13016,7 +14235,7 @@

Submodules } ], "default": null, - "description": "Domain of the (original) URI. This field is not supported in Gemini API.", + "description": "The domain of the web page that contains the evidence. This can be used to filter out low-quality sources. This field is not supported in Gemini API.", "title": "Domain" }, "title": { @@ -13029,7 +14248,7 @@

Submodules } ], "default": null, - "description": "Title of the chunk.", + "description": "The title of the web page that contains the evidence.", "title": "Title" }, "uri": { @@ -13042,7 +14261,7 @@

Submodules } ], "default": null, - "description": "URI reference of the chunk.", + "description": "The URI of the web page that contains the evidence.", "title": "Uri" } }, @@ -13051,6 +14270,7 @@

Submodules }, "GroundingMetadata": { "additionalProperties": false, + "description": "Information for various kinds of grounding.", "properties": { "imageSearchQueries": { "anyOf": [ @@ -13084,48 +14304,47 @@

Submodules "description": "A list of supporting references retrieved from the grounding\n source. This field is populated when the grounding source is Google\n Search, Vertex AI Search, or Google Maps.\n ", "title": "Groundingchunks" }, - "googleMapsWidgetContextToken": { + "groundingSupports": { "anyOf": [ { - "type": "string" + "items": { + "$ref": "#/$defs/GroundingSupport" + }, + "type": "array" }, { "type": "null" } ], "default": null, - "description": "Optional. Output only. Resource name of the Google Maps widget context token to be used with the PlacesContextElement widget to render contextual data. This is populated only for Google Maps grounding. This field is not supported in Gemini API.", - "title": "Googlemapswidgetcontexttoken" + "description": "List of grounding support.", + "title": "Groundingsupports" }, - "groundingSupports": { + "retrievalMetadata": { "anyOf": [ { - "items": { - "$ref": "#/$defs/GroundingSupport" - }, - "type": "array" + "$ref": "#/$defs/RetrievalMetadata" }, { "type": "null" } ], "default": null, - "description": "Optional. List of grounding support.", - "title": "Groundingsupports" + "description": "Metadata related to retrieval in the grounding flow." }, - "retrievalMetadata": { + "searchEntryPoint": { "anyOf": [ { - "$ref": "#/$defs/RetrievalMetadata" + "$ref": "#/$defs/SearchEntryPoint" }, { "type": "null" } ], "default": null, - "description": "Optional. Output only. Retrieval metadata." + "description": "Optional. Google search entry for the following-up web\n searches." }, - "retrievalQueries": { + "webSearchQueries": { "anyOf": [ { "items": { @@ -13138,26 +14357,27 @@

Submodules } ], "default": null, - "description": "Optional. Queries executed by the retrieval tools. This field is not supported in Gemini API.", - "title": "Retrievalqueries" + "description": "Web search queries for the following-up web search.", + "title": "Websearchqueries" }, - "searchEntryPoint": { + "googleMapsWidgetContextToken": { "anyOf": [ { - "$ref": "#/$defs/SearchEntryPoint" + "type": "string" }, { "type": "null" } ], "default": null, - "description": "Optional. Google search entry for the following-up web searches." + "description": "Optional. Output only. A token that can be used to render a Google Maps widget with the contextual data. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API.", + "title": "Googlemapswidgetcontexttoken" }, - "sourceFlaggingUris": { + "retrievalQueries": { "anyOf": [ { "items": { - "$ref": "#/$defs/GroundingMetadataSourceFlaggingUri" + "type": "string" }, "type": "array" }, @@ -13166,14 +14386,14 @@

Submodules } ], "default": null, - "description": "Optional. Output only. List of source flagging uris. This is currently populated only for Google Maps grounding. This field is not supported in Gemini API.", - "title": "Sourceflagginguris" + "description": "Optional. The queries that were executed by the retrieval tools. This field is populated only when the grounding source is a retrieval tool, such as Vertex AI Search. This field is not supported in Gemini API.", + "title": "Retrievalqueries" }, - "webSearchQueries": { + "sourceFlaggingUris": { "anyOf": [ { "items": { - "type": "string" + "$ref": "#/$defs/GroundingMetadataSourceFlaggingUri" }, "type": "array" }, @@ -13182,8 +14402,8 @@

Submodules } ], "default": null, - "description": "Optional. Web search queries for the following-up web search.", - "title": "Websearchqueries" + "description": "Optional. Output only. A list of URIs that can be used to flag a place or review for inappropriate content. This field is populated only when the grounding source is Google Maps. This field is not supported in Gemini API.", + "title": "Sourceflagginguris" } }, "title": "GroundingMetadata", @@ -13191,7 +14411,7 @@

Submodules }, "GroundingMetadataSourceFlaggingUri": { "additionalProperties": false, - "description": "Source content flagging uri for a place or review.\n\nThis is currently populated only for Google Maps grounding. This data type is\nnot supported in Gemini API.", + "description": "A URI that can be used to flag a place or review for inappropriate content.\n\nThis is populated only when the grounding source is Google Maps. This data\ntype is not supported in Gemini API.", "properties": { "flagContentUri": { "anyOf": [ @@ -13203,7 +14423,7 @@

Submodules } ], "default": null, - "description": "A link where users can flag a problem with the source (place or review).", + "description": "The URI that can be used to flag the content.", "title": "Flagcontenturi" }, "sourceId": { @@ -13216,7 +14436,7 @@

Submodules } ], "default": null, - "description": "Id of the place or review.", + "description": "The ID of the place or review.", "title": "Sourceid" } }, @@ -13240,7 +14460,7 @@

Submodules } ], "default": null, - "description": "Confidence score of the support references. Ranges from 0 to 1. 1 is the most confident. For Gemini 2.0 and before, this list must have the same size as the grounding_chunk_indices. For Gemini 2.5 and after, this list will be empty and should be ignored.", + "description": "Confidence score of the support references.\n\n Ranges from 0 to 1. 1 is the most confident. This list must have the\n same size as the grounding_chunk_indices.", "title": "Confidencescores" }, "groundingChunkIndices": { @@ -13256,7 +14476,7 @@

Submodules } ], "default": null, - "description": "A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. For instance [1,3,4] means that grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the retrieved content attributed to the claim.", + "description": "A list of indices (into 'grounding_chunk') specifying the\n citations associated with the claim. For instance [1,3,4] means that\n grounding_chunk[1], grounding_chunk[3], grounding_chunk[4] are the\n retrieved content attributed to the claim.", "title": "Groundingchunkindices" }, "segment": { @@ -13276,7 +14496,7 @@

Submodules "type": "object" }, "HarmBlockThreshold": { - "description": "The harm block threshold.", + "description": "The threshold for blocking content.\n\nIf the harm probability exceeds this threshold, the content will be blocked.", "enum": [ "HARM_BLOCK_THRESHOLD_UNSPECIFIED", "BLOCK_LOW_AND_ABOVE", @@ -13289,7 +14509,7 @@

Submodules "type": "string" }, "HarmCategory": { - "description": "Harm category.", + "description": "The harm category to be blocked.", "enum": [ "HARM_CATEGORY_UNSPECIFIED", "HARM_CATEGORY_HARASSMENT", @@ -13307,7 +14527,7 @@

Submodules "type": "string" }, "HarmProbability": { - "description": "Output only. Harm probability levels in the content.", + "description": "Output only. The probability of harm for this category.", "enum": [ "HARM_PROBABILITY_UNSPECIFIED", "NEGLIGIBLE", @@ -13319,7 +14539,7 @@

Submodules "type": "string" }, "HarmSeverity": { - "description": "Output only.\n\nHarm severity levels in the content. This enum is not supported in Gemini API.", + "description": "Output only.\n\nThe severity of harm for this category. This enum is not supported in Gemini\nAPI.", "enum": [ "HARM_SEVERITY_UNSPECIFIED", "HARM_SEVERITY_NEGLIGIBLE", @@ -13508,7 +14728,7 @@

Submodules }, "LogprobsResult": { "additionalProperties": false, - "description": "Logprobs Result", + "description": "The log probabilities of the tokens generated by the model.\n\nThis is useful for understanding the model's confidence in its predictions and\nfor debugging. For example, you can use log probabilities to identify when the\nmodel is making a less confident prediction or to explore alternative\nresponses that the model considered. A low log probability can also indicate\nthat the model is \"hallucinating\" or generating factually incorrect\ninformation.", "properties": { "chosenCandidates": { "anyOf": [ @@ -13523,7 +14743,7 @@

Submodules } ], "default": null, - "description": "Length = total number of decoding steps. The chosen candidates may or may not be in top_candidates.", + "description": "A list of the chosen candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps. Note that the chosen candidate might not be in `top_candidates`.", "title": "Chosencandidates" }, "topCandidates": { @@ -13539,7 +14759,7 @@

Submodules } ], "default": null, - "description": "Length = total number of decoding steps.", + "description": "A list of the top candidate tokens at each decoding step. The length of this list is equal to the total number of decoding steps.", "title": "Topcandidates" } }, @@ -13548,7 +14768,7 @@

Submodules }, "LogprobsResultCandidate": { "additionalProperties": false, - "description": "Candidate for the logprobs token and score.", + "description": "A single token and its associated log probability.", "properties": { "logProbability": { "anyOf": [ @@ -13560,7 +14780,7 @@

Submodules } ], "default": null, - "description": "The candidate's log probability.", + "description": "The log probability of this token. A higher value indicates that the model was more confident in this token. The log probability can be used to assess the relative likelihood of different tokens and to identify when the model is uncertain.", "title": "Logprobability" }, "token": { @@ -13573,7 +14793,7 @@

Submodules } ], "default": null, - "description": "The candidate's token string value.", + "description": "The token's string representation.", "title": "Token" }, "tokenId": { @@ -13586,7 +14806,7 @@

Submodules } ], "default": null, - "description": "The candidate's token id value.", + "description": "The token's numerical ID. While the `token` field provides the string representation of the token, the `token_id` is the numerical representation that the model uses internally. This can be useful for developers who want to build custom logic based on the model's vocabulary.", "title": "Tokenid" } }, @@ -13595,7 +14815,7 @@

Submodules }, "LogprobsResultTopCandidates": { "additionalProperties": false, - "description": "Candidates with top log probabilities at each decoding step.", + "description": "A list of the top candidate tokens and their log probabilities at each decoding step.\n\nThis can be used to see what other tokens the model considered.", "properties": { "candidates": { "anyOf": [ @@ -13610,7 +14830,7 @@

Submodules } ], "default": null, - "description": "Sorted by log probability in descending order.", + "description": "The list of candidate tokens, sorted by log probability in descending order.", "title": "Candidates" } }, @@ -13656,7 +14876,7 @@

Submodules } ], "default": null, - "description": "Number of tokens.", + "description": "The number of tokens counted for this modality.", "title": "Tokencount" } }, @@ -13700,7 +14920,7 @@

Submodules } ], "default": null, - "description": "Optional. Result of executing the [ExecutableCode]." + "description": "Optional. The result of executing the ExecutableCode." }, "executableCode": { "anyOf": [ @@ -13712,7 +14932,7 @@

Submodules } ], "default": null, - "description": "Optional. Code generated by the model that is meant to be executed." + "description": "Optional. Code generated by the model that is intended to be executed." }, "fileData": { "anyOf": [ @@ -13724,7 +14944,7 @@

Submodules } ], "default": null, - "description": "Optional. URI based data." + "description": "Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage." }, "functionCall": { "anyOf": [ @@ -13736,7 +14956,7 @@

Submodules } ], "default": null, - "description": "Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values." + "description": "Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function." }, "functionResponse": { "anyOf": [ @@ -13748,7 +14968,7 @@

Submodules } ], "default": null, - "description": "Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model." + "description": "Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted." }, "inlineData": { "anyOf": [ @@ -13760,7 +14980,7 @@

Submodules } ], "default": null, - "description": "Optional. Inlined bytes data." + "description": "Optional. The inline data content of the part. This can be used to include images, audio, or video in a request." }, "text": { "anyOf": [ @@ -13772,7 +14992,7 @@

Submodules } ], "default": null, - "description": "Optional. Text part (can be code).", + "description": "Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.", "title": "Text" }, "thought": { @@ -13785,7 +15005,7 @@

Submodules } ], "default": null, - "description": "Optional. Indicates if the part is thought from the model.", + "description": "Optional. Indicates whether the `part` represents the model's thought process or reasoning.", "title": "Thought" }, "thoughtSignature": { @@ -13867,36 +15087,36 @@

Submodules "additionalProperties": false, "description": "Partial argument value of the function call.\n\nThis data type is not supported in Gemini API.", "properties": { - "nullValue": { + "boolValue": { "anyOf": [ { - "const": "NULL_VALUE", - "type": "string" + "type": "boolean" }, { "type": "null" } ], "default": null, - "description": "Optional. Represents a null value.", - "title": "Nullvalue" + "description": "Optional. Represents a boolean value.", + "title": "Boolvalue" }, - "numberValue": { + "jsonPath": { "anyOf": [ { - "type": "number" + "type": "string" }, { "type": "null" } ], "default": null, - "description": "Optional. Represents a double value.", - "title": "Numbervalue" + "description": "Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. \"$.foo.bar[0].data\".", + "title": "Jsonpath" }, - "stringValue": { + "nullValue": { "anyOf": [ { + "const": "NULL_VALUE", "type": "string" }, { @@ -13904,23 +15124,23 @@

Submodules } ], "default": null, - "description": "Optional. Represents a string value.", - "title": "Stringvalue" + "description": "Optional. Represents a null value.", + "title": "Nullvalue" }, - "boolValue": { + "numberValue": { "anyOf": [ { - "type": "boolean" + "type": "number" }, { "type": "null" } ], "default": null, - "description": "Optional. Represents a boolean value.", - "title": "Boolvalue" + "description": "Optional. Represents a double value.", + "title": "Numbervalue" }, - "jsonPath": { + "stringValue": { "anyOf": [ { "type": "string" @@ -13930,8 +15150,8 @@

Submodules } ], "default": null, - "description": "Required. A JSON Path (RFC 9535) to the argument being streamed. https://datatracker.ietf.org/doc/html/rfc9535. e.g. \"$.foo.bar[0].data\".", - "title": "Jsonpath" + "description": "Optional. Represents a string value.", + "title": "Stringvalue" }, "willContinue": { "anyOf": [ @@ -14019,7 +15239,7 @@

Submodules }, "RetrievalMetadata": { "additionalProperties": false, - "description": "Metadata related to retrieval in the grounding flow.", + "description": "Metadata returned to client when grounding is enabled.", "properties": { "googleSearchDynamicRetrievalScore": { "anyOf": [ @@ -14031,7 +15251,7 @@

Submodules } ], "default": null, - "description": "Optional. Score indicating how likely information from Google Search could help answer the prompt. The score is in the range `[0, 1]`, where 0 is the least likely and 1 is the most likely. This score is only populated when Google Search grounding and dynamic retrieval is enabled. It will be compared to the threshold to determine whether to trigger Google Search.", + "description": "Optional. Score indicating how likely information from google\n search could help answer the prompt. The score is in the range [0, 1],\n where 0 is the least likely and 1 is the most likely. This score is only\n populated when google search grounding and dynamic retrieval is enabled.\n It will be compared to the threshold to determine whether to trigger\n Google search.", "title": "Googlesearchdynamicretrievalscore" } }, @@ -14040,7 +15260,7 @@

Submodules }, "SafetyRating": { "additionalProperties": false, - "description": "Safety rating corresponding to the generated content.", + "description": "A safety rating for a piece of content.\n\nThe safety rating contains the harm category and the harm probability level.", "properties": { "blocked": { "anyOf": [ @@ -14052,7 +15272,7 @@

Submodules } ], "default": null, - "description": "Output only. Indicates whether the content was filtered out because of this rating.", + "description": "Output only. Indicates whether the content was blocked because of this rating.", "title": "Blocked" }, "category": { @@ -14065,7 +15285,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm category." + "description": "Output only. The harm category of this rating." }, "overwrittenThreshold": { "anyOf": [ @@ -14089,7 +15309,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm probability levels in the content." + "description": "Output only. The probability of harm for this category." }, "probabilityScore": { "anyOf": [ @@ -14101,7 +15321,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm probability score. This field is not supported in Gemini API.", + "description": "Output only. The probability score of harm for this category. This field is not supported in Gemini API.", "title": "Probabilityscore" }, "severity": { @@ -14114,7 +15334,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm severity levels in the content. This field is not supported in Gemini API." + "description": "Output only. The severity of harm for this category. This field is not supported in Gemini API." }, "severityScore": { "anyOf": [ @@ -14126,7 +15346,7 @@

Submodules } ], "default": null, - "description": "Output only. Harm severity score. This field is not supported in Gemini API.", + "description": "Output only. The severity score of harm for this category. This field is not supported in Gemini API.", "title": "Severityscore" } }, @@ -14135,7 +15355,7 @@

Submodules }, "SearchEntryPoint": { "additionalProperties": false, - "description": "Google search entry point.", + "description": "The entry point used to search for grounding sources.", "properties": { "renderedContent": { "anyOf": [ @@ -14147,7 +15367,7 @@

Submodules } ], "default": null, - "description": "Optional. Web content snippet that can be embedded in a web page or an app webview.", + "description": "Optional. Web content snippet that can be embedded in a web page\n or an app webview.", "title": "Renderedcontent" }, "sdkBlob": { @@ -14161,7 +15381,7 @@

Submodules } ], "default": null, - "description": "Optional. Base64 encoded JSON representing array of tuple.", + "description": "Optional. JSON representing array of tuples.", "title": "Sdkblob" } }, @@ -14170,9 +15390,9 @@

Submodules }, "Segment": { "additionalProperties": false, - "description": "Segment of the content.", + "description": "Segment of the content this support belongs to.", "properties": { - "endIndex": { + "startIndex": { "anyOf": [ { "type": "integer" @@ -14182,10 +15402,10 @@

Submodules } ], "default": null, - "description": "Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.", - "title": "Endindex" + "description": "Output only. Start index in the given Part, measured in bytes.\n\n Offset from the start of the Part, inclusive, starting at zero.", + "title": "Startindex" }, - "partIndex": { + "endIndex": { "anyOf": [ { "type": "integer" @@ -14195,10 +15415,10 @@

Submodules } ], "default": null, - "description": "Output only. The index of a Part object within its parent Content object.", - "title": "Partindex" + "description": "Output only. End index in the given Part, measured in bytes.\n\n Offset from the start of the Part, exclusive, starting at zero.", + "title": "Endindex" }, - "startIndex": { + "partIndex": { "anyOf": [ { "type": "integer" @@ -14208,8 +15428,8 @@

Submodules } ], "default": null, - "description": "Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.", - "title": "Startindex" + "description": "Output only. The index of a Part object within its parent\n Content object.", + "title": "Partindex" }, "text": { "anyOf": [ @@ -14221,7 +15441,7 @@

Submodules } ], "default": null, - "description": "Output only. The text corresponding to the segment from the response.", + "description": "Output only. The text corresponding to the segment from the\n response.", "title": "Text" } }, @@ -14266,6 +15486,8 @@

Submodules "enum": [ "TRAFFIC_TYPE_UNSPECIFIED", "ON_DEMAND", + "ON_DEMAND_PRIORITY", + "ON_DEMAND_FLEX", "PROVISIONED_THROUGHPUT" ], "title": "TrafficType", @@ -14273,7 +15495,7 @@

Submodules }, "UrlContextMetadata": { "additionalProperties": false, - "description": "Metadata related to url context retrieval tool.", + "description": "Metadata returned when the model uses the `url_context` tool to get information from a user-provided URL.", "properties": { "urlMetadata": { "anyOf": [ @@ -14288,7 +15510,7 @@

Submodules } ], "default": null, - "description": "Output only. List of url context.", + "description": "Output only. A list of URL metadata, with one entry for each URL retrieved by the tool.", "title": "Urlmetadata" } }, @@ -14297,7 +15519,7 @@

Submodules }, "UrlMetadata": { "additionalProperties": false, - "description": "Context of the a single url retrieval.", + "description": "The metadata for a single URL retrieval.", "properties": { "retrievedUrl": { "anyOf": [ @@ -14309,7 +15531,7 @@

Submodules } ], "default": null, - "description": "Retrieved url by the tool.", + "description": "The URL retrieved by the tool.", "title": "Retrievedurl" }, "urlRetrievalStatus": { @@ -14322,14 +15544,14 @@

Submodules } ], "default": null, - "description": "Status of the url retrieval." + "description": "The status of the URL retrieval." } }, "title": "UrlMetadata", "type": "object" }, "UrlRetrievalStatus": { - "description": "Status of the url retrieval.", + "description": "The status of the URL retrieval.", "enum": [ "URL_RETRIEVAL_STATUS_UNSPECIFIED", "URL_RETRIEVAL_STATUS_SUCCESS", @@ -14342,7 +15564,7 @@

Submodules }, "VideoMetadata": { "additionalProperties": false, - "description": "Metadata describes the input video content.", + "description": "Provides metadata for a video, including the start and end offsets for clipping and the frame rate.", "properties": { "endOffset": { "anyOf": [ @@ -14367,7 +15589,7 @@

Submodules } ], "default": null, - "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value will be 1.0. The fps range is (0.0, 24.0].", + "description": "Optional. The frame rate of the video sent to the model. If not specified, the default value is 1.0. The valid range is (0.0, 24.0].", "title": "Fps" }, "startOffset": { @@ -14852,6 +16074,160 @@

Submodules +
+pydantic model genai.types.BigQuerySource
+

Bases: BaseModel

+

The BigQuery location for the input content.

+

This data type is not supported in Gemini API.

+

Create a new model by parsing and validating input data from keyword arguments.

+

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be +validated to form a valid model.

+

self is explicitly positional-only to allow self as a field name.

+

+Show JSON schema
{
+   "title": "BigQuerySource",
+   "description": "The BigQuery location for the input content.\n\nThis data type is not supported in Gemini API.",
+   "type": "object",
+   "properties": {
+      "inputUri": {
+         "anyOf": [
+            {
+               "type": "string"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`.",
+         "title": "Inputuri"
+      }
+   },
+   "additionalProperties": false
+}
+
+
+

+
Fields:
+
+
+
Validators:
+

+
+
+
+field input_uri: Optional[str] = None (alias 'inputUri')
+

Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: bq://projectId.bqDatasetId.bqTableId.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +

+ +
+
+class genai.types.BigQuerySourceDict
+

Bases: TypedDict

+

The BigQuery location for the input content.

+

This data type is not supported in Gemini API.

+
+
+input_uri: Optional[str]
+

bq://projectId.bqDatasetId.bqTableId.

+
+
Type:
+

Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms

+
+
Type:
+
    +
  • BigQuery path. For example

  • +
+
+
+
+ +
+ +
+
+pydantic model genai.types.BleuMetricValue
+

Bases: BaseModel

+

Bleu metric value for an instance.

+

This data type is not supported in Gemini API.

+

Create a new model by parsing and validating input data from keyword arguments.

+

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be +validated to form a valid model.

+

self is explicitly positional-only to allow self as a field name.

+

+Show JSON schema
{
+   "title": "BleuMetricValue",
+   "description": "Bleu metric value for an instance.\n\nThis data type is not supported in Gemini API.",
+   "type": "object",
+   "properties": {
+      "score": {
+         "anyOf": [
+            {
+               "type": "number"
+            },
+            {
+               "type": "null"
+            }
+         ],
+         "default": null,
+         "description": "Output only. Bleu score.",
+         "title": "Score"
+      }
+   },
+   "additionalProperties": false
+}
+
+
+

+
Fields:
+
+
+
Validators:
+

+
+
+
+field score: Optional[float] = None
+

Output only. Bleu score.

+
+
Validated by:
+
    +
  • _check_field_type_mismatches

  • +
+
+
+
+ +
+ +
+
+class genai.types.BleuMetricValueDict
+

Bases: TypedDict

+

Bleu metric value for an instance.

+

This data type is not supported in Gemini API.

+
+
+score: Optional[float]
+

Output only. Bleu score.

+
+ +
+
pydantic model genai.types.BleuSpec
@@ -14926,7 +16302,9 @@

Submodules pydantic model genai.types.Blob

Bases: BaseModel

-

Content blob.

+

A content blob.

+

A Blob contains data of a specific media type. It is used to represent images, +audio, and video.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

@@ -14934,7 +16312,7 @@

Submodules Show JSON schema
{
    "title": "Blob",
-   "description": "Content blob.",
+   "description": "A content blob.\n\nA Blob contains data of a specific media type. It is used to represent images,\naudio, and video.",
    "type": "object",
    "properties": {
       "data": {
@@ -14948,7 +16326,7 @@ 

Submodules } ], "default": null, - "description": "Required. Raw bytes.", + "description": "Required. The raw bytes of the data.", "title": "Data" }, "displayName": { @@ -14961,7 +16339,7 @@

Submodules } ], "default": null, - "description": "Optional. Display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is currently used in the Gemini GenerateContent calls only when server side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.", + "description": "Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in `PromptMessage` for prompt management. It is used in the Gemini calls only when server-side tools (`code_execution`, `google_search`, and `url_context`) are enabled. This field is not supported in Gemini API.", "title": "Displayname" }, "mimeType": { @@ -14996,7 +16374,7 @@

Submodules
field data: Optional[bytes] = None
-

Required. Raw bytes.

+

Required. The raw bytes of the data.

Validated by: