#[non_exhaustive]pub struct NullConversationManager;Expand description
Leaves the history alone (NullConversationManager): reduce always returns false, so a
context-window overflow leaves the agent loop. Stateful models use it, since the provider
keeps the history.
Implementations§
Trait Implementations§
Source§impl Clone for NullConversationManager
impl Clone for NullConversationManager
Source§impl ConversationManager for NullConversationManager
impl ConversationManager for NullConversationManager
Source§fn reduce<'life0, 'life1, 'async_trait>(
&'life0 self,
_options: ConversationManagerReduceOptions<'life1>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reduce<'life0, 'life1, 'async_trait>(
&'life0 self,
_options: ConversationManagerReduceOptions<'life1>,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reduces the history and returns whether it changed (
reduce). Read moreSource§fn compression_threshold(&self) -> Option<f64>
fn compression_threshold(&self) -> Option<f64>
The proactive compression threshold, or
None when only overflow recovery runs: the
ratio of the context window, in (0, 1], at which a model call reduces first. The agent
checks it when the manager is initialized and fails otherwise.Source§fn init_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
_agent: &'life1 mut LocalAgent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn init_agent<'life0, 'life1, 'async_trait>(
&'life0 self,
_agent: &'life1 mut LocalAgent,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Registers the strategy’s own hooks, after the overflow and compression hooks. Read more
impl Copy for NullConversationManager
Source§impl Debug for NullConversationManager
impl Debug for NullConversationManager
Auto Trait Implementations§
impl Forget for NullConversationManager
impl Freeze for NullConversationManager
impl Move for NullConversationManager
impl RefUnwindSafe for NullConversationManager
impl Send for NullConversationManager
impl Sync for NullConversationManager
impl Unpin for NullConversationManager
impl UnsafeUnpin for NullConversationManager
impl UnwindSafe for NullConversationManager
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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 moreCreates a shared type from an unshared type.