Compare commits
1 Commits
mimo/code/
...
fix/1427
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d084149f5a |
@@ -44,9 +44,13 @@ class MemPalaceResult:
|
|||||||
|
|
||||||
|
|
||||||
def _get_client(palace_path: Path):
|
def _get_client(palace_path: Path):
|
||||||
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable."""
|
"""Return a ChromaDB persistent client, or raise MemPalaceUnavailable.
|
||||||
|
|
||||||
|
Telemetry is disabled for sovereignty — no data leaks to Chroma Inc.
|
||||||
|
"""
|
||||||
try:
|
try:
|
||||||
import chromadb # type: ignore
|
import chromadb # type: ignore
|
||||||
|
from chromadb.config import Settings
|
||||||
except ImportError as exc:
|
except ImportError as exc:
|
||||||
raise MemPalaceUnavailable(
|
raise MemPalaceUnavailable(
|
||||||
"ChromaDB is not installed. "
|
"ChromaDB is not installed. "
|
||||||
@@ -59,7 +63,10 @@ def _get_client(palace_path: Path):
|
|||||||
"Run 'mempalace mine' to initialise the palace."
|
"Run 'mempalace mine' to initialise the palace."
|
||||||
)
|
)
|
||||||
|
|
||||||
return chromadb.PersistentClient(path=str(palace_path))
|
return chromadb.PersistentClient(
|
||||||
|
path=str(palace_path),
|
||||||
|
settings=Settings(anonymized_telemetry=False),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def search_memories(
|
def search_memories(
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ HERMES_CONTEXT = [
|
|||||||
|
|
||||||
class RelevanceEngine:
|
class RelevanceEngine:
|
||||||
def __init__(self, collection_name: str = "deep_dive"):
|
def __init__(self, collection_name: str = "deep_dive"):
|
||||||
self.client = chromadb.PersistentClient(path="./chroma_db")
|
self.client = chromadb.PersistentClient(path="./chroma_db", settings=chromadb.config.Settings(anonymized_telemetry=False))
|
||||||
self.embedding_fn = embedding_functions.SentenceTransformerEmbeddingFunction(
|
self.embedding_fn = embedding_functions.SentenceTransformerEmbeddingFunction(
|
||||||
model_name="all-MiniLM-L6-v2"
|
model_name="all-MiniLM-L6-v2"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ VIOLATION_KEYWORDS = [
|
|||||||
|
|
||||||
def audit(palace_path: Path):
|
def audit(palace_path: Path):
|
||||||
violations = []
|
violations = []
|
||||||
client = chromadb.PersistentClient(path=str(palace_path))
|
client = chromadb.PersistentClient(path=str(palace_path), settings=chromadb.config.Settings(anonymized_telemetry=False))
|
||||||
try:
|
try:
|
||||||
col = client.get_collection("mempalace_drawers")
|
col = client.get_collection("mempalace_drawers")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ DOCS_PER_ROOM = 5
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
client = chromadb.PersistentClient(path=PALACE_PATH)
|
client = chromadb.PersistentClient(path=PALACE_PATH, settings=chromadb.config.Settings(anonymized_telemetry=False))
|
||||||
col = client.get_collection("mempalace_drawers")
|
col = client.get_collection("mempalace_drawers")
|
||||||
|
|
||||||
# Discover rooms in this wing
|
# Discover rooms in this wing
|
||||||
|
|||||||
Reference in New Issue
Block a user