pub struct LLMEvaluator { /* private fields */ }
Expand description
Evaluator for comparing responses from multiple LLM providers
Implementations§
Source§impl LLMEvaluator
impl LLMEvaluator
Sourcepub fn new(llms: Vec<Box<dyn LLMProvider>>) -> Self
pub fn new(llms: Vec<Box<dyn LLMProvider>>) -> Self
Creates a new evaluator with the given LLM providers
§Arguments
llms
- Vector of LLM providers to evaluate
Sourcepub fn scoring<F>(self, f: F) -> Self
pub fn scoring<F>(self, f: F) -> Self
Adds a scoring function to evaluate LLM responses
§Arguments
f
- Function that takes a response string and returns a score
Sourcepub async fn evaluate_chat(
&self,
messages: &[ChatMessage],
) -> Result<Vec<EvalResult>, LLMError>
pub async fn evaluate_chat( &self, messages: &[ChatMessage], ) -> Result<Vec<EvalResult>, LLMError>
Auto Trait Implementations§
impl Freeze for LLMEvaluator
impl !RefUnwindSafe for LLMEvaluator
impl Send for LLMEvaluator
impl Sync for LLMEvaluator
impl Unpin for LLMEvaluator
impl !UnwindSafe for LLMEvaluator
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