Class EvalCreateParams.TestingCriterion
-
- All Implemented Interfaces:
public final class EvalCreateParams.TestingCriterionA LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceEvalCreateParams.TestingCriterion.VisitorAn interface that defines how to map each variant of TestingCriterion to a value of type T.
public final classEvalCreateParams.TestingCriterion.LabelModelA LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
public final classEvalCreateParams.TestingCriterion.TextSimilarityA TextSimilarityGrader object which grades text based on similarity metrics.
public final classEvalCreateParams.TestingCriterion.PythonA PythonGrader object that runs a python script on the input.
public final classEvalCreateParams.TestingCriterion.ScoreModelA ScoreModelGrader object that uses a model to assign a score to the input.
-
Method Summary
Modifier and Type Method Description final Optional<EvalCreateParams.TestingCriterion.LabelModel>labelModel()A LabelModelGrader object which uses a model to assign labels to each item in the evaluation. final Optional<StringCheckGrader>stringCheck()A StringCheckGrader object that performs a string comparison between input and reference using a specified operation. final Optional<EvalCreateParams.TestingCriterion.TextSimilarity>textSimilarity()A TextSimilarityGrader object which grades text based on similarity metrics. final Optional<EvalCreateParams.TestingCriterion.Python>python()A PythonGrader object that runs a python script on the input. final Optional<EvalCreateParams.TestingCriterion.ScoreModel>scoreModel()A ScoreModelGrader object that uses a model to assign a score to the input. final BooleanisLabelModel()final BooleanisStringCheck()final BooleanisTextSimilarity()final BooleanisPython()final BooleanisScoreModel()final EvalCreateParams.TestingCriterion.LabelModelasLabelModel()A LabelModelGrader object which uses a model to assign labels to each item in the evaluation. final StringCheckGraderasStringCheck()A StringCheckGrader object that performs a string comparison between input and reference using a specified operation. final EvalCreateParams.TestingCriterion.TextSimilarityasTextSimilarity()A TextSimilarityGrader object which grades text based on similarity metrics. final EvalCreateParams.TestingCriterion.PythonasPython()A PythonGrader object that runs a python script on the input. final EvalCreateParams.TestingCriterion.ScoreModelasScoreModel()A ScoreModelGrader object that uses a model to assign a score to the input. final Optional<JsonValue>_json()final <T extends Any> Taccept(EvalCreateParams.TestingCriterion.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final EvalCreateParams.TestingCriterionvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static EvalCreateParams.TestingCriterionofLabelModel(EvalCreateParams.TestingCriterion.LabelModel labelModel)A LabelModelGrader object which uses a model to assign labels to each item in the evaluation. final static EvalCreateParams.TestingCriterionofStringCheck(StringCheckGrader stringCheck)A StringCheckGrader object that performs a string comparison between input and reference using a specified operation. final static EvalCreateParams.TestingCriterionofTextSimilarity(EvalCreateParams.TestingCriterion.TextSimilarity textSimilarity)A TextSimilarityGrader object which grades text based on similarity metrics. final static EvalCreateParams.TestingCriterionofPython(EvalCreateParams.TestingCriterion.Python python)A PythonGrader object that runs a python script on the input. final static EvalCreateParams.TestingCriterionofScoreModel(EvalCreateParams.TestingCriterion.ScoreModel scoreModel)A ScoreModelGrader object that uses a model to assign a score to the input. -
-
Method Detail
-
labelModel
final Optional<EvalCreateParams.TestingCriterion.LabelModel> labelModel()
A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
-
stringCheck
final Optional<StringCheckGrader> stringCheck()
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
textSimilarity
final Optional<EvalCreateParams.TestingCriterion.TextSimilarity> textSimilarity()
A TextSimilarityGrader object which grades text based on similarity metrics.
-
python
final Optional<EvalCreateParams.TestingCriterion.Python> python()
A PythonGrader object that runs a python script on the input.
-
scoreModel
final Optional<EvalCreateParams.TestingCriterion.ScoreModel> scoreModel()
A ScoreModelGrader object that uses a model to assign a score to the input.
-
isLabelModel
final Boolean isLabelModel()
-
isStringCheck
final Boolean isStringCheck()
-
isTextSimilarity
final Boolean isTextSimilarity()
-
isScoreModel
final Boolean isScoreModel()
-
asLabelModel
final EvalCreateParams.TestingCriterion.LabelModel asLabelModel()
A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
-
asStringCheck
final StringCheckGrader asStringCheck()
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
asTextSimilarity
final EvalCreateParams.TestingCriterion.TextSimilarity asTextSimilarity()
A TextSimilarityGrader object which grades text based on similarity metrics.
-
asPython
final EvalCreateParams.TestingCriterion.Python asPython()
A PythonGrader object that runs a python script on the input.
-
asScoreModel
final EvalCreateParams.TestingCriterion.ScoreModel asScoreModel()
A ScoreModelGrader object that uses a model to assign a score to the input.
-
accept
final <T extends Any> T accept(EvalCreateParams.TestingCriterion.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import com.openai.core.JsonValue; import java.util.Optional; Optional<String> result = testingCriterion.accept(new TestingCriterion.Visitor<Optional<String>>() { @Override public Optional<String> visitLabelModel(LabelModel labelModel) { return Optional.of(labelModel.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final EvalCreateParams.TestingCriterion validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofLabelModel
final static EvalCreateParams.TestingCriterion ofLabelModel(EvalCreateParams.TestingCriterion.LabelModel labelModel)
A LabelModelGrader object which uses a model to assign labels to each item in the evaluation.
-
ofStringCheck
final static EvalCreateParams.TestingCriterion ofStringCheck(StringCheckGrader stringCheck)
A StringCheckGrader object that performs a string comparison between input and reference using a specified operation.
-
ofTextSimilarity
final static EvalCreateParams.TestingCriterion ofTextSimilarity(EvalCreateParams.TestingCriterion.TextSimilarity textSimilarity)
A TextSimilarityGrader object which grades text based on similarity metrics.
-
ofPython
final static EvalCreateParams.TestingCriterion ofPython(EvalCreateParams.TestingCriterion.Python python)
A PythonGrader object that runs a python script on the input.
-
ofScoreModel
final static EvalCreateParams.TestingCriterion ofScoreModel(EvalCreateParams.TestingCriterion.ScoreModel scoreModel)
A ScoreModelGrader object that uses a model to assign a score to the input.
-
-
-
-