Home / Function/ clear() — langchain Function Reference

clear() — langchain Function Reference

Architecture documentation for the clear() function in summary.py from the langchain codebase.

Entity Profile

Dependency Diagram

graph TD
  79074a26_98af_82c7_6abb_086ab544fb81["clear()"]
  896d889a_d228_6c16_6cdd_5799f6e5f307["ConversationSummaryMemory"]
  79074a26_98af_82c7_6abb_086ab544fb81 -->|defined in| 896d889a_d228_6c16_6cdd_5799f6e5f307
  style 79074a26_98af_82c7_6abb_086ab544fb81 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

libs/langchain/langchain_classic/memory/summary.py lines 165–168

    def clear(self) -> None:
        """Clear memory contents."""
        super().clear()
        self.buffer = ""

Domain

Subdomains

Frequently Asked Questions

What does clear() do?
clear() is a function in the langchain codebase, defined in libs/langchain/langchain_classic/memory/summary.py.
Where is clear() defined?
clear() is defined in libs/langchain/langchain_classic/memory/summary.py at line 165.

Analyze Your Own Codebase

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

Try Supermodel Free