Skip to content

ImageContent

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: AnnotatedObject

An image provided to or from an LLM. Requires the image prompt capability.

Source code in src/aclientp/schema/v2/content.py
class ImageContent(AnnotatedObject):
    """An image provided to or from an LLM. Requires the ``image`` prompt capability."""

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

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

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

    uri: str | MISSING | None = MISSING
    """URI associated with the image."""

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

annotations class-attribute instance-attribute

annotations: Annotations | MISSING | None = MISSING

Display and routing hints.

data instance-attribute

data: str

Base64-encoded image data.

mime_type instance-attribute

mime_type: MediaType

MIME type of the image.

uri class-attribute instance-attribute

uri: str | MISSING | None = MISSING

URI associated with the image.

:fa-brands-github: Show source on GitHub