Skip to main content

MessageLog

Trait MessageLog 

Source
pub trait MessageLog: Send + Sync {
    // Required methods
    fn message_bounds<'life0, 'life1, 'async_trait>(
        &'life0 self,
        session_id: &'life1 str,
        start: DateTime<Utc>,
        end: DateTime<Utc>,
    ) -> Pin<Box<dyn Future<Output = Result<(Option<i64>, Option<i64>)>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn retained<'life0, 'life1, 'async_trait>(
        &'life0 self,
        ids: &'life1 [i64],
    ) -> Pin<Box<dyn Future<Output = Result<HashSet<i64>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}
Expand description

The host’s message log, as the memory store links into it: episodes record the messages they cover, and indexed messages are dropped once the host no longer keeps them. Memory never reads the host’s tables itself.

Required Methods§

Source

fn message_bounds<'life0, 'life1, 'async_trait>( &'life0 self, session_id: &'life1 str, start: DateTime<Utc>, end: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<(Option<i64>, Option<i64>)>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

The first and last user or assistant message of session_id from start to end, both inclusive.

Source

fn retained<'life0, 'life1, 'async_trait>( &'life0 self, ids: &'life1 [i64], ) -> Pin<Box<dyn Future<Output = Result<HashSet<i64>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Which of ids the host still keeps.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl MessageLog for TranscriptLog

Episodes record the turns they cover by id.