test__convert_dict_to_message_ai() — langchain Function Reference
Architecture documentation for the test__convert_dict_to_message_ai() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD e05f451b_4a54_b858_a038_9bfcf76686b1["test__convert_dict_to_message_ai()"] 48232d20_f8c1_b597_14fa_7dc407e9bfe5["test_base.py"] e05f451b_4a54_b858_a038_9bfcf76686b1 -->|defined in| 48232d20_f8c1_b597_14fa_7dc407e9bfe5 style e05f451b_4a54_b858_a038_9bfcf76686b1 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/openai/tests/unit_tests/chat_models/test_base.py lines 190–195
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
Source
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/openai/tests/unit_tests/chat_models/test_base.py.
Where is test__convert_dict_to_message_ai() defined?
test__convert_dict_to_message_ai() is defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py at line 190.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free