Home / File/ utils.py — langchain Source File

utils.py — langchain Source File

Architecture documentation for utils.py, a python file in the langchain codebase. 2 imports, 0 dependents.

File python AgentOrchestration ActionLogic 2 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  8238f640_0370_d858_41a2_76c2eb4cd163["utils.py"]
  cfe2bde5_180e_e3b0_df2b_55b3ebaca8e7["collections.abc"]
  8238f640_0370_d858_41a2_76c2eb4cd163 --> cfe2bde5_180e_e3b0_df2b_55b3ebaca8e7
  43d88577_548b_2248_b01b_7987bae85dcc["langchain_core.tools"]
  8238f640_0370_d858_41a2_76c2eb4cd163 --> 43d88577_548b_2248_b01b_7987bae85dcc
  style 8238f640_0370_d858_41a2_76c2eb4cd163 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

from collections.abc import Sequence

from langchain_core.tools import BaseTool


def validate_tools_single_input(class_name: str, tools: Sequence[BaseTool]) -> None:
    """Validate tools for single input.

    Args:
        class_name: Name of the class.
        tools: List of tools to validate.

    Raises:
        ValueError: If a multi-input tool is found in tools.
    """
    for tool in tools:
        if not tool.is_single_input:
            msg = f"{class_name} does not support multi-input tool {tool.name}."
            raise ValueError(msg)

Subdomains

Dependencies

  • collections.abc
  • langchain_core.tools

Frequently Asked Questions

What does utils.py do?
utils.py is a source file in the langchain codebase, written in python. It belongs to the AgentOrchestration domain, ActionLogic subdomain.
What functions are defined in utils.py?
utils.py defines 1 function(s): validate_tools_single_input.
What does utils.py depend on?
utils.py imports 2 module(s): collections.abc, langchain_core.tools.
Where is utils.py in the architecture?
utils.py is located at libs/langchain/langchain_classic/agents/utils.py (domain: AgentOrchestration, subdomain: ActionLogic, directory: libs/langchain/langchain_classic/agents).

Analyze Your Own Codebase

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

Try Supermodel Free