mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-21 07:02:25 +02:00
Add checkpoint config to checkpoint metadata?
This commit is contained in:
@@ -760,10 +760,11 @@ class Pregel(
|
||||
)
|
||||
)
|
||||
checkpoint_config = {
|
||||
**checkpoint_config,
|
||||
"configurable": {
|
||||
**checkpoint_config["configurable"],
|
||||
"thread_ts": checkpoint["id"],
|
||||
}
|
||||
},
|
||||
}
|
||||
# increment start to 0
|
||||
start += 1
|
||||
@@ -885,10 +886,11 @@ class Pregel(
|
||||
)
|
||||
)
|
||||
checkpoint_config = {
|
||||
**checkpoint_config,
|
||||
"configurable": {
|
||||
**checkpoint_config["configurable"],
|
||||
"thread_ts": checkpoint["id"],
|
||||
}
|
||||
},
|
||||
}
|
||||
# yield debug checkpoint
|
||||
if stream_mode == "debug":
|
||||
@@ -1031,10 +1033,11 @@ class Pregel(
|
||||
)
|
||||
)
|
||||
checkpoint_config = {
|
||||
**checkpoint_config,
|
||||
"configurable": {
|
||||
**checkpoint_config["configurable"],
|
||||
"thread_ts": checkpoint["id"],
|
||||
}
|
||||
},
|
||||
}
|
||||
# increment start to 0
|
||||
start += 1
|
||||
@@ -1162,10 +1165,11 @@ class Pregel(
|
||||
)
|
||||
)
|
||||
checkpoint_config = {
|
||||
**checkpoint_config,
|
||||
"configurable": {
|
||||
**checkpoint_config["configurable"],
|
||||
"thread_ts": checkpoint["id"],
|
||||
}
|
||||
},
|
||||
}
|
||||
# yield debug checkpoint
|
||||
if stream_mode == "debug":
|
||||
|
||||
+24
-4
@@ -4372,10 +4372,15 @@ def test_branch_then(snapshot: SnapshotAssertion) -> None:
|
||||
"step": 0,
|
||||
"payload": {
|
||||
"config": {
|
||||
"tags": [],
|
||||
"metadata": {"thread_id": "10"},
|
||||
"callbacks": None,
|
||||
"recursion_limit": 25,
|
||||
"run_id": None,
|
||||
"configurable": {
|
||||
"thread_id": "10",
|
||||
"thread_ts": AnyStr(),
|
||||
}
|
||||
},
|
||||
},
|
||||
"values": {"my_key": "value", "market": "DE"},
|
||||
},
|
||||
@@ -4407,10 +4412,15 @@ def test_branch_then(snapshot: SnapshotAssertion) -> None:
|
||||
"step": 1,
|
||||
"payload": {
|
||||
"config": {
|
||||
"tags": [],
|
||||
"metadata": {"thread_id": "10"},
|
||||
"callbacks": None,
|
||||
"recursion_limit": 25,
|
||||
"run_id": None,
|
||||
"configurable": {
|
||||
"thread_id": "10",
|
||||
"thread_ts": AnyStr(),
|
||||
}
|
||||
},
|
||||
},
|
||||
"values": {"my_key": "value prepared", "market": "DE"},
|
||||
},
|
||||
@@ -4442,10 +4452,15 @@ def test_branch_then(snapshot: SnapshotAssertion) -> None:
|
||||
"step": 2,
|
||||
"payload": {
|
||||
"config": {
|
||||
"tags": [],
|
||||
"metadata": {"thread_id": "10"},
|
||||
"callbacks": None,
|
||||
"recursion_limit": 25,
|
||||
"run_id": None,
|
||||
"configurable": {
|
||||
"thread_id": "10",
|
||||
"thread_ts": AnyStr(),
|
||||
}
|
||||
},
|
||||
},
|
||||
"values": {"my_key": "value prepared slow", "market": "DE"},
|
||||
},
|
||||
@@ -4477,10 +4492,15 @@ def test_branch_then(snapshot: SnapshotAssertion) -> None:
|
||||
"step": 3,
|
||||
"payload": {
|
||||
"config": {
|
||||
"tags": [],
|
||||
"metadata": {"thread_id": "10"},
|
||||
"callbacks": None,
|
||||
"recursion_limit": 25,
|
||||
"run_id": None,
|
||||
"configurable": {
|
||||
"thread_id": "10",
|
||||
"thread_ts": AnyStr(),
|
||||
}
|
||||
},
|
||||
},
|
||||
"values": {
|
||||
"my_key": "value prepared slow finished",
|
||||
|
||||
@@ -3584,8 +3584,6 @@ async def test_start_branch_then() -> None:
|
||||
|
||||
|
||||
async def test_branch_then() -> None:
|
||||
pass
|
||||
|
||||
class State(TypedDict):
|
||||
my_key: Annotated[str, operator.add]
|
||||
market: str
|
||||
@@ -3629,10 +3627,15 @@ async def test_branch_then() -> None:
|
||||
"step": 0,
|
||||
"payload": {
|
||||
"config": {
|
||||
"tags": [],
|
||||
"metadata": {"thread_id": "10"},
|
||||
"callbacks": None,
|
||||
"recursion_limit": 25,
|
||||
"run_id": None,
|
||||
"configurable": {
|
||||
"thread_id": "10",
|
||||
"thread_ts": AnyStr(),
|
||||
}
|
||||
},
|
||||
},
|
||||
"values": {"my_key": "value", "market": "DE"},
|
||||
},
|
||||
@@ -3664,10 +3667,15 @@ async def test_branch_then() -> None:
|
||||
"step": 1,
|
||||
"payload": {
|
||||
"config": {
|
||||
"tags": [],
|
||||
"metadata": {"thread_id": "10"},
|
||||
"callbacks": None,
|
||||
"recursion_limit": 25,
|
||||
"run_id": None,
|
||||
"configurable": {
|
||||
"thread_id": "10",
|
||||
"thread_ts": AnyStr(),
|
||||
}
|
||||
},
|
||||
},
|
||||
"values": {"my_key": "value prepared", "market": "DE"},
|
||||
},
|
||||
@@ -3699,10 +3707,15 @@ async def test_branch_then() -> None:
|
||||
"step": 2,
|
||||
"payload": {
|
||||
"config": {
|
||||
"tags": [],
|
||||
"metadata": {"thread_id": "10"},
|
||||
"callbacks": None,
|
||||
"recursion_limit": 25,
|
||||
"run_id": None,
|
||||
"configurable": {
|
||||
"thread_id": "10",
|
||||
"thread_ts": AnyStr(),
|
||||
}
|
||||
},
|
||||
},
|
||||
"values": {"my_key": "value prepared slow", "market": "DE"},
|
||||
},
|
||||
@@ -3734,10 +3747,15 @@ async def test_branch_then() -> None:
|
||||
"step": 3,
|
||||
"payload": {
|
||||
"config": {
|
||||
"tags": [],
|
||||
"metadata": {"thread_id": "10"},
|
||||
"callbacks": None,
|
||||
"recursion_limit": 25,
|
||||
"run_id": None,
|
||||
"configurable": {
|
||||
"thread_id": "10",
|
||||
"thread_ts": AnyStr(),
|
||||
}
|
||||
},
|
||||
},
|
||||
"values": {
|
||||
"my_key": "value prepared slow finished",
|
||||
|
||||
Reference in New Issue
Block a user