Table of Contents

Class GroundingChunkWeb

Namespace
Google.GenAI.Types
Assembly
Google.GenAI.dll

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.

public record GroundingChunkWeb : IEquatable<GroundingChunkWeb>
Inheritance
GroundingChunkWeb
Implements
Inherited Members

Properties

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.

[JsonPropertyName("domain")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Domain { get; set; }

Property Value

string

Title

The title of the web page that contains the evidence.

[JsonPropertyName("title")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Title { get; set; }

Property Value

string

Uri

The URI of the web page that contains the evidence.

[JsonPropertyName("uri")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Uri { get; set; }

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GroundingChunkWeb object.

public static GroundingChunkWeb? FromJson(string jsonString, JsonSerializerOptions? options = null)

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GroundingChunkWeb

The deserialized GroundingChunkWeb object, or null if deserialization fails.