Debian Codegraph @

src/anthropic/types/text_block.py

raw
1 from typing import List, Optional
2 from typing_extensions import Literal
3
4 from .._models import BaseModel
5 from .text_citation import TextCitation
6
7 __all__ = ["TextBlock"]
8
9
10 class TextBlock(BaseModel):
11 citations: Optional[List[TextCitation]] = None
12 """Citations supporting the text block.
13
14 The type of citation returned will depend on the type of document being cited.
15 Citing a PDF results in `page_location`, plain text results in `char_location`,
16 and content document results in `content_block_location`.
17 """
18
19 text: str
20
21 type: Literal["text"]