Replies: 1 comment
-
What does the node with the LLM call look like? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey everyone, I'm trying to implement an "abort" functionality in my langgraph agent.
More specifically, a user might click "Abort" in my UI. In this case, I'm changing some state in the DB and I'm checking it periodically in parallel to the LangGraph astream loop.
I've tried to create a race condition between these 2 things, but seems like whenever my graph is stuck on some async call (e.g an LLM call), the cancellation doesn't work.
This is my simplified code:
As I said, when the graph is stuck on an LLM call, the race condition doesn't work and the execution proceeds for some reason. I'm not sure why :face_with_monocle:
Does any of you implemented an abort functionality maybe? I'd love to get some advice.
Beta Was this translation helpful? Give feedback.
All reactions