MCPcopy Create free account
hub / github.com/BUPT-GAMMA/MASFactory / MediaMessageBlock

Class MediaMessageBlock

masfactory/core/multimodal.py:215–230  ·  view source on GitHub ↗

Provider-agnostic media message block recorded in history and encoded by adapters.

Source from the content-addressed store, hash-verified

213
214@dataclass(frozen=True, slots=True)
215class MediaMessageBlock:
216 """Provider-agnostic media message block recorded in history and encoded by adapters."""
217
218 asset: MediaAsset
219 field_name: str
220 tag: str
221 description: str = ""
222 type: str = "media"
223
224 @property
225 def modality(self) -> FieldModality:
226 return self.asset.modality
227
228 @property
229 def fingerprint(self) -> str:
230 return self.asset.fingerprint()
231
232
233MessageBlock = TextMessageBlock | MediaMessageBlock

Calls

no outgoing calls

Tested by

no test coverage detected