tests: fix up the astra integ tests and add vectorize tests (#2616)
* fix up the astra integ tests and add vectorize tests * [autofix.ci] apply automated fixes --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
34c1a4d469
commit
46966d164d
4 changed files with 151 additions and 16 deletions
|
|
@ -88,7 +88,7 @@ class LCVectorStoreComponent(Component):
|
|||
|
||||
def search_documents(self) -> List[Data]:
|
||||
"""
|
||||
Search for documents in the Chroma vector store.
|
||||
Search for documents in the vector store.
|
||||
"""
|
||||
search_query: str = self.search_query
|
||||
if not search_query:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ from langflow.inputs.inputs import DictInput, SecretStrInput, MessageTextInput,
|
|||
from langflow.template.field.base import Output
|
||||
|
||||
|
||||
class AstraVectorize(Component):
|
||||
class AstraVectorizeComponent(Component):
|
||||
display_name: str = "Astra Vectorize"
|
||||
description: str = "Configuration options for Astra Vectorize server-side embeddings."
|
||||
documentation: str = "https://docs.datastax.com/en/astra-db-serverless/databases/embedding-generation.html"
|
||||
|
|
@ -92,7 +92,7 @@ class AstraVectorize(Component):
|
|||
|
||||
def build_options(self) -> dict[str, Any]:
|
||||
provider_value = self.VECTORIZE_PROVIDERS_MAPPING[self.provider][0]
|
||||
authentication = {**self.authentication}
|
||||
authentication = {**(self.authentication or {})}
|
||||
api_key_name = self.api_key_name
|
||||
if api_key_name:
|
||||
authentication["providerKey"] = api_key_name
|
||||
|
|
@ -102,7 +102,7 @@ class AstraVectorize(Component):
|
|||
"provider": provider_value,
|
||||
"modelName": self.model_name,
|
||||
"authentication": authentication,
|
||||
"parameters": self.model_parameters,
|
||||
"parameters": self.model_parameters or {},
|
||||
},
|
||||
"collection_embedding_api_key": self.provider_api_key,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
from .AmazonBedrockEmbeddings import AmazonBedrockEmbeddingsComponent
|
||||
from .AstraVectorize import AstraVectorizeComponent
|
||||
from .AzureOpenAIEmbeddings import AzureOpenAIEmbeddingsComponent
|
||||
from .CohereEmbeddings import CohereEmbeddingsComponent
|
||||
from .HuggingFaceEmbeddings import HuggingFaceEmbeddingsComponent
|
||||
|
|
@ -9,6 +10,7 @@ from .VertexAIEmbeddings import VertexAIEmbeddingsComponent
|
|||
|
||||
__all__ = [
|
||||
"AmazonBedrockEmbeddingsComponent",
|
||||
"AstraVectorizeComponent",
|
||||
"AzureOpenAIEmbeddingsComponent",
|
||||
"CohereEmbeddingsComponent",
|
||||
"HuggingFaceEmbeddingsComponent",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue