Skip to content

Commit

Permalink
Merge pull request #1 from Alonoparag/async-vectorstore
Browse files Browse the repository at this point in the history
Async vectorstore
  • Loading branch information
Alonoparag authored Apr 26, 2024
2 parents 6d85e77 + 3f885db commit 635d59b
Show file tree
Hide file tree
Showing 7 changed files with 1,617 additions and 24 deletions.
2 changes: 2 additions & 0 deletions libs/aws/langchain_aws/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,15 @@
AmazonKendraRetriever,
AmazonKnowledgeBasesRetriever,
)
from langchain_aws.vectorstores.documentdb import DocumentDBVectorSearch

__all__ = [
"Bedrock",
"BedrockEmbeddings",
"BedrockLLM",
"BedrockChat",
"ChatBedrock",
"DocumentDBVectorSearch",
"SagemakerEndpoint",
"AmazonKendraRetriever",
"AmazonKnowledgeBasesRetriever",
Expand Down
49 changes: 49 additions & 0 deletions libs/aws/langchain_aws/vectorstores/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""**Vector store** stores embedded data and performs vector search.
One of the most common ways to store and search over unstructured data is to
embed it and store the resulting embedding vectors, and then query the store
and retrieve the data that are 'most similar' to the embedded query.
**Class hierarchy:**
.. code-block::
VectorStore --> <name> # Examples: Annoy, FAISS, Milvus
BaseRetriever --> VectorStoreRetriever --> <name>Retriever # Example: VespaRetriever
**Main helpers:**
.. code-block::
Embeddings, Document
""" # noqa: E501

import importlib
from typing import TYPE_CHECKING, Any

if TYPE_CHECKING:
from langchain_core.vectorstores import (
VectorStore, # noqa: F401
)

from langchain_aws.vectorstores.documentdb import (
DocumentDBVectorSearch, # noqa: F401
)
__all__ = [
"DocumentDBVectorSearch",
]

_module_lookup = {
"DocumentDBVectorSearch": "langchain_community.vectorstores.documentdb",
}


def __getattr__(name: str) -> Any:
if name in _module_lookup:
module = importlib.import_module(_module_lookup[name])
return getattr(module, name)
raise AttributeError(f"module {__name__} has no attribute {name}")


__all__ = list(_module_lookup.keys())
Loading

0 comments on commit 635d59b

Please sign in to comment.