Class CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate
-
- All Implemented Interfaces:
public final class CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplateA 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceCreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.VisitorAn interface that defines how to map each variant of InnerTemplate to a value of type T.
public final classCreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.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
Modifier and Type Method Description final Optional<EasyInputMessage>easyInputMessage()A message input to the model with a role indicating instruction following hierarchy. final Optional<CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.EvalItem>evalItem()A message input to the model with a role indicating instruction following hierarchy. final BooleanisEasyInputMessage()final BooleanisEvalItem()final EasyInputMessageasEasyInputMessage()A message input to the model with a role indicating instruction following hierarchy. final CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.EvalItemasEvalItem()A message input to the model with a role indicating instruction following hierarchy. final Optional<JsonValue>_json()final <T extends Any> Taccept(CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplatevalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplateofEasyInputMessage(EasyInputMessage easyInputMessage)A message input to the model with a role indicating instruction following hierarchy. final static CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplateofEvalItem(CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.EvalItem evalItem)A message input to the model with a role indicating instruction following hierarchy. -
-
Method Detail
-
easyInputMessage
final Optional<EasyInputMessage> easyInputMessage()
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.
-
evalItem
final Optional<CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.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.
-
isEasyInputMessage
final Boolean isEasyInputMessage()
-
isEvalItem
final Boolean isEvalItem()
-
asEasyInputMessage
final EasyInputMessage asEasyInputMessage()
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.
-
asEvalItem
final CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.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(CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.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 = innerTemplate.accept(new InnerTemplate.Visitor<Optional<String>>() { @Override public Optional<String> visitEasyInputMessage(EasyInputMessage easyInputMessage) { return Optional.of(easyInputMessage.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate 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.
-
ofEasyInputMessage
final static CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate ofEasyInputMessage(EasyInputMessage easyInputMessage)
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.
-
ofEvalItem
final static CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate ofEvalItem(CreateEvalCompletionsRunDataSource.InputMessages.Template.InnerTemplate.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.
-
-
-
-