Skip to content
Discussion options

You must be logged in to vote

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)

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@balvisio
Comment options

Answer selected by balvisio
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants