#[non_exhaustive]pub enum CompactionError {
NotEnoughHistory,
SummarizationFailed(String),
}Expand description
Failure surface of CompactionStrategy::compact (and therefore of
History::compact_if_needed).
The façade Conversation::run /
Conversation::stream wraps this in
EngineError::Context when compaction
fails mid-run.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NotEnoughHistory
History has fewer messages than preserve_n_last, so there is
nothing the strategy can drop. Indicates a configuration bug
rather than a transient failure: raise the budget or lower
HistoryBuilder::preserve_n_last.
SummarizationFailed(String)
A strategy that calls a ailoop_core::CompletionModel
(notably SummarizeStrategy)
failed to produce a summary. The original error is rendered
as a string to keep CompactionError a non-generic,
object-safe enum usable behind Box<dyn CompactionStrategy>.
Trait Implementations§
Source§impl Debug for CompactionError
impl Debug for CompactionError
Source§impl Display for CompactionError
impl Display for CompactionError
Source§impl Error for CompactionError
impl Error for CompactionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CompactionError
impl RefUnwindSafe for CompactionError
impl Send for CompactionError
impl Sync for CompactionError
impl Unpin for CompactionError
impl UnsafeUnpin for CompactionError
impl UnwindSafe for CompactionError
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