Home / Function/ is_single_input() — langchain Function Reference

is_single_input() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  ef443a7f_e003_642c_a7ae_228e24f1d759["is_single_input()"]
  5ebe56ae_0ac8_cb13_b5a9_ee567b924009["BaseTool"]
  ef443a7f_e003_642c_a7ae_228e24f1d759 -->|defined in| 5ebe56ae_0ac8_cb13_b5a9_ee567b924009
  style ef443a7f_e003_642c_a7ae_228e24f1d759 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/langchain_core/tools/base.py lines 558–565

    def is_single_input(self) -> bool:
        """Check if the tool accepts only a single input argument.

        Returns:
            `True` if the tool has only one input argument, `False` otherwise.
        """
        keys = {k for k in self.args if k != "kwargs"}
        return len(keys) == 1

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free