test_tool_id_conversion() — langchain Function Reference
Architecture documentation for the test_tool_id_conversion() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD a6ad0d9e_ce51_b020_51b4_2738f3a1d3b3["test_tool_id_conversion()"] aaa4b344_20ed_7fa3_4067_f8f05affc01f["test_chat_models.py"] a6ad0d9e_ce51_b020_51b4_2738f3a1d3b3 -->|defined in| aaa4b344_20ed_7fa3_4067_f8f05affc01f style a6ad0d9e_ce51_b020_51b4_2738f3a1d3b3 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/mistralai/tests/unit_tests/test_chat_models.py lines 301–313
def test_tool_id_conversion() -> None:
assert _is_valid_mistral_tool_call_id("ssAbar4Dr")
assert not _is_valid_mistral_tool_call_id("abc123")
assert not _is_valid_mistral_tool_call_id("call_JIIjI55tTipFFzpcP8re3BpM")
result_map = {
"ssAbar4Dr": "ssAbar4Dr",
"abc123": "pL5rEGzxe",
"call_JIIjI55tTipFFzpcP8re3BpM": "8kxAQvoED",
}
for input_id, expected_output in result_map.items():
assert _convert_tool_call_id_to_mistral_compatible(input_id) == expected_output
assert _is_valid_mistral_tool_call_id(expected_output)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_tool_id_conversion() do?
test_tool_id_conversion() is a function in the langchain codebase, defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py.
Where is test_tool_id_conversion() defined?
test_tool_id_conversion() is defined in libs/partners/mistralai/tests/unit_tests/test_chat_models.py at line 301.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free