Dsxir. Predictor. CodeExec. Engine
(dsxir v0.3.0)
Copy Markdown
The generate -> execute -> regenerate -> extract loop shared by
Dsxir.Predictor.ProgramOfThought and Dsxir.Predictor.CodeAct.
Mirrors Dsxir.Predictor.ReAct: an Enum.reduce_while/3 over a
%CodeExec.State{}. A failed sandbox run is loop fuel for code_regenerate;
exhausting max_iters without a success raises
Dsxir.Errors.Framework.CodeExecutionError.
Summary
Functions
@spec run( Dsxir.Program.State.t(), Dsxir.Signature.Runtime.signature(), map(), keyword() ) :: {Dsxir.Program.State.t(), Dsxir.Prediction.t()}