MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / parse_cache_request_facts

Function parse_cache_request_facts

crates/python/src/py_adaptive.rs:292–302  ·  view source on GitHub ↗
(
    value: Option<&Bound<'_, PyAny>>,
)

Source from the content-addressed store, hash-verified

290}
291
292fn parse_cache_request_facts(
293 value: Option<&Bound<'_, PyAny>>,
294) -> PyResult<Option<CacheRequestFacts>> {
295 let Some(request_facts) = opt_py_to_json(value)? else {
296 return Ok(None);
297 };
298
299 serde_json::from_value(request_facts)
300 .map(Some)
301 .map_err(|e| pyo3::exceptions::PyValueError::new_err(format!("invalid request_facts: {e}")))
302}
303
304#[pyfunction]
305#[allow(clippy::too_many_arguments)]

Callers 1

Calls 1

opt_py_to_jsonFunction · 0.85

Tested by

no test coverage detected