#[non_exhaustive]pub struct SuggestionDedupingConfig {
pub enable_deduping: bool,
pub similarity_threshold: f32,
/* private fields */
}Available on crate features
conversations or generator-evaluations or generators only.Expand description
Config for suggestion deduping. NEXT_ID: 3
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enable_deduping: boolOptional. Whether to enable suggestion deduping.
similarity_threshold: f32Optional. The threshold for similarity between two suggestions. Acceptable value is [0.0, 1.0], default to 0.8
Implementations§
Source§impl SuggestionDedupingConfig
impl SuggestionDedupingConfig
pub fn new() -> Self
Sourcepub fn set_enable_deduping<T: Into<bool>>(self, v: T) -> Self
pub fn set_enable_deduping<T: Into<bool>>(self, v: T) -> Self
Sets the value of enable_deduping.
§Example
ⓘ
let x = SuggestionDedupingConfig::new().set_enable_deduping(true);Sourcepub fn set_similarity_threshold<T: Into<f32>>(self, v: T) -> Self
pub fn set_similarity_threshold<T: Into<f32>>(self, v: T) -> Self
Sets the value of similarity_threshold.
§Example
ⓘ
let x = SuggestionDedupingConfig::new().set_similarity_threshold(42.0);Trait Implementations§
Source§impl Clone for SuggestionDedupingConfig
impl Clone for SuggestionDedupingConfig
Source§fn clone(&self) -> SuggestionDedupingConfig
fn clone(&self) -> SuggestionDedupingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SuggestionDedupingConfig
impl Debug for SuggestionDedupingConfig
Source§impl Default for SuggestionDedupingConfig
impl Default for SuggestionDedupingConfig
Source§fn default() -> SuggestionDedupingConfig
fn default() -> SuggestionDedupingConfig
Returns the “default value” for a type. Read more
Source§impl Message for SuggestionDedupingConfig
impl Message for SuggestionDedupingConfig
Source§impl PartialEq for SuggestionDedupingConfig
impl PartialEq for SuggestionDedupingConfig
impl StructuralPartialEq for SuggestionDedupingConfig
Auto Trait Implementations§
impl Freeze for SuggestionDedupingConfig
impl RefUnwindSafe for SuggestionDedupingConfig
impl Send for SuggestionDedupingConfig
impl Sync for SuggestionDedupingConfig
impl Unpin for SuggestionDedupingConfig
impl UnsafeUnpin for SuggestionDedupingConfig
impl UnwindSafe for SuggestionDedupingConfig
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