Merge pull request #279 from langchain-ai/eugene/document_using_nuno_bot

Document Checkpoint
This commit is contained in:
Nuno Campos
2024-04-04 15:02:48 -07:00
committed by GitHub
+19
View File
@@ -13,11 +13,30 @@ from langgraph.utils import StrEnum
class Checkpoint(TypedDict):
"""State snapshot at a given point in time."""
v: int
"""The version of the checkpoint format. Currently 1."""
ts: str
"""The timestamp of the checkpoint in ISO 8601 format."""
channel_values: dict[str, Any]
"""The values of the channels at the time of the checkpoint.
Mapping from channel name to channel snapshot value.
"""
channel_versions: defaultdict[str, int]
"""The versions of the channels at the time of the checkpoint.
The keys are channel names and the values are the logical time step
at which the channel was last updated.
"""
versions_seen: defaultdict[str, defaultdict[str, int]]
"""Map from node ID to map from channel name to version seen.
This keeps track of the versions of the channels that each node has seen.
Used to determine which nodes to execute next.
"""
def _seen_dict():