diff --git a/src/backend/langflow/components/documentloaders/UnstructuredWordDocumentLoader.py b/src/backend/langflow/components/documentloaders/UnstructuredWordDocumentLoader.py index bf57664ff..48ff3a24e 100644 --- a/src/backend/langflow/components/documentloaders/UnstructuredWordDocumentLoader.py +++ b/src/backend/langflow/components/documentloaders/UnstructuredWordDocumentLoader.py @@ -1,4 +1,4 @@ -from langchain import CustomComponent +from langflow import CustomComponent from langflow.field_typing import Document from typing import Optional, Dict diff --git a/src/backend/langflow/components/vectorstores/FAISS.py b/src/backend/langflow/components/vectorstores/FAISS.py index b171802a2..cfdbc0521 100644 --- a/src/backend/langflow/components/vectorstores/FAISS.py +++ b/src/backend/langflow/components/vectorstores/FAISS.py @@ -1,6 +1,6 @@ from langflow import CustomComponent from langchain_community.vectorstores.faiss import FAISS -from typing import Optional, List, Union +from typing import List, Union from langchain.schema import BaseRetriever from langchain.vectorstores.base import VectorStore from langflow.field_typing import ( @@ -23,6 +23,6 @@ class FAISSComponent(CustomComponent): def build( self, embedding: Embeddings, - documents: Optional[List[Document]] = None, + documents: List[Document] = None, ) -> Union[VectorStore, FAISS, BaseRetriever]: return FAISS.from_documents(documents=documents, embedding=embedding) diff --git a/src/backend/langflow/components/vectorstores/Pinecone.py b/src/backend/langflow/components/vectorstores/Pinecone.py index ca443f2e2..bdd3323ee 100644 --- a/src/backend/langflow/components/vectorstores/Pinecone.py +++ b/src/backend/langflow/components/vectorstores/Pinecone.py @@ -28,7 +28,7 @@ class PineconeComponent(CustomComponent): def build( self, embedding: Embeddings, - documents: Optional[List[Document]] = None, + documents: List[Document] = None, index_name: Optional[str] = None, pinecone_api_key: Optional[str] = None, pinecone_env: Optional[str] = None, diff --git a/src/backend/langflow/components/vectorstores/Qdrant.py b/src/backend/langflow/components/vectorstores/Qdrant.py index 548da03bf..74bc5ff59 100644 --- a/src/backend/langflow/components/vectorstores/Qdrant.py +++ b/src/backend/langflow/components/vectorstores/Qdrant.py @@ -35,7 +35,7 @@ class QdrantComponent(CustomComponent): def build( self, embedding: Embeddings, - documents: Optional[List[Document]] = None, + documents: List[Document] = None, api_key: Optional[str] = None, collection_name: Optional[str] = None, content_payload_key: str = "page_content", diff --git a/src/backend/langflow/components/vectorstores/SupabaseVectorStore.py b/src/backend/langflow/components/vectorstores/SupabaseVectorStore.py index 2e2812e08..40e6dd98e 100644 --- a/src/backend/langflow/components/vectorstores/SupabaseVectorStore.py +++ b/src/backend/langflow/components/vectorstores/SupabaseVectorStore.py @@ -1,5 +1,5 @@ from langflow import CustomComponent -from typing import Optional, List, Union +from typing import List, Union from langchain_community.vectorstores.supabase import SupabaseVectorStore from langflow.field_typing import ( Document, @@ -29,7 +29,7 @@ class SupabaseComponent(CustomComponent): def build( self, embedding: Embeddings, - documents: Optional[List[Document]] = None, + documents: List[Document], query_name: str = "", search_kwargs: NestedDict = {}, supabase_service_key: str = "",