Class GroundingChunkImage

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

public abstract class GroundingChunkImage extends JsonSerializable
A piece of evidence that comes from an image search result.

It contains the URI of the image search result and the URI of the image. This is used to provide the user with a link to the source of the information.

  • Constructor Details

    • GroundingChunkImage

      public GroundingChunkImage()
  • Method Details

    • sourceUri

      public abstract Optional<String> sourceUri()
      The URI of the image search result page.
    • imageUri

      public abstract Optional<String> imageUri()
      The URI of the image.
    • title

      public abstract Optional<String> title()
      The title of the image search result page.
    • domain

      public abstract Optional<String> domain()
      The domain of the image search result page.
    • builder

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

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

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