Package com.anthropic.models
Class BetaToolChoice
-
- All Implemented Interfaces:
public final class BetaToolChoiceHow the model should use the provided tools. The model can use a specific tool, any available tool, or decide by itself.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceBetaToolChoice.VisitorAn interface that defines how to map each variant of BetaToolChoice to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<BetaToolChoiceAuto>auto()The model will automatically decide whether to use tools. final Optional<BetaToolChoiceAny>any()The model will use any available tools. final Optional<BetaToolChoiceTool>tool()The model will use the specified tool with tool_choice.name.final BooleanisAuto()final BooleanisAny()final BooleanisTool()final BetaToolChoiceAutoasAuto()The model will automatically decide whether to use tools. final BetaToolChoiceAnyasAny()The model will use any available tools. final BetaToolChoiceToolasTool()The model will use the specified tool with tool_choice.name.final Optional<JsonValue>_json()final <T extends Any> Taccept(BetaToolChoice.Visitor<T> visitor)final BetaToolChoicevalidate()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaToolChoiceofAuto(BetaToolChoiceAuto auto)The model will automatically decide whether to use tools. final static BetaToolChoiceofAny(BetaToolChoiceAny any)The model will use any available tools. final static BetaToolChoiceofTool(BetaToolChoiceTool tool)The model will use the specified tool with tool_choice.name.-
-
Method Detail
-
auto
final Optional<BetaToolChoiceAuto> auto()
The model will automatically decide whether to use tools.
-
any
final Optional<BetaToolChoiceAny> any()
The model will use any available tools.
-
tool
final Optional<BetaToolChoiceTool> tool()
The model will use the specified tool with
tool_choice.name.
-
asAuto
final BetaToolChoiceAuto asAuto()
The model will automatically decide whether to use tools.
-
asAny
final BetaToolChoiceAny asAny()
The model will use any available tools.
-
asTool
final BetaToolChoiceTool asTool()
The model will use the specified tool with
tool_choice.name.
-
accept
final <T extends Any> T accept(BetaToolChoice.Visitor<T> visitor)
-
validate
final BetaToolChoice validate()
-
ofAuto
final static BetaToolChoice ofAuto(BetaToolChoiceAuto auto)
The model will automatically decide whether to use tools.
-
ofAny
final static BetaToolChoice ofAny(BetaToolChoiceAny any)
The model will use any available tools.
-
ofTool
final static BetaToolChoice ofTool(BetaToolChoiceTool tool)
The model will use the specified tool with
tool_choice.name.
-
-
-
-