Home / Function/ test_structured_tool_from_parameterless_function() — langchain Function Reference

test_structured_tool_from_parameterless_function() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  7d1004c8_b114_79ba_0045_7f4e0d122258["test_structured_tool_from_parameterless_function()"]
  8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"]
  7d1004c8_b114_79ba_0045_7f4e0d122258 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555
  b621c544_d6db_7e8d_7240_9ce08870d71a["foo()"]
  7d1004c8_b114_79ba_0045_7f4e0d122258 -->|calls| b621c544_d6db_7e8d_7240_9ce08870d71a
  style 7d1004c8_b114_79ba_0045_7f4e0d122258 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 630–640

def test_structured_tool_from_parameterless_function() -> None:
    """Test parameterless function of structured tool."""

    def foo() -> str:
        """Docstring."""
        return "invoke foo"

    structured_tool = StructuredTool.from_function(foo)

    assert structured_tool.run({}) == "invoke foo"
    assert structured_tool.run("") == "invoke foo"

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_structured_tool_from_parameterless_function() do?
test_structured_tool_from_parameterless_function() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_structured_tool_from_parameterless_function() defined?
test_structured_tool_from_parameterless_function() is defined in libs/core/tests/unit_tests/test_tools.py at line 630.
What does test_structured_tool_from_parameterless_function() call?
test_structured_tool_from_parameterless_function() calls 1 function(s): foo.

Analyze Your Own Codebase

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

Try Supermodel Free