Class GroundingSupport

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public abstract class GroundingSupport.Builder

      Builder for GroundingSupport.

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • 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.Builder builder() Instantiates a builder for GroundingSupport.
      abstract GroundingSupport.Builder toBuilder() Creates a builder with the same values as this instance.
      static GroundingSupport fromJson(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
    • Constructor Detail

      • GroundingSupport

        GroundingSupport()
    • 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.