mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-02 12:46:56 +08:00
fix faiss_cache bug
This commit is contained in:
parent
6019af4f33
commit
b110fcd01b
@ -110,7 +110,8 @@ class KBFaissPool(_FaissPool):
|
|||||||
|
|
||||||
if os.path.isfile(os.path.join(vs_path, "index.faiss")):
|
if os.path.isfile(os.path.join(vs_path, "index.faiss")):
|
||||||
embeddings = get_Embeddings(embed_model=embed_model)
|
embeddings = get_Embeddings(embed_model=embed_model)
|
||||||
vector_store = FAISS.load_local(vs_path, embeddings, normalize_L2=True)
|
vector_store = FAISS.load_local(vs_path, embeddings, normalize_L2=True,
|
||||||
|
allow_dangerous_deserialization=True)
|
||||||
elif create:
|
elif create:
|
||||||
# create an empty vector store
|
# create an empty vector store
|
||||||
if not os.path.exists(vs_path):
|
if not os.path.exists(vs_path):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user