mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-17 21:25:46 +02:00
- This introduces a new optional method BaseChannel.consume, which gets called when a channel triggers a node - This is an alternative place to clean up channel state, in addition to the existing pattern of clearing state in the update() call for the next step - Channels should implement consume() when they want to clean up state exactly if and only if the channel triggered a node - Channels should clean up state in update() when they instead need to guarantee their value is available for a single step, irrespective of whether it was actually read