Skip to content

Commit

Permalink
Fix get_state
Browse files Browse the repository at this point in the history
  • Loading branch information
nfcampos committed Nov 26, 2024
1 parent 2221dbe commit 5fdba64
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions libs/langgraph/langgraph/func/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def _imp(func: types.FunctionType) -> Pregel:
channels={START: EphemeralValue(Any), END: LastValue(Any, END)},
input_channels=START,
output_channels=END,
stream_channels=END,
stream_mode="updates",
checkpointer=checkpointer,
store=store,
Expand Down
2 changes: 2 additions & 0 deletions libs/langgraph/tests/test_pregel.py
Original file line number Diff line number Diff line change
Expand Up @@ -2039,6 +2039,8 @@ def graph(state: dict) -> dict:
{"graph": {"a": "0foobarbaz", "c": "something else"}},
]

assert graph.get_state(thread1).values == {"a": "0foobarbaz", "c": "something else"}


@pytest.mark.repeat(20)
@pytest.mark.parametrize("checkpointer_name", ALL_CHECKPOINTERS_SYNC)
Expand Down

0 comments on commit 5fdba64

Please sign in to comment.