Class ReinforcementMethod.Grader
-
- All Implemented Interfaces:
public final class ReinforcementMethod.Grader
The grader used for the fine-tuning job.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ReinforcementMethod.Grader.Visitor
An interface that defines how to map each variant of Grader to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<StringCheckGrader>
stringCheck()
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation. final Optional<TextSimilarityGrader>
textSimilarity()
A TextSimilarityGrader object which grades text based on similarity metrics. final Optional<PythonGrader>
python()
A PythonGrader object that runs a python script on the input. final Optional<ScoreModelGrader>
scoreModel()
A ScoreModelGrader object that uses a model to assign a score to the input. final Optional<MultiGrader>
multi()
A MultiGrader object combines the output of multiple graders to produce a single score. final Boolean
isStringCheck()
final Boolean
isTextSimilarity()
final Boolean
isPython()
final Boolean
isScoreModel()
final Boolean
isMulti()
final StringCheckGrader
asStringCheck()
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation. final TextSimilarityGrader
asTextSimilarity()
A TextSimilarityGrader object which grades text based on similarity metrics. final PythonGrader
asPython()
A PythonGrader object that runs a python script on the input. final ScoreModelGrader
asScoreModel()
A ScoreModelGrader object that uses a model to assign a score to the input. final MultiGrader
asMulti()
A MultiGrader object combines the output of multiple graders to produce a single score. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(ReinforcementMethod.Grader.Visitor<T> visitor)
final ReinforcementMethod.Grader
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ReinforcementMethod.Grader
ofStringCheck(StringCheckGrader stringCheck)
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation. final static ReinforcementMethod.Grader
ofTextSimilarity(TextSimilarityGrader textSimilarity)
A TextSimilarityGrader object which grades text based on similarity metrics. final static ReinforcementMethod.Grader
ofPython(PythonGrader python)
A PythonGrader object that runs a python script on the input. final static ReinforcementMethod.Grader
ofScoreModel(ScoreModelGrader scoreModel)
A ScoreModelGrader object that uses a model to assign a score to the input. final static ReinforcementMethod.Grader
ofMulti(MultiGrader multi)
A MultiGrader object combines the output of multiple graders to produce a single score. -
-
Method Detail
-
stringCheck
final Optional<StringCheckGrader> stringCheck()
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
textSimilarity
final Optional<TextSimilarityGrader> textSimilarity()
A TextSimilarityGrader object which grades text based on similarity metrics.
-
python
final Optional<PythonGrader> python()
A PythonGrader object that runs a python script on the input.
-
scoreModel
final Optional<ScoreModelGrader> scoreModel()
A ScoreModelGrader object that uses a model to assign a score to the input.
-
multi
final Optional<MultiGrader> multi()
A MultiGrader object combines the output of multiple graders to produce a single score.
-
isStringCheck
final Boolean isStringCheck()
-
isTextSimilarity
final Boolean isTextSimilarity()
-
isScoreModel
final Boolean isScoreModel()
-
asStringCheck
final StringCheckGrader asStringCheck()
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
asTextSimilarity
final TextSimilarityGrader asTextSimilarity()
A TextSimilarityGrader object which grades text based on similarity metrics.
-
asPython
final PythonGrader asPython()
A PythonGrader object that runs a python script on the input.
-
asScoreModel
final ScoreModelGrader asScoreModel()
A ScoreModelGrader object that uses a model to assign a score to the input.
-
asMulti
final MultiGrader asMulti()
A MultiGrader object combines the output of multiple graders to produce a single score.
-
accept
final <T extends Any> T accept(ReinforcementMethod.Grader.Visitor<T> visitor)
-
validate
final ReinforcementMethod.Grader validate()
-
ofStringCheck
final static ReinforcementMethod.Grader ofStringCheck(StringCheckGrader stringCheck)
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
ofTextSimilarity
final static ReinforcementMethod.Grader ofTextSimilarity(TextSimilarityGrader textSimilarity)
A TextSimilarityGrader object which grades text based on similarity metrics.
-
ofPython
final static ReinforcementMethod.Grader ofPython(PythonGrader python)
A PythonGrader object that runs a python script on the input.
-
ofScoreModel
final static ReinforcementMethod.Grader ofScoreModel(ScoreModelGrader scoreModel)
A ScoreModelGrader object that uses a model to assign a score to the input.
-
ofMulti
final static ReinforcementMethod.Grader ofMulti(MultiGrader multi)
A MultiGrader object combines the output of multiple graders to produce a single score.
-
-
-
-