test_structured_args_decorator_no_infer_schema() — langchain Function Reference
Architecture documentation for the test_structured_args_decorator_no_infer_schema() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 1656f972_af24_b500_38e7_241fee9be5a8["test_structured_args_decorator_no_infer_schema()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] 1656f972_af24_b500_38e7_241fee9be5a8 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 style 1656f972_af24_b500_38e7_241fee9be5a8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 302–316
def test_structured_args_decorator_no_infer_schema() -> None:
"""Test functionality with structured arguments parsed as a decorator."""
@tool(infer_schema=False)
def structured_tool_input(
arg1: int, arg2: float | datetime, opt_arg: dict | None = None
) -> str:
"""Return the arguments directly."""
return f"{arg1}, {arg2}, {opt_arg}"
assert isinstance(structured_tool_input, BaseTool)
assert structured_tool_input.name == "structured_tool_input"
args = {"arg1": 1, "arg2": 0.001, "opt_arg": {"foo": "bar"}}
with pytest.raises(ToolException):
assert structured_tool_input.run(args)
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_structured_args_decorator_no_infer_schema() do?
test_structured_args_decorator_no_infer_schema() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_structured_args_decorator_no_infer_schema() defined?
test_structured_args_decorator_no_infer_schema() is defined in libs/core/tests/unit_tests/test_tools.py at line 302.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free