Home / Function/ test_chat_openai_system_message() — langchain Function Reference

test_chat_openai_system_message() — langchain Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  c627dde0_08b9_e002_59fd_5ca50edd423d["test_chat_openai_system_message()"]
  bd382a4e_442c_13ae_530c_6e34bc43623d["test_base.py"]
  c627dde0_08b9_e002_59fd_5ca50edd423d -->|defined in| bd382a4e_442c_13ae_530c_6e34bc43623d
  style c627dde0_08b9_e002_59fd_5ca50edd423d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/partners/openai/tests/integration_tests/chat_models/test_base.py lines 116–123

def test_chat_openai_system_message(use_responses_api: bool) -> None:
    """Test ChatOpenAI wrapper with system message."""
    chat = ChatOpenAI(use_responses_api=use_responses_api, max_tokens=MAX_TOKEN_COUNT)  # type: ignore[call-arg]
    system_message = SystemMessage(content="You are to chat with the user.")
    human_message = HumanMessage(content="Hello")
    response = chat.invoke([system_message, human_message])
    assert isinstance(response, BaseMessage)
    assert isinstance(response.text, str)

Domain

Subdomains

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free