This commit is contained in:
Nuno Campos
2024-09-22 12:51:06 -07:00
parent 1f347ed48e
commit 47fe321e31
2 changed files with 4 additions and 4 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import sys
from types import MappingProxyType
from typing import Any, Mapping
from typing import Any, Literal, Mapping, cast
from langgraph.types import Interrupt, Send # noqa: F401
@@ -73,7 +73,7 @@ NS_SEP = sys.intern("|")
# for checkpoint_ns, separates each level (ie. graph|subgraph|subsubgraph)
NS_END = sys.intern(":")
# for checkpoint_ns, for each level, separates the namespace from the task_id
CONF = sys.intern("configurable")
CONF = cast(Literal["configurable"], sys.intern("configurable"))
# key for the configurable dict in RunnableConfig
RESERVED = {
+2 -2
View File
@@ -83,9 +83,9 @@ def merge_configs(*configs: Optional[RunnableConfig]) -> RunnableConfig:
base[key] = value # type: ignore[literal-required]
elif key == CONF:
if base_value := base.get(key):
base[key] = {**base_value, **value} # type: ignore
base[key] = {**base_value, **value} # type: ignore[dict-item]
else:
base[key] = value # type: ignore[literal-required]
base[key] = value
elif key == "callbacks":
base_callbacks = base.get("callbacks")
# callbacks can be either None, list[handler] or manager