Skip to content

Bedrock Runtime  >  Structures  >  DocumentBlock

DocumentBlock

Structure Class

DocumentBlock dataclass

A document to include in a message.

Attributes

citations class-attribute instance-attribute
citations: CitationsConfig | None = None

Configuration settings that control how citations should be generated for this specific document.

context class-attribute instance-attribute
context: str | None = None

Contextual information about how the document should be processed or interpreted by the model when generating citations.

format class-attribute instance-attribute
format: DocumentFormat = DocumentFormat('txt')

The format of a document, or its extension.

name instance-attribute
name: str

A name for the document. The name can only contain the following characters:

  • Alphanumeric characters

  • Whitespace characters (no more than one in a row)

  • Hyphens

  • Parentheses

  • Square brackets

Note

This field is vulnerable to prompt injections, because the model might inadvertently interpret it as instructions. Therefore, we recommend that you specify a neutral name.

source instance-attribute

Contains the content of the document.