Skip to content

ImageContentBlock

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: BaseContentBlock

Images for visual context or analysis.

Requires the image prompt capability when included in prompts.

Source code in src/aclientp/schema/content_blocks.py
class ImageContentBlock(BaseContentBlock):
    """Images for visual context or analysis.

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

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

    data: str
    """Base64-encoded image data."""

    mime_type: str
    """MIME type of the image."""

    uri: str | None = None
    """URI of the image."""

data instance-attribute

data: str

Base64-encoded image data.

mime_type instance-attribute

mime_type: str

MIME type of the image.

uri class-attribute instance-attribute

uri: str | None = None

URI of the image.

:fa-brands-github: Show source on GitHub