get_input_schema() — langchain Function Reference
Architecture documentation for the get_input_schema() function in base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD ffe070be_ec88_fa83_4f8e_d29669becf89["get_input_schema()"] 8e601be2_5eac_8426_f30d_f1ed37138bd8["RunnableGenerator"] ffe070be_ec88_fa83_4f8e_d29669becf89 -->|defined in| 8e601be2_5eac_8426_f30d_f1ed37138bd8 255c479b_b9fa_44d8_4de5_2562051e06b5["get_name()"] ffe070be_ec88_fa83_4f8e_d29669becf89 -->|calls| 255c479b_b9fa_44d8_4de5_2562051e06b5 style ffe070be_ec88_fa83_4f8e_d29669becf89 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/langchain_core/runnables/base.py lines 4244–4267
def get_input_schema(self, config: RunnableConfig | None = None) -> type[BaseModel]:
# Override the default implementation.
# For a runnable generator, we need to bring to provide the
# module of the underlying function when creating the model.
root_type = self.InputType
func = getattr(self, "_transform", None) or self._atransform
module = getattr(func, "__module__", None)
if (
inspect.isclass(root_type)
and not isinstance(root_type, GenericAlias)
and issubclass(root_type, BaseModel)
):
return root_type
return create_model_v2(
self.get_name("Input"),
root=root_type,
# To create the schema, we need to provide the module
# where the underlying function is defined.
# This allows pydantic to resolve type annotations appropriately.
module_name=module,
)
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does get_input_schema() do?
get_input_schema() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is get_input_schema() defined?
get_input_schema() is defined in libs/core/langchain_core/runnables/base.py at line 4244.
What does get_input_schema() call?
get_input_schema() calls 1 function(s): get_name.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free