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

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicchainsbaseChaindict
    Methodā—Since v1.0

    dict

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

    Parameters

    NameTypeDescription
    **kwargsAny
    Default:{}

    Keyword arguments passed to default pydantic.BaseModel.dict 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, ...}