Package com.google.genai.types
Class GroundingChunkWeb
-
- All Implemented Interfaces:
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classGroundingChunkWeb.BuilderBuilder for GroundingChunkWeb.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description GroundingChunkWeb()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>domain()The domain of the web page that contains the evidence. abstract Optional<String>title()The title of the web page that contains the evidence. abstract Optional<String>uri()The URI of the web page that contains the evidence. static GroundingChunkWeb.Builderbuilder()Instantiates a builder for GroundingChunkWeb. abstract GroundingChunkWeb.BuildertoBuilder()Creates a builder with the same values as this instance. static GroundingChunkWebfromJson(String jsonString)Deserializes a JSON string to a GroundingChunkWeb 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
-
domain
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.
-
builder
static GroundingChunkWeb.Builder builder()
Instantiates a builder for GroundingChunkWeb.
-
toBuilder
abstract GroundingChunkWeb.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static GroundingChunkWeb fromJson(String jsonString)
Deserializes a JSON string to a GroundingChunkWeb object.
-
-
-
-