LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-core_apideprecationrename_parameter
    Functionā—Since v0.2

    rename_parameter

    Copy
    rename_parameter(
      *,
      since: str,
      removal: str,
      old: str,
      new: 
    View source on GitHub
    str
    )
    ->
    Callable
    [
    [
    Callable
    [
    _P
    ,
    _R
    ]
    ]
    ,
    Callable
    [
    _P
    ,
    _R
    ]
    ]

    Parameters

    NameTypeDescription
    since*str
    removal*str
    old*str
    new*str

    Decorator indicating that parameter old of func is renamed to new.

    The actual implementation of func should use new, not old. If old is passed to func, a DeprecationWarning is emitted, and its value is used, even if new is also passed by keyword.

    Example:

    @_api.rename_parameter("3.1", "bad_name", "good_name")
    def func(good_name): ...

    The version in which the parameter was renamed.

    The version in which the old parameter will be removed.

    The old parameter name.

    The new parameter name.