-
Is there a way to obtain the graph state when handling the
Thank you! |
Beta Was this translation helpful? Give feedback.
Answered by
hinthornw
Jun 14, 2024
Replies: 1 comment 1 reply
-
If I were doing this, I would fetch the state from the last checkpoint: graph = builder.compile(checkpointer=...)
config = {"configurable": {"thread_id": "abcd123"}}
try:
res = self.graph.invoke({"query": query}, config={"recursion_limit": 1, **config})
except GraphRecursionError:
# I want to read the state here
logger.exception(f"The invocation to graph reached the recursion limit")
state = self.graph.get_state(config) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
balvisio
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I were doing this, I would fetch the state from the last checkpoint: