Skip to main content

ToolOutputArchive

Trait ToolOutputArchive 

Source
pub trait ToolOutputArchive: Send + Sync {
    // Required method
    fn archive<'a>(
        &'a self,
        to_compact: &'a [Message],
    ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'a>>;
}
Expand description

Pre-summary tool-output archiving hook (Memex #2432).

The service calls archive(to_compact) BEFORE summarization. The returned reference strings are appended as a postfix AFTER the LLM summary to prevent the LLM from destroying the [archived:UUID] markers.

Required Methods§

Source

fn archive<'a>( &'a self, to_compact: &'a [Message], ) -> Pin<Box<dyn Future<Output = Vec<String>> + Send + 'a>>

Archive tool output bodies from to_compact and return reference strings.

Returns an empty Vec when archiving is disabled or no bodies are archived.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§