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-corerunnablesconfigcall_func_with_variable_args
    Function●Since v0.1

    call_func_with_variable_args

    Call function that may optionally accept a run_manager and/or config.

    Copy
    call_func_with_variable_args(
      func: Callable[[Input], Output] | Callable[[Input, RunnableConfig], Output] | Callable[[Input, CallbackManagerForChainRun], Output] | Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output],
      input: Input,
      config: RunnableConfig,
      run_manager: CallbackManagerForChainRun | None = None,
      **kwargs: Any = {}
    ) -> Output

    Parameters

    NameTypeDescription
    func*Callable[[Input], Output] | Callable[[Input, RunnableConfig], Output] | Callable[[Input, CallbackManagerForChainRun], Output] | Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output]

    The function to call.

    input*Input

    The input to the function.

    config*RunnableConfig

    The config to pass to the function.

    run_managerCallbackManagerForChainRun | None
    Default:None

    The run manager to pass to the function.

    **kwargsAny
    Default:{}

    The keyword arguments to pass to the function.

    View source on GitHub