Skip to content

TextContentBlock

Base classes

Name Children Inherits
BaseContentBlock
aclientp.schema.content_blocks
Base content block.

⋔ Inheritance diagram

graph TD
  95970859778528["content_blocks.TextContentBlock"]
  95970859784416["content_blocks.BaseContentBlock"]
  95970862258240["base.AnnotatedObject"]
  95970862254416["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970859784416 --> 95970859778528
  95970862258240 --> 95970859784416
  95970862254416 --> 95970862258240
  95970851503232 --> 95970862254416
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: BaseContentBlock

Text content.

May be plain text or formatted with Markdown.

All agents MUST support text content blocks in prompts. Clients SHOULD render this text as Markdown.

Source code in src/aclientp/schema/content_blocks.py
class TextContentBlock(BaseContentBlock):
    """Text content.

    May be plain text or formatted with Markdown.

    All agents MUST support text content blocks in prompts.
    Clients SHOULD render this text as Markdown.
    """

    type: Literal["text"] = Field(default="text", init=False)

    text: str
    """Text content of the block."""

text instance-attribute

text: str

Text content of the block.

:fa-brands-github: Show source on GitHub