mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-05 17:27:47 +02:00
Exclude complex values from checkpoint metadata
This commit is contained in:
@@ -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,
|
||||
}
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user