LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    Standard Tests
    Text Splitters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    โŒ˜I

    Chat LangChain

    What can I help with?

    Enter to sendยทShift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicchainsbaseChainmodel_dump
    Methodโ—Since v1.5

    model_dump

    Copy
    model_dump(
        self,
        kwargs: Any = {},
    ) -> dict
    View source on GitHub

    Parameters

    NameTypeDescription
    **kwargsAny
    Default:{}

    Keyword arguments passed to default pydantic.BaseModel.model_dump method.

    Dictionary representation of chain.

    Expects Chain._chain_type property to be implemented and for memory to be null.

    Example:

    chain.model_dump(exclude_unset=True)
    # -> {"_type": "foo", "verbose": False, ...}