Home / Function/ test_structured_tool_lambda_multi_args_schema() — langchain Function Reference

test_structured_tool_lambda_multi_args_schema() — langchain Function Reference

Architecture documentation for the test_structured_tool_lambda_multi_args_schema() function in test_tools.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  87a17ca6_d762_045c_2bfc_f18e231cc324["test_structured_tool_lambda_multi_args_schema()"]
  8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"]
  87a17ca6_d762_045c_2bfc_f18e231cc324 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555
  style 87a17ca6_d762_045c_2bfc_f18e231cc324 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 524–536

def test_structured_tool_lambda_multi_args_schema() -> None:
    """Test args schema inference when the tool argument is a lambda function."""
    tool = StructuredTool.from_function(
        name="tool",
        description="A tool",
        func=lambda tool_input, other_arg: f"{tool_input}{other_arg}",
    )
    assert tool.args_schema is not None
    expected_args = {
        "tool_input": {"title": "Tool Input"},
        "other_arg": {"title": "Other Arg"},
    }
    assert tool.args == expected_args

Domain

Subdomains

Frequently Asked Questions

What does test_structured_tool_lambda_multi_args_schema() do?
test_structured_tool_lambda_multi_args_schema() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_structured_tool_lambda_multi_args_schema() defined?
test_structured_tool_lambda_multi_args_schema() is defined in libs/core/tests/unit_tests/test_tools.py at line 524.

Analyze Your Own Codebase

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

Try Supermodel Free