MCPcopy Create free account
hub / github.com/AQ-MedAI/MedMemoryBench / get

Method get

methods/mem0/client/main.py:150–166  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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]]:

Callers 15

validate_authMethod · 0.45
validate_authMethod · 0.45
_validate_api_keyMethod · 0.45

Calls 3

_prepare_paramsMethod · 0.95
capture_client_eventFunction · 0.90
jsonMethod · 0.45

Tested by

no test coverage detected