MCPcopy Create free account
hub / github.com/AI45Lab/Code / clear_working

Method clear_working

sdk/python/src/lib.rs:3189–3197  ·  view source on GitHub ↗

Clear working memory. Removes all items from working memory without affecting short-term or long-term memory.

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

Source from the content-addressed store, hash-verified

3187 ///
3188 /// Removes all items from working memory without affecting short-term or long-term memory.
3189 fn clear_working(&self, py: Python<'_>) -> PyResult<()> {
3190 let memory = self
3191 .inner
3192 .memory()
3193 .ok_or_else(|| PyRuntimeError::new_err("Memory not configured for this session"))?
3194 .clone();
3195 py.allow_threads(move || get_runtime().block_on(memory.clear_working()));
3196 Ok(())
3197 }
3198
3199 /// Get current short-term memory items.
3200 ///

Callers

nothing calls this directly

Calls 4

block_onMethod · 0.80
get_runtimeFunction · 0.70
cloneMethod · 0.45
memoryMethod · 0.45

Tested by

no test coverage detected