foxloom 0.2.1

Hybrid memory layer with mem0-style semantics on top of foxstash-core
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use serde_json::Value;

use crate::MemoryRecord;

pub trait FoxstashAdapter: Send + Sync {
    fn upsert_embedding(&self, key: &str, text: &str, metadata: Value) -> Result<(), String>;
    fn delete_embedding(&self, key: &str) -> Result<(), String>;

    fn similarity_search(
        &self,
        query: &str,
        top_k: usize,
        metadata_filter: Option<Value>,
    ) -> Result<Vec<MemoryRecord>, String>;
}