Add docstring to search_with_vector_store method

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-28 00:24:18 -03:00
commit ca6baaa0c5

View file

@ -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):