Home / Function/ test_tool_call_input_tool_message_output() — langchain Function Reference

test_tool_call_input_tool_message_output() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/test_tools.py lines 1455–1471

def test_tool_call_input_tool_message_output() -> None:
    tool_call = {
        "name": "structured_api",
        "args": {"arg1": 1, "arg2": True, "arg3": {"img": "base64string..."}},
        "id": "123",
        "type": "tool_call",
    }
    tool = _MockStructuredTool()
    expected = ToolMessage(
        "1 True {'img': 'base64string...'}", tool_call_id="123", name="structured_api"
    )
    actual = tool.invoke(tool_call)
    assert actual == expected

    tool_call.pop("type")
    with pytest.raises(ValidationError):
        tool.invoke(tool_call)

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free