Interface ResponseItem.Visitor
-
- All Implemented Interfaces:
public interface ResponseItem.Visitor<T extends Object>
An interface that defines how to map each variant of ResponseItem to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract T
visitResponseInputMessageItem(ResponseInputMessageItem responseInputMessageItem)
abstract T
visitResponseOutputMessage(ResponseOutputMessage responseOutputMessage)
An output message from the model. abstract T
visitFileSearchCall(ResponseFileSearchToolCall fileSearchCall)
The results of a file search tool call. abstract T
visitComputerCall(ResponseComputerToolCall computerCall)
A tool call to a computer use tool. abstract T
visitComputerCallOutput(ResponseComputerToolCallOutputItem computerCallOutput)
abstract T
visitWebSearchCall(ResponseFunctionWebSearch webSearchCall)
The results of a web search tool call. abstract T
visitFunctionCall(ResponseFunctionToolCallItem functionCall)
A tool call to run a function. abstract T
visitFunctionCallOutput(ResponseFunctionToolCallOutputItem functionCallOutput)
T
unknown(JsonValue json)
Maps an unknown variant of ResponseItem to a value of type T. -
-
Method Detail
-
visitResponseInputMessageItem
abstract T visitResponseInputMessageItem(ResponseInputMessageItem responseInputMessageItem)
-
visitResponseOutputMessage
abstract T visitResponseOutputMessage(ResponseOutputMessage responseOutputMessage)
An output message from the model.
-
visitFileSearchCall
abstract T visitFileSearchCall(ResponseFileSearchToolCall fileSearchCall)
The results of a file search tool call. See the file search guide for more information.
-
visitComputerCall
abstract T visitComputerCall(ResponseComputerToolCall computerCall)
A tool call to a computer use tool. See the computer use guide for more information.
-
visitComputerCallOutput
abstract T visitComputerCallOutput(ResponseComputerToolCallOutputItem computerCallOutput)
-
visitWebSearchCall
abstract T visitWebSearchCall(ResponseFunctionWebSearch webSearchCall)
The results of a web search tool call. See the web search guide for more information.
-
visitFunctionCall
abstract T visitFunctionCall(ResponseFunctionToolCallItem functionCall)
A tool call to run a function. See the function calling guide for more information.
-
visitFunctionCallOutput
abstract T visitFunctionCallOutput(ResponseFunctionToolCallOutputItem functionCallOutput)
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ResponseItem to a value of type T.
An instance of ResponseItem can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-