[PR #126] [MERGED] Implement new Pregel._defaults() method to match Python implementation #507

Closed
opened 2026-02-15 18:17:13 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/langchain-ai/langgraphjs/pull/126
Author: @andrewnguonly
Created: 5/7/2024
Status: Merged
Merged: 5/7/2024
Merged by: @andrewnguonly

Base: mainHead: migrate-pregel-4


📝 Commits (1)

  • 8f872ab Implement Pregel._default().

📊 Changes

3 files changed (+221 additions, -4 deletions)

View changed files

📝 langgraph/src/pregel/index.ts (+87 -2)
📝 langgraph/src/pregel/types.ts (+2 -0)
📝 langgraph/src/tests/pregel.test.ts (+132 -2)

📄 Description

Summary

_defaults() is a new method in the Pregel class (Python implementation) that the updated invoke() and stream() methods depend on.

Reference: https://github.com/langchain-ai/langgraph/blob/main/langgraph/pregel/__init__.py#L558

Implementation

  1. Create new _defaults() method.
  2. Create new streamChannelsAsIs getter. _defaults() depends on this.
  3. Create new All (*) string literal type. _defaults() depends on this. However, this feature was added as part of another feature unrelated to _defaults(). See this PR: https://github.com/langchain-ai/langgraph/pull/367.

Next Steps

  1. Update Pregel invoke() and stream() methods.
  2. Update Graph APIs and remaining Pregel state APIs.

🔄 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/langgraphjs/pull/126 **Author:** [@andrewnguonly](https://github.com/andrewnguonly) **Created:** 5/7/2024 **Status:** ✅ Merged **Merged:** 5/7/2024 **Merged by:** [@andrewnguonly](https://github.com/andrewnguonly) **Base:** `main` ← **Head:** `migrate-pregel-4` --- ### 📝 Commits (1) - [`8f872ab`](https://github.com/langchain-ai/langgraphjs/commit/8f872ab0518fd1a550d558f9514fe19fa8b82c65) Implement Pregel._default(). ### 📊 Changes **3 files changed** (+221 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `langgraph/src/pregel/index.ts` (+87 -2) 📝 `langgraph/src/pregel/types.ts` (+2 -0) 📝 `langgraph/src/tests/pregel.test.ts` (+132 -2) </details> ### 📄 Description ### Summary `_defaults()` is a new method in the `Pregel` class (Python implementation) that the updated `invoke()` and `stream()` methods depend on. Reference: https://github.com/langchain-ai/langgraph/blob/main/langgraph/pregel/__init__.py#L558 ### Implementation 1. Create new `_defaults()` method. 2. Create new `streamChannelsAsIs` getter. `_defaults()` depends on this. 3. Create new `All` (`*`) string literal type. `_defaults()` depends on this. However, this feature was added as part of another feature unrelated to `_defaults()`. See this PR: https://github.com/langchain-ai/langgraph/pull/367. ### Next Steps 1. Update `Pregel` `invoke()` and `stream()` methods. 2. Update Graph APIs and remaining Pregel state APIs. --- <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-15 18:17:13 -05:00
yindo closed this issue 2026-02-15 18:17:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraphjs#507