Home / Function/ get_input_schema() — langchain Function Reference

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
  4092ee09_16a5_468b_93e6_e09fe0c4c41d["get_input_schema()"]
  11e31530_bade_f413_97e7_9abc389b68c7["RunnableEachBase"]
  4092ee09_16a5_468b_93e6_e09fe0c4c41d -->|defined in| 11e31530_bade_f413_97e7_9abc389b68c7
  255c479b_b9fa_44d8_4de5_2562051e06b5["get_name()"]
  4092ee09_16a5_468b_93e6_e09fe0c4c41d -->|calls| 255c479b_b9fa_44d8_4de5_2562051e06b5
  style 4092ee09_16a5_468b_93e6_e09fe0c4c41d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/base.py lines 5296–5311

    def get_input_schema(self, config: RunnableConfig | None = None) -> type[BaseModel]:
        return create_model_v2(
            self.get_name("Input"),
            root=(
                list[self.bound.get_input_schema(config)],  # type: ignore[misc]
                None,
            ),
            # create model needs access to appropriate type annotations to be
            # able to construct the Pydantic model.
            # When we create the model, we pass information about the namespace
            # where the model is being created, so the type annotations can
            # be resolved correctly as well.
            # self.__class__.__module__ handles the case when the Runnable is
            # being sub-classed in a different module.
            module_name=self.__class__.__module__,
        )

Domain

Subdomains

Calls

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 5296.
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