Skip to content

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

Bases: _SerdeShape

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

Attributes

value instance-attribute

ToolChoiceAny dataclass

Bases: _SerdeShape

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

Attributes

value instance-attribute

ToolChoiceTool dataclass

Bases: _SerdeShape

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

Attributes

value instance-attribute

ToolChoiceUnknown dataclass

Bases: _SerdeShape

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