Home / Function/ test_batch() — langchain Function Reference

test_batch() — langchain Function Reference

Architecture documentation for the test_batch() function in test_base.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  80173a23_d37b_f7db_60e8_001b3d4a6b70["test_batch()"]
  4404310a_b16c_e9e6_1de2_90e5ea6f3ce3["test_base.py"]
  80173a23_d37b_f7db_60e8_001b3d4a6b70 -->|defined in| 4404310a_b16c_e9e6_1de2_90e5ea6f3ce3
  style 80173a23_d37b_f7db_60e8_001b3d4a6b70 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/language_models/llms/test_base.py lines 25–31

def test_batch() -> None:
    llm = FakeListLLM(responses=["foo"] * 3)
    output = llm.batch(["foo", "bar", "foo"])
    assert output == ["foo"] * 3

    output = llm.batch(["foo", "bar", "foo"], config={"max_concurrency": 2})
    assert output == ["foo"] * 3

Subdomains

Frequently Asked Questions

What does test_batch() do?
test_batch() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/language_models/llms/test_base.py.
Where is test_batch() defined?
test_batch() is defined in libs/core/tests/unit_tests/language_models/llms/test_base.py at line 25.

Analyze Your Own Codebase

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

Try Supermodel Free