langchain-postgres 0.0.5__py3-none-any.whl → 0.0.7__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: langchain-postgres
3
- Version: 0.0.5
3
+ Version: 0.0.7
4
4
  Summary: An integration package connecting Postgres and LangChain
5
5
  Home-page: https://github.com/langchain-ai/langchain-postgres
6
6
  License: MIT
@@ -12,13 +12,13 @@ Classifier: Programming Language :: Python :: 3.10
12
12
  Classifier: Programming Language :: Python :: 3.11
13
13
  Classifier: Programming Language :: Python :: 3.12
14
14
  Requires-Dist: langchain-core (>=0.1.50,<0.3)
15
- Requires-Dist: langgraph (>=0.0.32,<0.0.33)
16
15
  Requires-Dist: numpy (>=1,<2)
17
16
  Requires-Dist: pgvector (>=0.2.5,<0.3.0)
18
17
  Requires-Dist: psycopg (>=3,<4)
19
18
  Requires-Dist: psycopg-pool (>=3.2.1,<4.0.0)
20
19
  Requires-Dist: sqlalchemy (>=2,<3)
21
20
  Project-URL: Repository, https://github.com/langchain-ai/langchain-postgres
21
+ Project-URL: Source Code, https://github.com/langchain-ai/langchain-postgres/tree/master/langchain_postgres
22
22
  Description-Content-Type: text/markdown
23
23
 
24
24
  # langchain-postgres
@@ -46,98 +46,13 @@ The package currently only supports the [psycogp3](https://www.psycopg.org/psyco
46
46
  pip install -U langchain-postgres
47
47
  ```
48
48
 
49
- ## Usage
50
-
51
- ### PostgresSaver (LangGraph Checkpointer)
52
-
53
- The LangGraph checkpointer can be used to add memory to your LangGraph application.
54
-
55
- `PostgresSaver` is an implementation of the checkpointer saver using
56
- Postgres as the backend.
57
-
58
- Currently, only the psycopg3 driver is supported.
59
-
60
- Sync usage:
61
-
62
- ```python
63
- from psycopg_pool import ConnectionPool
64
- from langchain_postgres import (
65
- PostgresSaver, PickleCheckpointSerializer
66
- )
67
-
68
- pool = ConnectionPool(
69
- # Example configuration
70
- conninfo="postgresql://langchain:langchain@localhost:6024/langchain",
71
- max_size=20,
72
- )
73
-
74
- PostgresSaver.create_tables(pool)
75
-
76
- checkpointer = PostgresSaver(
77
- serializer=PickleCheckpointSerializer(),
78
- sync_connection=pool,
79
- )
80
-
81
- # Set up the langgraph workflow with the checkpointer
82
- workflow = ... # Fill in with your workflow
83
- app = workflow.compile(checkpointer=checkpointer)
84
-
85
- # Use with the sync methods of `app` (e.g., `app.stream())
86
-
87
- pool.close() # Remember to close the connection pool.
88
- ```
89
-
90
- Async usage:
49
+ ## Change Log
91
50
 
92
- ```python
93
- from psycopg_pool import AsyncConnectionPool
94
- from langchain_postgres import (
95
- PostgresSaver, PickleCheckpointSerializer
96
- )
97
-
98
- pool = AsyncConnectionPool(
99
- # Example configuration
100
- conninfo="postgresql://langchain:langchain@localhost:6024/langchain",
101
- max_size=20,
102
- )
103
-
104
- # Create the tables in postgres (only needs to be done once)
105
- await PostgresSaver.acreate_tables(pool)
106
-
107
- checkpointer = PostgresSaver(
108
- serializer=PickleCheckpointSerializer(),
109
- async_connection=pool,
110
- )
111
-
112
- # Set up the langgraph workflow with the checkpointer
113
- workflow = ... # Fill in with your workflow
114
- app = workflow.compile(checkpointer=checkpointer)
115
-
116
- # Use with the async methods of `app` (e.g., `app.astream()`)
117
-
118
- await pool.close() # Remember to close the connection pool.
119
- ```
120
-
121
- #### Testing
122
-
123
- If testing with the postgres checkpointer it may be useful to both create and
124
- drop the tables before and after the tests.
125
-
126
- ```python
127
- from psycopg_pool import ConnectionPool
128
- from langchain_postgres import (
129
- PostgresSaver
130
- )
131
- with ConnectionPool(
132
- # Example configuration
133
- conninfo="postgresql://langchain:langchain@localhost:6024/langchain",
134
- max_size=20,
135
- ) as conn:
136
- PostgresSaver.create_tables(conn)
137
- PostgresSaver.drop_tables(conn)
138
- # Run your unit tests with langgraph
139
- ```
51
+ 0.0.6:
52
+ - Remove langgraph as a dependency as it was causing dependency conflicts.
53
+ - Base interface for checkpointer changed in langgraph, so existing implementation would've broken regardless.
140
54
 
55
+ ## Usage
141
56
 
142
57
  ### ChatMessageHistory
143
58
 
@@ -0,0 +1,9 @@
1
+ langchain_postgres/__init__.py,sha256=9rXsSowLZpH_dqyWJUhpTVwviQ02wLTZj_kPi6OOfcc,415
2
+ langchain_postgres/_utils.py,sha256=Johm50HEgA4qScLDaSDIfJfF3DygjA5KTBtNeVcD63I,2914
3
+ langchain_postgres/chat_message_histories.py,sha256=gh6hjBlrJ5GSo5kePQdh3VhiUYoWWdP37GXtZ1e25a4,14033
4
+ langchain_postgres/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ langchain_postgres/vectorstores.py,sha256=hV-J7tGp-s6ZiTLSi0uLnswVG_Gb8E6ZVZE0nzE2e2g,81052
6
+ langchain_postgres-0.0.7.dist-info/LICENSE,sha256=2btS8uNUDWD_UNjw9ba6ZJt_00aUjEw9CGyK-xIHY8c,1072
7
+ langchain_postgres-0.0.7.dist-info/METADATA,sha256=xG_riG4igA4C6m7zIy6kim2W9zN85Tmb45CzSqLKCOw,4015
8
+ langchain_postgres-0.0.7.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
9
+ langchain_postgres-0.0.7.dist-info/RECORD,,