Class EvalCreateParams.TestingCriterion.LabelModel.Input
-
- All Implemented Interfaces:
public final class EvalCreateParams.TestingCriterion.LabelModel.InputA chat message that makes up the prompt or context. May include variable references to the
itemnamespace, ie {{item.name}}.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceEvalCreateParams.TestingCriterion.LabelModel.Input.VisitorAn interface that defines how to map each variant of Input to a value of type T.
public final classEvalCreateParams.TestingCriterion.LabelModel.Input.SimpleInputMessagepublic final classEvalCreateParams.TestingCriterion.LabelModel.Input.EvalItemA 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
-
-
Method Detail
-
simpleInputMessage
final Optional<EvalCreateParams.TestingCriterion.LabelModel.Input.SimpleInputMessage> simpleInputMessage()
-
evalItem
final Optional<EvalCreateParams.TestingCriterion.LabelModel.Input.EvalItem> evalItem()
A 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.
-
isSimpleInputMessage
final Boolean isSimpleInputMessage()
-
isEvalItem
final Boolean isEvalItem()
-
asSimpleInputMessage
final EvalCreateParams.TestingCriterion.LabelModel.Input.SimpleInputMessage asSimpleInputMessage()
-
asEvalItem
final EvalCreateParams.TestingCriterion.LabelModel.Input.EvalItem asEvalItem()
A 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.
-
accept
final <T extends Any> T accept(EvalCreateParams.TestingCriterion.LabelModel.Input.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 = input.accept(new Input.Visitor<Optional<String>>() { @Override public Optional<String> visitSimpleInputMessage(SimpleInputMessage simpleInputMessage) { return Optional.of(simpleInputMessage.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final EvalCreateParams.TestingCriterion.LabelModel.Input 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.
-
ofSimpleInputMessage
final static EvalCreateParams.TestingCriterion.LabelModel.Input ofSimpleInputMessage(EvalCreateParams.TestingCriterion.LabelModel.Input.SimpleInputMessage simpleInputMessage)
-
ofEvalItem
final static EvalCreateParams.TestingCriterion.LabelModel.Input ofEvalItem(EvalCreateParams.TestingCriterion.LabelModel.Input.EvalItem evalItem)
A 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.
-
-
-
-