本页还没有译文
本页 9 段还没译成简体中文,下面显示的是英文原文。MISSING_CHECKPOINTER
还没翻译译自英文(docs.langchain.com)本页 9 段都还没译
You are attempting to use built-in LangGraph persistence without providing a checkpointer.
This happens when a checkpointer is missing in the compile() method of StateGraph or entrypoint.
Troubleshooting
The following may help resolve this error:
- Initialize and pass a checkpointer to the
compile()method ofStateGraphorentrypoint.
import { InMemorySaver, StateGraph } from "@langchain/langgraph";
const checkpointer = new InMemorySaver();
// Graph API
import { StateGraph } from "@langchain/langgraph";
const graph = new StateGraph(...).compile({ checkpointer });
// Functional API
import { entrypoint } from "@langchain/langgraph";
const workflow = entrypoint(
{ checkpointer, name: "workflow" },
async (messages: string[]) => {
// ...
}
);- Use the LangGraph API so you don't need to implement or configure checkpointers manually. The API handles all persistence infrastructure for you.
Related
- Read more about persistence.
AI 翻译查看英文原文