pub struct LlmPlanner;Expand description
LLM-powered planner that generates plans, extracts goals, and evaluates achievement
Implementations§
Source§impl LlmPlanner
impl LlmPlanner
Sourcepub async fn create_plan(
llm: &Arc<dyn LlmClient>,
prompt: &str,
) -> Result<ExecutionPlan>
pub async fn create_plan( llm: &Arc<dyn LlmClient>, prompt: &str, ) -> Result<ExecutionPlan>
Generate an execution plan from a prompt using LLM
Sourcepub async fn extract_goal(
llm: &Arc<dyn LlmClient>,
prompt: &str,
) -> Result<AgentGoal>
pub async fn extract_goal( llm: &Arc<dyn LlmClient>, prompt: &str, ) -> Result<AgentGoal>
Extract a goal with success criteria from a prompt using LLM
Sourcepub async fn check_achievement(
llm: &Arc<dyn LlmClient>,
goal: &AgentGoal,
current_state: &str,
) -> Result<AchievementResult>
pub async fn check_achievement( llm: &Arc<dyn LlmClient>, goal: &AgentGoal, current_state: &str, ) -> Result<AchievementResult>
Evaluate whether a goal has been achieved given current state
Sourcepub fn fallback_plan(prompt: &str) -> ExecutionPlan
pub fn fallback_plan(prompt: &str) -> ExecutionPlan
Create a fallback plan using heuristic logic (no LLM required)
Sourcepub fn fallback_goal(prompt: &str) -> AgentGoal
pub fn fallback_goal(prompt: &str) -> AgentGoal
Create a fallback goal using heuristic logic (no LLM required)
Sourcepub fn fallback_check_achievement(
goal: &AgentGoal,
current_state: &str,
) -> AchievementResult
pub fn fallback_check_achievement( goal: &AgentGoal, current_state: &str, ) -> AchievementResult
Create a fallback achievement result using heuristic logic (no LLM required)
Auto Trait Implementations§
impl Freeze for LlmPlanner
impl RefUnwindSafe for LlmPlanner
impl Send for LlmPlanner
impl Sync for LlmPlanner
impl Unpin for LlmPlanner
impl UnsafeUnpin for LlmPlanner
impl UnwindSafe for LlmPlanner
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