Home / Function/ test_convert_dict_to_message_ai() — langchain Function Reference

test_convert_dict_to_message_ai() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/xai/tests/unit_tests/test_chat_models.py lines 99–104

def test_convert_dict_to_message_ai() -> None:
    message = {"role": "assistant", "content": "foo"}
    result = _convert_dict_to_message(message)
    expected_output = AIMessage(content="foo")
    assert result == expected_output
    assert _convert_message_to_dict(expected_output) == message

Domain

Subdomains

Frequently Asked Questions

What does test_convert_dict_to_message_ai() do?
test_convert_dict_to_message_ai() 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_ai() defined?
test_convert_dict_to_message_ai() is defined in libs/partners/xai/tests/unit_tests/test_chat_models.py at line 99.

Analyze Your Own Codebase

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

Try Supermodel Free