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

    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.

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

    Example:

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

    Parameters

    NameTypeDescription
    since*str

    The version in which the parameter was renamed.

    removal*str

    The version in which the old parameter will be removed.

    old*str

    The old parameter name.

    new*str

    The new parameter name.

    View source on GitHub