Home / Function/ test_convert_dict_to_message_tool() — langchain Function Reference

test_convert_dict_to_message_tool() — langchain Function Reference

Architecture documentation for the test_convert_dict_to_message_tool() function in test_chat_models.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  b3987886_9e01_b89e_df95_3b4a5c4b9bb1["test_convert_dict_to_message_tool()"]
  d3aa2dec_5fef_73c8_892f_691289c5feaf["test_chat_models.py"]
  b3987886_9e01_b89e_df95_3b4a5c4b9bb1 -->|defined in| d3aa2dec_5fef_73c8_892f_691289c5feaf
  style b3987886_9e01_b89e_df95_3b4a5c4b9bb1 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/xai/tests/unit_tests/test_chat_models.py lines 131–136

def test_convert_dict_to_message_tool() -> None:
    message = {"role": "tool", "content": "foo", "tool_call_id": "bar"}
    result = _convert_dict_to_message(message)
    expected_output = ToolMessage(content="foo", tool_call_id="bar")
    assert result == expected_output
    assert _convert_message_to_dict(expected_output) == message

Domain

Subdomains

Frequently Asked Questions

What does test_convert_dict_to_message_tool() do?
test_convert_dict_to_message_tool() is a function in the langchain codebase, defined in libs/partners/xai/tests/unit_tests/test_chat_models.py.
Where is test_convert_dict_to_message_tool() defined?
test_convert_dict_to_message_tool() is defined in libs/partners/xai/tests/unit_tests/test_chat_models.py at line 131.

Analyze Your Own Codebase

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

Try Supermodel Free