Skip to content

EmbeddedResourceContentBlock

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: BaseContentBlock

Complete resource contents embedded directly in the message.

Preferred for including context as it avoids extra round-trips.

Requires the embeddedContext prompt capability when included in prompts.

Source code in src/aclientp/schema/content_blocks.py
class EmbeddedResourceContentBlock(BaseContentBlock):
    """Complete resource contents embedded directly in the message.

    Preferred for including context as it avoids extra round-trips.

    Requires the `embeddedContext` prompt capability when included in prompts.
    """

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

    resource: ResourceContents
    """Resource content that can be embedded in a message."""

resource instance-attribute

resource: ResourceContents

Resource content that can be embedded in a message.

:fa-brands-github: Show source on GitHub