test_bind_tools_errors() — langchain Function Reference
Architecture documentation for the test_bind_tools_errors() function in test_chat_models.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD fb612fd4_d98c_59d6_7f33_c5c4f4ee1129["test_bind_tools_errors()"] ab3fd66d_3ad7_be56_7427_66f2c1a9d0a8["test_chat_models.py"] fb612fd4_d98c_59d6_7f33_c5c4f4ee1129 -->|defined in| ab3fd66d_3ad7_be56_7427_66f2c1a9d0a8 style fb612fd4_d98c_59d6_7f33_c5c4f4ee1129 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/huggingface/tests/unit_tests/test_chat_models.py lines 193–206
def test_bind_tools_errors(
chat_hugging_face: Any,
tools: dict[str, str],
tool_choice: Any,
expected_exception: Any,
expected_message: str,
) -> None:
with patch(
"langchain_huggingface.chat_models.huggingface.convert_to_openai_tool",
side_effect=lambda x: x,
):
with pytest.raises(expected_exception) as excinfo:
chat_hugging_face.bind_tools(tools, tool_choice=tool_choice)
assert expected_message in str(excinfo.value)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_bind_tools_errors() do?
test_bind_tools_errors() is a function in the langchain codebase, defined in libs/partners/huggingface/tests/unit_tests/test_chat_models.py.
Where is test_bind_tools_errors() defined?
test_bind_tools_errors() is defined in libs/partners/huggingface/tests/unit_tests/test_chat_models.py at line 193.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free