pub struct TextContext {
pub seq_len: usize,
pub batch_size: usize,
pub vocab_id_max: usize,
pub max_token_id_seen: usize,
}Expand description
Context fields a text request typically carries.
Fields§
§seq_len: usize§batch_size: usize§vocab_id_max: usize§max_token_id_seen: usizeTrait Implementations§
Source§impl Clone for TextContext
impl Clone for TextContext
Source§fn clone(&self) -> TextContext
fn clone(&self) -> TextContext
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 moreSource§impl Debug for TextContext
impl Debug for TextContext
Source§impl Validator<TextContext> for MaxBatchSize
impl Validator<TextContext> for MaxBatchSize
fn check(&self, ctx: &TextContext) -> ValidationResult
fn name(&self) -> &'static str
Source§impl Validator<TextContext> for MaxSeqLen
impl Validator<TextContext> for MaxSeqLen
fn check(&self, ctx: &TextContext) -> ValidationResult
fn name(&self) -> &'static str
Source§impl Validator<TextContext> for TokenIdsInVocab
impl Validator<TextContext> for TokenIdsInVocab
fn check(&self, ctx: &TextContext) -> ValidationResult
fn name(&self) -> &'static str
Auto Trait Implementations§
impl Freeze for TextContext
impl RefUnwindSafe for TextContext
impl Send for TextContext
impl Sync for TextContext
impl Unpin for TextContext
impl UnsafeUnpin for TextContext
impl UnwindSafe for TextContext
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,
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