From 9f1a0d7d952c2430a798fe770d993231c4105acd Mon Sep 17 00:00:00 2001 From: david qiu Date: Fri, 26 Apr 2024 14:53:00 -0700 Subject: [PATCH] Backport PR #753: Load persisted vector store by default --- packages/jupyter-ai/jupyter_ai/chat_handlers/learn.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/jupyter-ai/jupyter_ai/chat_handlers/learn.py b/packages/jupyter-ai/jupyter_ai/chat_handlers/learn.py index d05917374..a7d0d2343 100644 --- a/packages/jupyter-ai/jupyter_ai/chat_handlers/learn.py +++ b/packages/jupyter-ai/jupyter_ai/chat_handlers/learn.py @@ -76,7 +76,10 @@ def _load(self): return self.index = FAISS.load_local( - INDEX_SAVE_DIR, embeddings, index_name=self.index_name + INDEX_SAVE_DIR, + embeddings, + index_name=self.index_name, + allow_dangerous_deserialization=True, ) self.load_metadata() except Exception as e: