Skip to content

TextContent

Base classes

Name Children Inherits
AnnotatedObject
aclientp.schema.v2.base
A v2 object with the ``_meta`` extension point.

⋔ Inheritance diagram

graph TD
  95970868776160["content.TextContent"]
  95970868359040["base.AnnotatedObject"]
  95970855946400["base.Schema"]
  95970851503232["main.BaseModel"]
  125067848591872["builtins.object"]
  95970868359040 --> 95970868776160
  95970855946400 --> 95970868359040
  95970851503232 --> 95970855946400
  125067848591872 --> 95970851503232

🛈 DocStrings

Bases: AnnotatedObject

Text provided to or from an LLM. All agents MUST support it in prompts.

Source code in src/aclientp/schema/v2/content.py
class TextContent(AnnotatedObject):
    """Text provided to or from an LLM. All agents MUST support it in prompts."""

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

    text: str
    """The text; clients SHOULD render it as Markdown."""

    annotations: Annotations | MISSING | None = MISSING
    """Display and routing hints."""

annotations class-attribute instance-attribute

annotations: Annotations | MISSING | None = MISSING

Display and routing hints.

text instance-attribute

text: str

The text; clients SHOULD render it as Markdown.

:fa-brands-github: Show source on GitHub