Skip to content

Bedrock Runtime  >  Unions  >  ToolChoice

ToolChoice

Union Type

ToolChoice module-attribute

Determines which tools the model should request in a call to Converse or ConverseStream. For more information, see Call a tool with the Converse API in the Amazon Bedrock User Guide.

Union Member Types

ToolChoiceAuto dataclass

(Default). The Model automatically decides if a tool should be called or whether to generate text instead.

Attributes

value instance-attribute

ToolChoiceAny dataclass

The model must request at least one tool (no text is generated).

Attributes

value instance-attribute

ToolChoiceTool dataclass

The Model must request the specified tool. Only supported by Anthropic Claude 3 and Amazon Nova models.

Attributes

value instance-attribute

ToolChoiceUnknown dataclass

Represents an unknown variant.

If you receive this value, you will need to update your library to receive the parsed value.

This value may not be deliberately sent.

Attributes

tag instance-attribute
tag: str