Skip to content

Bedrock Agent  >  Unions  >  ToolChoice

ToolChoice

Union Type

ToolChoice module-attribute

Defines which tools the model should request when invoked. For more information, see Use a tool to complete an Amazon Bedrock model response.

Union Member Types

ToolChoiceAuto dataclass

Defines tools. The model automatically decides whether to call a tool or to generate text instead.

Attributes

value instance-attribute

ToolChoiceAny dataclass

Defines tools, at least one of which must be requested by the model. No text is generated but the results of tool use are sent back to the model to help generate a response.

Attributes

value instance-attribute

ToolChoiceTool dataclass

Defines a specific tool that the model must request. No text is generated but the results of tool use are sent back to the model to help generate a response.

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