pub struct CompactionConfigBuilder { /* private fields */ }Expand description
Builder for CompactionConfig.
Implementations§
Source§impl CompactionConfigBuilder
impl CompactionConfigBuilder
Sourcepub fn threshold_ratio(self, value: f32) -> Self
pub fn threshold_ratio(self, value: f32) -> Self
Threshold ratio of context window to trigger compaction
Sourcepub fn model<VALUE: Into<String>>(self, value: VALUE) -> Self
pub fn model<VALUE: Into<String>>(self, value: VALUE) -> Self
Model to use for generating summaries
Sourcepub fn summary_prompt(self, value: String) -> Self
pub fn summary_prompt(self, value: String) -> Self
Custom summary prompt
Sourcepub fn build(self) -> Result<CompactionConfig, CompactionConfigBuilderError>
pub fn build(self) -> Result<CompactionConfig, CompactionConfigBuilderError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CompactionConfigBuilder
impl RefUnwindSafe for CompactionConfigBuilder
impl Send for CompactionConfigBuilder
impl Sync for CompactionConfigBuilder
impl Unpin for CompactionConfigBuilder
impl UnsafeUnpin for CompactionConfigBuilder
impl UnwindSafe for CompactionConfigBuilder
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