fix vectorstore imports (#12804)

Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
Harrison Chase 2023-11-02 15:32:31 -07:00 committed by GitHub
parent f66a9d2adf
commit 6609a6033f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 78 additions and 0 deletions

View File

@ -21,6 +21,8 @@ and retrieve the data that are 'most similar' to the embedded query.
from typing import Any
from langchain.schema.vectorstore import VectorStore
def _import_alibaba_cloud_open_search() -> Any:
from langchain.vectorstores.alibabacloud_opensearch import AlibabaCloudOpenSearch
@ -605,4 +607,5 @@ __all__ = [
"Zilliz",
"TencentVectorDB",
"AzureCosmosDBVectorSearch",
"VectorStore",
]

View File

@ -0,0 +1,75 @@
"""Test the public API of the tools package."""
from langchain.vectorstores import __all__ as public_api
_EXPECTED = [
"AlibabaCloudOpenSearch",
"AlibabaCloudOpenSearchSettings",
"AnalyticDB",
"Annoy",
"AtlasDB",
"AwaDB",
"AzureSearch",
"Bagel",
"Cassandra",
"Chroma",
"Clarifai",
"Clickhouse",
"ClickhouseSettings",
"DashVector",
"DeepLake",
"Dingo",
"DocArrayHnswSearch",
"DocArrayInMemorySearch",
"ElasticKnnSearch",
"ElasticVectorSearch",
"ElasticsearchStore",
"Epsilla",
"FAISS",
"Hologres",
"LanceDB",
"LLMRails",
"Marqo",
"MatchingEngine",
"Meilisearch",
"Milvus",
"MomentoVectorIndex",
"MongoDBAtlasVectorSearch",
"MyScale",
"MyScaleSettings",
"Neo4jVector",
"OpenSearchVectorSearch",
"PGEmbedding",
"PGVector",
"Pinecone",
"Qdrant",
"Redis",
"Rockset",
"SKLearnVectorStore",
"ScaNN",
"SemaDB",
"SingleStoreDB",
"SQLiteVSS",
"StarRocks",
"SupabaseVectorStore",
"Tair",
"Tigris",
"TimescaleVector",
"Typesense",
"USearch",
"Vald",
"Vearch",
"Vectara",
"VespaStore",
"Weaviate",
"ZepVectorStore",
"Zilliz",
"TencentVectorDB",
"AzureCosmosDBVectorSearch",
"VectorStore",
]
def test_public_api() -> None:
"""Test for regressions or changes in the public API."""
# Check that the public API is as expected
assert set(public_api) == set(_EXPECTED)