From ca6baaa0c581591d0f011d1bc7a6bcea1d3f24d4 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Wed, 28 Feb 2024 00:24:18 -0300 Subject: [PATCH] Add docstring to search_with_vector_store method --- .../langflow/components/vectorstores/base/model.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/backend/langflow/components/vectorstores/base/model.py b/src/backend/langflow/components/vectorstores/base/model.py index c6af714d6..1cc8b9d88 100644 --- a/src/backend/langflow/components/vectorstores/base/model.py +++ b/src/backend/langflow/components/vectorstores/base/model.py @@ -16,6 +16,20 @@ class LCVectorStoreComponent(CustomComponent): def search_with_vector_store( self, input_value: Text, search_type: str, vector_store: VectorStore ) -> List[Record]: + """ + Search for records in the vector store based on the input value and search type. + + Args: + input_value (Text): The input value to search for. + search_type (str): The type of search to perform. + vector_store (VectorStore): The vector store to search in. + + Returns: + List[Record]: A list of records matching the search criteria. + + Raises: + ValueError: If invalid inputs are provided. + """ docs = [] if input_value and isinstance(input_value, str):