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
  2034e9c0_4b42_ca72_9684_be3a9b4b7b0c["InputType()"]
  70048a7c_06ac_54dc_f2cc_70cbfa8bcbc9["_ConfigurableModel"]
  2034e9c0_4b42_ca72_9684_be3a9b4b7b0c -->|defined in| 70048a7c_06ac_54dc_f2cc_70cbfa8bcbc9
  style 2034e9c0_4b42_ca72_9684_be3a9b4b7b0c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/chat_models/base.py lines 754–764

    def InputType(self) -> TypeAlias:
        """Get the input type for this `Runnable`."""
        from langchain_core.prompt_values import (
            ChatPromptValueConcrete,
            StringPromptValue,
        )

        # 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/langchain_classic/chat_models/base.py.
Where is InputType() defined?
InputType() is defined in libs/langchain/langchain_classic/chat_models/base.py at line 754.

Analyze Your Own Codebase

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

Try Supermodel Free