Class GroundingChunk

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.GroundingChunk

public abstract class GroundingChunk extends JsonSerializable
Grounding chunk.
  • Constructor Details

    • GroundingChunk

      public GroundingChunk()
  • Method Details

    • maps

      public abstract Optional<GroundingChunkMaps> maps()
      Grounding chunk from Google Maps. This field is not supported in Gemini API.
    • retrievedContext

      public abstract Optional<GroundingChunkRetrievedContext> retrievedContext()
      Grounding chunk from context retrieved by the retrieval tools. This field is not supported in Gemini API.
    • web

      public abstract Optional<GroundingChunkWeb> web()
      Grounding chunk from the web.
    • builder

      public static GroundingChunk.Builder builder()
      Instantiates a builder for GroundingChunk.
    • toBuilder

      public abstract GroundingChunk.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static GroundingChunk fromJson(String jsonString)
      Deserializes a JSON string to a GroundingChunk object.