Struct GenOptions
pub struct GenOptions {
pub body_rx: RegexAst,
pub stop_rx: RegexAst,
pub stop_capture_name: Option<String>,
pub lazy: Option<bool>,
pub is_suffix: Option<bool>,
pub temperature: Option<f32>,
}
Fields§
§body_rx: RegexAst
Regular expression matching the body of generation.
stop_rx: RegexAst
The whole generation must match body_rx + stop_rx
.
Whatever matched stop_rx
is discarded.
If stop_rx
is empty, it’s assumed to be EOS.
stop_capture_name: Option<String>
When set, the string matching stop_rx
will be output as a capture
with the given name.
lazy: Option<bool>
Lazy gen()s take the shortest match. Non-lazy take the longest. If not specified, the gen() is lazy if stop_rx is non-empty.
is_suffix: Option<bool>
Treat stop_rx as suffix, i.e., do not hide it from the LLM (but do not include it in the capture).
temperature: Option<f32>
Override sampling temperature.
Trait Implementations§
§impl Clone for GenOptions
impl Clone for GenOptions
§fn clone(&self) -> GenOptions
fn clone(&self) -> GenOptions
Returns a copy of the value. Read more
1.0.0 · 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 GenOptions
impl RefUnwindSafe for GenOptions
impl Send for GenOptions
impl Sync for GenOptions
impl Unpin for GenOptions
impl UnwindSafe for GenOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: AsAny + ?Sized,
impl<T> Downcast for Twhere
T: AsAny + ?Sized,
§fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
fn downcast_ref<T>(&self) -> Option<&T>where
T: AsAny,
Forward to the method defined on the type
Any
.§fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
fn downcast_mut<T>(&mut self) -> Option<&mut T>where
T: AsAny,
Forward to the method defined on the type
Any
.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more