MCPcopy Index your code
hub / github.com/AI45Lab/Code / step_outcome_to_py

Function step_outcome_to_py

sdk/python/src/lib.rs:3470–3474  ·  view source on GitHub ↗

Convert a `StepOutcome` into a Python dict.

(py: Python<'_>, outcome: &RustStepOutcome)

Source from the content-addressed store, hash-verified

3468
3469/// Convert a `StepOutcome` into a Python dict.
3470fn step_outcome_to_py(py: Python<'_>, outcome: &RustStepOutcome) -> PyResult<PyObject> {
3471 let json = serde_json::to_string(outcome)
3472 .map_err(|e| PyRuntimeError::new_err(format!("serialize outcome: {e}")))?;
3473 json_string_to_py(py, &json)
3474}
3475
3476/// Bridges a Python pipeline-stage callable into a synchronous `PipelineStage`.
3477///

Callers 4

parallelMethod · 0.85
parallel_resumableMethod · 0.85
pipelineMethod · 0.85

Calls 1

json_string_to_pyFunction · 0.85

Tested by 1