Skip to content

Commit a54e624

Browse files
committed
fix breaking imports
1 parent 55b7af3 commit a54e624

24 files changed

+41
-41
lines changed

docs/document_loader.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@
415415
"metadata": {},
416416
"outputs": [],
417417
"source": [
418-
"from langchain_postgres import Column\n",
418+
"from langchain_google_alloydb_pg import Column\n",
419419
"\n",
420420
"await engine.ainit_document_table(\n",
421421
" table_name=TABLE_NAME,\n",

docs/vector_store.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,7 @@
606606
"metadata": {},
607607
"outputs": [],
608608
"source": [
609-
"from langchain_postgres import Column\n",
609+
"from langchain_google_alloydb_pg import Column\n",
610610
"\n",
611611
"\n",
612612
"# Set table name\n",

samples/index_tuning_sample/create_vector_embeddings.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@
1919
import sqlalchemy
2020
from langchain_community.document_loaders import CSVLoader
2121
from langchain_google_vertexai import VertexAIEmbeddings
22-
from langchain_postgres import Column
2322

24-
from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore
23+
from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBVectorStore, Column
2524

2625
EMBEDDING_COUNT = 100000
2726
VECTOR_SIZE = 768

samples/index_tuning_sample/index_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
vector_table_name,
3333
)
3434
from langchain_google_vertexai import VertexAIEmbeddings
35-
from langchain_postgres.v2.indexes import (
35+
from langchain_google_alloydb_pg.indexes import (
3636
HNSWIndex,
3737
HNSWQueryOptions,
3838
IVFFlatIndex,

samples/langchain_quick_start.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,7 @@
601601
},
602602
"outputs": [],
603603
"source": [
604-
"from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBLoader\n",
605-
"from langchain_postgres import Column\n",
604+
"from langchain_google_alloydb_pg import AlloyDBEngine, AlloyDBLoader, Column\n",
606605
"\n",
607606
"engine = AlloyDBEngine.from_instance(\n",
608607
" project_id=project_id,\n",
@@ -709,8 +708,7 @@
709708
},
710709
"outputs": [],
711710
"source": [
712-
"from langchain_google_alloydb_pg import AlloyDBEngine\n",
713-
"from langchain_postgres import Column\n",
711+
"from langchain_google_alloydb_pg import AlloyDBEngine, Column\n",
714712
"\n",
715713
"sample_vector_table_name = \"movie_vector_table_samples\"\n",
716714
"\n",

samples/migrations/migrate_pinecone_vectorstore_to_alloydb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ async def main(
175175
print("Langchain AlloyDB client initiated.")
176176

177177
# [START pinecone_vectorstore_alloydb_migration_create_table]
178-
from langchain_postgres import Column
178+
from langchain_google_alloydb_pg import Column
179179

180180
await alloydb_engine.ainit_vectorstore_table(
181181
table_name=alloydb_table,

src/langchain_google_alloydb_pg/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
from .chat_message_history import AlloyDBChatMessageHistory
1616
from .checkpoint import AlloyDBSaver
1717
from .embeddings import AlloyDBEmbeddings
18-
from .engine import AlloyDBEngine, Column
18+
from .engine import AlloyDBEngine
1919
from .loader import AlloyDBDocumentSaver, AlloyDBLoader
2020
from .model_manager import AlloyDBModel, AlloyDBModelManager
2121
from .vectorstore import AlloyDBVectorStore
2222
from .version import __version__
23+
from langchain_postgres import Column
2324

2425
__all__ = [
2526
"AlloyDBEngine",

src/langchain_google_alloydb_pg/async_vectorstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from langchain_core.documents import Document
2929
from langchain_core.embeddings import Embeddings
3030
from langchain_core.vectorstores import VectorStore, utils
31-
from langchain_postgres.v2.indexes import (
31+
from langchain_google_alloydb_pg.indexes import (
3232
DEFAULT_DISTANCE_STRATEGY,
3333
DEFAULT_INDEX_NAME_SUFFIX,
3434
BaseIndex,

src/langchain_google_alloydb_pg/indexes.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,19 @@
1515
import warnings
1616
from dataclasses import dataclass, field
1717

18-
from langchain_postgres.v2.indexes import BaseIndex, DistanceStrategy, QueryOptions
18+
from langchain_postgres.v2.indexes import (
19+
BaseIndex,
20+
DistanceStrategy,
21+
QueryOptions,
22+
StrategyMixin,
23+
DEFAULT_DISTANCE_STRATEGY,
24+
DEFAULT_INDEX_NAME_SUFFIX,
25+
ExactNearestNeighbor,
26+
HNSWIndex,
27+
HNSWQueryOptions,
28+
IVFFlatIndex,
29+
IVFFlatQueryOptions,
30+
)
1931

2032

2133
@dataclass

src/langchain_google_alloydb_pg/vectorstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from langchain_core.documents import Document
2121
from langchain_core.embeddings import Embeddings
2222
from langchain_core.vectorstores import VectorStore
23-
from langchain_postgres.v2.indexes import (
23+
from langchain_google_alloydb_pg.indexes import (
2424
DEFAULT_DISTANCE_STRATEGY,
2525
BaseIndex,
2626
DistanceStrategy,

0 commit comments

Comments
 (0)