Package com.openai.models.responses
Class ResponseCreateParams.Input
-
- All Implemented Interfaces:
public final class ResponseCreateParams.Input
Text, image, or file inputs to the model, used to generate a response.
Learn more:
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ResponseCreateParams.Input.Visitor
An interface that defines how to map each variant of Input to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<String>
text()
A text input to the model, equivalent to a text input with the user
role.final Optional<List<ResponseInputItem>>
response()
A list of one or many input items to the model, containing different content types. final Boolean
isText()
final Boolean
isResponse()
final String
asText()
A text input to the model, equivalent to a text input with the user
role.final List<ResponseInputItem>
asResponse()
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(ResponseCreateParams.Input.Visitor<T> visitor)
final ResponseCreateParams.Input
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseCreateParams.Input
ofText(String text)
A text input to the model, equivalent to a text input with the user
role.final static ResponseCreateParams.Input
ofResponse(List<ResponseInputItem> response)
A list of one or many input items to the model, containing different content types. -
-
Method Detail
-
text
final Optional<String> text()
A text input to the model, equivalent to a text input with the
user
role.
-
response
final Optional<List<ResponseInputItem>> response()
A list of one or many input items to the model, containing different content types.
-
isResponse
final Boolean isResponse()
-
asText
final String asText()
A text input to the model, equivalent to a text input with the
user
role.
-
asResponse
final List<ResponseInputItem> asResponse()
A list of one or many input items to the model, containing different content types.
-
accept
final <T extends Any> T accept(ResponseCreateParams.Input.Visitor<T> visitor)
-
validate
final ResponseCreateParams.Input validate()
-
ofText
final static ResponseCreateParams.Input ofText(String text)
A text input to the model, equivalent to a text input with the
user
role.
-
ofResponse
final static ResponseCreateParams.Input ofResponse(List<ResponseInputItem> response)
A list of one or many input items to the model, containing different content types.
-
-
-
-