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
> 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