You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-17Lines changed: 11 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Feel free to use the abstraction as provided or else modify them / extend them a
15
15
16
16
## Requirements
17
17
18
-
The package currently only supports the [psycogp3](https://www.psycopg.org/psycopg3/)driver.
18
+
The package supports the [asyncpg](https://github.com/MagicStack/asyncpg) and [psycogp3](https://www.psycopg.org/psycopg3/)drivers.
> See example for the [PGVector vectorstore here](https://github.com/langchain-ai/langchain-postgres/blob/main/examples/vectorstore.ipynb)
32
-
`PGVector` is being deprecated. Please migrate to `PGVectorStore`.
33
-
`PGVectorStore` is used for improved performance and manageability.
34
-
See the [migration guide](https://github.com/langchain-ai/langchain-postgres/blob/main/examples/migrate_pgvector_to_pgvectorstore.md) for details on how to migrate from `PGVector` to `PGVectorStore`.
30
+
> [!WARNING]
31
+
> In v0.0.14+, `PGVector` is deprecated. Please migrate to `PGVectorStore`
32
+
> for improved performance and manageability.
33
+
> See the [migration guide](https://github.com/langchain-ai/langchain-postgres/blob/main/examples/migrate_pgvector_to_pgvectorstore.md) for details on how to migrate from `PGVector` to `PGVectorStore`.
35
34
36
-
> [!TIP]
37
-
> All synchronous functions have corresponding asynchronous functions
35
+
For a detailed example on `PGVectorStore` see [here](https://github.com/langchain-ai/langchain-postgres/blob/main/examples/pg_vectorstore.ipynb).
38
36
39
37
```python
40
38
from langchain_postgres import PGEngine, PGVectorStore
@@ -58,11 +56,10 @@ store = PGVectorStore.create_sync(
58
56
embedding_service=embedding,
59
57
)
60
58
61
-
all_texts = ["Apples and oranges", "Cars and airplanes", "Pineapple", "Train", "Banana"]
62
-
metadatas = [{"len": len(t)} for t in all_texts]
63
-
ids = [str(uuid.uuid4()) for _ in all_texts]
64
59
docs = [
65
-
Document(id=ids[i], page_content=all_texts[i], metadata=metadatas[i]) for i inrange(len(all_texts))
For a detailed example on `PGVectorStore` see [here](https://github.com/langchain-ai/langchain-postgres/blob/main/examples/pg_vectorstore.ipynb).
72
+
> [!TIP]
73
+
> All synchronous functions have corresponding asynchronous functions
76
74
77
75
### ChatMessageHistory
78
76
@@ -122,10 +120,6 @@ chat_history.add_messages([
122
120
print(chat_history.messages)
123
121
```
124
122
125
-
### Vectorstore
126
-
127
-
See example for the [PGVector vectorstore here](https://github.com/langchain-ai/langchain-postgres/blob/main/examples/vectorstore.ipynb)
128
-
129
123
## Google Cloud Integrations
130
124
131
125
[Google Cloud](https://python.langchain.com/docs/integrations/providers/google/) provides Vector Store, Chat Message History, and Data Loader integrations for [AlloyDB](https://cloud.google.com/alloydb) and [Cloud SQL](https://cloud.google.com/sql) for PostgreSQL databases via the following PyPi packages:
0 commit comments