feat: Support for Autodetect in AstraDBVectorStore settings (#4869)
* feat: first pass at autodetect updates * [autofix.ci] apply automated fixes * Fully support autodetect --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
269bc8fa63
commit
19d2974904
7 changed files with 280 additions and 93 deletions
|
|
@ -4,7 +4,7 @@ import pytest
|
|||
from astrapy.db import AstraDB
|
||||
from langchain_core.documents import Document
|
||||
from langflow.components.embeddings import OpenAIEmbeddingsComponent
|
||||
from langflow.components.vectorstores import AstraVectorStoreComponent
|
||||
from langflow.components.vectorstores import AstraDBVectorStoreComponent
|
||||
from langflow.schema.data import Data
|
||||
|
||||
from tests.api_keys import get_astradb_api_endpoint, get_astradb_application_token, get_openai_api_key
|
||||
|
|
@ -43,7 +43,7 @@ async def test_base(astradb_client: AstraDB):
|
|||
api_endpoint = get_astradb_api_endpoint()
|
||||
|
||||
results = await run_single_component(
|
||||
AstraVectorStoreComponent,
|
||||
AstraDBVectorStoreComponent,
|
||||
inputs={
|
||||
"token": application_token,
|
||||
"api_endpoint": api_endpoint,
|
||||
|
|
@ -69,7 +69,7 @@ async def test_astra_embeds_and_search():
|
|||
api_endpoint = get_astradb_api_endpoint()
|
||||
|
||||
results = await run_single_component(
|
||||
AstraVectorStoreComponent,
|
||||
AstraDBVectorStoreComponent,
|
||||
inputs={
|
||||
"token": application_token,
|
||||
"api_endpoint": api_endpoint,
|
||||
|
|
@ -111,7 +111,7 @@ def test_astra_vectorize():
|
|||
documents = [Document(page_content="test1"), Document(page_content="test2")]
|
||||
records = [Data.from_document(d) for d in documents]
|
||||
|
||||
component = AstraVectorStoreComponent()
|
||||
component = AstraDBVectorStoreComponent()
|
||||
vectorize_options = component.build_vectorize_options(**options_comp)
|
||||
|
||||
component.build(
|
||||
|
|
@ -167,7 +167,7 @@ def test_astra_vectorize_with_provider_api_key():
|
|||
documents = [Document(page_content="test1"), Document(page_content="test2")]
|
||||
records = [Data.from_document(d) for d in documents]
|
||||
|
||||
component = AstraVectorStoreComponent()
|
||||
component = AstraDBVectorStoreComponent()
|
||||
vectorize_options = component.build_vectorize_options(**options_comp)
|
||||
|
||||
component.build(
|
||||
|
|
@ -222,7 +222,7 @@ def test_astra_vectorize_passes_authentication():
|
|||
documents = [Document(page_content="test1"), Document(page_content="test2")]
|
||||
records = [Data.from_document(d) for d in documents]
|
||||
|
||||
component = AstraVectorStoreComponent()
|
||||
component = AstraDBVectorStoreComponent()
|
||||
vectorize_options = component.build_vectorize_options(**options_comp)
|
||||
|
||||
component.build(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue