Refactor vector store component class names for consistency
This commit is contained in:
parent
71524d8219
commit
7f11cae2b7
13 changed files with 21 additions and 21 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
from langflow.components.vectorstores.AstraDB import AstraDBVectorStoreComponent
|
from langflow.components.vectorstores.AstraDB import AstraVectorStoreComponent
|
||||||
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
||||||
from langflow.field_typing import Embeddings, Text
|
from langflow.field_typing import Embeddings, Text
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
@ -120,7 +120,7 @@ class AstraDBSearchComponent(LCVectorStoreComponent):
|
||||||
metadata_indexing_exclude: Optional[List[str]] = None,
|
metadata_indexing_exclude: Optional[List[str]] = None,
|
||||||
collection_indexing_policy: Optional[dict] = None,
|
collection_indexing_policy: Optional[dict] = None,
|
||||||
) -> List[Data]:
|
) -> List[Data]:
|
||||||
vector_store = AstraDBVectorStoreComponent().build(
|
vector_store = AstraVectorStoreComponent().build(
|
||||||
embedding=embedding,
|
embedding=embedding,
|
||||||
collection_name=collection_name,
|
collection_name=collection_name,
|
||||||
token=token,
|
token=token,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
||||||
from langflow.components.vectorstores.Couchbase import CouchbaseComponent
|
from langflow.components.vectorstores.Couchbase import CouchbaseVectorStoreComponent
|
||||||
from langflow.field_typing import Embeddings, Text
|
from langflow.field_typing import Embeddings, Text
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
||||||
|
|
@ -52,7 +52,7 @@ class CouchbaseSearchComponent(LCVectorStoreComponent):
|
||||||
couchbase_username: str = "",
|
couchbase_username: str = "",
|
||||||
couchbase_password: str = "",
|
couchbase_password: str = "",
|
||||||
) -> List[Data]:
|
) -> List[Data]:
|
||||||
vector_store = CouchbaseComponent().build(
|
vector_store = CouchbaseVectorStoreComponent().build(
|
||||||
couchbase_connection_string=couchbase_connection_string,
|
couchbase_connection_string=couchbase_connection_string,
|
||||||
couchbase_username=couchbase_username,
|
couchbase_username=couchbase_username,
|
||||||
couchbase_password=couchbase_password,
|
couchbase_password=couchbase_password,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
||||||
from langflow.components.vectorstores.MongoDBAtlasVector import MongoDBAtlasComponent
|
from langflow.components.vectorstores.MongoDBAtlasVector import MongoVectorStoreComponent
|
||||||
from langflow.field_typing import Embeddings, NestedDict, Text
|
from langflow.field_typing import Embeddings, NestedDict, Text
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
||||||
|
|
@ -43,7 +43,7 @@ class MongoDBAtlasSearchComponent(LCVectorStoreComponent):
|
||||||
search_kwargs: Optional[NestedDict] = None,
|
search_kwargs: Optional[NestedDict] = None,
|
||||||
) -> List[Data]:
|
) -> List[Data]:
|
||||||
search_kwargs = search_kwargs or {}
|
search_kwargs = search_kwargs or {}
|
||||||
vector_store = MongoDBAtlasComponent().build(
|
vector_store = MongoVectorStoreComponent().build(
|
||||||
mongodb_atlas_cluster_uri=mongodb_atlas_cluster_uri,
|
mongodb_atlas_cluster_uri=mongodb_atlas_cluster_uri,
|
||||||
collection_name=collection_name,
|
collection_name=collection_name,
|
||||||
db_name=db_name,
|
db_name=db_name,
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,13 @@ from typing import List, Optional
|
||||||
from langchain_pinecone._utilities import DistanceStrategy
|
from langchain_pinecone._utilities import DistanceStrategy
|
||||||
|
|
||||||
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
||||||
from langflow.components.vectorstores.Pinecone import PineconeComponent
|
from langflow.components.vectorstores.Pinecone import PineconeVectorStoreComponent
|
||||||
from langflow.field_typing import Embeddings, Text
|
from langflow.field_typing import Embeddings, Text
|
||||||
from langflow.field_typing.constants import NestedDict
|
from langflow.field_typing.constants import NestedDict
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
||||||
|
|
||||||
class PineconeSearchComponent(PineconeComponent, LCVectorStoreComponent):
|
class PineconeSearchComponent(PineconeVectorStoreComponent, LCVectorStoreComponent):
|
||||||
display_name = "Pinecone Search"
|
display_name = "Pinecone Search"
|
||||||
description = "Search a Pinecone Vector Store for similar documents."
|
description = "Search a Pinecone Vector Store for similar documents."
|
||||||
icon = "Pinecone"
|
icon = "Pinecone"
|
||||||
|
|
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
from typing import List, Optional
|
from typing import List, Optional
|
||||||
|
|
||||||
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
||||||
from langflow.components.vectorstores.Qdrant import QdrantComponent
|
from langflow.components.vectorstores.Qdrant import QdrantVectorStoreComponent
|
||||||
from langflow.field_typing import Embeddings, NestedDict, Text
|
from langflow.field_typing import Embeddings, NestedDict, Text
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
||||||
|
|
||||||
class QdrantSearchComponent(QdrantComponent, LCVectorStoreComponent):
|
class QdrantSearchComponent(QdrantVectorStoreComponent, LCVectorStoreComponent):
|
||||||
display_name = "Qdrant Search"
|
display_name = "Qdrant Search"
|
||||||
description = "Construct Qdrant wrapper from a list of texts."
|
description = "Construct Qdrant wrapper from a list of texts."
|
||||||
icon = "Qdrant"
|
icon = "Qdrant"
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@ from typing import List, Optional
|
||||||
from langchain_core.embeddings import Embeddings
|
from langchain_core.embeddings import Embeddings
|
||||||
|
|
||||||
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
||||||
from langflow.components.vectorstores.Redis import RedisComponent
|
from langflow.components.vectorstores.Redis import RedisVectorStoreComponent
|
||||||
from langflow.field_typing import Text
|
from langflow.field_typing import Text
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
||||||
|
|
||||||
class RedisSearchComponent(RedisComponent, LCVectorStoreComponent):
|
class RedisSearchComponent(RedisVectorStoreComponent, LCVectorStoreComponent):
|
||||||
"""
|
"""
|
||||||
A custom component for implementing a Vector Store using Redis.
|
A custom component for implementing a Vector Store using Redis.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@ from typing import List
|
||||||
from langchain_community.vectorstores.vectara import Vectara
|
from langchain_community.vectorstores.vectara import Vectara
|
||||||
|
|
||||||
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
||||||
from langflow.components.vectorstores.Vectara import VectaraComponent
|
from langflow.components.vectorstores.Vectara import VectaraVectorStoreComponent
|
||||||
from langflow.field_typing import Text
|
from langflow.field_typing import Text
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
||||||
|
|
||||||
class VectaraSearchComponent(VectaraComponent, LCVectorStoreComponent):
|
class VectaraSearchComponent(VectaraVectorStoreComponent, LCVectorStoreComponent):
|
||||||
display_name: str = "Vectara Search"
|
display_name: str = "Vectara Search"
|
||||||
description: str = "Search a Vectara Vector Store for similar documents."
|
description: str = "Search a Vectara Vector Store for similar documents."
|
||||||
documentation = "https://python.langchain.com/docs/integrations/vectorstores/vectara"
|
documentation = "https://python.langchain.com/docs/integrations/vectorstores/vectara"
|
||||||
|
|
|
||||||
|
|
@ -3,12 +3,12 @@ from typing import List
|
||||||
from langchain_core.embeddings import Embeddings
|
from langchain_core.embeddings import Embeddings
|
||||||
|
|
||||||
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
from langflow.components.vectorstores.base.model import LCVectorStoreComponent
|
||||||
from langflow.components.vectorstores.pgvector import PGVectorComponent
|
from langflow.components.vectorstores.pgvector import PGVectorStoreComponent
|
||||||
from langflow.field_typing import Text
|
from langflow.field_typing import Text
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
||||||
|
|
||||||
class PGVectorSearchComponent(PGVectorComponent, LCVectorStoreComponent):
|
class PGVectorSearchComponent(PGVectorStoreComponent, LCVectorStoreComponent):
|
||||||
display_name: str = "PGVector Search"
|
display_name: str = "PGVector Search"
|
||||||
description: str = "Search a PGVector Store for similar documents."
|
description: str = "Search a PGVector Store for similar documents."
|
||||||
documentation = "https://python.langchain.com/docs/integrations/vectorstores/pgvector"
|
documentation = "https://python.langchain.com/docs/integrations/vectorstores/pgvector"
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ from langflow.field_typing import Embeddings
|
||||||
|
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
class AstraDBComponent(Component):
|
class AstraVectorStoreComponent(Component):
|
||||||
display_name: str = "Astra DB Vector Store"
|
display_name: str = "Astra DB Vector Store"
|
||||||
description: str = "Implementation of Vector Store using Astra DB with search capabilities"
|
description: str = "Implementation of Vector Store using Astra DB with search capabilities"
|
||||||
documentation: str = "https://python.langchain.com/docs/integrations/vectorstores/astradb"
|
documentation: str = "https://python.langchain.com/docs/integrations/vectorstores/astradb"
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ from langflow.helpers.data import docs_to_data
|
||||||
from loguru import logger
|
from loguru import logger
|
||||||
|
|
||||||
|
|
||||||
class FAISSVectorStoreComponent(Component):
|
class FaissVectorStoreComponent(Component):
|
||||||
"""
|
"""
|
||||||
FAISS Vector Store with search capabilities
|
FAISS Vector Store with search capabilities
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from langflow.inputs import BoolInput, IntInput, StrInput, HandleInput
|
||||||
from langflow.template import Output
|
from langflow.template import Output
|
||||||
from langflow.helpers.data import docs_to_data
|
from langflow.helpers.data import docs_to_data
|
||||||
|
|
||||||
class MongoDBAtlasComponent(Component):
|
class MongoVectorStoreComponent(Component):
|
||||||
display_name = "MongoDB Atlas"
|
display_name = "MongoDB Atlas"
|
||||||
description = "MongoDB Atlas Vector Store with search capabilities"
|
description = "MongoDB Atlas Vector Store with search capabilities"
|
||||||
documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/mongodb_atlas"
|
documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/mongodb_atlas"
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ from langflow.custom import CustomComponent
|
||||||
from langflow.schema import Data
|
from langflow.schema import Data
|
||||||
|
|
||||||
|
|
||||||
class RedisComponent(CustomComponent):
|
class RedisVectorStoreComponent(CustomComponent):
|
||||||
"""
|
"""
|
||||||
A custom component for implementing a Vector Store using Redis.
|
A custom component for implementing a Vector Store using Redis.
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ from langflow.inputs import BoolInput, IntInput, StrInput, HandleInput
|
||||||
from langflow.template import Output
|
from langflow.template import Output
|
||||||
from langflow.helpers.data import docs_to_data
|
from langflow.helpers.data import docs_to_data
|
||||||
|
|
||||||
class PGVectorComponent(Component):
|
class PGVectorStoreComponent(Component):
|
||||||
display_name = "PGVector"
|
display_name = "PGVector"
|
||||||
description = "PGVector Vector Store with search capabilities"
|
description = "PGVector Vector Store with search capabilities"
|
||||||
documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/pgvector"
|
documentation = "https://python.langchain.com/docs/modules/data_connection/vectorstores/integrations/pgvector"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue