pub trait PlanGenerator: Send + Sync {
// Required method
fn generate_plan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
objective: &'life1 str,
context: &'life2 str,
tools: &'life3 [Value],
) -> Pin<Box<dyn Future<Output = Result<ExecutionPlan, AgentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait;
// Provided method
fn generate_plan_streaming<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
objective: &'life1 str,
context: &'life2 str,
tools: &'life3 [Value],
on_generating: Box<dyn Fn() + Send>,
on_step_parsed: Box<dyn Fn(usize, String, String) + Send>,
on_raw_chunk: Box<dyn Fn(String) + Send>,
) -> Pin<Box<dyn Future<Output = Result<ExecutionPlan, AgentError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
}Expand description
Generates an ExecutionPlan from a high-level objective.
The generator may use LLM prompting, rule engines, or templates.
Required Methods§
fn generate_plan<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
objective: &'life1 str,
context: &'life2 str,
tools: &'life3 [Value],
) -> Pin<Box<dyn Future<Output = Result<ExecutionPlan, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Provided Methods§
fn generate_plan_streaming<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
objective: &'life1 str,
context: &'life2 str,
tools: &'life3 [Value],
on_generating: Box<dyn Fn() + Send>,
on_step_parsed: Box<dyn Fn(usize, String, String) + Send>,
on_raw_chunk: Box<dyn Fn(String) + Send>,
) -> Pin<Box<dyn Future<Output = Result<ExecutionPlan, AgentError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".