test_tool_partial_function_args_schema() — langchain Function Reference
Architecture documentation for the test_tool_partial_function_args_schema() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 44f1ced9_e8e1_8112_5aff_addf8d909246["test_tool_partial_function_args_schema()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] 44f1ced9_e8e1_8112_5aff_addf8d909246 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 style 44f1ced9_e8e1_8112_5aff_addf8d909246 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 539–552
def test_tool_partial_function_args_schema() -> None:
"""Test args schema inference when the tool argument is a partial function."""
def func(tool_input: str, other_arg: str) -> str:
assert isinstance(tool_input, str)
assert isinstance(other_arg, str)
return tool_input + other_arg
tool = Tool(
name="tool",
description="A tool",
func=partial(func, other_arg="foo"),
)
assert tool.run("bar") == "barfoo"
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_tool_partial_function_args_schema() do?
test_tool_partial_function_args_schema() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_tools.py.
Where is test_tool_partial_function_args_schema() defined?
test_tool_partial_function_args_schema() is defined in libs/core/tests/unit_tests/test_tools.py at line 539.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free