langchain_core.runnables.config
.call_func_with_variable_argsΒΆ
- langchain_core.runnables.config.call_func_with_variable_args(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] = 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
input (Input) β The input to the function.
config (RunnableConfig) β The config to pass to the function.
run_manager (CallbackManagerForChainRun) β The run manager to pass to the function. Defaults to None.
**kwargs (Any) β The keyword arguments to pass to the function.
func (Union[Callable[[Input], Output], Callable[[Input, RunnableConfig], Output], Callable[[Input, CallbackManagerForChainRun], Output], Callable[[Input, CallbackManagerForChainRun, RunnableConfig], Output]]) β
- Returns
The output of the function.
- Return type
Output