Home / Function/ test_convert_dict_to_message_ai_with_name() — langchain Function Reference

test_convert_dict_to_message_ai_with_name() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/xai/tests/unit_tests/test_chat_models.py lines 107–112

def test_convert_dict_to_message_ai_with_name() -> None:
    message = {"role": "assistant", "content": "foo", "name": "test"}
    result = _convert_dict_to_message(message)
    expected_output = AIMessage(content="foo", name="test")
    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_with_name() do?
test_convert_dict_to_message_ai_with_name() 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_with_name() defined?
test_convert_dict_to_message_ai_with_name() is defined in libs/partners/xai/tests/unit_tests/test_chat_models.py at line 107.

Analyze Your Own Codebase

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

Try Supermodel Free