From 813e2260a66c0472b7505b68988f2252b989d695 Mon Sep 17 00:00:00 2001 From: aries_ckt <916701291@qq.com> Date: Mon, 9 Oct 2023 15:01:42 +0500 Subject: [PATCH] fix:chromadb persist_path compatible with old version --- pilot/vector_store/chroma_store.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pilot/vector_store/chroma_store.py b/pilot/vector_store/chroma_store.py index f51bc9917..884b29b05 100644 --- a/pilot/vector_store/chroma_store.py +++ b/pilot/vector_store/chroma_store.py @@ -17,7 +17,8 @@ def __init__(self, ctx: {}) -> None: self.ctx = ctx chroma_path = ctx.get( - "CHROMA_PERSIST_PATH", os.getenv("CHROMA_PERSIST_PATH", os.getcwd()) + "CHROMA_PERSIST_PATH", + os.path.join(os.path.dirname(os.path.dirname(__file__)), "data"), ) self.persist_dir = os.path.join( chroma_path, ctx["vector_store_name"] + ".vectordb"