test_summary_buffer_memory_summary_async() — langchain Function Reference
Architecture documentation for the test_summary_buffer_memory_summary_async() function in test_summary_buffer_memory.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 7586bcc9_402d_e888_4c72_66f94abfb225["test_summary_buffer_memory_summary_async()"] da36ce5c_a860_75d8_fce3_82c9466efd95["test_summary_buffer_memory.py"] 7586bcc9_402d_e888_4c72_66f94abfb225 -->|defined in| da36ce5c_a860_75d8_fce3_82c9466efd95 style 7586bcc9_402d_e888_4c72_66f94abfb225 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/tests/unit_tests/chains/test_summary_buffer_memory.py lines 54–66
async def test_summary_buffer_memory_summary_async() -> None:
"""Test ConversationSummaryBufferMemory when only buffer."""
llm = FakeLLM(queries={0: "summary"}, sequential_responses=True)
memory = ConversationSummaryBufferMemory(
llm=llm,
memory_key="baz",
max_token_limit=5,
)
await memory.asave_context({"input": "bar"}, {"output": "foo"})
await memory.asave_context({"input": "bar1"}, {"output": "foo1"})
assert memory.buffer == "System: summary\nHuman: bar1\nAI: foo1"
output = await memory.aload_memory_variables({})
assert output == {"baz": "System: summary\nHuman: bar1\nAI: foo1"}
Domain
Subdomains
Source
Frequently Asked Questions
What does test_summary_buffer_memory_summary_async() do?
test_summary_buffer_memory_summary_async() is a function in the langchain codebase, defined in libs/langchain/tests/unit_tests/chains/test_summary_buffer_memory.py.
Where is test_summary_buffer_memory_summary_async() defined?
test_summary_buffer_memory_summary_async() is defined in libs/langchain/tests/unit_tests/chains/test_summary_buffer_memory.py at line 54.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free