Class ResponseInputItem
-
- All Implemented Interfaces:
public final class ResponseInputItemA 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 interfaceResponseInputItem.VisitorAn interface that defines how to map each variant of ResponseInputItem to a value of type T.
public final classResponseInputItem.MessageA message input to the model with a role indicating instruction following hierarchy. Instructions given with the
developerorsystemrole take precedence over instructions given with theuserrole.public final classResponseInputItem.ComputerCallOutputThe output of a computer tool call.
public final classResponseInputItem.FunctionCallOutputThe output of a function tool call.
public final classResponseInputItem.ItemReferenceAn 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 BooleanisEasyInputMessage()final BooleanisMessage()final BooleanisResponseOutputMessage()final BooleanisFileSearchCall()final BooleanisComputerCall()final BooleanisComputerCallOutput()final BooleanisWebSearchCall()final BooleanisFunctionCall()final BooleanisFunctionCallOutput()final BooleanisReasoning()final BooleanisItemReference()final EasyInputMessageasEasyInputMessage()A message input to the model with a role indicating instruction following hierarchy. final ResponseInputItem.MessageasMessage()A message input to the model with a role indicating instruction following hierarchy. final ResponseOutputMessageasResponseOutputMessage()An output message from the model. final ResponseFileSearchToolCallasFileSearchCall()The results of a file search tool call. final ResponseComputerToolCallasComputerCall()A tool call to a computer use tool. final ResponseInputItem.ComputerCallOutputasComputerCallOutput()The output of a computer tool call. final ResponseFunctionWebSearchasWebSearchCall()The results of a web search tool call. final ResponseFunctionToolCallasFunctionCall()A tool call to run a function. final ResponseInputItem.FunctionCallOutputasFunctionCallOutput()The output of a function tool call. final ResponseReasoningItemasReasoning()A description of the chain of thought used by a reasoning model while generating a response. final ResponseInputItem.ItemReferenceasItemReference()An internal identifier for an item to reference. final Optional<JsonValue>_json()final <T extends Any> Taccept(ResponseInputItem.Visitor<T> visitor)final ResponseInputItemvalidate()final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static ResponseInputItemofEasyInputMessage(EasyInputMessage easyInputMessage)A message input to the model with a role indicating instruction following hierarchy. final static ResponseInputItemofMessage(ResponseInputItem.Message message)A message input to the model with a role indicating instruction following hierarchy. final static ResponseInputItemofResponseOutputMessage(ResponseOutputMessage responseOutputMessage)An output message from the model. final static ResponseInputItemofFileSearchCall(ResponseFileSearchToolCall fileSearchCall)The results of a file search tool call. final static ResponseInputItemofComputerCall(ResponseComputerToolCall computerCall)A tool call to a computer use tool. final static ResponseInputItemofComputerCallOutput(ResponseInputItem.ComputerCallOutput computerCallOutput)The output of a computer tool call. final static ResponseInputItemofWebSearchCall(ResponseFunctionWebSearch webSearchCall)The results of a web search tool call. final static ResponseInputItemofFunctionCall(ResponseFunctionToolCall functionCall)A tool call to run a function. final static ResponseInputItemofFunctionCallOutput(ResponseInputItem.FunctionCallOutput functionCallOutput)The output of a function tool call. final static ResponseInputItemofReasoning(ResponseReasoningItem reasoning)A description of the chain of thought used by a reasoning model while generating a response. final static ResponseInputItemofItemReference(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
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole 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
developerorsystemrole take precedence over instructions given with theuserrole.
-
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.
-
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
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole 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
developerorsystemrole take precedence over instructions given with theuserrole.
-
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.
-
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
developerorsystemrole take precedence over instructions given with theuserrole. Messages with theassistantrole 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
developerorsystemrole take precedence over instructions given with theuserrole.
-
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.
-
ofItemReference
final static ResponseInputItem ofItemReference(ResponseInputItem.ItemReference itemReference)
An internal identifier for an item to reference.
-
-
-
-