pub struct RerankingConfig {
pub top_n: usize,
pub min_score: Option<f32>,
pub preserve_original_score: bool,
}Expand description
Reranking configuration
Fields§
§top_n: usizeNumber of documents returned in the final result
min_score: Option<f32>Minimum score threshold (optional)
preserve_original_score: boolWhether to preserve the original score
Implementations§
Source§impl RerankingConfig
impl RerankingConfig
Sourcepub fn with_top_n(self, n: usize) -> Self
pub fn with_top_n(self, n: usize) -> Self
Sets the number of documents returned in the final result
Sourcepub fn with_min_score(self, score: f32) -> Self
pub fn with_min_score(self, score: f32) -> Self
Sets the minimum score threshold
Sourcepub fn with_preserve_original_score(self, preserve: bool) -> Self
pub fn with_preserve_original_score(self, preserve: bool) -> Self
Sets whether to preserve the original score
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RerankingConfig
impl RefUnwindSafe for RerankingConfig
impl Send for RerankingConfig
impl Sync for RerankingConfig
impl Unpin for RerankingConfig
impl UnsafeUnpin for RerankingConfig
impl UnwindSafe for RerankingConfig
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