call_func_with_variable_args() — langchain Function Reference
Architecture documentation for the call_func_with_variable_args() function in config.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7079a884_2cef_5b12_cc79_e93a4668dcc5["call_func_with_variable_args()"] 4d16987d_fe07_22bb_f46d_7daeb24e0367["config.py"] 7079a884_2cef_5b12_cc79_e93a4668dcc5 -->|defined in| 4d16987d_fe07_22bb_f46d_7daeb24e0367 cd508af1_56d4_d79e_3d0e_5e0f0df7aaa2["patch_config()"] 7079a884_2cef_5b12_cc79_e93a4668dcc5 -->|calls| cd508af1_56d4_d79e_3d0e_5e0f0df7aaa2 style 7079a884_2cef_5b12_cc79_e93a4668dcc5 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/config.py lines 423–452
def 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:
"""Call function that may optionally accept a run_manager and/or config.
Args:
func: The function to call.
input: The input to the function.
config: The config to pass to the function.
run_manager: The run manager to pass to the function.
**kwargs: The keyword arguments to pass to the function.
Returns:
The output of the function.
"""
if accepts_config(func):
if run_manager is not None:
kwargs["config"] = patch_config(config, callbacks=run_manager.get_child())
else:
kwargs["config"] = config
if run_manager is not None and accepts_run_manager(func):
kwargs["run_manager"] = run_manager
return func(input, **kwargs) # type: ignore[call-arg]
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does call_func_with_variable_args() do?
call_func_with_variable_args() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/config.py.
Where is call_func_with_variable_args() defined?
call_func_with_variable_args() is defined in libs/core/langchain_core/runnables/config.py at line 423.
What does call_func_with_variable_args() call?
call_func_with_variable_args() calls 1 function(s): patch_config.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free