with_config() — langchain Function Reference
Architecture documentation for the with_config() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 6b835391_7b83_c070_63f0_3b2aed993f7e["with_config()"] 1ad7446c_5ef5_eeb3_2fc5_22a110a58b17["RunnableBinding"] 6b835391_7b83_c070_63f0_3b2aed993f7e -->|defined in| 1ad7446c_5ef5_eeb3_2fc5_22a110a58b17 e2bea970_c5e9_9585_6fa1_e85a5a79ce5e["with_config()"] 6b835391_7b83_c070_63f0_3b2aed993f7e -->|calls| e2bea970_c5e9_9585_6fa1_e85a5a79ce5e style 6b835391_7b83_c070_63f0_3b2aed993f7e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/base.py lines 6006–6019
def with_config(
self,
config: RunnableConfig | None = None,
# Sadly Unpack is not well supported by mypy so this will have to be untyped
**kwargs: Any,
) -> Runnable[Input, Output]:
return self.__class__(
bound=self.bound,
kwargs=self.kwargs,
config=cast("RunnableConfig", {**self.config, **(config or {}), **kwargs}),
config_factories=self.config_factories,
custom_input_type=self.custom_input_type,
custom_output_type=self.custom_output_type,
)
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does with_config() do?
with_config() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is with_config() defined?
with_config() is defined in libs/core/langchain_core/runnables/base.py at line 6006.
What does with_config() call?
with_config() calls 1 function(s): with_config.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free