Figure out what we can do to help explain differences between update vs. values #2698
Open
1 task done
Labels
maintainer
Issue created by library maintainer
Privileged issue
Issue Content
There can be some subtle differences when using
update
vs.values
.Specifically, b/c update is prior to the reducer, message coercion never takes place.
This means that
update
andvalues
give different types for the messages!One option is to use the built in message type everywhere
Output from
update
:{'node': {'messages': [{'role': 'ai', 'content': 'hello'}]}}
Output from
values
:{'messages': []}
{'messages': [AIMessage(content='hello', additional_kwargs={}, response_metadata={}, id='2f277693-67e6-4b5a-9ba0-80877b4ba6ce')]}
Note that it's AIMessage in values, but dict format in
update
.While the behavior is as designed, I am not sure if it's as expected by users.
The text was updated successfully, but these errors were encountered: