diff --git a/pyproject.toml b/pyproject.toml index 2d456b60..2b161795 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ test = [ "pytest==8.4.2", "pytest-cov==7.0.0", "langchain-tests==1.1.0", - "langgraph==0.6.10" + "langgraph==1.0.4" ] [build-system] diff --git a/requirements.txt b/requirements.txt index adf7896c..bacbe361 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ cloud-sql-python-connector[asyncpg]==1.18.5 numpy==2.3.3; python_version >= "3.11" numpy==2.2.6; python_version == "3.10" -langgraph==0.6.10 +langgraph==1.0.4 langchain-postgres==0.0.16 diff --git a/src/langchain_google_cloud_sql_pg/async_checkpoint.py b/src/langchain_google_cloud_sql_pg/async_checkpoint.py index fc875991..32eef521 100644 --- a/src/langchain_google_cloud_sql_pg/async_checkpoint.py +++ b/src/langchain_google_cloud_sql_pg/async_checkpoint.py @@ -276,7 +276,9 @@ async def aput( async with self.pool.connect() as conn: type_, serialized_checkpoint = self.serde.dumps_typed(checkpoint) - serialized_metadata = self.jsonplus_serde.dumps(metadata) + serialized_metadata = json.dumps(metadata, ensure_ascii=False).encode( + "utf-8", "ignore" + ) await conn.execute( text(query), { @@ -409,7 +411,7 @@ async def alist( (value["type"], value["checkpoint"]) ), metadata=( - self.jsonplus_serde.loads(value["metadata"]) # type: ignore + json.loads(value["metadata"]) # type: ignore if value["metadata"] is not None else {} ), @@ -494,7 +496,7 @@ async def aget_tuple(self, config: RunnableConfig) -> Optional[CheckpointTuple]: }, checkpoint=self.serde.loads_typed((value["type"], value["checkpoint"])), metadata=( - self.jsonplus_serde.loads(value["metadata"]) # type: ignore + json.loads(value["metadata"]) # type: ignore if value["metadata"] is not None else {} ),