pub struct PreparedText {
pub token_ids: Vec<u32>,
pub normalization_trace: NormalizationTrace,
}Expand description
Token ids and a caller-owned trace returned by a model-specific text preparer.
Fields§
§token_ids: Vec<u32>Token ids the model will consume.
normalization_trace: NormalizationTraceDetailed normalization record, retained only in request-local memory.
Implementations§
Source§impl PreparedText
impl PreparedText
Sourcepub fn new(token_ids: Vec<u32>, normalization_trace: NormalizationTrace) -> Self
pub fn new(token_ids: Vec<u32>, normalization_trace: NormalizationTrace) -> Self
Constructs a prepared text payload from model-specific tokenization.
Trait Implementations§
Source§impl Clone for PreparedText
impl Clone for PreparedText
Source§fn clone(&self) -> PreparedText
fn clone(&self) -> PreparedText
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 PreparedText
impl Debug for PreparedText
impl Eq for PreparedText
Source§impl PartialEq for PreparedText
impl PartialEq for PreparedText
impl StructuralPartialEq for PreparedText
Auto Trait Implementations§
impl Freeze for PreparedText
impl RefUnwindSafe for PreparedText
impl Send for PreparedText
impl Sync for PreparedText
impl Unpin for PreparedText
impl UnsafeUnpin for PreparedText
impl UnwindSafe for PreparedText
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).