Home / Function/ test_tool_description() — langchain Function Reference

test_tool_description() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 1180–1189

def test_tool_description() -> None:
    def foo(bar: str) -> str:
        """The foo."""
        return bar

    foo1 = tool(foo)
    assert foo1.description == "The foo."

    foo2 = StructuredTool.from_function(foo)
    assert foo2.description == "The foo."

Domain

Subdomains

Calls

Frequently Asked Questions

What does test_tool_description() do?
test_tool_description() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_tool_description() defined?
test_tool_description() is defined in libs/core/tests/unit_tests/test_tools.py at line 1180.
What does test_tool_description() call?
test_tool_description() 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