Skip to content
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

Unexpected Behavior in updateState During 'Wait for User Input' Scenario #25

Open
hide212131 opened this issue Sep 6, 2024 · 1 comment

Comments

@hide212131
Copy link

I have created a Java Notebook based on LangGraph's 'Wait for user input - Simple Usage' page. However, after interrupting once and then receiving user feedback, functions like updateState and getNext do not seem to behave as expected.

I have uploaded the Java Notebook here. The expected value for graph.getState(config).getNext() is 'step_3', but it remains 'human_feedback' regardless of the config value.

@bsorrentino
Copy link
Owner

bsorrentino commented Sep 6, 2024

@hide212131 thanks for this valuable feedback.

You must change:

var updateConfig = graph.updateState(invokeConfig, mapOf("user_feedback", userInput), "human_feedback");

With

var updateConfig = graph.updateState(invokeConfig, mapOf("user_feedback", userInput), null);

the last argument to graph.updateState is asNode which applies the update as if it were performed by the specified node

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants