Class ValidateRewardResponse
Response for the validate_reward method. Contains the computed reward for a reinforcement tuning reward configuration.
public record ValidateRewardResponse : IEquatable<ValidateRewardResponse>
- Inheritance
-
ValidateRewardResponse
- Implements
- Inherited Members
Properties
Error
Output only. In case of an error, this field will be populated with a detailed error message to help with debugging.
[JsonPropertyName("error")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Error { get; set; }
Property Value
OverallReward
Output only. The overall weighted reward. For a CompositeReinforcementTuningRewardConfig,
this is the weighted average of all rewards. For a SingleReinforcementTuningRewardConfig,
this will be the value of the single reward.
[JsonPropertyName("overallReward")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public double? OverallReward { get; set; }
Property Value
RewardInfoDetails
A map from reward name to reward info.
[JsonPropertyName("rewardInfoDetails")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public Dictionary<string, ReinforcementTuningRewardInfo>? RewardInfoDetails { get; set; }
Property Value
SdkHttpResponse
Used to retain the full HTTP response.
[JsonPropertyName("sdkHttpResponse")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public HttpResponse? SdkHttpResponse { get; set; }
Property Value
Methods
FromJson(string, JsonSerializerOptions?)
Deserializes a JSON string to a ValidateRewardResponse object.
public static ValidateRewardResponse? FromJson(string jsonString, JsonSerializerOptions? options = null)
Parameters
jsonStringstringThe JSON string to deserialize.
optionsJsonSerializerOptionsOptional JsonSerializerOptions.
Returns
- ValidateRewardResponse
The deserialized ValidateRewardResponse object, or null if deserialization fails.