Skip to content

Commit 14a4240

Browse files
authored
feat(langgraph): Add Langgraph Checkpointer (#284)
* feat(langgraph): Add Langgraph Checkpointer * fix lint * Update README.rst
1 parent e8bd4ae commit 14a4240

File tree

12 files changed

+2232
-5
lines changed

12 files changed

+2232
-5
lines changed

README.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,22 @@ See the full `Chat Message History`_ tutorial.
158158

159159
.. _`Chat Message History`: https://github.com/googleapis/langchain-google-cloud-sql-pg-python/tree/main/docs/chat_message_history.ipynb
160160

161+
Langgraph Checkpoint Usage
162+
~~~~~~~~~~~~~~~~~~~~~~~~~~
163+
164+
Use ``PostgresSaver`` to save snapshots of the graph state at a given point in time.
165+
166+
.. code:: python
167+
168+
from langchain_google_cloud_sql_pg import PostgresSaver, PostgresEngine
169+
170+
engine = PostgresEngine.from_instance("project-id", "region", "my-instance", "my-database")
171+
checkpoint = PostgresSaver.create_sync(engine)
172+
173+
See the full `Checkpoint`_ tutorial.
174+
175+
.. _`Checkpoint`: https://github.com/googleapis/langchain-google-cloud-sql-pg-python/tree/main/docs/langgraph_checkpointer.ipynb
176+
161177
Contributions
162178
~~~~~~~~~~~~~
163179

0 commit comments

Comments
 (0)