Table of Contents

Class ReinforcementTuningParseResponseConfig

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

Defines how to parse sample response for reinforcement tuning.

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

Properties

ParseType

Defines how to parse sample response.

[JsonPropertyName("parseType")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public ResponseParseType? ParseType { get; set; }

Property Value

ResponseParseType?

RegexExtractExpression

Defines the regex to extract the important part of sample response. This field is only used when parse_type is REGEX_EXTRACT.

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

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ReinforcementTuningParseResponseConfig object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ReinforcementTuningParseResponseConfig

The deserialized ReinforcementTuningParseResponseConfig object, or null if deserialization fails.