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
  131593cf_91da_c902_b4cf_3e47a3c26e5e["InputType()"]
  74f697e6_2555_becc_640e_6f41ea707eba["_ConfigurableModel"]
  131593cf_91da_c902_b4cf_3e47a3c26e5e -->|defined in| 74f697e6_2555_becc_640e_6f41ea707eba
  style 131593cf_91da_c902_b4cf_3e47a3c26e5e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain_v1/langchain/chat_models/base.py lines 703–708

    def InputType(self) -> TypeAlias:
        """Get the input type for this `Runnable`."""
        # This is a version of LanguageModelInput which replaces the abstract
        # base class BaseMessage with a union of its subclasses, which makes
        # for a much better schema.
        return str | StringPromptValue | ChatPromptValueConcrete | list[AnyMessage]

Domain

Subdomains

Frequently Asked Questions

What does InputType() do?
InputType() is a function in the langchain codebase, defined in libs/langchain_v1/langchain/chat_models/base.py.
Where is InputType() defined?
InputType() is defined in libs/langchain_v1/langchain/chat_models/base.py at line 703.

Analyze Your Own Codebase

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

Try Supermodel Free