mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-29 04:55:09 +02:00
Add back .join() method removed by accident
This commit is contained in:
@@ -82,6 +82,15 @@ class PregelInvoke(RunnableBinding):
|
||||
**other_kwargs,
|
||||
)
|
||||
|
||||
def join(self, channels: Sequence[str]) -> PregelInvoke:
|
||||
joiner = RunnablePassthrough.assign(
|
||||
**{chan: PregelRead(chan) for chan in channels}
|
||||
)
|
||||
if isinstance(self.bound, RunnablePassthrough):
|
||||
return PregelInvoke(channels=self.channels, bound=joiner)
|
||||
else:
|
||||
return PregelInvoke(channels=self.channels, bound=self.bound | joiner)
|
||||
|
||||
def __or__(
|
||||
self,
|
||||
other: Runnable[Any, Other]
|
||||
|
||||
Reference in New Issue
Block a user