Skip to content

chore: Refactor AlloyDB Engine and Vectorstore using PGEngine and PGV… #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 1 addition & 1 deletion docs/vector_store.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langchain_google_alloydb_pg.indexes import IVFFlatIndex\n",
"from langchain_postgres.v2.indexes import IVFFlatIndex\n",
"\n",
"index = IVFFlatIndex()\n",
"await store.aapply_vector_index(index)"
Expand Down
7 changes: 2 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ authors = [
dependencies = [
"google-cloud-alloydb-connector[asyncpg]>=1.2.0, <2.0.0",
"google-cloud-storage>=2.18.2, <4.0.0",
"langchain-core>=0.2.36, <1.0.0",
"numpy>=1.24.4, <3.0.0; python_version > '3.9'",
"numpy>=1.24.4, <=2.0.2; python_version <= '3.9'",
"pgvector>=0.2.5, <1.0.0",
"SQLAlchemy[asyncio]>=2.0.25, <3.0.0"
"SQLAlchemy[asyncio]>=2.0.25, <3.0.0",
"langchain-postgres>=0.0.14rc1"
]

classifiers = [
Expand Down
7 changes: 2 additions & 5 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
google-cloud-alloydb-connector[asyncpg]==1.7.0
google-cloud-storage==3.1.0
langchain-core==0.3.41
numpy==2.2.3; python_version > "3.9"
numpy== 2.0.2; python_version <= "3.9"
pgvector==0.3.6
SQLAlchemy[asyncio]==2.0.38
langgraph-checkpoint==2.0.19
langgraph-checkpoint==2.0.19
langchain-postgres==0.0.14rc1
8 changes: 5 additions & 3 deletions samples/index_tuning_sample/index_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,14 @@
vector_table_name,
)
from langchain_google_vertexai import VertexAIEmbeddings

from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore
from langchain_google_alloydb_pg.indexes import (
from langchain_postgres.v2.indexes import (
HNSWIndex,
HNSWQueryOptions,
IVFFlatIndex,
)

from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore
from langchain_google_alloydb_pg.indexes import (
IVFIndex,
ScaNNIndex,
)
Expand Down
3 changes: 2 additions & 1 deletion samples/index_tuning_sample/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
langchain-google-alloydb-pg==0.9.3
langchain==0.3.20
langchain-google-vertexai==2.0.14
langchain-google-vertexai==2.0.14
langchain-postgres==0.0.14rc1
1 change: 1 addition & 0 deletions samples/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ google-cloud-resource-manager==1.14.1
langchain-community==0.3.19
langchain-google-alloydb-pg==0.9.3
langchain-google-vertexai==2.0.14
langchain-postgres==0.0.14rc1
Loading