MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / delete

Method delete

python/src/memory/client.rs:183–191  ·  view source on GitHub ↗

Delete a single memory by its ID.

(&self, py: Python<'_>, memory_id: String)

Source from the content-addressed store, hash-verified

181
182 /// Delete a single memory by its ID.
183 fn delete(&self, py: Python<'_>, memory_id: String) -> PyResult<()> {
184 let id = parse_memory_id(&memory_id)?;
185 let service = Arc::clone(&self.service);
186 let rt = get_runtime();
187
188 py.allow_threads(|| {
189 rt.block_on(async move { service.delete(&id).await.map_err(to_py_runtime_error) })
190 })
191 }
192
193 /// Delete all memories matching the given scope.
194 #[pyo3(signature = (user_id=None, agent_id=None, run_id=None))]

Callers

nothing calls this directly

Calls 2

parse_memory_idFunction · 0.85
get_runtimeFunction · 0.50

Tested by

no test coverage detected