pub struct HallucinationDetector { /* private fields */ }
Implementations§
Source§impl HallucinationDetector
impl HallucinationDetector
pub fn new(options: HallucinationOptions) -> Result<Self, Box<dyn Error>>
pub async fn detect_hallucinations( &self, llm_output: &String, references: &[String], ) -> Result<HallucinationScore, DetectorError>
Trait Implementations§
Source§impl Clone for HallucinationDetector
impl Clone for HallucinationDetector
Source§fn clone(&self) -> HallucinationDetector
fn clone(&self) -> HallucinationDetector
Returns a copy 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 HallucinationDetector
impl RefUnwindSafe for HallucinationDetector
impl Send for HallucinationDetector
impl Sync for HallucinationDetector
impl Unpin for HallucinationDetector
impl UnwindSafe for HallucinationDetector
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