Class ResponseItem
-
- All Implemented Interfaces:
public final class ResponseItem
Content item used to generate a response.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
ResponseItem.Visitor
An interface that defines how to map each variant of ResponseItem to a value of type T.
-
Method Summary
-
-
Method Detail
-
responseInputMessageItem
final Optional<ResponseInputMessageItem> responseInputMessageItem()
-
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<ResponseComputerToolCallOutputItem> computerCallOutput()
-
webSearchCall
final Optional<ResponseFunctionWebSearch> webSearchCall()
The results of a web search tool call. See the web search guide for more information.
-
functionCall
final Optional<ResponseFunctionToolCallItem> functionCall()
A tool call to run a function. See the function calling guide for more information.
-
functionCallOutput
final Optional<ResponseFunctionToolCallOutputItem> functionCallOutput()
-
isResponseInputMessageItem
final Boolean isResponseInputMessageItem()
-
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()
-
asResponseInputMessageItem
final ResponseInputMessageItem asResponseInputMessageItem()
-
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 ResponseComputerToolCallOutputItem asComputerCallOutput()
-
asWebSearchCall
final ResponseFunctionWebSearch asWebSearchCall()
The results of a web search tool call. See the web search guide for more information.
-
asFunctionCall
final ResponseFunctionToolCallItem asFunctionCall()
A tool call to run a function. See the function calling guide for more information.
-
asFunctionCallOutput
final ResponseFunctionToolCallOutputItem asFunctionCallOutput()
-
accept
final <T extends Any> T accept(ResponseItem.Visitor<T> visitor)
-
validate
final ResponseItem validate()
-
ofResponseInputMessageItem
final static ResponseItem ofResponseInputMessageItem(ResponseInputMessageItem responseInputMessageItem)
-
ofResponseOutputMessage
final static ResponseItem ofResponseOutputMessage(ResponseOutputMessage responseOutputMessage)
An output message from the model.
-
ofFileSearchCall
final static ResponseItem ofFileSearchCall(ResponseFileSearchToolCall fileSearchCall)
The results of a file search tool call. See the file search guide for more information.
-
ofComputerCall
final static ResponseItem ofComputerCall(ResponseComputerToolCall computerCall)
A tool call to a computer use tool. See the computer use guide for more information.
-
ofComputerCallOutput
final static ResponseItem ofComputerCallOutput(ResponseComputerToolCallOutputItem computerCallOutput)
-
ofWebSearchCall
final static ResponseItem ofWebSearchCall(ResponseFunctionWebSearch webSearchCall)
The results of a web search tool call. See the web search guide for more information.
-
ofFunctionCall
final static ResponseItem ofFunctionCall(ResponseFunctionToolCallItem functionCall)
A tool call to run a function. See the function calling guide for more information.
-
ofFunctionCallOutput
final static ResponseItem ofFunctionCallOutput(ResponseFunctionToolCallOutputItem functionCallOutput)
-
-
-
-