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.

当你在节点内部调用子图多次,且子图以 checkpointer=True(续传模式)编译时,会发生此错误。

故障排除

根据你的需求选择以下方案之一:
  1. 不需要中断? 使用 checkpointer: false 完全退出检查点:
    const subgraph = subgraphBuilder.compile({ checkpointer: false });
    
  2. 需要中断但不需要跨调用持久化? 使用默认的继承模式,省略 checkpointer
    const subgraph = subgraphBuilder.compile();
    
    每次调用获得唯一的命名空间,因此并行执行可以工作。子图每次都从头开始,但可以使用 interrupt()
  3. 需要跨调用持久化? 使用 checkpointer: true。LangGraph 为每次调用分配基于位置的命名空间后缀(calling_nodecalling_node|1 等)以防止冲突。要获得稳定的、基于名称的命名空间,请用唯一的节点名称包装每个子图——参见并行子图

相关