feat: tool mode for all vector store components (#5348)
* feat: tool mode for all vector store components * [autofix.ci] apply automated fixes * [autofix.ci] apply automated fixes (attempt 2/3) * Update elasticsearch.py * Update test_vector_store_rag.py * Update vector_store_rag.py --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
be612eb6d3
commit
22877ae920
28 changed files with 412 additions and 572 deletions
|
|
@ -56,7 +56,6 @@ async def test_base(astradb_client: AstraDB):
|
|||
},
|
||||
)
|
||||
|
||||
assert results["vector_store"] is not None
|
||||
assert results["search_results"] == []
|
||||
assert astradb_client.collection(BASIC_COLLECTION)
|
||||
|
||||
|
|
@ -73,7 +72,7 @@ async def test_astra_embeds_and_search():
|
|||
"api_endpoint": api_endpoint,
|
||||
"collection_name": BASIC_COLLECTION,
|
||||
"number_of_results": 1,
|
||||
"search_input": "test1",
|
||||
"search_query": "test1",
|
||||
"ingest_data": ComponentInputHandle(
|
||||
clazz=TextToData, inputs={"text_data": ["test1", "test2"]}, output_name="from_text"
|
||||
),
|
||||
|
|
@ -117,7 +116,7 @@ def test_astra_vectorize():
|
|||
api_endpoint=api_endpoint,
|
||||
collection_name=VECTORIZE_COLLECTION,
|
||||
ingest_data=records,
|
||||
search_input="test",
|
||||
search_query="test",
|
||||
number_of_results=2,
|
||||
pre_delete_collection=True,
|
||||
)
|
||||
|
|
@ -173,7 +172,7 @@ def test_astra_vectorize_with_provider_api_key():
|
|||
api_endpoint=api_endpoint,
|
||||
collection_name=VECTORIZE_COLLECTION_OPENAI,
|
||||
ingest_data=records,
|
||||
search_input="test",
|
||||
search_query="test",
|
||||
number_of_results=2,
|
||||
pre_delete_collection=True,
|
||||
)
|
||||
|
|
@ -228,7 +227,7 @@ def test_astra_vectorize_passes_authentication():
|
|||
api_endpoint=api_endpoint,
|
||||
collection_name=VECTORIZE_COLLECTION_OPENAI_WITH_AUTH,
|
||||
ingest_data=records,
|
||||
search_input="test",
|
||||
search_query="test",
|
||||
number_of_results=2,
|
||||
pre_delete_collection=True,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ def rag_graph():
|
|||
chat_input.get_output("message").value = "What is the meaning of life?"
|
||||
rag_vector_store = AstraDBVectorStoreComponent(_id="rag-vector-store-123")
|
||||
rag_vector_store.set(
|
||||
search_input=chat_input.message_response,
|
||||
search_query=chat_input.message_response,
|
||||
api_endpoint="https://astra.example.com",
|
||||
token="token", # noqa: S106
|
||||
embedding_model=openai_embeddings.build_embeddings,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue