Package com.google.genai.types
Class RetrievalMetadata
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.RetrievalMetadata
Metadata related to the retrieval grounding source. This is part of the `GroundingMetadata`
returned when grounding is enabled.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for RetrievalMetadata. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RetrievalMetadata.Builderbuilder()Instantiates a builder for RetrievalMetadata.static RetrievalMetadataDeserializes a JSON string to a RetrievalMetadata object.Optional.abstract RetrievalMetadata.BuilderCreates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
RetrievalMetadata
public RetrievalMetadata()
-
-
Method Details
-
googleSearchDynamicRetrievalScore
Optional. A score indicating how likely it is that a Google Search query could help answer the prompt. The score is in the range of `[0, 1]`. A score of 1 means the model is confident that a search will be helpful, and 0 means it is not. This score is populated only when Google Search grounding and dynamic retrieval are enabled. The score is used to determine whether to trigger a search. -
builder
Instantiates a builder for RetrievalMetadata. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a RetrievalMetadata object.
-