test_load_criteria_evaluator() — langchain Function Reference
Architecture documentation for the test_load_criteria_evaluator() function in test_eval_chain.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7fa63da7_ad71_f17f_18d7_897e6e951199["test_load_criteria_evaluator()"] 919cda35_c0f5_cbb5_866a_0591c5815209["test_eval_chain.py"] 7fa63da7_ad71_f17f_18d7_897e6e951199 -->|defined in| 919cda35_c0f5_cbb5_866a_0591c5815209 style 7fa63da7_ad71_f17f_18d7_897e6e951199 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/evaluation/qa/test_eval_chain.py lines 57–66
def test_load_criteria_evaluator() -> None:
"""Test loading a criteria evaluator."""
try:
from langchain_openai import ChatOpenAI # noqa: F401
except ImportError:
pytest.skip("langchain-openai not installed")
# Patch the env with an openai-api-key
with patch.dict(os.environ, {"OPENAI_API_KEY": "foo"}):
# Check it can load using a string arg (even if that's not how it's typed)
load_evaluator("criteria") # type: ignore[arg-type]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_load_criteria_evaluator() do?
test_load_criteria_evaluator() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/evaluation/qa/test_eval_chain.py.
Where is test_load_criteria_evaluator() defined?
test_load_criteria_evaluator() is defined in libs/langchain/tests/unit_tests/evaluation/qa/test_eval_chain.py at line 57.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free