test_tool_call_input_tool_message_with_artifact() — langchain Function Reference
Architecture documentation for the test_tool_call_input_tool_message_with_artifact() function in test_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD f35b0f27_b9b1_de16_ad17_3427bf523290["test_tool_call_input_tool_message_with_artifact()"] 8e7836ae_e72c_f670_72a5_4ca6d46e3555["test_tools.py"] f35b0f27_b9b1_de16_ad17_3427bf523290 -->|defined in| 8e7836ae_e72c_f670_72a5_4ca6d46e3555 style f35b0f27_b9b1_de16_ad17_3427bf523290 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_tools.py lines 1524–1542
def test_tool_call_input_tool_message_with_artifact(tool: BaseTool) -> None:
tool_call: dict[str, Any] = {
"name": "structured_api",
"args": {"arg1": 1, "arg2": True, "arg3": {"img": "base64string..."}},
"id": "123",
"type": "tool_call",
}
expected = ToolMessage(
"1 True", artifact=tool_call["args"], 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)
actual_content = tool.invoke(tool_call["args"])
assert actual_content == expected.content
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_tool_call_input_tool_message_with_artifact() do?
test_tool_call_input_tool_message_with_artifact() 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_with_artifact() defined?
test_tool_call_input_tool_message_with_artifact() is defined in libs/core/tests/unit_tests/test_tools.py at line 1524.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free