-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple different outputs in video and notebook (Module 3 - Lesson 3: Editing State and Human Feedback) #39
Comments
Also in Studio section we have the following statement:
However there is no path like specified, does it mean that we need to use |
And also I noticed that in the video after the first run we have AI and Tool message, but in the notebook (and also on the second screenshot above) we have also Human message that we inserted as the first message in the stream. |
I found older package versions where I don't have such issues with event duplicates:
Is it expected change in streaming behavior or not? Thank you. |
It seems that there are many changes in langgraph logic and structure for the last month and there are multiple inconsistencies in previous and current behavior (or there is documentation about such changes but I didn't find information about any of these changes). Could you please help with it? |
Hi @rlancemartin, What is interesting that duplicated events do not appear for stream_mode="updates", got this issue for stream_mode="values". Thank you. |
Hi @rlancemartin, I am watching "Lesson 4: Research Assistant" from Module 4 and found that when you resume the graph execution there using stream_mode="values", then you already have the same behavior of this recent stream_mode implementation that I described above, and which is different from the behavior in all of your previous videos in the course. Thank you. |
Hi @labdmitriy. I will confirm with @nfcampos. IIRC, we indeed made changes to streaming so that the current state is emitted when proceeding with |
Hi @rlancemartin, Thanks a lot for your response. If emitting of the current state is the new expected behavior for streaming mode "values", then not only it is inconsistent with the multiple videos (that it is ok because the code is changing very fast), but also it is inconsistent with another streaming modes, for example "updates" which has an old and more expected (in my opinion) behavior. Therefore, for clarity, I am changing any occurrences of "values" streaming to "updates" streaming in your awesome lessons in LangChain Academy, to be consistent with both your videos and old consistent behavior between all streaming modes. One of the examples that seems to me confusing is when you stream the graph to the end and invoke the graph again to continue the execution ( Thank you. |
Thanks! If you put up a PR with this change, I can review. Also we can add a notification to the notebook to highlight that the change in streaming was done, and that videos were filmed with an earlier version of the library that did emit current state. From discussion with @nfcampos this is why me made the change:
|
Thank you, but I don't understand then why stream="values" is changed, but not "updates" mode? Also if working with subgraphs is special case, which mode to use in which cases, if we have 5 officialy supported modes now ("values", "updates", "custom", "messages" and "debug")? Does each mode has its own unique impact on the behavior of the graph (like for subgraphs case) and which mode's behavior was changed? I can make changes for streaming mode and create PR but it would be great to understand the difference between modes and if we have now different behavior of the modes, which is the best mode for this case. |
@vbarda do you have the latest documentation on streaming modes that addresses this question? |
Hi @rlancemartin,
I am trying to reproduce Lesson 3 in Module 3, and found strange difference in outputs:
graph.stream(None, ...)
we have AI and Tool message, and after the second one - only AI message, and it seems consistent with the graph structure:The first case (in video) seems to be intuitive and correct way to resume, but I can't understand, why do I have duplicated event with Tool message for the second run?
Environment information:
Thank you.
The text was updated successfully, but these errors were encountered: