pub struct MemoryInjectionConfig {
pub trigger: Option<InjectionTrigger>,
pub max_entries: Option<usize>,
pub query: Option<MemoryQuery>,
pub format: Option<MemoryFormat>,
}Expand description
Memory context injection (MemoryInjectionConfig): before a model call the manager searches
memory and folds the top results into that call’s input only; they never enter the stored
conversation or session.
Fields§
§trigger: Option<InjectionTrigger>When injection runs. Defaults to InjectionTrigger::UserTurn.
max_entries: Option<usize>Maximum number of entries retrieved and injected per call. Defaults to 5. With several stores the results are concatenated in store order, with no cross-store ranking.
query: Option<MemoryQuery>Derives the query. Defaults to the latest user message’s text on a user turn, otherwise the most recent assistant message’s text.
format: Option<MemoryFormat>Renders the entries. Defaults to a <memory> block with one escaped
<entry source="STORE"> per result.
Implementations§
Source§impl MemoryInjectionConfig
impl MemoryInjectionConfig
Sourcepub fn builder() -> MemoryInjectionConfigBuilder
pub fn builder() -> MemoryInjectionConfigBuilder
Create an instance of MemoryInjectionConfig using the builder syntax
Trait Implementations§
Source§impl Clone for MemoryInjectionConfig
impl Clone for MemoryInjectionConfig
Source§impl Debug for MemoryInjectionConfig
impl Debug for MemoryInjectionConfig
Source§impl Default for MemoryInjectionConfig
impl Default for MemoryInjectionConfig
Source§impl From<MemoryInjectionConfig> for Toggle<MemoryInjectionConfig>
impl From<MemoryInjectionConfig> for Toggle<MemoryInjectionConfig>
Source§fn from(config: MemoryInjectionConfig) -> Self
fn from(config: MemoryInjectionConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryInjectionConfig
impl !UnwindSafe for MemoryInjectionConfig
impl Freeze for MemoryInjectionConfig
impl Send for MemoryInjectionConfig
impl Sync for MemoryInjectionConfig
impl Unpin for MemoryInjectionConfig
impl UnsafeUnpin for MemoryInjectionConfig
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,
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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.