Class GroundingChunk
A piece of evidence that supports a claim made by the model. This is used to show a citation
for a claim made by the model. When grounding is enabled, the model returns a GroundingChunk
that contains a reference to the source of the information.
public record GroundingChunk : IEquatable<GroundingChunk>
- Inheritance
-
GroundingChunk
- Implements
- Inherited Members
Properties
Image
A grounding chunk from an image search result. See the Image message for details.
[JsonPropertyName("image")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GroundingChunkImage? Image { get; set; }
Property Value
Maps
A Maps chunk is a piece of evidence that comes from Google Maps. It contains information
about a place, such as its name, address, and reviews. This is used to provide the user with
rich, location-based information.
[JsonPropertyName("maps")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GroundingChunkMaps? Maps { get; set; }
Property Value
RetrievedContext
A grounding chunk from a data source retrieved by a retrieval tool, such as Vertex AI
Search. See the RetrievedContext message for details
[JsonPropertyName("retrievedContext")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GroundingChunkRetrievedContext? RetrievedContext { get; set; }
Property Value
Web
A grounding chunk from a web page, typically from Google Search. See the Web message for
details.
[JsonPropertyName("web")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GroundingChunkWeb? Web { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a GroundingChunk object.
public static GroundingChunk? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- GroundingChunk
The deserialized GroundingChunk object, or null if deserialization fails.