ContentBlock
A block of content for a message that you pass to, or receive from, a model with the Converse or ConverseStream API operations.
Inheritors
Types
CachePoint to include in the message.
A content block that contains both generated text and associated citation information, providing traceability between the response and source documents.
A document to include in the message.
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.
Image to include in the message.
Contains content regarding the reasoning that is carried out by the model. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.
Text to include in the message.
The result for a tool request that a model makes.
Information about a tool use request from a model.
Video to include in the message.
Functions
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.
Casts this ContentBlock as a CachePoint and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.CachePointBlock value. Returns null if the ContentBlock is not a CachePoint.
Casts this ContentBlock as a CitationsContent and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.CitationsContentBlock value. Throws an exception if the ContentBlock is not a CitationsContent.
Casts this ContentBlock as a CitationsContent and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.CitationsContentBlock value. Returns null if the ContentBlock is not a CitationsContent.
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.
Casts this ContentBlock as a Document and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.DocumentBlock value. Returns null if the ContentBlock is not a Document.
Casts this ContentBlock as a GuardContent and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseContentBlock value. Throws an exception if the ContentBlock is not a GuardContent.
Casts this ContentBlock as a GuardContent and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.GuardrailConverseContentBlock value. Returns null if the ContentBlock is not a GuardContent.
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.
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.
Casts this ContentBlock as a ReasoningContent and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ReasoningContentBlock value. Throws an exception if the ContentBlock is not a ReasoningContent.
Casts this ContentBlock as a ReasoningContent and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ReasoningContentBlock value. Returns null if the ContentBlock is not a ReasoningContent.
Casts this ContentBlock as a Text and retrieves its kotlin.String value. Throws an exception if the ContentBlock is not a Text.
Casts this ContentBlock as a Text and retrieves its kotlin.String value. Returns null if the ContentBlock is not a Text.
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.
Casts this ContentBlock as a ToolResult and retrieves its aws.sdk.kotlin.services.bedrockruntime.model.ToolResultBlock value. Returns null if the ContentBlock is not a ToolResult.
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.
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.
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.
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.