pub struct ExtractionConfig {
pub trigger: Option<Vec<Arc<dyn ExtractionTrigger>>>,
pub extractor: Option<Arc<dyn Extractor>>,
pub filter: Option<MemoryMessageFilter>,
}Expand description
A store’s automatic-extraction configuration (ExtractionConfig).
Fields§
§trigger: Option<Vec<Arc<dyn ExtractionTrigger>>>When extraction runs; it runs whenever any trigger fires. None is every 5 turns; an
empty list is rejected by the manager.
extractor: Option<Arc<dyn Extractor>>How messages become entries (client-side; the store must implement add). None hands
the raw messages to add_messages when the store implements it, and otherwise uses a
ModelExtractor.
filter: Option<MemoryMessageFilter>Block kinds to strip first. Defaults to MemoryMessageFilter::default.
Implementations§
Source§impl ExtractionConfig
impl ExtractionConfig
Sourcepub fn builder() -> ExtractionConfigBuilder
pub fn builder() -> ExtractionConfigBuilder
Create an instance of ExtractionConfig using the builder syntax
Source§impl ExtractionConfig
impl ExtractionConfig
Sourcepub fn with_trigger(
self,
triggers: impl IntoIterator<Item = Arc<dyn ExtractionTrigger>>,
) -> Self
pub fn with_trigger( self, triggers: impl IntoIterator<Item = Arc<dyn ExtractionTrigger>>, ) -> Self
Sets the triggers.
Sourcepub fn with_extractor(self, extractor: Arc<dyn Extractor>) -> Self
pub fn with_extractor(self, extractor: Arc<dyn Extractor>) -> Self
Sets the extractor.
Sourcepub fn with_filter(self, filter: MemoryMessageFilter) -> Self
pub fn with_filter(self, filter: MemoryMessageFilter) -> Self
Sets the filter.
Trait Implementations§
Source§impl Clone for ExtractionConfig
impl Clone for ExtractionConfig
Source§impl Debug for ExtractionConfig
impl Debug for ExtractionConfig
Source§impl Default for ExtractionConfig
impl Default for ExtractionConfig
Source§impl From<ExtractionConfig> for Toggle<ExtractionConfig>
impl From<ExtractionConfig> for Toggle<ExtractionConfig>
Source§fn from(config: ExtractionConfig) -> Self
fn from(config: ExtractionConfig) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for ExtractionConfig
impl !UnwindSafe for ExtractionConfig
impl Freeze for ExtractionConfig
impl Send for ExtractionConfig
impl Sync for ExtractionConfig
impl Unpin for ExtractionConfig
impl UnsafeUnpin for ExtractionConfig
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.