test_structured_tool_direct_init() — langchain Function Reference
Architecture documentation for the test_structured_tool_direct_init() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD cb179808_a502_51b9_a00f_974cdfead504["test_structured_tool_direct_init()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] cb179808_a502_51b9_a00f_974cdfead504 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 b621c544_d6db_7e8d_7240_9ce08870d71a["foo()"] cb179808_a502_51b9_a00f_974cdfead504 -->|calls| b621c544_d6db_7e8d_7240_9ce08870d71a style cb179808_a502_51b9_a00f_974cdfead504 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 2382–2395
def test_structured_tool_direct_init() -> None:
def foo(bar: str) -> str:
return bar
async def async_foo(bar: str) -> str:
return bar
class FooSchema(BaseModel):
bar: str = Field(..., description="The bar")
tool = StructuredTool(name="foo", args_schema=FooSchema, coroutine=async_foo)
with pytest.raises(NotImplementedError):
assert tool.invoke("hello") == "hello"
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_structured_tool_direct_init() do?
test_structured_tool_direct_init() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_structured_tool_direct_init() defined?
test_structured_tool_direct_init() is defined in libs/core/tests/unit_tests/test_tools.py at line 2382.
What does test_structured_tool_direct_init() call?
test_structured_tool_direct_init() 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