Class ResponseInputItem
-
- All Implemented Interfaces:
public final class ResponseInputItem
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developer
orsystem
role take precedence over instructions given with theuser
role. Messages with theassistant
role are presumed to have been generated by the model in previous interactions.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ResponseInputItem.Visitor
An interface that defines how to map each variant of ResponseInputItem to a value of type T.
public final class
ResponseInputItem.Message
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developer
orsystem
role take precedence over instructions given with theuser
role.public final class
ResponseInputItem.ComputerCallOutput
The output of a computer tool call.
public final class
ResponseInputItem.FunctionCallOutput
The output of a function tool call.
public final class
ResponseInputItem.ItemReference
An internal identifier for an item to reference.
-
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<ResponseInputItem.Message>
message()
A message input to the model with a role indicating instruction following hierarchy. final Optional<ResponseOutputMessage>
responseOutputMessage()
An output message from the model. final Optional<ResponseFileSearchToolCall>
fileSearchCall()
The results of a file search tool call. final Optional<ResponseComputerToolCall>
computerCall()
A tool call to a computer use tool. final Optional<ResponseInputItem.ComputerCallOutput>
computerCallOutput()
The output of a computer tool call. final Optional<ResponseFunctionWebSearch>
webSearchCall()
The results of a web search tool call. final Optional<ResponseFunctionToolCall>
functionCall()
A tool call to run a function. final Optional<ResponseInputItem.FunctionCallOutput>
functionCallOutput()
The output of a function tool call. final Optional<ResponseReasoningItem>
reasoning()
A description of the chain of thought used by a reasoning model while generating a response. final Optional<ResponseInputItem.ItemReference>
itemReference()
An internal identifier for an item to reference. final Boolean
isEasyInputMessage()
final Boolean
isMessage()
final Boolean
isResponseOutputMessage()
final Boolean
isFileSearchCall()
final Boolean
isComputerCall()
final Boolean
isComputerCallOutput()
final Boolean
isWebSearchCall()
final Boolean
isFunctionCall()
final Boolean
isFunctionCallOutput()
final Boolean
isReasoning()
final Boolean
isItemReference()
final EasyInputMessage
asEasyInputMessage()
A message input to the model with a role indicating instruction following hierarchy. final ResponseInputItem.Message
asMessage()
A message input to the model with a role indicating instruction following hierarchy. final ResponseOutputMessage
asResponseOutputMessage()
An output message from the model. final ResponseFileSearchToolCall
asFileSearchCall()
The results of a file search tool call. final ResponseComputerToolCall
asComputerCall()
A tool call to a computer use tool. final ResponseInputItem.ComputerCallOutput
asComputerCallOutput()
The output of a computer tool call. final ResponseFunctionWebSearch
asWebSearchCall()
The results of a web search tool call. final ResponseFunctionToolCall
asFunctionCall()
A tool call to run a function. final ResponseInputItem.FunctionCallOutput
asFunctionCallOutput()
The output of a function tool call. final ResponseReasoningItem
asReasoning()
A description of the chain of thought used by a reasoning model while generating a response. final ResponseInputItem.ItemReference
asItemReference()
An internal identifier for an item to reference. final Optional<JsonValue>
_json()
final <T extends Any> T
accept(ResponseInputItem.Visitor<T> visitor)
final ResponseInputItem
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ResponseInputItem
ofEasyInputMessage(EasyInputMessage easyInputMessage)
A message input to the model with a role indicating instruction following hierarchy. final static ResponseInputItem
ofMessage(ResponseInputItem.Message message)
A message input to the model with a role indicating instruction following hierarchy. final static ResponseInputItem
ofResponseOutputMessage(ResponseOutputMessage responseOutputMessage)
An output message from the model. final static ResponseInputItem
ofFileSearchCall(ResponseFileSearchToolCall fileSearchCall)
The results of a file search tool call. final static ResponseInputItem
ofComputerCall(ResponseComputerToolCall computerCall)
A tool call to a computer use tool. final static ResponseInputItem
ofComputerCallOutput(ResponseInputItem.ComputerCallOutput computerCallOutput)
The output of a computer tool call. final static ResponseInputItem
ofWebSearchCall(ResponseFunctionWebSearch webSearchCall)
The results of a web search tool call. final static ResponseInputItem
ofFunctionCall(ResponseFunctionToolCall functionCall)
A tool call to run a function. final static ResponseInputItem
ofFunctionCallOutput(ResponseInputItem.FunctionCallOutput functionCallOutput)
The output of a function tool call. final static ResponseInputItem
ofReasoning(ResponseReasoningItem reasoning)
A description of the chain of thought used by a reasoning model while generating a response. final static ResponseInputItem
ofItemReference(ResponseInputItem.ItemReference itemReference)
An internal identifier for an item to reference. -
-
Method Detail
-
easyInputMessage
final Optional<EasyInputMessage> easyInputMessage()
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developer
orsystem
role take precedence over instructions given with theuser
role. Messages with theassistant
role are presumed to have been generated by the model in previous interactions.
-
message
final Optional<ResponseInputItem.Message> message()
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developer
orsystem
role take precedence over instructions given with theuser
role.
-
responseOutputMessage
final Optional<ResponseOutputMessage> responseOutputMessage()
An output message from the model.
-
fileSearchCall
final Optional<ResponseFileSearchToolCall> fileSearchCall()
The results of a file search tool call. See the file search guide for more information.
-
computerCall
final Optional<ResponseComputerToolCall> computerCall()
A tool call to a computer use tool. See the computer use guide for more information.
-
computerCallOutput
final Optional<ResponseInputItem.ComputerCallOutput> computerCallOutput()
The output of a computer tool call.
-
webSearchCall
final Optional<ResponseFunctionWebSearch> webSearchCall()
The results of a web search tool call. See the web search guide for more information.
-
functionCall
final Optional<ResponseFunctionToolCall> functionCall()
A tool call to run a function. See the function calling guide for more information.
-
functionCallOutput
final Optional<ResponseInputItem.FunctionCallOutput> functionCallOutput()
The output of a function tool call.
-
reasoning
final Optional<ResponseReasoningItem> reasoning()
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your
input
to the Responses API for subsequent turns of a conversation if you are manually managing context.
-
itemReference
final Optional<ResponseInputItem.ItemReference> itemReference()
An internal identifier for an item to reference.
-
isEasyInputMessage
final Boolean isEasyInputMessage()
-
isResponseOutputMessage
final Boolean isResponseOutputMessage()
-
isFileSearchCall
final Boolean isFileSearchCall()
-
isComputerCall
final Boolean isComputerCall()
-
isComputerCallOutput
final Boolean isComputerCallOutput()
-
isWebSearchCall
final Boolean isWebSearchCall()
-
isFunctionCall
final Boolean isFunctionCall()
-
isFunctionCallOutput
final Boolean isFunctionCallOutput()
-
isReasoning
final Boolean isReasoning()
-
isItemReference
final Boolean isItemReference()
-
asEasyInputMessage
final EasyInputMessage asEasyInputMessage()
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developer
orsystem
role take precedence over instructions given with theuser
role. Messages with theassistant
role are presumed to have been generated by the model in previous interactions.
-
asMessage
final ResponseInputItem.Message asMessage()
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developer
orsystem
role take precedence over instructions given with theuser
role.
-
asResponseOutputMessage
final ResponseOutputMessage asResponseOutputMessage()
An output message from the model.
-
asFileSearchCall
final ResponseFileSearchToolCall asFileSearchCall()
The results of a file search tool call. See the file search guide for more information.
-
asComputerCall
final ResponseComputerToolCall asComputerCall()
A tool call to a computer use tool. See the computer use guide for more information.
-
asComputerCallOutput
final ResponseInputItem.ComputerCallOutput asComputerCallOutput()
The output of a computer tool call.
-
asWebSearchCall
final ResponseFunctionWebSearch asWebSearchCall()
The results of a web search tool call. See the web search guide for more information.
-
asFunctionCall
final ResponseFunctionToolCall asFunctionCall()
A tool call to run a function. See the function calling guide for more information.
-
asFunctionCallOutput
final ResponseInputItem.FunctionCallOutput asFunctionCallOutput()
The output of a function tool call.
-
asReasoning
final ResponseReasoningItem asReasoning()
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your
input
to the Responses API for subsequent turns of a conversation if you are manually managing context.
-
asItemReference
final ResponseInputItem.ItemReference asItemReference()
An internal identifier for an item to reference.
-
accept
final <T extends Any> T accept(ResponseInputItem.Visitor<T> visitor)
-
validate
final ResponseInputItem validate()
-
ofEasyInputMessage
final static ResponseInputItem ofEasyInputMessage(EasyInputMessage easyInputMessage)
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developer
orsystem
role take precedence over instructions given with theuser
role. Messages with theassistant
role are presumed to have been generated by the model in previous interactions.
-
ofMessage
final static ResponseInputItem ofMessage(ResponseInputItem.Message message)
A message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developer
orsystem
role take precedence over instructions given with theuser
role.
-
ofResponseOutputMessage
final static ResponseInputItem ofResponseOutputMessage(ResponseOutputMessage responseOutputMessage)
An output message from the model.
-
ofFileSearchCall
final static ResponseInputItem ofFileSearchCall(ResponseFileSearchToolCall fileSearchCall)
The results of a file search tool call. See the file search guide for more information.
-
ofComputerCall
final static ResponseInputItem ofComputerCall(ResponseComputerToolCall computerCall)
A tool call to a computer use tool. See the computer use guide for more information.
-
ofComputerCallOutput
final static ResponseInputItem ofComputerCallOutput(ResponseInputItem.ComputerCallOutput computerCallOutput)
The output of a computer tool call.
-
ofWebSearchCall
final static ResponseInputItem ofWebSearchCall(ResponseFunctionWebSearch webSearchCall)
The results of a web search tool call. See the web search guide for more information.
-
ofFunctionCall
final static ResponseInputItem ofFunctionCall(ResponseFunctionToolCall functionCall)
A tool call to run a function. See the function calling guide for more information.
-
ofFunctionCallOutput
final static ResponseInputItem ofFunctionCallOutput(ResponseInputItem.FunctionCallOutput functionCallOutput)
The output of a function tool call.
-
ofReasoning
final static ResponseInputItem ofReasoning(ResponseReasoningItem reasoning)
A description of the chain of thought used by a reasoning model while generating a response. Be sure to include these items in your
input
to the Responses API for subsequent turns of a conversation if you are manually managing context.
-
ofItemReference
final static ResponseInputItem ofItemReference(ResponseInputItem.ItemReference itemReference)
An internal identifier for an item to reference.
-
-
-
-