test__convert_dict_to_message_with_missing_content() — langchain Function Reference
Architecture documentation for the test__convert_dict_to_message_with_missing_content() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD b950418a_2a4d_2ee6_78e0_b952a7e297c4["test__convert_dict_to_message_with_missing_content()"] aaa4b344_20ed_7fa3_4067_f8f05affc01f["test_chat_models.py"] b950418a_2a4d_2ee6_78e0_b952a7e297c4 -->|defined in| aaa4b344_20ed_7fa3_4067_f8f05affc01f style b950418a_2a4d_2ee6_78e0_b952a7e297c4 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/mistralai/tests/unit_tests/test_chat_models.py lines 267–290
def test__convert_dict_to_message_with_missing_content() -> None:
raw_tool_call = {
"id": "ssAbar4Dr",
"function": {
"arguments": '{"query": "test search"}',
"name": "search",
},
}
message = {"role": "assistant", "tool_calls": [raw_tool_call]}
result = _convert_mistral_chat_message_to_message(message)
expected_output = AIMessage(
content="",
additional_kwargs={"tool_calls": [raw_tool_call]},
tool_calls=[
ToolCall(
name="search",
args={"query": "test search"},
id="ssAbar4Dr",
type="tool_call",
)
],
response_metadata={"model_provider": "mistralai"},
)
assert result == expected_output
Domain
Subdomains
Source
Frequently Asked Questions
What does test__convert_dict_to_message_with_missing_content() do?
test__convert_dict_to_message_with_missing_content() is a function in the langchain codebase, defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py.
Where is test__convert_dict_to_message_with_missing_content() defined?
test__convert_dict_to_message_with_missing_content() is defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py at line 267.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free