pub struct EnhancedEntity {
pub name: String,
pub entity_type: SemanticEntityType,
pub confidence: f32,
pub context: Option<String>,
}Expand description
An entity extracted by LLM
Fields§
§name: StringEntity name/value
entity_type: SemanticEntityTypeSemantic type
confidence: f32Confidence score (0.0-1.0)
context: Option<String>Context where found
Implementations§
Source§impl EnhancedEntity
impl EnhancedEntity
Sourcepub fn new(
name: String,
entity_type: SemanticEntityType,
confidence: f32,
) -> Self
pub fn new( name: String, entity_type: SemanticEntityType, confidence: f32, ) -> Self
Create a new enhanced entity with the given name, type, and confidence.
Sourcepub fn with_context(self, context: String) -> Self
pub fn with_context(self, context: String) -> Self
Attach contextual information describing where the entity was found.
Trait Implementations§
Source§impl Clone for EnhancedEntity
impl Clone for EnhancedEntity
Source§fn clone(&self) -> EnhancedEntity
fn clone(&self) -> EnhancedEntity
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 moreAuto Trait Implementations§
impl Freeze for EnhancedEntity
impl RefUnwindSafe for EnhancedEntity
impl Send for EnhancedEntity
impl Sync for EnhancedEntity
impl Unpin for EnhancedEntity
impl UnsafeUnpin for EnhancedEntity
impl UnwindSafe for EnhancedEntity
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