test_validate_model_on_init() — langchain Function Reference
Architecture documentation for the test_validate_model_on_init() function in test_llms.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 4d0cd436_6625_a25c_2604_0c8dcc890f45["test_validate_model_on_init()"] 92c74082_b175_00d9_ee08_72212a280d77["test_llms.py"] 4d0cd436_6625_a25c_2604_0c8dcc890f45 -->|defined in| 92c74082_b175_00d9_ee08_72212a280d77 style 4d0cd436_6625_a25c_2604_0c8dcc890f45 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/ollama/tests/unit_tests/test_llms.py lines 37–46
def test_validate_model_on_init(mock_validate_model: Any) -> None:
"""Test that the model is validated on initialization when requested."""
OllamaLLM(model=MODEL_NAME, validate_model_on_init=True)
mock_validate_model.assert_called_once()
mock_validate_model.reset_mock()
OllamaLLM(model=MODEL_NAME, validate_model_on_init=False)
mock_validate_model.assert_not_called()
OllamaLLM(model=MODEL_NAME)
mock_validate_model.assert_not_called()
Domain
Subdomains
Source
Frequently Asked Questions
What does test_validate_model_on_init() do?
test_validate_model_on_init() is a function in the langchain codebase, defined in libs/partners/ollama/tests/unit_tests/test_llms.py.
Where is test_validate_model_on_init() defined?
test_validate_model_on_init() is defined in libs/partners/ollama/tests/unit_tests/test_llms.py at line 37.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free