Source code for ralph.mcp.multimodal._audio_content
"""Typed audio content block."""
from __future__ import annotations
from dataclasses import dataclass
[docs]
@dataclass(frozen=True)
class AudioContent:
"""Typed audio content block referencing a manifest artifact."""
uri: str
mime_type: str
title: str
type: str = "audio"
delivery: str = "typed_block"
[docs]
def to_dict(self) -> dict[str, object]:
"""Serialize to MCP-compatible content block dictionary."""
return {
"type": self.type,
"uri": self.uri,
"mimeType": self.mime_type,
"title": self.title,
"delivery": self.delivery,
}