Home / Function/ InputType() — langchain Function Reference

InputType() — langchain Function Reference

Architecture documentation for the InputType() function in base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  9e7ec506_ed2e_07c1_6a26_e06c37c6134c["InputType()"]
  c6a370e4_a02a_c56a_38eb_7ca734dcbfea["RunnableLambda"]
  9e7ec506_ed2e_07c1_6a26_e06c37c6134c -->|defined in| c6a370e4_a02a_c56a_38eb_7ca734dcbfea
  style 9e7ec506_ed2e_07c1_6a26_e06c37c6134c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/runnables/base.py lines 4656–4666

    def InputType(self) -> Any:
        """The type of the input to this `Runnable`."""
        func = getattr(self, "func", None) or self.afunc
        try:
            params = inspect.signature(func).parameters
            first_param = next(iter(params.values()), None)
            if first_param and first_param.annotation != inspect.Parameter.empty:
                return first_param.annotation
        except ValueError:
            pass
        return Any

Domain

Subdomains

Frequently Asked Questions

What does InputType() do?
InputType() is a function in the langchain codebase, defined in libs/core/langchain_core/runnables/base.py.
Where is InputType() defined?
InputType() is defined in libs/core/langchain_core/runnables/base.py at line 4656.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free