Skip to main content

AutonomyLlm

Trait AutonomyLlm 

Source
pub trait AutonomyLlm {
    // Required methods
    fn auto_tag(&self, title: &str, content: &str) -> Result<Vec<String>>;
    fn detect_contradiction(&self, mem_a: &str, mem_b: &str) -> Result<bool>;
    fn summarize_memories(
        &self,
        memories: &[(String, String)],
    ) -> Result<String>;
}
Expand description

LLM surface the autonomy passes use. Implemented for OllamaClient in prod and stubbed in tests. The auto_tag and detect_contradiction methods are here for completeness — the autonomy passes themselves currently only call summarize_memories, but exposing the three together keeps the trait a single, testable LLM boundary that the curator’s run_once path can switch to in a follow-up PR.

Required Methods§

Source

fn auto_tag(&self, title: &str, content: &str) -> Result<Vec<String>>

Generate tags for a memory.

Source

fn detect_contradiction(&self, mem_a: &str, mem_b: &str) -> Result<bool>

Return true iff the two pieces of content contradict each other.

Source

fn summarize_memories(&self, memories: &[(String, String)]) -> Result<String>

Produce a consolidated summary of N memories.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§