Skip to content

Commit

Permalink
Revert metadata serde
Browse files Browse the repository at this point in the history
  • Loading branch information
vermapratyush committed Sep 12, 2024
1 parent 7be933f commit fa9009a
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
EmptyChannelError,
get_checkpoint_id,
)
from langgraph.checkpoint.serde.jsonplus import JsonPlusSerializer
from langgraph.checkpoint.serde.types import TASKS, ChannelProtocol

MetadataInput = Optional[dict[str, Any]]
Expand Down Expand Up @@ -131,8 +130,6 @@ class BasePostgresSaver(BaseCheckpointSaver):
UPSERT_CHECKPOINT_WRITES_SQL = UPSERT_CHECKPOINT_WRITES_SQL
INSERT_CHECKPOINT_WRITES_SQL = INSERT_CHECKPOINT_WRITES_SQL

jsonplus_serde = JsonPlusSerializer()

def _load_checkpoint(
self,
checkpoint: dict[str, Any],
Expand Down Expand Up @@ -224,7 +221,7 @@ def _dump_writes(
]

def _load_metadata(self, metadata: dict[str, Any]) -> dict[str, Any]:
return self.serde.loads(self.serde.dumps(metadata))
return self.jsonplus_serde.loads(self.jsonplus_serde.dumps(metadata))

def _dump_metadata(self, metadata) -> str:
serialized_metadata_type, serialized_metadata = self.jsonplus_serde.dumps_typed(
Expand Down

0 comments on commit fa9009a

Please sign in to comment.