Skip to content

Commit

Permalink
Merge pull request #2296 from langchain-ai/vb/remap
Browse files Browse the repository at this point in the history
langgraph: handle messages-tuple stream mode in RemoteGraph
  • Loading branch information
nfcampos authored Nov 1, 2024
2 parents d9743f6 + 84e023e commit 47ea264
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libs/langgraph/langgraph/pregel/remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,13 @@ def _get_stream_modes(
if "messages" in updated_stream_modes:
updated_stream_modes.remove("messages")
updated_stream_modes.append("messages-tuple")

# if requested "messages-tuple",
# map to "messages" in requested_stream_modes
if "messages-tuple" in requested_stream_modes:
requested_stream_modes.remove("messages-tuple")
requested_stream_modes.append("messages")

# add 'updates' mode if not present
if "updates" not in updated_stream_modes:
updated_stream_modes.append("updates")
Expand Down

0 comments on commit 47ea264

Please sign in to comment.