Skip to content

ContentBlockDict

Union Type

Union Member Types

ContentBlockTextDict

Bases: TypedDict

Attributes

text instance-attribute
text: str

Text to include in the message.

ContentBlockImageDict

Bases: TypedDict

Attributes

image instance-attribute

Image to include in the message.

Note

This field is only supported by Anthropic Claude 3 models.

ContentBlockDocumentDict

Bases: TypedDict

Attributes

document instance-attribute

A document to include in the message.

ContentBlockVideoDict

Bases: TypedDict

Attributes

video instance-attribute

Video to include in the message.

ContentBlockAudioDict

Bases: TypedDict

Attributes

audio instance-attribute

An audio content block containing audio data in the conversation.

ContentBlockToolUseDict

Bases: TypedDict

Attributes

tool_use instance-attribute

Information about a tool use request from a model.

ContentBlockToolResultDict

Bases: TypedDict

Attributes

tool_result instance-attribute

The result for a tool request that a model makes.

ContentBlockGuardContentDict

Bases: TypedDict

Attributes

guard_content instance-attribute

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.

ContentBlockCachePointDict

Bases: TypedDict

Attributes

cache_point instance-attribute

CachePoint to include in the message.

ContentBlockReasoningContentDict

Bases: TypedDict

Attributes

reasoning_content instance-attribute

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.

ContentBlockCitationsContentDict

Bases: TypedDict

Attributes

citations_content instance-attribute

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

ContentBlockSearchResultDict

Bases: TypedDict

Attributes

search_result instance-attribute

Search result to include in the message.

ContentBlockToolAdditionDict

Bases: TypedDict

Attributes

tool_addition instance-attribute

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.

ContentBlockToolRemovalDict

Bases: TypedDict

Attributes

tool_removal instance-attribute

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.