Skip to main content

MemoryExtractionService

Struct MemoryExtractionService 

Source
pub struct MemoryExtractionService { /* private fields */ }
Expand description

Memory Extraction Service.

Coordinates LLM-based memory extraction and storage via SanctumPort. Depends only on port traits — contains no concrete adapter references.

Implementations§

Source§

impl MemoryExtractionService

Source

pub fn new( llm: Arc<dyn LlmPort>, embedding: Arc<dyn EmbeddingPort>, sanctum: Arc<dyn SanctumPort>, ) -> Self

Create a new memory extraction service.

Source

pub async fn extract_memories( &self, paladin_id: &str, conversation: &[GarrisonEntry], ) -> Result<Vec<SanctumEntry>, SanctumError>

Extract memories from conversation history.

Analyzes the conversation, extracts important information, and stores it in long-term memory (Sanctum) for later retrieval.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.