Package com.anthropic.models.messages
Interface ToolUseCaller.Visitor
-
- All Implemented Interfaces:
public interface ToolUseCaller.Visitor<T extends Object>An interface that defines how to map each variant of ToolUseCaller to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitDirect(DirectCaller direct)Tool invocation directly from the model. abstract TvisitCodeExecution20250825(ServerToolCaller codeExecution20250825)Tool invocation generated by a server-side tool. abstract TvisitCodeExecution20260120(ServerToolCaller20260120 codeExecution20260120)Tunknown(JsonValue json)Maps an unknown variant of ToolUseCaller to a value of type T. -
-
Method Detail
-
visitDirect
abstract T visitDirect(DirectCaller direct)
Tool invocation directly from the model.
-
visitCodeExecution20250825
abstract T visitCodeExecution20250825(ServerToolCaller codeExecution20250825)
Tool invocation generated by a server-side tool.
-
visitCodeExecution20260120
abstract T visitCodeExecution20260120(ServerToolCaller20260120 codeExecution20260120)
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ToolUseCaller to a value of type T.
An instance of ToolUseCaller 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.
-
-
-
-