Handling update of state parameters in multiple nodes at the same time #1787
-
def seed_question_router(state: State): I have created a routing function like above. A different state parameter will be updated at both nodes. But I am receiving this error, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi you need to attach a reducer to the state keys that you want to update from multiple nodes at the same time https://langchain-ai.github.io/langgraph/concepts/low_level/#reducers |
Beta Was this translation helpful? Give feedback.
-
Thanks
Le mar. 5 nov. 2024 à 10:49, Abhi Pemmaraju ***@***.***> a
écrit :
… @RetroFiveCinque <https://github.com/RetroFiveCinque> I was returning the
whole state at node node...
If you are updating different key at same steps using multiple nodes you
can directly return that key value as dict.
If you are trying to update the same key....You should use some reducer
function.
—
Reply to this email directly, view it on GitHub
<#1787 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BLJ6LLHSJPD2NGROBE4C53TZ7CIDVAVCNFSM6AAAAABOTL2RDOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMJVGI3TENA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
Hi you need to attach a reducer to the state keys that you want to update from multiple nodes at the same time https://langchain-ai.github.io/langgraph/concepts/low_level/#reducers