• Checks if the given graph invoke / stream chunk contains interrupt.

    Type Parameters

    • Value = unknown

    Parameters

    • values: unknown

      The values to check.

    Returns values is {
        __interrupt__: Interrupt<Value>[];
    }

    true if the values contain an interrupt, false otherwise.

    Example

    import { INTERRUPT, isInterrupted } from "@langchain/langgraph";

    const values = await graph.invoke({ foo: "bar" });
    if (isInterrupted<string>(values)) {
    const interrupt = values[INTERRUPT][0].value;
    }