extern crate hallucination_detection; use csv::WriterBuilder; use hallucination_detection::HallucinationDetector; use serde::{Deserialize, Serialize}; use std::collections::HashSet; use std::error::Error; use std::io::{BufRead, BufReader}; use std::path::Path; #[derive(Debug, Deserialize)] #[allow(dead_code)] struct SourceInfo { source_id: String, task_type: String, source: String, source_info: String, prompt: String, } #[derive(Debug, Deserialize)] #[allow(dead_code)] struct Label { start: usize, end: usize, text: String, meta: String, label_type: String, implicit_true: bool, due_to_null: bool, } #[derive(Debug, Deserialize)] #[allow(dead_code)] struct ResponseData { id: String, source_id: String, model: String, temperature: f64, labels: Vec