VeuReu commited on
Commit
7b5dd83
·
verified ·
1 Parent(s): 64b7ee1

Upload 11 files

Browse files
Files changed (1) hide show
  1. casting_loader.py +2 -7
casting_loader.py CHANGED
@@ -29,7 +29,6 @@ log = logging.getLogger("identity_encoding")
29
  # ChromaDB (persistente)
30
  try:
31
  import chromadb
32
- from chromadb.config import Settings # noqa: F401
33
  except Exception as e:
34
  chromadb = None # type: ignore
35
  log.error("No se pudo importar chromadb: %s", e)
@@ -63,12 +62,8 @@ def ensure_chroma(db_dir: Path):
63
  if chromadb is None:
64
  raise RuntimeError("chromadb no instalado. pip install chromadb")
65
  db_dir.mkdir(parents=True, exist_ok=True)
66
-
67
- # Nueva forma de crear un cliente persistente
68
- client = chromadb.Client(Settings(
69
- chroma_db_impl="duckdb+parquet",
70
- persist_directory=str(db_dir)
71
- ))
72
  return client
73
 
74
  # ============================ 1) INDEX FACES =================================
 
29
  # ChromaDB (persistente)
30
  try:
31
  import chromadb
 
32
  except Exception as e:
33
  chromadb = None # type: ignore
34
  log.error("No se pudo importar chromadb: %s", e)
 
62
  if chromadb is None:
63
  raise RuntimeError("chromadb no instalado. pip install chromadb")
64
  db_dir.mkdir(parents=True, exist_ok=True)
65
+ # Nueva API (>=0.5): cliente persistente directo
66
+ client = chromadb.PersistentClient(path=str(db_dir))
 
 
 
 
67
  return client
68
 
69
  # ============================ 1) INDEX FACES =================================