Table of Contents

Class CitationMetadata

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

Citation information when the model quotes another source.

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

Properties

Citations

Contains citation information when the model directly quotes, at length, from another source. Can include traditional websites and code repositories.

[JsonPropertyName("citations")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public List<Citation>? Citations { get; set; }

Property Value

List<Citation>

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a CitationMetadata object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

CitationMetadata

The deserialized CitationMetadata object, or null if deserialization fails.