Package com.google.genai.types
Class GroundingMetadata
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GroundingMetadata
Information for various kinds of grounding.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for GroundingMetadata. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GroundingMetadata.Builderbuilder()Instantiates a builder for GroundingMetadata.static GroundingMetadataDeserializes a JSON string to a GroundingMetadata object.Optional.abstract Optional<List<GroundingChunk>>A list of supporting references retrieved from the grounding source.abstract Optional<List<GroundingSupport>>List of grounding support.Optional.abstract Optional<RetrievalMetadata>Metadata related to retrieval in the grounding flow.Optional.abstract Optional<SearchEntryPoint>Optional.abstract Optional<List<GroundingMetadataSourceFlaggingUri>>Optional.abstract GroundingMetadata.BuilderCreates a builder with the same values as this instance.Web search queries for the following-up web search.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
GroundingMetadata
public GroundingMetadata()
-
-
Method Details
-
imageSearchQueries
Optional. The image search queries that were used to generate the content. This field is populated only when the grounding source is Google Search with the Image Search search_type enabled. -
groundingChunks
A list of supporting references retrieved from the grounding source. This field is populated when the grounding source is Google Search, Vertex AI Search, or Google Maps. -
groundingSupports
List of grounding support. -
retrievalMetadata
Metadata related to retrieval in the grounding flow. -
searchEntryPoint
Optional. Google search entry for the following-up web searches. -
webSearchQueries
Web search queries for the following-up web search. -
googleMapsWidgetContextToken
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. -
retrievalQueries
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. -
sourceFlaggingUris
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. -
builder
Instantiates a builder for GroundingMetadata. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a GroundingMetadata object.
-