pub struct ExecutionPlan {
pub goal: String,
pub reasoning: Option<String>,
pub steps: Vec<PlannedStep>,
pub confidence: f64,
pub is_complete: bool,
pub expected_outcome: Option<String>,
}Expand description
An execution plan from the LLM.
Fields§
§goal: StringThe goal this plan aims to achieve.
reasoning: Option<String>Reasoning for the plan (optional).
steps: Vec<PlannedStep>Steps to execute.
confidence: f64Overall confidence in the plan.
is_complete: boolWhether the plan is complete (achieves the goal).
expected_outcome: Option<String>Expected final state after execution.
Implementations§
Source§impl ExecutionPlan
impl ExecutionPlan
Sourcepub fn add_step(self, step: PlannedStep) -> Self
pub fn add_step(self, step: PlannedStep) -> Self
Add a step.
Sourcepub fn with_reasoning(self, reasoning: impl Into<String>) -> Self
pub fn with_reasoning(self, reasoning: impl Into<String>) -> Self
Set reasoning.
Sourcepub fn with_confidence(self, confidence: f64) -> Self
pub fn with_confidence(self, confidence: f64) -> Self
Set confidence.
Sourcepub fn with_expected_outcome(self, outcome: impl Into<String>) -> Self
pub fn with_expected_outcome(self, outcome: impl Into<String>) -> Self
Set expected outcome.
Sourcepub fn step_count(&self) -> usize
pub fn step_count(&self) -> usize
Get the number of steps.
Sourcepub fn average_step_confidence(&self) -> f64
pub fn average_step_confidence(&self) -> f64
Get the average confidence of steps.
Sourcepub fn steps_with_checkpoints(&self) -> Vec<&PlannedStep>
pub fn steps_with_checkpoints(&self) -> Vec<&PlannedStep>
Get steps that have checkpoints.
Sourcepub fn critical_steps(&self) -> Vec<&PlannedStep>
pub fn critical_steps(&self) -> Vec<&PlannedStep>
Get critical steps.
Trait Implementations§
Source§impl Clone for ExecutionPlan
impl Clone for ExecutionPlan
Source§fn clone(&self) -> ExecutionPlan
fn clone(&self) -> ExecutionPlan
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExecutionPlan
impl Debug for ExecutionPlan
Source§impl<'de> Deserialize<'de> for ExecutionPlan
impl<'de> Deserialize<'de> for ExecutionPlan
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 ExecutionPlan
impl RefUnwindSafe for ExecutionPlan
impl Send for ExecutionPlan
impl Sync for ExecutionPlan
impl Unpin for ExecutionPlan
impl UnwindSafe for ExecutionPlan
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