Package com.anthropic.models
Interface BetaToolChoice.Visitor
-
- All Implemented Interfaces:
public interface BetaToolChoice.Visitor<T extends Object>An interface that defines how to map each variant of BetaToolChoice to a value of type T.
-
-
Method Summary
Modifier and Type Method Description abstract TvisitAuto(BetaToolChoiceAuto auto)The model will automatically decide whether to use tools. abstract TvisitAny(BetaToolChoiceAny any)The model will use any available tools. abstract TvisitTool(BetaToolChoiceTool tool)The model will use the specified tool with tool_choice.name.Tunknown(JsonValue json)Maps an unknown variant of BetaToolChoice to a value of type T. -
-
Method Detail
-
visitAuto
abstract T visitAuto(BetaToolChoiceAuto auto)
The model will automatically decide whether to use tools.
-
visitAny
abstract T visitAny(BetaToolChoiceAny any)
The model will use any available tools.
-
visitTool
abstract T visitTool(BetaToolChoiceTool tool)
The model will use the specified tool with
tool_choice.name.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of BetaToolChoice to a value of type T.
An instance of BetaToolChoice 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.
-
-
-
-