diff --git a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py index 9c246ef74..9aa08ad0f 100644 --- a/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py +++ b/libs/checkpoint-postgres/langgraph/checkpoint/postgres/aio.py @@ -57,7 +57,11 @@ def __init__( @classmethod @asynccontextmanager async def from_conn_string( - cls, conn_string: str, *, pipeline: bool = False + cls, + conn_string: str, + *, + pipeline: bool = False, + serde: Optional[SerializerProtocol] = None, ) -> AsyncIterator["AsyncPostgresSaver"]: """Create a new PostgresSaver instance from a connection string. @@ -73,9 +77,9 @@ async def from_conn_string( ) as conn: if pipeline: async with conn.pipeline() as pipe: - yield AsyncPostgresSaver(conn, pipe) + yield AsyncPostgresSaver(conn=conn, pipe=pipe, serde=serde) else: - yield AsyncPostgresSaver(conn) + yield AsyncPostgresSaver(conn=conn, serde=serde) async def setup(self) -> None: """Set up the checkpoint database asynchronously.