langgraph, checkpoint-postgres: propagate new versions in update_state (#1270)

* langgraph, checkpoint-postgres: propagate new versions in update_state
This commit is contained in:
Vadym Barda
2024-08-08 11:55:55 -04:00
committed by GitHub
parent be8476d981
commit 4dc27b98f1
6 changed files with 38 additions and 20 deletions
@@ -194,7 +194,6 @@ class PostgresSaver(BasePostgresSaver):
thread_id,
checkpoint_ns,
copy.pop("channel_values"),
copy["channel_versions"],
new_versions,
),
)
@@ -201,7 +201,6 @@ class AsyncPostgresSaver(BasePostgresSaver):
thread_id,
checkpoint_ns,
copy.pop("channel_values"),
copy["channel_versions"],
new_versions,
),
)
@@ -150,14 +150,10 @@ class BasePostgresSaver(BaseCheckpointSaver):
checkpoint_ns: str,
values: dict[str, Any],
versions: dict[str, str],
new_versions: Optional[dict[str, str]],
) -> list[tuple[str, str, str, str, str, bytes]]:
if not versions:
return []
if new_versions:
versions = new_versions
return [
(
thread_id,