pub struct TranscriptView { /* private fields */ }Expand description
The transcript as a ModelProvider: wraps inner, rewrites every
request’s messages through the stepped view, and refreshes the
shared mirror first. A configured Summarizer upgrades the new
sections’ stand-ins in a background task after the request went
out — never inside it, never under the mirror’s lock, so a slow or
failing worker delays nothing.
Implementations§
Source§impl TranscriptView
impl TranscriptView
Sourcepub fn new(
inner: Arc<dyn ModelProvider>,
transcript: Arc<Mutex<Transcript>>,
) -> Self
pub fn new( inner: Arc<dyn ModelProvider>, transcript: Arc<Mutex<Transcript>>, ) -> Self
The wrapper over inner, mirroring into transcript — the same
mirror a crate::zoom::Zoom resolver reads. Build both from
one mirror, or let crate::attach do it. No summarizer: new
sections keep their extractive stand-ins.
Sourcepub fn with_summarizer(
inner: Arc<dyn ModelProvider>,
transcript: Arc<Mutex<Transcript>>,
summarizer: Arc<dyn Summarizer>,
) -> Self
pub fn with_summarizer( inner: Arc<dyn ModelProvider>, transcript: Arc<Mutex<Transcript>>, summarizer: Arc<dyn Summarizer>, ) -> Self
The wrapper with a summarizer for the model fill of new
sections. The fill runs in tokio tasks: calling Self::complete
with a summarizer requires a running runtime.
Trait Implementations§
Source§impl Debug for TranscriptView
impl Debug for TranscriptView
Source§impl ModelProvider for TranscriptView
impl ModelProvider for TranscriptView
Source§fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
req: ModelRequest,
sink: &'life1 mut dyn EventSink,
) -> Pin<Box<dyn Future<Output = Result<ModelOutput, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn complete<'life0, 'life1, 'async_trait>(
&'life0 self,
req: ModelRequest,
sink: &'life1 mut dyn EventSink,
) -> Pin<Box<dyn Future<Output = Result<ModelOutput, ProviderError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Stream deltas to
sink; return the assembled final output.Auto Trait Implementations§
impl !RefUnwindSafe for TranscriptView
impl !UnwindSafe for TranscriptView
impl Forget for TranscriptView
impl Freeze for TranscriptView
impl Send for TranscriptView
impl Sync for TranscriptView
impl Unpin for TranscriptView
impl UnsafeUnpin for TranscriptView
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