pub struct LocalSummarizerBuilder { /* private fields */ }Expand description
Builder for LocalSummarizer
Implementations§
Source§impl LocalSummarizerBuilder
impl LocalSummarizerBuilder
Sourcepub fn provider(self, provider: Arc<dyn Provider>) -> Self
pub fn provider(self, provider: Arc<dyn Provider>) -> Self
Set the provider to use for summarization.
Sourcepub fn model_id(self, model_id: impl Into<String>) -> Self
pub fn model_id(self, model_id: impl Into<String>) -> Self
Set the model ID to use for inference.
Sourcepub fn max_summary_tokens(self, tokens: u32) -> Self
pub fn max_summary_tokens(self, tokens: u32) -> Self
Set the maximum number of tokens for summary output.
Sourcepub fn max_facts(self, facts: usize) -> Self
pub fn max_facts(self, facts: usize) -> Self
Set the maximum number of facts to extract per summary.
Sourcepub fn build(self) -> Option<LocalSummarizer>
pub fn build(self) -> Option<LocalSummarizer>
Build the summarizer, returning None if no provider was set.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LocalSummarizerBuilder
impl !RefUnwindSafe for LocalSummarizerBuilder
impl Send for LocalSummarizerBuilder
impl Sync for LocalSummarizerBuilder
impl Unpin for LocalSummarizerBuilder
impl UnsafeUnpin for LocalSummarizerBuilder
impl !UnwindSafe for LocalSummarizerBuilder
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