mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-02 11:39:18 +00:00
community[patch]: fix typo in ValueError message in load_local function (#21818)
**Description:** Corrected an error in the `allow_dangerous_deserialization` message within the `load_local` functions
This commit is contained in:
@@ -446,10 +446,10 @@ class Annoy(VectorStore):
|
|||||||
"You will need to set `allow_dangerous_deserialization` to `True` to "
|
"You will need to set `allow_dangerous_deserialization` to `True` to "
|
||||||
"enable deserialization. If you do this, make sure that you "
|
"enable deserialization. If you do this, make sure that you "
|
||||||
"trust the source of the data. For example, if you are loading a "
|
"trust the source of the data. For example, if you are loading a "
|
||||||
"file that you created, and no that no one else has modified the file, "
|
"file that you created, and know that no one else has modified the "
|
||||||
"then this is safe to do. Do not set this to `True` if you are loading "
|
"file, then this is safe to do. Do not set this to `True` if you are "
|
||||||
"a file from an untrusted source (e.g., some random site on the "
|
"loading a file from an untrusted source (e.g., some random site on "
|
||||||
"internet.)."
|
"the internet.)."
|
||||||
)
|
)
|
||||||
path = Path(folder_path)
|
path = Path(folder_path)
|
||||||
# load index separately since it is not picklable
|
# load index separately since it is not picklable
|
||||||
|
@@ -1082,10 +1082,10 @@ class FAISS(VectorStore):
|
|||||||
"You will need to set `allow_dangerous_deserialization` to `True` to "
|
"You will need to set `allow_dangerous_deserialization` to `True` to "
|
||||||
"enable deserialization. If you do this, make sure that you "
|
"enable deserialization. If you do this, make sure that you "
|
||||||
"trust the source of the data. For example, if you are loading a "
|
"trust the source of the data. For example, if you are loading a "
|
||||||
"file that you created, and no that no one else has modified the file, "
|
"file that you created, and know that no one else has modified the "
|
||||||
"then this is safe to do. Do not set this to `True` if you are loading "
|
"file, then this is safe to do. Do not set this to `True` if you are "
|
||||||
"a file from an untrusted source (e.g., some random site on the "
|
"loading a file from an untrusted source (e.g., some random site on "
|
||||||
"internet.)."
|
"the internet.)."
|
||||||
)
|
)
|
||||||
path = Path(folder_path)
|
path = Path(folder_path)
|
||||||
# load index separately since it is not picklable
|
# load index separately since it is not picklable
|
||||||
|
@@ -463,7 +463,7 @@ class ScaNN(VectorStore):
|
|||||||
Args:
|
Args:
|
||||||
folder_path: folder path to load index, docstore,
|
folder_path: folder path to load index, docstore,
|
||||||
and index_to_docstore_id from.
|
and index_to_docstore_id from.
|
||||||
embeddings: Embeddings to use when generating queries
|
embedding: Embeddings to use when generating queries
|
||||||
index_name: for saving with a specific index file name
|
index_name: for saving with a specific index file name
|
||||||
allow_dangerous_deserialization: whether to allow deserialization
|
allow_dangerous_deserialization: whether to allow deserialization
|
||||||
of the data which involves loading a pickle file.
|
of the data which involves loading a pickle file.
|
||||||
@@ -479,10 +479,10 @@ class ScaNN(VectorStore):
|
|||||||
"You will need to set `allow_dangerous_deserialization` to `True` to "
|
"You will need to set `allow_dangerous_deserialization` to `True` to "
|
||||||
"enable deserialization. If you do this, make sure that you "
|
"enable deserialization. If you do this, make sure that you "
|
||||||
"trust the source of the data. For example, if you are loading a "
|
"trust the source of the data. For example, if you are loading a "
|
||||||
"file that you created, and no that no one else has modified the file, "
|
"file that you created, and know that no one else has modified the "
|
||||||
"then this is safe to do. Do not set this to `True` if you are loading "
|
"file, then this is safe to do. Do not set this to `True` if you are "
|
||||||
"a file from an untrusted source (e.g., some random site on the "
|
"loading a file from an untrusted source (e.g., some random site on "
|
||||||
"internet.)."
|
"the internet.)."
|
||||||
)
|
)
|
||||||
path = Path(folder_path)
|
path = Path(folder_path)
|
||||||
scann_path = path / "{index_name}.scann".format(index_name=index_name)
|
scann_path = path / "{index_name}.scann".format(index_name=index_name)
|
||||||
|
Reference in New Issue
Block a user