Table of Contents

Class ReinforcementTuningStringMatchRewardScorerJsonMatchExpression

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

Converts parsed responses to JSON format, finds the first-level matching key, then performs StringMatchExpression on the value.

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

Properties

KeyName

Json key name to find the value to match against.

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

Property Value

string

ValueStringMatchExpression

String match expression to match against the value of json key.

[JsonPropertyName("valueStringMatchExpression")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ReinforcementTuningStringMatchRewardScorerStringMatchExpression? ValueStringMatchExpression { get; set; }

Property Value

ReinforcementTuningStringMatchRewardScorerStringMatchExpression

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ReinforcementTuningStringMatchRewardScorerJsonMatchExpression object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ReinforcementTuningStringMatchRewardScorerJsonMatchExpression

The deserialized ReinforcementTuningStringMatchRewardScorerJsonMatchExpression object, or null if deserialization fails.