Skip to main content

Documentation Index

Fetch the complete documentation index at: https://nvd-54.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

你正在尝试使用 LangGraph 的内置持久化功能,但未提供检查点。 StateGraphentrypointcompile() 方法中缺少 checkpointer 时会发生此情况。

故障排除

以下可能有助于解决此错误:
import { InMemorySaver, StateGraph } from "@langchain/langgraph";
const checkpointer = new InMemorySaver();

// 图 API
import { StateGraph } from "@langchain/langgraph";
const graph = new StateGraph(...).compile({ checkpointer });

// 函数式 API
import { entrypoint } from "@langchain/langgraph";
const workflow = entrypoint(
    { checkpointer, name: "workflow" },
    async (messages: string[]) => {
        // ...
    }
);
  • 使用 LangGraph API,这样你就不需要手动实现或配置检查点。API 为你处理所有持久化基础设施。

相关