Skip to content

Bedrock Runtime  >  Unions  >  ContentBlock

ContentBlock

Union Type

Union Member Types

ContentBlockText dataclass

Text to include in the message.

Attributes

value instance-attribute
value: str

ContentBlockImage dataclass

Image to include in the message.

Note

This field is only supported by Anthropic Claude 3 models.

Attributes

value instance-attribute
value: ImageBlock

ContentBlockDocument dataclass

A document to include in the message.

Attributes

value instance-attribute

ContentBlockVideo dataclass

Video to include in the message.

Attributes

value instance-attribute
value: VideoBlock

ContentBlockAudio dataclass

An audio content block containing audio data in the conversation.

Attributes

value instance-attribute
value: AudioBlock

ContentBlockToolUse dataclass

Information about a tool use request from a model.

Attributes

value instance-attribute
value: ToolUseBlock

ContentBlockToolResult dataclass

The result for a tool request that a model makes.

Attributes

value instance-attribute

ContentBlockGuardContent dataclass

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.

Attributes

value instance-attribute

ContentBlockCachePoint dataclass

CachePoint to include in the message.

Attributes

value instance-attribute

ContentBlockReasoningContent dataclass

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.

Attributes

value instance-attribute

ContentBlockCitationsContent dataclass

A content block that contains both generated text and associated citation information, providing traceability between the response and source documents.

Attributes

value instance-attribute

ContentBlockSearchResult dataclass

Search result to include in the message.

Attributes

value instance-attribute

ContentBlockToolAddition dataclass

A content block for adding a tool to the available tool set mid-conversation. Each block references a single tool via its tool field. Use within a system role message to make a tool available without re-sending the full tool configuration.

Attributes

value instance-attribute

ContentBlockToolRemoval dataclass

A content block for removing a tool from the available tool set mid-conversation. Each block references a single tool via its tool field. Use within a system role message to remove a tool without re-sending the full tool configuration.

Attributes

value instance-attribute

ContentBlockUnknown 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