Table of Contents

Class GroundingChunkImage

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

An Image chunk is 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.

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

Properties

Domain

The domain of the image search result page.

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

Property Value

string

ImageUri

The URI of the image.

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

Property Value

string

SourceUri

The URI of the image search result page.

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

Property Value

string

Title

The title of the image search result page.

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

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GroundingChunkImage object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GroundingChunkImage

The deserialized GroundingChunkImage object, or null if deserialization fails.