Home / Function/ test__construct_lc_result_from_responses_api_error_handling() — langchain Function Reference

test__construct_lc_result_from_responses_api_error_handling() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  61956223_dc03_d4da_1538_6065024b6d51["test__construct_lc_result_from_responses_api_error_handling()"]
  48232d20_f8c1_b597_14fa_7dc407e9bfe5["test_base.py"]
  61956223_dc03_d4da_1538_6065024b6d51 -->|defined in| 48232d20_f8c1_b597_14fa_7dc407e9bfe5
  style 61956223_dc03_d4da_1538_6065024b6d51 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/chat_models/test_base.py lines 1372–1389

def test__construct_lc_result_from_responses_api_error_handling() -> None:
    """Test that errors in the response are properly raised."""
    response = Response(
        id="resp_123",
        created_at=1234567890,
        model="gpt-4o",
        object="response",
        error=ResponseError(message="Test error", code="server_error"),
        parallel_tool_calls=True,
        tools=[],
        tool_choice="auto",
        output=[],
    )

    with pytest.raises(ValueError) as excinfo:
        _construct_lc_result_from_responses_api(response)

    assert "Test error" in str(excinfo.value)

Domain

Subdomains

Frequently Asked Questions

What does test__construct_lc_result_from_responses_api_error_handling() do?
test__construct_lc_result_from_responses_api_error_handling() is a function in the langchain codebase, defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py.
Where is test__construct_lc_result_from_responses_api_error_handling() defined?
test__construct_lc_result_from_responses_api_error_handling() is defined in libs/partners/openai/tests/unit_tests/chat_models/test_base.py at line 1372.

Analyze Your Own Codebase

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

Try Supermodel Free