Table of Contents

Class ReinforcementTuningStringMatchRewardScorerStringMatchExpression

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

Evaluates parsed response using match type against expression.

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

Properties

Expression

String or regular expression to match against. Customer can also provide a references map (key/value pairs) whose value will be substituted into the expression by referencing references.key_name (wrapped in double curly braces).

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

Property Value

string

MatchOperation

Match operation to use for evaluation.

[JsonPropertyName("matchOperation")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public MatchOperation? MatchOperation { get; set; }

Property Value

MatchOperation?

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ReinforcementTuningStringMatchRewardScorerStringMatchExpression object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ReinforcementTuningStringMatchRewardScorerStringMatchExpression

The deserialized ReinforcementTuningStringMatchRewardScorerStringMatchExpression object, or null if deserialization fails.