Second-brain 2.0: hybrid retrieval, obsidian bridge, vector watermark, tests

This commit is contained in:
2026-05-26 19:27:12 +02:00
parent 29bc45d623
commit e1640071e4
7 changed files with 291 additions and 16 deletions

View File

@@ -7,12 +7,10 @@ Phase 2: + Embedding + Fusion.
from typing import List, Dict, Any, Optional
from .engram import Engram
from .store import EngramStore
from .chroma_store import ChromaStore
from .embedder import encode
class Retriever:
def __init__(self, store: EngramStore, chroma: Optional[ChromaStore] = None):
def __init__(self, store: EngramStore, chroma: Optional[object] = None):
self.store = store
self.chroma = chroma
@@ -50,7 +48,6 @@ class Retriever:
if not self.chroma:
return []
chroma_results = self.chroma.query(query, top_k=limit * 3)
eids = [r["id"] for r in chroma_results]
results = []
for r in chroma_results:
eg = self.store.get(r["id"])