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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/chat_models/test_base.py lines 198–203

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/openai/tests/unit_tests/chat_models/test_base.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/openai/tests/unit_tests/chat_models/test_base.py at line 198.

Analyze Your Own Codebase

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

Try Supermodel Free