@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class ToolChoice extends Object implements Serializable, Cloneable, StructuredPojo
Determines which tools the model should request in a call to Converse or ConverseStream.
ToolChoice is only supported by Anthropic Claude 3 models and by Mistral AI Mistral Large.
| Constructor and Description |
|---|
ToolChoice() |
| Modifier and Type | Method and Description |
|---|---|
ToolChoice |
clone() |
boolean |
equals(Object obj) |
AnyToolChoice |
getAny()
The model must request at least one tool (no text is generated).
|
AutoToolChoice |
getAuto()
(Default).
|
SpecificToolChoice |
getTool()
The Model must request the specified tool.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller. |
void |
setAny(AnyToolChoice any)
The model must request at least one tool (no text is generated).
|
void |
setAuto(AutoToolChoice auto)
(Default).
|
void |
setTool(SpecificToolChoice tool)
The Model must request the specified tool.
|
String |
toString()
Returns a string representation of this object.
|
ToolChoice |
withAny(AnyToolChoice any)
The model must request at least one tool (no text is generated).
|
ToolChoice |
withAuto(AutoToolChoice auto)
(Default).
|
ToolChoice |
withTool(SpecificToolChoice tool)
The Model must request the specified tool.
|
public void setAuto(AutoToolChoice auto)
(Default). The Model automatically decides if a tool should be called or whether to generate text instead.
auto - (Default). The Model automatically decides if a tool should be called or whether to generate text instead.public AutoToolChoice getAuto()
(Default). The Model automatically decides if a tool should be called or whether to generate text instead.
public ToolChoice withAuto(AutoToolChoice auto)
(Default). The Model automatically decides if a tool should be called or whether to generate text instead.
auto - (Default). The Model automatically decides if a tool should be called or whether to generate text instead.public void setAny(AnyToolChoice any)
The model must request at least one tool (no text is generated).
any - The model must request at least one tool (no text is generated).public AnyToolChoice getAny()
The model must request at least one tool (no text is generated).
public ToolChoice withAny(AnyToolChoice any)
The model must request at least one tool (no text is generated).
any - The model must request at least one tool (no text is generated).public void setTool(SpecificToolChoice tool)
The Model must request the specified tool. Only supported by Anthropic Claude 3 models.
tool - The Model must request the specified tool. Only supported by Anthropic Claude 3 models.public SpecificToolChoice getTool()
The Model must request the specified tool. Only supported by Anthropic Claude 3 models.
public ToolChoice withTool(SpecificToolChoice tool)
The Model must request the specified tool. Only supported by Anthropic Claude 3 models.
tool - The Model must request the specified tool. Only supported by Anthropic Claude 3 models.public String toString()
toString in class ObjectObject.toString()public ToolChoice clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojoProtocolMarshaller.marshall in interface StructuredPojoprotocolMarshaller - Implementation of ProtocolMarshaller used to marshall this object's data.