call_func_with_variable_args#

langchain_core.runnables.config.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[source]#

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

Parameters:
  • (Union[Callable[[Input] (func) –

    Callable[[Input, CallbackManagerForChainRun], Output], Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output]]):

    The function to call.

  • Output]

    Callable[[Input, CallbackManagerForChainRun], Output], Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output]]):

    The function to call.

  • func (Union[Callable[[Input], Output], Callable[[Input, RunnableConfig], Output], Callable[[Input, CallbackManagerForChainRun], Output], Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output]]) –

  • input (Input) –

  • config (RunnableConfig) –

  • run_manager (Optional[CallbackManagerForChainRun]) –

  • kwargs (Any) –

Return type:

Output

:paramCallable[[Input, CallbackManagerForChainRun], Output],
Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output]]):

The function to call.

Parameters:
Returns:

The output of the function.

Return type:

Output