pub enum RunAction {
RequestModel {
request: ChatRequest,
},
ExecuteTool {
calls: Vec<ToolCall>,
},
RequestToolApproval {
call: ToolCall,
reason: String,
},
CompactMemory,
DemoteMemory,
FinishRun {
reason: FinishReason,
usage: TokenUsage,
},
AbortRun {
error: String,
},
Noop,
}Expand description
Actions produced by the state machine that must be executed by the runtime.
Variants§
RequestModel
Request a model completion (non-streaming or streaming).
Fields
§
request: ChatRequestThe chat request to send.
ExecuteTool
Execute one or more tool calls.
RequestToolApproval
Request human approval before executing a tool.
Fields
CompactMemory
Compact conversation memory (summarize old messages).
DemoteMemory
Demote old messages to long-term storage.
FinishRun
The run has finished.
AbortRun
The run was aborted.
Noop
No action needed (e.g., during streaming).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for RunAction
impl<'de> Deserialize<'de> for RunAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RunAction
impl RefUnwindSafe for RunAction
impl Send for RunAction
impl Sync for RunAction
impl Unpin for RunAction
impl UnsafeUnpin for RunAction
impl UnwindSafe for RunAction
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