pub struct TestGenerator { /* private fields */ }Available on crate feature
eval only.Expand description
Generates evaluation test cases from descriptions or event logs.
Implementations§
Source§impl TestGenerator
impl TestGenerator
Sourcepub fn new(model: Arc<dyn Llm>) -> TestGenerator
pub fn new(model: Arc<dyn Llm>) -> TestGenerator
Creates a new test generator with default configuration.
Sourcepub fn with_config(
model: Arc<dyn Llm>,
config: GeneratorConfig,
) -> TestGenerator
pub fn with_config( model: Arc<dyn Llm>, config: GeneratorConfig, ) -> TestGenerator
Creates a new test generator with custom configuration.
Sourcepub async fn generate_from_description(
&self,
description: &str,
) -> Result<Vec<EvalCase>, EvalError>
pub async fn generate_from_description( &self, description: &str, ) -> Result<Vec<EvalCase>, EvalError>
Generate eval cases from a natural language description.
Prompts the LLM to produce eval case definitions as JSON. On parse failure for any individual case, a warning is logged and that case is skipped without aborting the batch.
Auto Trait Implementations§
impl !RefUnwindSafe for TestGenerator
impl !UnwindSafe for TestGenerator
impl Freeze for TestGenerator
impl Send for TestGenerator
impl Sync for TestGenerator
impl Unpin for TestGenerator
impl UnsafeUnpin for TestGenerator
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