Skip to content

DocumentBlock

Source code in docs_src/capo_bedrock_runtime/types/document_block.py
class DocumentBlock(TypedDict, closed=True):
    format: "capo_bedrock_runtime.types.document_format.DocumentFormat"
    """<p>The format of a document, or its extension.</p>"""
    name: "str"
    """<p>A name for the document. The name can only contain the following characters:</p> <ul> <li> <p>Alphanumeric characters</p> </li> <li> <p>Whitespace characters (no more than one in a row)</p> </li> <li> <p>Hyphens</p> </li> <li> <p>Parentheses</p> </li> <li> <p>Square brackets</p> </li> </ul> <note> <p>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.</p> </note>"""
    source: "capo_bedrock_runtime.types.document_source.DocumentSource"
    """<p>Contains the content of the document.</p>"""
    context: NotRequired["str"]
    """<p>Contextual information about how the document should be processed or interpreted by the model when generating citations.</p>"""
    citations: NotRequired[
        "capo_bedrock_runtime.types.citations_config.CitationsConfig"
    ]
    """<p>Configuration settings that control how citations should be generated for this specific document.</p>"""

citations instance-attribute

citations: NotRequired[CitationsConfig]

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

context instance-attribute

context: NotRequired[str]

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

format instance-attribute

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

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.