From e7a030d057a8d7700c487463bcd23e883f50ba46 Mon Sep 17 00:00:00 2001 From: LLLin000 <809867916@qq.com> Date: Fri, 10 Jul 2026 23:35:26 +0800 Subject: [PATCH] refactor: remove ChromaDB dependency gating from status and preflight MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Embed status no longer checks for chromadb import — vec0 runs in paperforge.db and doesn't need the ChromaDB library. The preflight check also no longer requires chromadb since vec0 backends do not depend on it. The chroma_backend module remains for legacy test compatibility but no longer gates any production build/status path. --- paperforge/commands/embed.py | 4 ---- paperforge/embedding/preflight.py | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/paperforge/commands/embed.py b/paperforge/commands/embed.py index 6de40077..982f87b9 100644 --- a/paperforge/commands/embed.py +++ b/paperforge/commands/embed.py @@ -122,10 +122,6 @@ def run(args: argparse.Namespace) -> int: import openai # noqa: F401 except ImportError: _dep_missing.append("openai") - try: - import chromadb # noqa: F401 - except ImportError: - _dep_missing.append("chromadb") write_vector_runtime( vault, enabled=bool(status.get("mode", "")), diff --git a/paperforge/embedding/preflight.py b/paperforge/embedding/preflight.py index 2d11e13c..091889ff 100644 --- a/paperforge/embedding/preflight.py +++ b/paperforge/embedding/preflight.py @@ -17,16 +17,6 @@ def _preflight_check(vault: Path, settings: dict | None = None) -> dict: "fix": 'Run: pip install "paperforge[vector]"', } - # 2. chromadb package - try: - import chromadb # noqa: F401 - except ImportError: - return { - "ok": False, - "error": "chromadb is not installed", - "fix": 'Run: pip install "paperforge[vector]"', - } - # 3. API key api_key = None if settings: