Checks if the given graph invoke / stream chunk contains interrupt.
The values to check.
true if the values contain an interrupt, false otherwise.
true
false
import { INTERRUPT, isInterrupted } from "@langchain/langgraph";const values = await graph.invoke({ foo: "bar" });if (isInterrupted<string>(values)) { const interrupt = values[INTERRUPT][0].value;} Copy
import { INTERRUPT, isInterrupted } from "@langchain/langgraph";const values = await graph.invoke({ foo: "bar" });if (isInterrupted<string>(values)) { const interrupt = values[INTERRUPT][0].value;}
Checks if the given graph invoke / stream chunk contains interrupt.