This commit is contained in:
imClumsyPanda 2023-06-14 21:20:52 +08:00
parent a55aab498f
commit 58d6a9a098
3 changed files with 3 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 291 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 265 KiB

View File

@ -5,6 +5,7 @@ from typing import Any, Callable, List, Tuple, Dict
from langchain.docstore.base import Docstore
from langchain.docstore.document import Document
import numpy as np
import copy
class MyFAISS(FAISS, VectorStore):
@ -95,7 +96,8 @@ class MyFAISS(FAISS, VectorStore):
for id in id_seq:
if id == id_seq[0]:
_id = self.index_to_docstore_id[id]
doc = self.docstore.search(_id)
# doc = self.docstore.search(_id)
doc = copy.deepcopy(self.docstore.search(_id))
else:
_id0 = self.index_to_docstore_id[id]
doc0 = self.docstore.search(_id0)