Class Response.Instructions
-
- All Implemented Interfaces:
public final class Response.InstructionsA system (or developer) message inserted into the model's context.
When using along with
previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceResponse.Instructions.VisitorAn interface that defines how to map each variant of Instructions to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<String>string()A text input to the model, equivalent to a text input with the developerrole.final Optional<List<ResponseInputItem>>inputItemList()A list of one or many input items to the model, containing different content types. final BooleanisString()final BooleanisInputItemList()final StringasString()A text input to the model, equivalent to a text input with the developerrole.final List<ResponseInputItem>asInputItemList()A list of one or many input items to the model, containing different content types. final Optional<JsonValue>_json()final <T extends Any> Taccept(Response.Instructions.Visitor<T> visitor)final Response.Instructionsvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Response.InstructionsofString(String string)A text input to the model, equivalent to a text input with the developerrole.final static Response.InstructionsofInputItemList(List<ResponseInputItem> inputItemList)A list of one or many input items to the model, containing different content types. -
-
Method Detail
-
string
final Optional<String> string()
A text input to the model, equivalent to a text input with the
developerrole.
-
inputItemList
final Optional<List<ResponseInputItem>> inputItemList()
A list of one or many input items to the model, containing different content types.
-
isInputItemList
final Boolean isInputItemList()
-
asString
final String asString()
A text input to the model, equivalent to a text input with the
developerrole.
-
asInputItemList
final List<ResponseInputItem> asInputItemList()
A list of one or many input items to the model, containing different content types.
-
accept
final <T extends Any> T accept(Response.Instructions.Visitor<T> visitor)
-
validate
final Response.Instructions validate()
-
ofString
final static Response.Instructions ofString(String string)
A text input to the model, equivalent to a text input with the
developerrole.
-
ofInputItemList
final static Response.Instructions ofInputItemList(List<ResponseInputItem> inputItemList)
A list of one or many input items to the model, containing different content types.
-
-
-
-