Home / Function/ test_selector_trims_one_example() — langchain Function Reference

test_selector_trims_one_example() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/core/tests/unit_tests/example_selectors/test_length_based_example_selector.py lines 43–48

def test_selector_trims_one_example(selector: LengthBasedExampleSelector) -> None:
    """Test LengthBasedExampleSelector can trim one example."""
    long_question = """I am writing a really long question,
    this probably is going to affect the example right?"""
    output = selector.select_examples({"question": long_question})
    assert output == EXAMPLES[:1]

Domain

Subdomains

Frequently Asked Questions

What does test_selector_trims_one_example() do?
test_selector_trims_one_example() 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_one_example() defined?
test_selector_trims_one_example() is defined in libs/core/tests/unit_tests/example_selectors/test_length_based_example_selector.py at line 43.

Analyze Your Own Codebase

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

Try Supermodel Free