struct Active<'a> {Show 13 fields
prepared: PreparedRequest,
phase: Phase,
checkpoint: Option<PrefixState>,
reservation: usize,
ticket: Arc<Ticket>,
session: Option<Turn>,
output: Output,
text_decoder: Box<dyn FnMut(u32) -> Result<Option<String>> + 'a>,
text: GeneratedText,
usage: UsageStats,
config_generation: u64,
response_bytes: usize,
last_chunk: Option<(usize, f64)>,
}Fields§
§prepared: PreparedRequest§phase: Phase§checkpoint: Option<PrefixState>§reservation: usize§ticket: Arc<Ticket>§session: Option<Turn>§output: Output§text_decoder: Box<dyn FnMut(u32) -> Result<Option<String>> + 'a>§text: GeneratedText§usage: UsageStats§config_generation: u64§response_bytes: usize§last_chunk: Option<(usize, f64)>Tokens and elapsed seconds from the last step, if eligible for pacing.
Implementations§
Source§impl Active<'_>
impl Active<'_>
fn stats(&self) -> ActiveRequest
fn phase_name(&self) -> &'static str
fn generated(&self) -> &[u32]
Sourcefn report(&self, gpu: &Gpu<'_>)
fn report(&self, gpu: &Gpu<'_>)
Per-request throughput and context/KV-cache fullness, reported to the server console when the request completes.
fn step( &mut self, gpu: &mut Gpu<'_>, cache: &mut PrefixCache, tok: &ChatTokenizer, state: &State, quantum: usize, ) -> Result<bool>
fn finish(self, tok: &ChatTokenizer) -> Result<()>
fn finish_response(&mut self, tok: &ChatTokenizer) -> Result<()>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Active<'a>
impl<'a> !Send for Active<'a>
impl<'a> !Sync for Active<'a>
impl<'a> !UnwindSafe for Active<'a>
impl<'a> Freeze for Active<'a>
impl<'a> Unpin for Active<'a>
impl<'a> UnsafeUnpin for Active<'a>
Blanket Implementations§
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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
impl<T> ErasedDestructor for Twhere
T: 'static,
§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
§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