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

Method remember_failure

sdk/python/src/lib.rs:3029–3045  ·  view source on GitHub ↗
(
        &self,
        py: Python<'_>,
        task: String,
        error: String,
        tools: Vec<String>,
    )

Source from the content-addressed store, hash-verified

3027 /// tools: List of tool names attempted
3028 #[pyo3(signature = (task, error, tools))]
3029 fn remember_failure(
3030 &self,
3031 py: Python<'_>,
3032 task: String,
3033 error: String,
3034 tools: Vec<String>,
3035 ) -> PyResult<()> {
3036 let memory = self
3037 .inner
3038 .memory()
3039 .ok_or_else(|| PyRuntimeError::new_err("Memory not configured for this session"))?
3040 .clone();
3041 py.allow_threads(move || {
3042 get_runtime().block_on(memory.remember_failure(&task, &error, &tools))
3043 })
3044 .map_err(|e| PyRuntimeError::new_err(format!("Remember failed: {e}")))
3045 }
3046
3047 /// Recall memories similar to a query.
3048 ///

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