Package com.google.genai.types
Class SingleReinforcementTuningRewardConfig
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SingleReinforcementTuningRewardConfig
Single reinforcement tuning reward config.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBuilder for SingleReinforcementTuningRewardConfig. -
Field Summary
Fields inherited from class com.google.genai.JsonSerializable
MAX_READ_LENGTH_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Optional<ReinforcementTuningAutoraterScorer>Scores parsed responses for autorater use cases by using a model to compute the reward.builder()Instantiates a builder for SingleReinforcementTuningRewardConfig.ReinforcementTuningCloudRunRewardScorer is used to score parsed responses by calling a Cloud Run service.ReinforcementTuningCodeExecutionRewardScorer is used to score parsed responses for code execution use cases.Deserializes a JSON string to a SingleReinforcementTuningRewardConfig object.Defines how to parse sample response.A unique reward name for identifying each single reinforcement tuning reward.ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for simple string matching use cases against reference answers.Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString
-
Constructor Details
-
SingleReinforcementTuningRewardConfig
public SingleReinforcementTuningRewardConfig()
-
-
Method Details
-
autoraterScorer
Scores parsed responses for autorater use cases by using a model to compute the reward. -
rewardName
A unique reward name for identifying each single reinforcement tuning reward. -
parseResponseConfig
Defines how to parse sample response. For example, given a sample response for evaluating the reward, users might want to extract the text only between `` and `` in the sample response, and keeps only the last one in case there are multiple such tags. To achieve such a purpose, they can define a regex `".*(.*?)"` using the ReinforcementTuningParseResponseConfig.ResponseParseType.REGEX_EXTRACT parse type. -
codeExecutionRewardScorer
ReinforcementTuningCodeExecutionRewardScorer is used to score parsed responses for code execution use cases. -
stringMatchRewardScorer
ReinforcementTuningStringMatchRewardScorer is used to score parsed responses for simple string matching use cases against reference answers. -
cloudRunRewardScorer
ReinforcementTuningCloudRunRewardScorer is used to score parsed responses by calling a Cloud Run service. -
builder
Instantiates a builder for SingleReinforcementTuningRewardConfig. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a SingleReinforcementTuningRewardConfig object.
-