[PR #245] [MERGED] Add stream_mode=updates or values #1323

Closed
opened 2026-02-20 17:44:27 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraph/pull/245
Author: @nfcampos
Created: 3/31/2024
Status: Merged
Merged: 4/1/2024
Merged by: @nfcampos

Base: mainHead: nc/30mar/stream-mode


📝 Commits (1)

  • 1ad0177 Add stream_mode=updates or values

📊 Changes

7 files changed (+288 additions, -909 deletions)

View changed files

📝 langgraph/graph/graph.py (+3 -4)
📝 langgraph/graph/state.py (+4 -7)
📝 langgraph/pregel/__init__.py (+86 -49)
📝 langgraph/pregel/io.py (+27 -1)
📝 langgraph/pregel/validate.py (+25 -23)
📝 tests/test_pregel.py (+79 -425)
📝 tests/test_pregel_async.py (+64 -400)

📄 Description

  • stream(stream_mode="values") yields thre current channel values whenever a channel is updated
  • stream(stream_mode="updates") yields the update sent to each channel by each node
  • this removes the end value present at the end of each call to Graph/StateGraph/MessageGraph.stream(). To access the end value either call .invoke() or stream(stream_mode="values")

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/langchain-ai/langgraph/pull/245 **Author:** [@nfcampos](https://github.com/nfcampos) **Created:** 3/31/2024 **Status:** ✅ Merged **Merged:** 4/1/2024 **Merged by:** [@nfcampos](https://github.com/nfcampos) **Base:** `main` ← **Head:** `nc/30mar/stream-mode` --- ### 📝 Commits (1) - [`1ad0177`](https://github.com/langchain-ai/langgraph/commit/1ad017781d70e8544b14a303b19c3dea2aa6b27b) Add stream_mode=updates or values ### 📊 Changes **7 files changed** (+288 additions, -909 deletions) <details> <summary>View changed files</summary> 📝 `langgraph/graph/graph.py` (+3 -4) 📝 `langgraph/graph/state.py` (+4 -7) 📝 `langgraph/pregel/__init__.py` (+86 -49) 📝 `langgraph/pregel/io.py` (+27 -1) 📝 `langgraph/pregel/validate.py` (+25 -23) 📝 `tests/test_pregel.py` (+79 -425) 📝 `tests/test_pregel_async.py` (+64 -400) </details> ### 📄 Description - stream(stream_mode="values") yields thre current channel values whenever a channel is updated - stream(stream_mode="updates") yields the update sent to each channel by each node - this removes the __end__ value present at the end of each call to Graph/StateGraph/MessageGraph.stream(). To access the __end__ value either call .invoke() or stream(stream_mode="values") --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-20 17:44:27 -05:00
yindo closed this issue 2026-02-20 17:44:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#1323