Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]

Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/index_tuning_sample/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/langchain_on_vertexai/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion samples/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
4 changes: 3 additions & 1 deletion tests/test_async_vectorstore_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
4 changes: 3 additions & 1 deletion tests/test_vectorstore_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down