Skip to content

The agent engineering platform.

pinecone[patch]: integration test new namespace (#17121)

Erick Friis15bd1154a754
diff --git a/libs/partners/pinecone/tests/integration_tests/test_vectorstores.py b/libs/partners/pinecone/tests/integration_tests/test_vectorstores.py
index 3abdabe256..eb1f959839 100644
--- a/libs/partners/pinecone/tests/integration_tests/test_vectorstores.py
+++ b/libs/partners/pinecone/tests/integration_tests/test_vectorstores.py
@@ -100,15 +100,17 @@ class TestPinecone:
texts = [needs] + texts
metadatas = [{"page": i} for i in range(len(texts))]
+
+ namespace = f"{NAMESPACE_NAME}-md"
docsearch = Pinecone.from_texts(
texts,
embedding_openai,
index_name=INDEX_NAME,
metadatas=metadatas,
- namespace=NAMESPACE_NAME,
+ namespace=namespace,
)
time.sleep(DEFAULT_SLEEP) # prevent race condition
- output = docsearch.similarity_search(needs, k=1, namespace=NAMESPACE_NAME)
+ output = docsearch.similarity_search(needs, k=1, namespace=namespace)
# TODO: why metadata={"page": 0.0}) instead of {"page": 0}?
assert output == [Document(page_content=needs, metadata={"page": 0.0})]