LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph.checkpointbaseBaseCheckpointSaverget_next_version
    Method●Since v1.0

    get_next_version

    Generate the next version ID for a channel.

    Default is to use integer versions, incrementing by 1.

    If you override, you can use str/int/float versions, as long as they are monotonically increasing.

    Copy
    get_next_version(
        self,
        current: V | None,
        channel: None,
    ) -> V

    Parameters

    NameTypeDescription
    current*V | None

    The current version identifier (int, float, or str).

    channel*None

    Deprecated argument, kept for backwards compatibility.

    View source on GitHub