Tool

sealed class Tool

Contains configurations for a tool that a model can use when generating a response. For more information, see Use a tool to complete an Amazon Bedrock model response.

Inheritors

Types

Link copied to clipboard
data class CachePoint(val value: CachePointBlock) : Tool

Creates a cache checkpoint within a tool designation

Link copied to clipboard
object SdkUnknown : Tool
Link copied to clipboard
data class ToolSpec(val value: ToolSpecification) : Tool

The specification for the tool.

Functions

Link copied to clipboard

Casts this Tool as a CachePoint and retrieves its aws.sdk.kotlin.services.bedrockagent.model.CachePointBlock value. Throws an exception if the Tool is not a CachePoint.

Link copied to clipboard

Casts this Tool as a CachePoint and retrieves its aws.sdk.kotlin.services.bedrockagent.model.CachePointBlock value. Returns null if the Tool is not a CachePoint.

Link copied to clipboard

Casts this Tool as a ToolSpec and retrieves its aws.sdk.kotlin.services.bedrockagent.model.ToolSpecification value. Throws an exception if the Tool is not a ToolSpec.

Link copied to clipboard

Casts this Tool as a ToolSpec and retrieves its aws.sdk.kotlin.services.bedrockagent.model.ToolSpecification value. Returns null if the Tool is not a ToolSpec.