mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-26 09:32:25 +02:00
Exclude complex values from checkpoint metadata
This commit is contained in:
@@ -323,8 +323,14 @@ class PostgresSaver(BasePostgresSaver):
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
|
||||
@@ -281,8 +281,14 @@ class AsyncPostgresSaver(BasePostgresSaver):
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
|
||||
@@ -429,8 +429,14 @@ class ShallowPostgresSaver(BasePostgresSaver):
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
@@ -758,8 +764,14 @@ class AsyncShallowPostgresSaver(BasePostgresSaver):
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "langgraph-checkpoint-postgres"
|
||||
version = "2.0.14"
|
||||
version = "2.0.15"
|
||||
description = "Library with a Postgres implementation of LangGraph checkpoint saver."
|
||||
authors = []
|
||||
license = "MIT"
|
||||
|
||||
@@ -402,9 +402,13 @@ class SqliteSaver(BaseCheckpointSaver[str]):
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
if not k.startswith("__") and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__") and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -468,9 +468,13 @@ class AsyncSqliteSaver(BaseCheckpointSaver[str]):
|
||||
**{
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
if not k.startswith("__") and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__") and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "langgraph-checkpoint-sqlite"
|
||||
version = "2.0.4"
|
||||
version = "2.0.5"
|
||||
description = "Library with a SQLite implementation of LangGraph checkpoint saver."
|
||||
authors = []
|
||||
license = "MIT"
|
||||
|
||||
@@ -362,8 +362,14 @@ class InMemorySaver(
|
||||
k: v
|
||||
for k, v in config["configurable"].items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**{
|
||||
k: v
|
||||
for k, v in config.get("metadata", {}).items()
|
||||
if not k.startswith("__")
|
||||
and isinstance(v, (str, int, bool, float))
|
||||
},
|
||||
**config.get("metadata", {}),
|
||||
**metadata,
|
||||
}
|
||||
),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[tool.poetry]
|
||||
name = "langgraph-checkpoint"
|
||||
version = "2.0.14"
|
||||
version = "2.0.15"
|
||||
description = "Library with base interfaces for LangGraph checkpoint savers."
|
||||
authors = []
|
||||
license = "MIT"
|
||||
|
||||
Reference in New Issue
Block a user