Home / Function/ test_input_messages_output_message_async() — langchain Function Reference

test_input_messages_output_message_async() — langchain Function Reference

Architecture documentation for the test_input_messages_output_message_async() function in test_history.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  43350645_b945_ac3a_b482_e4aa8dfac99c["test_input_messages_output_message_async()"]
  0af0dfde_fe33_f3e5_b5e6_a3d18260dc67["test_history.py"]
  43350645_b945_ac3a_b482_e4aa8dfac99c -->|defined in| 0af0dfde_fe33_f3e5_b5e6_a3d18260dc67
  e035a3b1_d1a1_c458_c801_af1fc0272f8b["_get_get_session_history()"]
  43350645_b945_ac3a_b482_e4aa8dfac99c -->|calls| e035a3b1_d1a1_c458_c801_af1fc0272f8b
  style 43350645_b945_ac3a_b482_e4aa8dfac99c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/core/tests/unit_tests/runnables/test_history.py lines 316–327

async def test_input_messages_output_message_async() -> None:
    runnable = LengthChatModel()
    get_session_history = _get_get_session_history()
    with_history = RunnableWithMessageHistory(
        runnable,
        get_session_history,
    )
    config: RunnableConfig = {"configurable": {"session_id": "5_async"}}
    output = await with_history.ainvoke([HumanMessage(content="hi")], config)
    assert output.content == "1"
    output = await with_history.ainvoke([HumanMessage(content="hi")], config)
    assert output.content == "3"

Domain

Subdomains

Frequently Asked Questions

What does test_input_messages_output_message_async() do?
test_input_messages_output_message_async() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_history.py.
Where is test_input_messages_output_message_async() defined?
test_input_messages_output_message_async() is defined in libs/core/tests/unit_tests/runnables/test_history.py at line 316.
What does test_input_messages_output_message_async() call?
test_input_messages_output_message_async() calls 1 function(s): _get_get_session_history.

Analyze Your Own Codebase

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

Try Supermodel Free