From 31cb1c2387f254ef1ab85e62560fd3c73fc3235a Mon Sep 17 00:00:00 2001 From: Eric Pinzur Date: Fri, 23 Feb 2024 08:02:28 +0100 Subject: [PATCH] fix vector store --- ragstack-e2e-tests/e2e_tests/langchain/test_unstructured.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ragstack-e2e-tests/e2e_tests/langchain/test_unstructured.py b/ragstack-e2e-tests/e2e_tests/langchain/test_unstructured.py index 32fc054cd..919e6febb 100644 --- a/ragstack-e2e-tests/e2e_tests/langchain/test_unstructured.py +++ b/ragstack-e2e-tests/e2e_tests/langchain/test_unstructured.py @@ -6,6 +6,7 @@ from langchain.prompts import PromptTemplate from langchain_core.runnables import RunnablePassthrough from langchain.chat_models import ChatOpenAI +from langchain.embeddings import OpenAIEmbeddings from e2e_tests.langchain.rag_application import BASIC_QA_PROMPT from e2e_tests.test_utils import get_local_resource_path @@ -47,9 +48,8 @@ def test_unstructured(vector_store, unstructured_mode, request): ) vector_store_context: VectorStoreTestContext = request.getfixturevalue(vector_store) - vector_store = vector_store_context.new_langchain_vector_store( - embedding_dimension=1536 - ) + embedding = OpenAIEmbeddings(openai_api_key=get_required_env("OPEN_AI_KEY")) + vector_store = vector_store_context.new_langchain_vector_store(embedding=embedding) loader = UnstructuredAPIFileLoader( file_path=get_local_resource_path("tree.pdf"),