node output overriding messages list despite add_messages function #1393
Closed
fcalabrow
started this conversation in
Discussions
Replies: 1 comment 1 reply
-
@fcalabrow by default stream outputs only the updates to a given channel / key in the state. if you pass |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm getting started with the LangGraph documentation, only changing the ChatModel:
If I run this I get:
{'messages': [AIMessage(content='¡Hola! ¿En qué puedo ayudarte hoy?', additional_kwargs={'refusal': None}, response_metadata={'token_usage': {'completion_tokens': 11, 'prompt_tokens': 9, 'total_tokens': 20}, 'model_name': 'gpt-3.5-turbo-0125', 'system_fingerprint': None, 'finish_reason': 'stop', 'logprobs': None}, id='run-eebc2d17-fbeb-4b26-a920-c6de14df45c9-0', usage_metadata={'input_tokens': 9, 'output_tokens': 11, 'total_tokens': 20})]}
The
messages
value doesn't keep the first message. Rather it seems that thechatbot
output is overriding thestate
values.I also tried with a different function, like this:
Now I get:
{'sentences': ['Prueba']}
Evidently, the
add_sentences
function doesn't have any effect.Beta Was this translation helpful? Give feedback.
All reactions