Retrieve all collected multimodal data and embeddings.
(
self
)
| 480 | return await _retrieve(self._data), await _retrieve(self._embeddings) |
| 481 | |
| 482 | def retrieve_all_sync( |
| 483 | self |
| 484 | ) -> tuple[Optional[Dict[str, List[Any]]], Optional[Dict[str, List[Any]]]]: |
| 485 | """Retrieve all collected multimodal data and embeddings.""" |
| 486 | |
| 487 | def _retrieve( |
| 488 | data: Optional[dict[str, |
| 489 | list]]) -> Optional[Dict[str, List[Any]]]: |
| 490 | if not data: |
| 491 | return None |
| 492 | return { |
| 493 | modality: items |
| 494 | for modality, items in data.items() if items |
| 495 | } |
| 496 | |
| 497 | return _retrieve(self._data), _retrieve(self._embeddings) |
| 498 | |
| 499 | def add_data(self, |
| 500 | media_type: str, |
no outgoing calls
no test coverage detected