with_types() — langchain Function Reference
Architecture documentation for the with_types() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 0f2938ba_950e_46e8_852e_5087c4a53c28["with_types()"] 1ad7446c_5ef5_eeb3_2fc5_22a110a58b17["RunnableBinding"] 0f2938ba_950e_46e8_852e_5087c4a53c28 -->|defined in| 1ad7446c_5ef5_eeb3_2fc5_22a110a58b17 c9c7c02b_0dcd_70ff_1897_383c5e6adb58["with_types()"] c9c7c02b_0dcd_70ff_1897_383c5e6adb58 -->|calls| 0f2938ba_950e_46e8_852e_5087c4a53c28 c9c7c02b_0dcd_70ff_1897_383c5e6adb58["with_types()"] 0f2938ba_950e_46e8_852e_5087c4a53c28 -->|calls| c9c7c02b_0dcd_70ff_1897_383c5e6adb58 style 0f2938ba_950e_46e8_852e_5087c4a53c28 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/base.py lines 6075–6091
def with_types(
self,
input_type: type[Input] | BaseModel | None = None,
output_type: type[Output] | BaseModel | None = None,
) -> Runnable[Input, Output]:
return self.__class__(
bound=self.bound,
kwargs=self.kwargs,
config=self.config,
config_factories=self.config_factories,
custom_input_type=(
input_type if input_type is not None else self.custom_input_type
),
custom_output_type=(
output_type if output_type is not None else self.custom_output_type
),
)
Domain
Subdomains
Defined In
Calls
Called By
Source
Frequently Asked Questions
What does with_types() do?
with_types() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is with_types() defined?
with_types() is defined in libs/core/langchain_core/runnables/base.py at line 6075.
What does with_types() call?
with_types() calls 1 function(s): with_types.
What calls with_types()?
with_types() is called by 1 function(s): with_types.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free