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

    Copy
    call_func_with_variable_args(
      func: Callable[[Input], Output] | Callable[[Input, RunnableConfig],
    View source on GitHub
    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]
    input*Input
    config*RunnableConfig
    run_managerCallbackManagerForChainRun | None
    Default:None
    **kwargsAny
    Default:{}

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

    The function to call.

    The input to the function.

    The config to pass to the function.

    The run manager to pass to the function.

    The keyword arguments to pass to the function.