Class LabelModelGrader
-
- All Implemented Interfaces:
public final class LabelModelGraderA 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 final classLabelModelGrader.BuilderA builder for LabelModelGrader.
public final classLabelModelGrader.InputA message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole are presumed to have been generated by the model in previous interactions.
-
Method Summary
Modifier and Type Method Description final List<LabelModelGrader.Input>input()final List<String>labels()The labels to assign to each item in the evaluation. final Stringmodel()The model to use for the evaluation. final Stringname()The name of the grader. final List<String>passingLabels()The labels that indicate a passing result. final JsonValue_type()The object type, which is always label_model.final JsonField<List<LabelModelGrader.Input>>_input()Returns the raw JSON value of input. final JsonField<List<String>>_labels()Returns the raw JSON value of labels. final JsonField<String>_model()Returns the raw JSON value of model. final JsonField<String>_name()Returns the raw JSON value of name. final JsonField<List<String>>_passingLabels()Returns the raw JSON value of passingLabels. final Map<String, JsonValue>_additionalProperties()final LabelModelGrader.BuildertoBuilder()final LabelModelGradervalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static LabelModelGrader.Builderbuilder()Returns a mutable builder for constructing an instance of LabelModelGrader. -
-
Method Detail
-
input
final List<LabelModelGrader.Input> input()
-
passingLabels
final List<String> passingLabels()
The labels that indicate a passing result. Must be a subset of labels.
-
_type
final JsonValue _type()
The object type, which is always
label_model.Expected to always return the following:
JsonValue.from("label_model")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_input
final JsonField<List<LabelModelGrader.Input>> _input()
Returns the raw JSON value of input.
Unlike input, this method doesn't throw if the JSON field has an unexpected type.
-
_labels
final JsonField<List<String>> _labels()
Returns the raw JSON value of labels.
Unlike labels, this method doesn't throw if the JSON field has an unexpected type.
-
_model
final JsonField<String> _model()
Returns the raw JSON value of model.
Unlike model, this method doesn't throw if the JSON field has an unexpected type.
-
_name
final JsonField<String> _name()
Returns the raw JSON value of name.
Unlike name, this method doesn't throw if the JSON field has an unexpected type.
-
_passingLabels
final JsonField<List<String>> _passingLabels()
Returns the raw JSON value of passingLabels.
Unlike passingLabels, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final LabelModelGrader.Builder toBuilder()
-
validate
final LabelModelGrader validate()
-
builder
final static LabelModelGrader.Builder builder()
Returns a mutable builder for constructing an instance of LabelModelGrader.
The following fields are required:
.input() .labels() .model() .name() .passingLabels()
-
-
-
-