test__convert_dict_to_message_tool_call_with_null_content() — langchain Function Reference
Architecture documentation for the test__convert_dict_to_message_tool_call_with_null_content() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 0beaf5e7_ee6f_a316_e857_f97f58f72572["test__convert_dict_to_message_tool_call_with_null_content()"] aaa4b344_20ed_7fa3_4067_f8f05affc01f["test_chat_models.py"] 0beaf5e7_ee6f_a316_e857_f97f58f72572 -->|defined in| aaa4b344_20ed_7fa3_4067_f8f05affc01f style 0beaf5e7_ee6f_a316_e857_f97f58f72572 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/mistralai/tests/unit_tests/test_chat_models.py lines 241–264
def test__convert_dict_to_message_tool_call_with_null_content() -> None:
raw_tool_call = {
"id": "ssAbar4Dr",
"function": {
"arguments": '{"name": "Sally", "hair_color": "green"}',
"name": "GenerateUsername",
},
}
message = {"role": "assistant", "content": None, "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="GenerateUsername",
args={"name": "Sally", "hair_color": "green"},
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_tool_call_with_null_content() do?
test__convert_dict_to_message_tool_call_with_null_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_tool_call_with_null_content() defined?
test__convert_dict_to_message_tool_call_with_null_content() is defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py at line 241.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free