Home / Function/ test_selector_trims_all_examples() — langchain Function Reference

test_selector_trims_all_examples() — langchain Function Reference

Architecture documentation for the test_selector_trims_all_examples() function in test_length_based_example_selector.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  7e9bf520_5ebc_78a3_6c3c_0f88bc237988["test_selector_trims_all_examples()"]
  0d16a97e_7eda_f038_8c5e_a1eab2a3f700["test_length_based_example_selector.py"]
  7e9bf520_5ebc_78a3_6c3c_0f88bc237988 -->|defined in| 0d16a97e_7eda_f038_8c5e_a1eab2a3f700
  style 7e9bf520_5ebc_78a3_6c3c_0f88bc237988 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/example_selectors/test_length_based_example_selector.py lines 51–59

def test_selector_trims_all_examples(
    selector: LengthBasedExampleSelector,
) -> None:
    """Test LengthBasedExampleSelector can trim all examples."""
    longest_question = """This question is super super super,
    super super super super super super super super super super super,
    super super super super long, this will affect the example right?"""
    output = selector.select_examples({"question": longest_question})
    assert output == []

Domain

Subdomains

Frequently Asked Questions

What does test_selector_trims_all_examples() do?
test_selector_trims_all_examples() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/example_selectors/test_length_based_example_selector.py.
Where is test_selector_trims_all_examples() defined?
test_selector_trims_all_examples() is defined in libs/core/tests/unit_tests/example_selectors/test_length_based_example_selector.py at line 51.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free