GuardContent

Contains the content to assess with the guardrail. If you don't specify guardContent in a call to the Converse API, the guardrail (if passed in the Converse API) assesses the entire message.

For more information, see Use a guardrail with the Converse API in the Amazon Bedrock User Guide.

Constructors

Link copied to clipboard
constructor(value: GuardrailConverseContentBlock)

Properties

Link copied to clipboard

Inherited functions

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard

Casts this ContentBlock as a Document and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.DocumentBlock value. Throws an exception if the ContentBlock is not a Document.

Link copied to clipboard
Link copied to clipboard

Casts this ContentBlock as a Image and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ImageBlock value. Throws an exception if the ContentBlock is not a Image.

Link copied to clipboard

Casts this ContentBlock as a Image and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ImageBlock value. Returns null if the ContentBlock is not a Image.

Link copied to clipboard
fun asText(): String

Casts this ContentBlock as a Text and retrieves its kotlin.String value. Throws an exception if the ContentBlock is not a Text.

Link copied to clipboard

Casts this ContentBlock as a Text and retrieves its kotlin.String value. Returns null if the ContentBlock is not a Text.

Link copied to clipboard

Casts this ContentBlock as a ToolResult and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ToolResultBlock value. Throws an exception if the ContentBlock is not a ToolResult.

Link copied to clipboard
Link copied to clipboard

Casts this ContentBlock as a ToolUse and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ToolUseBlock value. Throws an exception if the ContentBlock is not a ToolUse.

Link copied to clipboard

Casts this ContentBlock as a ToolUse and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ToolUseBlock value. Returns null if the ContentBlock is not a ToolUse.

Link copied to clipboard

Casts this ContentBlock as a Video and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.VideoBlock value. Throws an exception if the ContentBlock is not a Video.

Link copied to clipboard

Casts this ContentBlock as a Video and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.VideoBlock value. Returns null if the ContentBlock is not a Video.