pub trait IntentClassifier:
Send
+ Sync
+ Debug {
// Required method
fn classify<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
context: &'life2 [String],
registry: &'life3 SkillRegistry,
) -> Pin<Box<dyn Future<Output = Result<ClassificationResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
// Provided method
fn rebuild_index<'life0, 'life1, 'async_trait>(
&'life0 self,
registry: &'life1 SkillRegistry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
}Expand description
Trait for intent classifiers.
Implementations should classify a query and return ranked intent scores.
Required Methods§
Sourcefn classify<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
context: &'life2 [String],
registry: &'life3 SkillRegistry,
) -> Pin<Box<dyn Future<Output = Result<ClassificationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn classify<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
query: &'life1 str,
context: &'life2 [String],
registry: &'life3 SkillRegistry,
) -> Pin<Box<dyn Future<Output = Result<ClassificationResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Provided Methods§
Sourcefn rebuild_index<'life0, 'life1, 'async_trait>(
&'life0 self,
registry: &'life1 SkillRegistry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn rebuild_index<'life0, 'life1, 'async_trait>(
&'life0 self,
registry: &'life1 SkillRegistry,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Rebuilds any internal indices (e.g., TF-IDF vocabulary). Called when skills are added/removed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".