Class Response.Instructions
-
- All Implemented Interfaces:
public final class Response.Instructions
A 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 interface
Response.Instructions.Visitor
An 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 developer
role.final Optional<List<ResponseInputItem>>
inputItemList()
A list of one or many input items to the model, containing different content types. final Boolean
isString()
final Boolean
isInputItemList()
final String
asString()
A text input to the model, equivalent to a text input with the developer
role.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> T
accept(Response.Instructions.Visitor<T> visitor)
final Response.Instructions
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static Response.Instructions
ofString(String string)
A text input to the model, equivalent to a text input with the developer
role.final static Response.Instructions
ofInputItemList(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
developer
role.
-
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
developer
role.
-
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
developer
role.
-
ofInputItemList
final static Response.Instructions ofInputItemList(List<ResponseInputItem> inputItemList)
A list of one or many input items to the model, containing different content types.
-
-
-
-