pub struct Simulation { /* private fields */ }Expand description
Runs goals against a harness, each manner of each goal samples times.
Implementations§
Source§impl Simulation
impl Simulation
Sourcepub const fn with_samples(self, samples: u32) -> Self
pub const fn with_samples(self, samples: u32) -> Self
Holds each conversation samples times.
Sourcepub const fn with_concurrency(self, concurrency: usize) -> Self
pub const fn with_concurrency(self, concurrency: usize) -> Self
Holds at most concurrency conversations at once; the report’s order is kept.
Sourcepub async fn run(
&self,
goals: &[Goal],
harness: &dyn EvalHarness,
user: &dyn SimulatedUser,
) -> SimulationReport
pub async fn run( &self, goals: &[Goal], harness: &dyn EvalHarness, user: &dyn SimulatedUser, ) -> SimulationReport
Holds every conversation and reports them.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Simulation
impl RefUnwindSafe for Simulation
impl Send for Simulation
impl Sync for Simulation
impl Unpin for Simulation
impl UnsafeUnpin for Simulation
impl UnwindSafe for Simulation
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