pub struct Planner { /* private fields */ }Expand description
Proposal scorer and ranker.
Implementations§
Source§impl Planner
impl Planner
pub fn new(config: PlannerConfig) -> Planner
Sourcepub fn score(
&self,
proposal: &ActionProposal,
initial_state: Option<&HashMap<String, Value>>,
registered_tools: Option<&HashSet<String>>,
) -> ScoredProposal
pub fn score( &self, proposal: &ActionProposal, initial_state: Option<&HashMap<String, Value>>, registered_tools: Option<&HashSet<String>>, ) -> ScoredProposal
Score a single proposal using static verification.
Sourcepub fn rank(
&self,
candidates: &[ActionProposal],
initial_state: Option<&HashMap<String, Value>>,
registered_tools: Option<&HashSet<String>>,
) -> Vec<ScoredProposal>
pub fn rank( &self, candidates: &[ActionProposal], initial_state: Option<&HashMap<String, Value>>, registered_tools: Option<&HashSet<String>>, ) -> Vec<ScoredProposal>
Rank multiple candidate proposals. Returns scored proposals sorted by score descending (best first).
Sourcepub fn rank_with_feedback(
&self,
candidates: &[ActionProposal],
initial_state: Option<&HashMap<String, Value>>,
registered_tools: Option<&HashSet<String>>,
feedback: Option<&ToolFeedback>,
) -> Vec<ScoredProposal>
pub fn rank_with_feedback( &self, candidates: &[ActionProposal], initial_state: Option<&HashMap<String, Value>>, registered_tools: Option<&HashSet<String>>, feedback: Option<&ToolFeedback>, ) -> Vec<ScoredProposal>
Rank with historical tool feedback from trajectory store.
Auto Trait Implementations§
impl Freeze for Planner
impl RefUnwindSafe for Planner
impl Send for Planner
impl Sync for Planner
impl Unpin for Planner
impl UnsafeUnpin for Planner
impl UnwindSafe for Planner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more