Home / Function/ test_tool_args_schema_with_annotated_type() — langchain Function Reference

test_tool_args_schema_with_annotated_type() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 2942–2960

def test_tool_args_schema_with_annotated_type() -> None:
    @tool
    def test_tool(
        query_fragments: Annotated[
            list[str],
            "A list of query fragments",
        ],
    ) -> list[str]:
        """Search the Internet and retrieve relevant result items."""
        return []

    assert test_tool.args == {
        "query_fragments": {
            "description": "A list of query fragments",
            "items": {"type": "string"},
            "title": "Query Fragments",
            "type": "array",
        }
    }

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free