MCPcopy Index your code
hub / github.com/OpenBMB/ChatDev / to_message_block

Method to_message_block

utils/attachments.py:225–229  ·  view source on GitHub ↗
(self, attachment_id: str)

Source from the content-addressed store, hash-verified

223 return self._records.get(attachment_id)
224
225 def to_message_block(self, attachment_id: str) -> MessageBlock:
226 record = self._records.get(attachment_id)
227 if not record:
228 raise KeyError(f"Attachment '{attachment_id}' not found")
229 return record.as_message_block()
230
231 def list_records(self) -> Dict[str, AttachmentRecord]:
232 return dict(self._records)

Callers

nothing calls this directly

Calls 2

as_message_blockMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected