test_tool_message_to_dict() — langchain Function Reference
Architecture documentation for the test_tool_message_to_dict() function in test_messages.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 8f496b18_66e8_87e7_3b3b_dc7dd1d681cc["test_tool_message_to_dict()"] 1c821c4f_25a2_9606_a15f_b3df054105ac["test_messages.py"] 8f496b18_66e8_87e7_3b3b_dc7dd1d681cc -->|defined in| 1c821c4f_25a2_9606_a15f_b3df054105ac style 8f496b18_66e8_87e7_3b3b_dc7dd1d681cc fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/test_messages.py lines 968–985
def test_tool_message_to_dict() -> None:
message = ToolMessage("foo", artifact={"bar": {"baz": 123}}, tool_call_id="1")
expected = {
"type": "tool",
"data": {
"content": "foo",
"additional_kwargs": {},
"response_metadata": {},
"artifact": {"bar": {"baz": 123}},
"type": "tool",
"name": None,
"id": None,
"tool_call_id": "1",
"status": "success",
},
}
actual = message_to_dict(message)
assert actual == expected
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_tool_message_to_dict() do?
test_tool_message_to_dict() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/test_messages.py.
Where is test_tool_message_to_dict() defined?
test_tool_message_to_dict() is defined in libs/core/tests/unit_tests/test_messages.py at line 968.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free