test_ignore_session_id() — langchain Function Reference
Architecture documentation for the test_ignore_session_id() function in test_history.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 99b43ed9_41a0_4e5b_b042_817f1939e0b0["test_ignore_session_id()"] 0af0dfde_fe33_f3e5_b5e6_a3d18260dc67["test_history.py"] 99b43ed9_41a0_4e5b_b042_817f1939e0b0 -->|defined in| 0af0dfde_fe33_f3e5_b5e6_a3d18260dc67 style 99b43ed9_41a0_4e5b_b042_817f1939e0b0 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/runnables/test_history.py lines 780–798
def test_ignore_session_id() -> None:
"""Test without config."""
def _fake_llm(messages: list[BaseMessage]) -> list[BaseMessage]:
return [
AIMessage(
content="you said: "
+ "\n".join(
str(m.content) for m in messages if isinstance(m, HumanMessage)
)
)
]
runnable = RunnableLambda(_fake_llm)
history = InMemoryChatMessageHistory()
with_message_history = RunnableWithMessageHistory(runnable, lambda: history)
_ = with_message_history.invoke("hello")
_ = with_message_history.invoke("hello again")
assert len(history.messages) == 4
Domain
Subdomains
Source
Frequently Asked Questions
What does test_ignore_session_id() do?
test_ignore_session_id() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/runnables/test_history.py.
Where is test_ignore_session_id() defined?
test_ignore_session_id() is defined in libs/core/tests/unit_tests/runnables/test_history.py at line 780.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free