aload_memory_variables() — langchain Function Reference
Architecture documentation for the aload_memory_variables() function in summary_buffer.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 10c4371c_db0c_5181_61bf_09aedcca2b15["aload_memory_variables()"] f7800961_f1f1_7fa8_1fe5_64c9aba0b253["ConversationSummaryBufferMemory"] 10c4371c_db0c_5181_61bf_09aedcca2b15 -->|defined in| f7800961_f1f1_7fa8_1fe5_64c9aba0b253 a854b30d_1538_6542_a3e9_b289c046450c["abuffer()"] a854b30d_1538_6542_a3e9_b289c046450c -->|calls| 10c4371c_db0c_5181_61bf_09aedcca2b15 style 10c4371c_db0c_5181_61bf_09aedcca2b15 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/langchain/langchain_classic/memory/summary_buffer.py lines 67–83
async def aload_memory_variables(self, inputs: dict[str, Any]) -> dict[str, Any]:
"""Asynchronously return key-value pairs given the text input to the chain."""
buffer = await self.chat_memory.aget_messages()
if self.moving_summary_buffer != "":
first_messages: list[BaseMessage] = [
self.summary_message_cls(content=self.moving_summary_buffer),
]
buffer = first_messages + buffer
if self.return_messages:
final_buffer: Any = buffer
else:
final_buffer = get_buffer_string(
buffer,
human_prefix=self.human_prefix,
ai_prefix=self.ai_prefix,
)
return {self.memory_key: final_buffer}
Domain
Subdomains
Called By
Source
Frequently Asked Questions
What does aload_memory_variables() do?
aload_memory_variables() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/memory/summary_buffer.py.
Where is aload_memory_variables() defined?
aload_memory_variables() is defined in libs/langchain/langchain_classic/memory/summary_buffer.py at line 67.
What calls aload_memory_variables()?
aload_memory_variables() is called by 1 function(s): abuffer.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free