pub struct StopPolicy {
pub max_attempts: u32,
pub max_total_tokens: Option<u64>,
pub stop_on_failed_verdict: bool,
}Fields§
§max_attempts: u32§max_total_tokens: Option<u64>§stop_on_failed_verdict: boolImplementations§
Source§impl StopPolicy
impl StopPolicy
pub fn new(max_attempts: u32) -> Self
pub fn max_total_tokens(self, limit: u64) -> Self
pub fn stop_on_failed_verdict(self, enabled: bool) -> Self
Trait Implementations§
Source§impl Clone for StopPolicy
impl Clone for StopPolicy
Source§fn clone(&self) -> StopPolicy
fn clone(&self) -> StopPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 StopPolicy
impl RefUnwindSafe for StopPolicy
impl Send for StopPolicy
impl Sync for StopPolicy
impl Unpin for StopPolicy
impl UnsafeUnpin for StopPolicy
impl UnwindSafe for StopPolicy
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