Table of Contents

Class DynamicRetrievalConfig

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

Describes the options to customize dynamic retrieval.

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

Properties

DynamicThreshold

Optional. The threshold to be used in dynamic retrieval. If not set, a system default value is used.

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

Property Value

double?

Mode

The mode of the predictor to be used in dynamic retrieval.

[JsonPropertyName("mode")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public DynamicRetrievalConfigMode? Mode { get; set; }

Property Value

DynamicRetrievalConfigMode?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a DynamicRetrievalConfig object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

DynamicRetrievalConfig

The deserialized DynamicRetrievalConfig object, or null if deserialization fails.