mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-30 11:49:38 +02:00
Remove unused when values for Interrupt
This commit is contained in:
@@ -102,5 +102,5 @@ class Send:
|
||||
|
||||
@dataclass
|
||||
class Interrupt:
|
||||
when: Literal["before", "during", "after"]
|
||||
value: Any = None
|
||||
value: Any
|
||||
when: Literal["during"] = "during"
|
||||
|
||||
@@ -40,7 +40,7 @@ class NodeInterrupt(GraphInterrupt):
|
||||
"""Raised by a node to interrupt execution."""
|
||||
|
||||
def __init__(self, value: Any) -> None:
|
||||
super().__init__([Interrupt("during", value)])
|
||||
super().__init__([Interrupt(value)])
|
||||
|
||||
|
||||
class EmptyInputError(Exception):
|
||||
|
||||
@@ -6383,7 +6383,7 @@ def test_dynamic_interrupt(snapshot: SnapshotAssertion) -> None:
|
||||
PregelTask(
|
||||
AnyStr(),
|
||||
"tool_two",
|
||||
interrupts=(Interrupt("during", "Just because..."),),
|
||||
interrupts=(Interrupt("Just because..."),),
|
||||
),
|
||||
),
|
||||
config=tool_two.checkpointer.get_tuple(thread1).config,
|
||||
|
||||
@@ -285,7 +285,7 @@ async def test_dynamic_interrupt(
|
||||
PregelTask(
|
||||
AnyStr(),
|
||||
"tool_two",
|
||||
interrupts=(Interrupt("during", "Just because..."),),
|
||||
interrupts=(Interrupt("Just because..."),),
|
||||
),
|
||||
),
|
||||
config=tup.config,
|
||||
|
||||
Reference in New Issue
Block a user