Class GroundingChunkWeb

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

public abstract class GroundingChunkWeb extends JsonSerializable
A `Web` chunk is a piece of evidence that comes from a web page. It contains the URI of the web page, the title of the page, and the domain of the page. This is used to provide the user with a link to the source of the information.
  • Constructor Details

    • GroundingChunkWeb

      public GroundingChunkWeb()
  • Method Details

    • domain

      public abstract Optional<String> domain()
      The domain of the web page that contains the evidence. This can be used to filter out low-quality sources. This field is not supported in Gemini API.
    • title

      public abstract Optional<String> title()
      The title of the web page that contains the evidence.
    • uri

      public abstract Optional<String> uri()
      The URI of the web page that contains the evidence.
    • builder

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

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

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