Home / Function/ test_tool_annotated_descriptions() — langchain Function Reference

test_tool_annotated_descriptions() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 1393–1419

def test_tool_annotated_descriptions() -> None:
    def foo(
        bar: Annotated[str, "this is the bar"], baz: Annotated[int, "this is the baz"]
    ) -> str:
        """The foo.

        Returns:
            The bar only.
        """
        return bar

    foo1 = tool(foo)
    args_schema = _schema(foo1.args_schema)
    assert args_schema == {
        "title": "foo",
        "type": "object",
        "description": inspect.getdoc(foo),
        "properties": {
            "bar": {"title": "Bar", "type": "string", "description": "this is the bar"},
            "baz": {
                "title": "Baz",
                "type": "integer",
                "description": "this is the baz",
            },
        },
        "required": ["bar", "baz"],
    }

Domain

Subdomains

Calls

Frequently Asked Questions

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