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

Method get_artifact

sdk/python/src/lib.rs:2743–2747  ·  view source on GitHub ↗

Return a stored tool artifact by URI, or ``None`` if it is not retained.

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

Source from the content-addressed store, hash-verified

2741
2742 /// Return a stored tool artifact by URI, or ``None`` if it is not retained.
2743 fn get_artifact(&self, py: Python<'_>, artifact_uri: &str) -> PyResult<PyObject> {
2744 let json = serde_json::to_string(&self.inner.get_artifact(artifact_uri))
2745 .map_err(|e| PyRuntimeError::new_err(format!("Failed to serialize artifact: {e}")))?;
2746 json_string_to_py(py, &json)
2747 }
2748
2749 /// Return compact execution trace events recorded for this session.
2750 fn trace_events(&self, py: Python<'_>) -> PyResult<PyObject> {

Calls 1

json_string_to_pyFunction · 0.85