Table of Contents

Class ReinforcementTuningCodeExecutionRewardScorer

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

Scores parsed responses for code execution use cases.

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

Properties

PythonCodeSnippet

Example python code snippet which assigns reward of 1 to answer matching user provided reference answer in per prompt references map.

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

Property Value

string

Methods

FromJson(string, JsonSerializerOptions?)

Deserializes a JSON string to a ReinforcementTuningCodeExecutionRewardScorer object.

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

Parameters

jsonString string

The JSON string to deserialize.

options JsonSerializerOptions

Optional JsonSerializerOptions.

Returns

ReinforcementTuningCodeExecutionRewardScorer

The deserialized ReinforcementTuningCodeExecutionRewardScorer object, or null if deserialization fails.