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

Method clear_short_term

sdk/python/src/lib.rs:3225–3233  ·  view source on GitHub ↗

Clear short-term memory for this session. Removes all session-scoped memory items without affecting long-term or working memory.

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

Source from the content-addressed store, hash-verified

3223 ///
3224 /// Removes all session-scoped memory items without affecting long-term or working memory.
3225 fn clear_short_term(&self, py: Python<'_>) -> PyResult<()> {
3226 let memory = self
3227 .inner
3228 .memory()
3229 .ok_or_else(|| PyRuntimeError::new_err("Memory not configured for this session"))?
3230 .clone();
3231 py.allow_threads(move || get_runtime().block_on(memory.clear_short_term()));
3232 Ok(())
3233 }
3234
3235 // ========================================================================
3236 // Slash Command & Scheduler API

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