Table of Contents

Class GroundingChunkCustomMetadata

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

User provided metadata about the GroundingFact. This data type is not supported in Vertex AI.

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

Properties

Key

The key of the metadata.

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

Property Value

string

NumericValue

Optional. The numeric value of the metadata. The expected range for this value depends on the specific key used.

[JsonPropertyName("numericValue")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? NumericValue { get; set; }

Property Value

double?

StringListValue

Optional. A list of string values for the metadata.

[JsonPropertyName("stringListValue")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public GroundingChunkStringList? StringListValue { get; set; }

Property Value

GroundingChunkStringList

StringValue

Optional. The string value of the metadata.

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

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a GroundingChunkCustomMetadata object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

GroundingChunkCustomMetadata

The deserialized GroundingChunkCustomMetadata object, or null if deserialization fails.