pub struct RerankingExecutor { /* private fields */ }Expand description
Reranker 执行器
Implementations§
Source§impl RerankingExecutor
impl RerankingExecutor
pub fn new(reranker: Box<dyn Reranker>) -> Self
pub fn with_config(self, config: RerankingConfig) -> Self
pub fn with_top_n(self, n: usize) -> Self
pub fn with_min_score(self, score: f32) -> Self
pub fn with_preserve_original_score(self, preserve: bool) -> Self
pub fn rerank( &self, query: &str, results: Vec<SearchResult>, ) -> Result<Vec<SearchResult>, RerankingError>
pub fn rerank_documents( &self, query: &str, documents: Vec<Document>, ) -> Result<Vec<SearchResult>, RerankingError>
Auto Trait Implementations§
impl !RefUnwindSafe for RerankingExecutor
impl !UnwindSafe for RerankingExecutor
impl Freeze for RerankingExecutor
impl Send for RerankingExecutor
impl Sync for RerankingExecutor
impl Unpin for RerankingExecutor
impl UnsafeUnpin for RerankingExecutor
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