lastResult

suspend fun lastResult(config: GraphConfig<State>): GraphResult<State>?

Returns where the run of GraphConfig.threadId stopped, read from its last checkpoint, without running anything. Use it to restore a screen after a restart, or to build the next input of a conversation from the state the last run ended with.

The result is GraphResult.Completed when the run finished, and GraphResult.Interrupted when resume can continue it: the run paused at an interrupt, or stopped before or between two steps because a node failed or the process ended. It is null when the thread has no checkpoint.

Throws

if config has no checkpointer.