pub struct EntityEnhancerBuilder { /* private fields */ }Expand description
Builder for EntityEnhancer
Implementations§
Source§impl EntityEnhancerBuilder
impl EntityEnhancerBuilder
Sourcepub fn provider(self, provider: Arc<dyn Provider>) -> Self
pub fn provider(self, provider: Arc<dyn Provider>) -> Self
Set the provider to use for entity extraction.
Sourcepub fn model_id(self, model_id: impl Into<String>) -> Self
pub fn model_id(self, model_id: impl Into<String>) -> Self
Set the model ID to use for inference.
Sourcepub fn min_confidence(self, confidence: f32) -> Self
pub fn min_confidence(self, confidence: f32) -> Self
Set the minimum confidence threshold for extracted entities.
Sourcepub fn max_entities(self, max: usize) -> Self
pub fn max_entities(self, max: usize) -> Self
Set the maximum number of entities to extract per call.
Sourcepub fn build(self) -> Option<EntityEnhancer>
pub fn build(self) -> Option<EntityEnhancer>
Build the entity enhancer, returning None if no provider was set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EntityEnhancerBuilder
impl !RefUnwindSafe for EntityEnhancerBuilder
impl Send for EntityEnhancerBuilder
impl Sync for EntityEnhancerBuilder
impl Unpin for EntityEnhancerBuilder
impl UnsafeUnpin for EntityEnhancerBuilder
impl !UnwindSafe for EntityEnhancerBuilder
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