pub struct TurnRunner { /* private fields */ }Expand description
Drives logical model rounds over caller-owned materials.
Only fresh declarations from each accepted model output are executed. Preparation and observation are supplied per run; tool policy belongs to the executor. Controlled stops return materials, including the complete current batch when its results have not committed.
Implementations§
Source§impl TurnRunner
impl TurnRunner
Sourcepub fn new(gateway: Arc<dyn ModelGateway>, executor: Arc<ToolExecutor>) -> Self
pub fn new(gateway: Arc<dyn ModelGateway>, executor: Arc<ToolExecutor>) -> Self
Assemble the two execution dependencies.
Sourcepub async fn run(
&self,
turn_id: TurnId,
context: Context,
options: TurnRunOptions,
control: CallControl,
) -> TurnOutcome
pub async fn run( &self, turn_id: TurnId, context: Context, options: TurnRunOptions, control: CallControl, ) -> TurnOutcome
Run using complete logical gateway calls.
Sourcepub async fn run_streaming(
&self,
turn_id: TurnId,
context: Context,
options: TurnRunOptions,
control: CallControl,
) -> TurnOutcome
pub async fn run_streaming( &self, turn_id: TurnId, context: Context, options: TurnRunOptions, control: CallControl, ) -> TurnOutcome
Run using streaming gateway calls, accepting only complete Done output.
Auto Trait Implementations§
impl !RefUnwindSafe for TurnRunner
impl !UnwindSafe for TurnRunner
impl Freeze for TurnRunner
impl Send for TurnRunner
impl Sync for TurnRunner
impl Unpin for TurnRunner
impl UnsafeUnpin for TurnRunner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more