Skip to content

feat: adding interruption functionality to interrupt graphs #8

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

Closed

Conversation

haarshitgarg
Copy link

I couldn't find a way to interrupt whatever the graph was doing from the outside. So, to handle that I think just a bool flag to interrupt it whenever required and a handler to get the state of the graph.

With lack of pause and resume anyone using it can handle pause/resume externally with the state they do receive.

@haarshitgarg
Copy link
Author

@bsorrentino let me know what you think as this is not the solution to the issue #5 but this do help with the interruption which I was not able to do otherwise

@bsorrentino
Copy link
Owner

@bsorrentino let me know what you think as this is not the solution to the issue #5 but this do help with the interruption which I was not able to do otherwise

Very smart solution in using exception to force interruption. It is not clear to me how to resume from interruption point

@haarshitgarg
Copy link
Author

We can store the current state as it does with the handler and possibly the node information. Next pass we can just start with that node maybe with little modifications?

@bsorrentino
Copy link
Owner

We can store the current state as it does with the handler and possibly the node information. Next pass we can just start with that node maybe with little modifications?

Yes, the problem is store interrupted node information, I'm starting to implement standard LangGraph approach using Checkpoints & Interruptions to acheive this

@haarshitgarg
Copy link
Author

We can store the current state as it does with the handler and possibly the node information. Next pass we can just start with that node maybe with little modifications?

Yes, the problem is store interrupted node information, I'm starting to implement standard LangGraph approach using Checkpoints & Interruptions to acheive this

@bsorrentino, In exactly this location I think I can get back nodeId which is I think you are referring to. I have not checked the checkpoints & interruptions in detail though

image

@bsorrentino
Copy link
Owner

HI @haarshitgarg thanks again for contribution. After your push I've preferred re-use the common approach proposed by official LangGraph main project.

Would be great have your feedbacks about it

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

Successfully merging this pull request may close these issues.

2 participants