test_parse_model_string_errors() — langchain Function Reference
Architecture documentation for the test_parse_model_string_errors() function in test_base.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 503e8c5b_0647_c7ea_1c99_697481b493f8["test_parse_model_string_errors()"] d83b56bb_a911_dd2e_ea6f_f5da87a02a7e["test_base.py"] 503e8c5b_0647_c7ea_1c99_697481b493f8 -->|defined in| d83b56bb_a911_dd2e_ea6f_f5da87a02a7e style 503e8c5b_0647_c7ea_1c99_697481b493f8 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/embeddings/test_base.py lines 31–53
def test_parse_model_string_errors() -> None:
"""Test error cases for model string parsing."""
with pytest.raises(ValueError, match="Model name must be"):
_parse_model_string("just-a-model-name")
with pytest.raises(ValueError, match="Invalid model format "):
_parse_model_string("")
with pytest.raises(ValueError, match="is not supported"):
_parse_model_string(":model-name")
with pytest.raises(ValueError, match="Model name cannot be empty"):
_parse_model_string("openai:")
with pytest.raises(
ValueError,
match="Provider 'invalid-provider' is not supported",
):
_parse_model_string("invalid-provider:model-name")
for provider in _SUPPORTED_PROVIDERS:
with pytest.raises(ValueError, match=f"{provider}"):
_parse_model_string("invalid-provider:model-name")
Domain
Subdomains
Source
Frequently Asked Questions
What does test_parse_model_string_errors() do?
test_parse_model_string_errors() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/embeddings/test_base.py.
Where is test_parse_model_string_errors() defined?
test_parse_model_string_errors() is defined in libs/langchain/tests/unit_tests/embeddings/test_base.py at line 31.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free