pub enum TurnOperation {
InvokeModel {
request: ChatRequest,
},
InvokeTools {
calls: Vec<PreparedToolCall>,
},
Finished(TurnOutcome),
}Expand description
External work requested by one prepared engine step.
Operations are runtime values, not durable payloads. In particular, a model request may contain credentials. Persist the accompanying events and resolve protected execution resources at the host’s activity boundary.
Variants§
InvokeModel
Ask the configured model for the next assistant message.
Fields
§
request: ChatRequestComplete provider-neutral request.
InvokeTools
Run a prepared tool batch. A host may dispatch runnable calls sequentially, concurrently, or as durable activities.
Fields
§
calls: Vec<PreparedToolCall>Calls after middleware has rewritten or denied each one.
Finished(TurnOutcome)
The turn has reached a terminal outcome.
Trait Implementations§
Source§impl Clone for TurnOperation
impl Clone for TurnOperation
Auto Trait Implementations§
impl Freeze for TurnOperation
impl RefUnwindSafe for TurnOperation
impl Send for TurnOperation
impl Sync for TurnOperation
impl Unpin for TurnOperation
impl UnsafeUnpin for TurnOperation
impl UnwindSafe for TurnOperation
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