Retrieve a specific memory by ID. Args: memory_id: The ID of the memory to retrieve. Returns: A dictionary containing the memory data. Raises: APIError: If the API request fails.
(self, memory_id: str)
| 148 | |
| 149 | @api_error_handler |
| 150 | def get(self, memory_id: str) -> Dict[str, Any]: |
| 151 | """Retrieve a specific memory by ID. |
| 152 | |
| 153 | Args: |
| 154 | memory_id: The ID of the memory to retrieve. |
| 155 | |
| 156 | Returns: |
| 157 | A dictionary containing the memory data. |
| 158 | |
| 159 | Raises: |
| 160 | APIError: If the API request fails. |
| 161 | """ |
| 162 | params = self._prepare_params() |
| 163 | response = self.client.get(f"/v1/memories/{memory_id}/", params=params) |
| 164 | response.raise_for_status() |
| 165 | capture_client_event("client.get", self, {"memory_id": memory_id}) |
| 166 | return response.json() |
| 167 | |
| 168 | @api_error_handler |
| 169 | def get_all(self, version: str = "v1", **kwargs) -> List[Dict[str, Any]]: |
no test coverage detected