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_base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  2e1192a3_30bf_0208_fd40_42e8a66da9b9["test__convert_dict_to_message_tool()"]
  48232d20_f8c1_b597_14fa_7dc407e9bfe5["test_base.py"]
  2e1192a3_30bf_0208_fd40_42e8a66da9b9 -->|defined in| 48232d20_f8c1_b597_14fa_7dc407e9bfe5
  style 2e1192a3_30bf_0208_fd40_42e8a66da9b9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/chat_models/test_base.py lines 232–237

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/openai/tests/unit_tests/chat_models/test_base.py.
Where is test__convert_dict_to_message_tool() defined?
test__convert_dict_to_message_tool() is defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py at line 232.

Analyze Your Own Codebase

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

Try Supermodel Free