get_name() — langchain Function Reference
Architecture documentation for the get_name() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb["get_name()"] 4022a4a7_2f12_918e_95f7_87d452c5dc9e["Runnable"] 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb -->|defined in| 4022a4a7_2f12_918e_95f7_87d452c5dc9e 368f6e6a_f895_2871_89fe_8bf6473a74e2["InputType()"] 368f6e6a_f895_2871_89fe_8bf6473a74e2 -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb 5190b3fa_f80f_a987_1443_a76b0f2ced9f["OutputType()"] 5190b3fa_f80f_a987_1443_a76b0f2ced9f -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb 125c96c1_bd40_4c0a_e008_1b2d7d545256["get_input_schema()"] 125c96c1_bd40_4c0a_e008_1b2d7d545256 -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb 8763aeb7_5982_a349_d09d_56e770883eae["get_output_schema()"] 8763aeb7_5982_a349_d09d_56e770883eae -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb 1489da2b_5401_76a3_ba05_99b810209fa3["config_schema()"] 1489da2b_5401_76a3_ba05_99b810209fa3 -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb d7ce2e1d_b396_28d9_0fe9_d910db244441["get_graph()"] d7ce2e1d_b396_28d9_0fe9_d910db244441 -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb e452ef21_518c_1508_7120_080fde38fa48["_call_with_config()"] e452ef21_518c_1508_7120_080fde38fa48 -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb 04250f25_4591_3561_3fce_37dcde5240f9["_acall_with_config()"] 04250f25_4591_3561_3fce_37dcde5240f9 -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb b94d1251_0016_0bba_e059_89e58d92df4e["_batch_with_config()"] b94d1251_0016_0bba_e059_89e58d92df4e -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb 7ec0cd61_e56d_0ff1_7fe4_4adb447059d6["_abatch_with_config()"] 7ec0cd61_e56d_0ff1_7fe4_4adb447059d6 -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb c49dc69d_f9a5_ae8c_118d_180778a5a3cd["_transform_stream_with_config()"] c49dc69d_f9a5_ae8c_118d_180778a5a3cd -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb 3e816ff5_58db_8211_c591_c62768220f37["_atransform_stream_with_config()"] 3e816ff5_58db_8211_c591_c62768220f37 -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb e9469d43_b057_bd44_72a5_6fdf965c9bca["get_name()"] e9469d43_b057_bd44_72a5_6fdf965c9bca -->|calls| 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb style 1dc6ac7a_dcbe_0b0a_c9c3_ebaf3a38b9cb fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/base.py lines 261–297
def get_name(self, suffix: str | None = None, *, name: str | None = None) -> str:
"""Get the name of the `Runnable`.
Args:
suffix: An optional suffix to append to the name.
name: An optional name to use instead of the `Runnable`'s name.
Returns:
The name of the `Runnable`.
"""
if name:
name_ = name
elif hasattr(self, "name") and self.name:
name_ = self.name
else:
# Here we handle a case where the runnable subclass is also a pydantic
# model.
cls = self.__class__
# Then it's a pydantic sub-class, and we have to check
# whether it's a generic, and if so recover the original name.
if (
hasattr(
cls,
"__pydantic_generic_metadata__",
)
and "origin" in cls.__pydantic_generic_metadata__
and cls.__pydantic_generic_metadata__["origin"] is not None
):
name_ = cls.__pydantic_generic_metadata__["origin"].__name__
else:
name_ = cls.__name__
if suffix:
if name_[0].isupper():
return name_ + suffix.title()
return name_ + "_" + suffix.lower()
return name_
Domain
Subdomains
Defined In
Calls
Called By
- InputType()
- OutputType()
- _abatch_with_config()
- _acall_with_config()
- _atransform_stream_with_config()
- _batch_with_config()
- _call_with_config()
- _transform_stream_with_config()
- abatch()
- ainvoke()
- ainvoke()
- batch()
- config_schema()
- get_graph()
- get_input_schema()
- get_input_schema()
- get_input_schema()
- get_input_schema()
- get_name()
- get_name()
- get_name()
- get_output_schema()
- get_output_schema()
- get_output_schema()
- get_output_schema()
- invoke()
- invoke()
- to_json()
Source
Frequently Asked Questions
What does get_name() do?
get_name() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is get_name() defined?
get_name() is defined in libs/core/langchain_core/runnables/base.py at line 261.
What does get_name() call?
get_name() calls 1 function(s): get_name.
What calls get_name()?
get_name() is called by 28 function(s): InputType, OutputType, _abatch_with_config, _acall_with_config, _atransform_stream_with_config, _batch_with_config, _call_with_config, _transform_stream_with_config, and 20 more.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free