Skip to content

AudioContent

Base classes

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

⋔ Inheritance diagram

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

🛈 DocStrings

Bases: AnnotatedObject

Audio provided to or from an LLM. Requires the audio prompt capability.

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

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

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

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

    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 audio data.

mime_type instance-attribute

mime_type: MediaType

MIME type of the audio.

:fa-brands-github: Show source on GitHub