Class GroundingSupport
-
- All Implemented Interfaces:
public abstract class GroundingSupport extends JsonSerializable
Grounding support.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classGroundingSupport.BuilderBuilder for GroundingSupport.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description GroundingSupport()
-
Method Summary
Modifier and Type Method Description abstract Optional<List<Float>>confidenceScores()Confidence score of the support references. abstract Optional<List<Integer>>groundingChunkIndices()A list of indices (into 'grounding_chunk') specifying the citations associated with the claim. abstract Optional<Segment>segment()Segment of the content this support belongs to. abstract Optional<List<Integer>>renderedParts()Indices into the `rendered_parts` field of the `GroundingMetadata` message. static GroundingSupport.Builderbuilder()Instantiates a builder for GroundingSupport. abstract GroundingSupport.BuildertoBuilder()Creates a builder with the same values as this instance. static GroundingSupportfromJson(String jsonString)Deserializes a JSON string to a GroundingSupport object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
confidenceScores
abstract Optional<List<Float>> confidenceScores()
Confidence score of the support references.
Ranges from 0 to 1. 1 is the most confident. This list must have the same size as the grounding_chunk_indices.
-
groundingChunkIndices
abstract Optional<List<Integer>> groundingChunkIndices()
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.
-
renderedParts
abstract Optional<List<Integer>> renderedParts()
Indices into the `rendered_parts` field of the `GroundingMetadata` message. These indices specify which rendered parts are associated with this support message.
-
builder
static GroundingSupport.Builder builder()
Instantiates a builder for GroundingSupport.
-
toBuilder
abstract GroundingSupport.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static GroundingSupport fromJson(String jsonString)
Deserializes a JSON string to a GroundingSupport object.
-
-
-
-