mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-17 21:25:46 +02:00
Merge pull request #2296 from langchain-ai/vb/remap
langgraph: handle messages-tuple stream mode in RemoteGraph
This commit is contained in:
@@ -538,6 +538,13 @@ class RemoteGraph(PregelProtocol):
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user