chore: Remove unused vector search component and update vector store parameters format

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-22 13:52:33 -03:00
commit 6e88eab7f5
3 changed files with 7 additions and 6 deletions

View file

@ -12,6 +12,5 @@ __all__ = [
"textsplitters",
"toolkits",
"tools",
"vectorsearch",
"vectorstores",
]

View file

@ -221,5 +221,6 @@ class Component(CustomComponent):
return [field.name for field in inputs]
except KeyError:
return []
return []
return []
def build(self, **kwargs):
self.set_attributes(kwargs)

View file

@ -4,7 +4,6 @@ import pytest
from langchain_core.documents import Document
from langflow.components.memories.AstraDBMessageReader import AstraDBMessageReaderComponent
from langflow.components.memories.AstraDBMessageWriter import AstraDBMessageWriterComponent
from langflow.components.vectorsearch.AstraDBSearch import AstraDBSearchComponent
from langflow.components.vectorstores.AstraDB import AstraVectorStoreComponent
from langflow.schema.data import Data
@ -78,10 +77,11 @@ def test_astra_embeds_and_search(astra_fixture):
collection_name=SEARCH_COLLECTION,
embedding=embedding,
inputs=records,
add_to_vector_store=True,
)
component.build_vector_store()
component = AstraDBSearchComponent()
records = component.build(
component.build(
token=application_token,
api_endpoint=api_endpoint,
collection_name=SEARCH_COLLECTION,
@ -89,6 +89,7 @@ def test_astra_embeds_and_search(astra_fixture):
input_value="test1",
number_of_results=1,
)
records = component.search_documents()
assert len(records) == 1