diff --git a/pyproject.toml b/pyproject.toml index 318e0441..5bce61ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -41,9 +41,9 @@ Changelog = "https://github.com/googleapis/langchain-google-cloud-sql-pg-python/ test = [ "black[jupyter]==25.1.0", "isort==6.0.0", - "mypy==1.11.2", + "mypy==1.13.0", "pytest-asyncio==0.24.0", - "pytest==8.3.3", + "pytest==8.3.4", "pytest-cov==6.0.0" ] diff --git a/requirements.txt b/requirements.txt index 2433a992..79e8db67 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ -cloud-sql-python-connector[asyncpg]==1.12.1 -langchain-core==0.3.8 +cloud-sql-python-connector[asyncpg]==1.14.0 +langchain-core==0.3.22 numpy==1.26.4 -pgvector==0.3.4 -SQLAlchemy[asyncio]==2.0.35 +pgvector==0.3.6 +SQLAlchemy[asyncio]==2.0.36 diff --git a/samples/index_tuning_sample/requirements.txt b/samples/index_tuning_sample/requirements.txt index 23fa9646..9351541e 100644 --- a/samples/index_tuning_sample/requirements.txt +++ b/samples/index_tuning_sample/requirements.txt @@ -1,3 +1,3 @@ langchain-community==0.3.16 -langchain-google-cloud-sql-pg==0.10.0 +langchain-google-cloud-sql-pg==0.11.1 langchain-google-vertexai==2.0.12 diff --git a/samples/langchain_on_vertexai/requirements.txt b/samples/langchain_on_vertexai/requirements.txt index ad908ae6..090f6c2e 100644 --- a/samples/langchain_on_vertexai/requirements.txt +++ b/samples/langchain_on_vertexai/requirements.txt @@ -1,5 +1,5 @@ google-cloud-aiplatform[reasoningengine,langchain]==1.79.0 google-cloud-resource-manager==1.14.0 langchain-community==0.3.16 -langchain-google-cloud-sql-pg==0.10.0 +langchain-google-cloud-sql-pg==0.11.1 langchain-google-vertexai==2.0.12 diff --git a/samples/requirements.txt b/samples/requirements.txt index ad908ae6..090f6c2e 100644 --- a/samples/requirements.txt +++ b/samples/requirements.txt @@ -1,5 +1,5 @@ google-cloud-aiplatform[reasoningengine,langchain]==1.79.0 google-cloud-resource-manager==1.14.0 langchain-community==0.3.16 -langchain-google-cloud-sql-pg==0.10.0 +langchain-google-cloud-sql-pg==0.11.1 langchain-google-vertexai==2.0.12 diff --git a/tests/test_async_vectorstore_search.py b/tests/test_async_vectorstore_search.py index d918415a..2d808dad 100644 --- a/tests/test_async_vectorstore_search.py +++ b/tests/test_async_vectorstore_search.py @@ -156,7 +156,9 @@ async def test_similarity_search_with_relevance_scores_threshold_cosine(self, vs results = await vs.asimilarity_search_with_relevance_scores( "foo", **score_threshold ) - assert len(results) == 4 + # Note: Since tests use FakeEmbeddings which are non-normalized vectors, results might have scores beyond the range [0,1]. + # For a normalized embedding service, a threshold of zero will yield all matched documents. + assert len(results) == 2 score_threshold = {"score_threshold": 0.02} results = await vs.asimilarity_search_with_relevance_scores( diff --git a/tests/test_vectorstore_search.py b/tests/test_vectorstore_search.py index f2c1cb17..3a0ca81a 100644 --- a/tests/test_vectorstore_search.py +++ b/tests/test_vectorstore_search.py @@ -170,7 +170,9 @@ async def test_similarity_search_with_relevance_scores_threshold_cosine(self, vs results = await vs.asimilarity_search_with_relevance_scores( "foo", **score_threshold ) - assert len(results) == 4 + # Note: Since tests use FakeEmbeddings which are non-normalized vectors, results might have scores beyond the range [0,1]. + # For a normalized embedding service, a threshold of zero will yield all matched documents. + assert len(results) == 2 score_threshold = {"score_threshold": 0.02} results = await vs.asimilarity_search_with_relevance_scores(