From ef6d3d66d618fb3ae8876e035523b7d674ed1380 Mon Sep 17 00:00:00 2001 From: Tarun Jain Date: Sat, 23 Mar 2024 04:09:07 +0530 Subject: [PATCH] community[patch]: docarray requires hnsw installation (#19416) I have a small dataset, and I tried to use docarray: ``DocArrayHnswSearch ``. But when I execute, it returns: ```bash raise ImportError( ImportError: Could not import docarray python package. Please install it with `pip install "langchain[docarray]"`. ``` Instead of docarray it needs to be ```bash docarray[hnswlib] ``` Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com> --- .../community/langchain_community/vectorstores/docarray/hnsw.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/community/langchain_community/vectorstores/docarray/hnsw.py b/libs/community/langchain_community/vectorstores/docarray/hnsw.py index 43948471849..8b33f7a0d58 100644 --- a/libs/community/langchain_community/vectorstores/docarray/hnsw.py +++ b/libs/community/langchain_community/vectorstores/docarray/hnsw.py @@ -14,7 +14,7 @@ class DocArrayHnswSearch(DocArrayIndex): """`HnswLib` storage using `DocArray` package. To use it, you should have the ``docarray`` package with version >=0.32.0 installed. - You can install it with `pip install "langchain[docarray]"`. + You can install it with `pip install "docarray[hnswlib]"`. """ @classmethod