pub struct SkillRouter { /* private fields */ }Implementations§
Source§impl SkillRouter
impl SkillRouter
pub fn new( llm: Arc<dyn LLMProvider>, skills: Vec<SkillDefinition>, ) -> SkillRouter
pub fn with_skills(self, skills: Vec<SkillDefinition>) -> SkillRouter
pub fn add_skill(&mut self, skill: SkillDefinition)
pub fn skills(&self) -> &[SkillDefinition]
pub async fn select_skill( &self, user_input: &str, ) -> Result<Option<String>, AgentError>
pub fn get_skill(&self, id: &str) -> Option<&SkillDefinition>
Sourcepub async fn select_skill_filtered(
&self,
user_input: &str,
allowed_skill_ids: &[&str],
) -> Result<Option<String>, AgentError>
pub async fn select_skill_filtered( &self, user_input: &str, allowed_skill_ids: &[&str], ) -> Result<Option<String>, AgentError>
Select a skill from a filtered subset of available skills
Auto Trait Implementations§
impl Freeze for SkillRouter
impl !RefUnwindSafe for SkillRouter
impl Send for SkillRouter
impl Sync for SkillRouter
impl Unpin for SkillRouter
impl UnsafeUnpin for SkillRouter
impl !UnwindSafe for SkillRouter
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 moreCreates a shared type from an unshared type.