Home / Function/ test__construct_responses_api_input_human_message_with_text_blocks_conversion() — langchain Function Reference

test__construct_responses_api_input_human_message_with_text_blocks_conversion() — langchain Function Reference

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

Entity Profile

Dependency Diagram

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

Relationship Graph

Source Code

libs/partners/openai/tests/unit_tests/chat_models/test_base.py lines 2062–2076

def test__construct_responses_api_input_human_message_with_text_blocks_conversion() -> (
    None
):
    """Test that human messages with text blocks are properly converted."""
    messages: list = [
        HumanMessage(content=[{"type": "text", "text": "What's in this image?"}])
    ]
    result = _construct_responses_api_input(messages)

    assert len(result) == 1
    assert result[0]["role"] == "user"
    assert isinstance(result[0]["content"], list)
    assert len(result[0]["content"]) == 1
    assert result[0]["content"][0]["type"] == "input_text"
    assert result[0]["content"][0]["text"] == "What's in this image?"

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free