ToolChoice

sealed class ToolChoice

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.

Inheritors

Types

Link copied to clipboard
data class Any(val value: AnyToolChoice) : ToolChoice

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

Link copied to clipboard
data class Auto(val value: AutoToolChoice) : ToolChoice

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

Link copied to clipboard
Link copied to clipboard
data class Tool(val value: SpecificToolChoice) : ToolChoice

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

Functions

Link copied to clipboard

Casts this ToolChoice as a Any and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.AnyToolChoice value. Throws an exception if the ToolChoice is not a Any.

Link copied to clipboard

Casts this ToolChoice as a Any and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.AnyToolChoice value. Returns null if the ToolChoice is not a Any.

Link copied to clipboard

Casts this ToolChoice as a Auto and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.AutoToolChoice value. Throws an exception if the ToolChoice is not a Auto.

Link copied to clipboard

Casts this ToolChoice as a Auto and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.AutoToolChoice value. Returns null if the ToolChoice is not a Auto.

Link copied to clipboard

Casts this ToolChoice as a Tool and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.SpecificToolChoice value. Throws an exception if the ToolChoice is not a Tool.

Link copied to clipboard

Casts this ToolChoice as a Tool and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.SpecificToolChoice value. Returns null if the ToolChoice is not a Tool.