pub trait Reranker: Send + Sync {
// Required methods
fn rerank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
documents: &'life2 [RerankDocument],
) -> Pin<Box<dyn Future<Output = Result<Vec<RerankResult>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn model_name(&self) -> &str;
}Expand description
Document reranking trait
Required Methods§
Sourcefn rerank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
documents: &'life2 [RerankDocument],
) -> Pin<Box<dyn Future<Output = Result<Vec<RerankResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn rerank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
query: &'life1 str,
documents: &'life2 [RerankDocument],
) -> Pin<Box<dyn Future<Output = Result<Vec<RerankResult>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Rerank documents for a query
Sourcefn model_name(&self) -> &str
fn model_name(&self) -> &str
Get model name