mirror of
https://github.com/hwchase17/langchain.git
synced 2026-02-21 14:43:07 +00:00
10 lines
784 B
Plaintext
10 lines
784 B
Plaintext
# Conversation summary memory
|
|
Now let's take a look at using a slightly more complex type of memory - `ConversationSummaryMemory`. This type of memory creates a summary of the conversation over time. This can be useful for condensing information from the conversation over time.
|
|
Conversation summary memory summarizes the conversation as it happens and stores the current summary in memory. This memory can then be used to inject the summary of the conversation so far into a prompt/chain. This memory is most useful for longer conversations, where keeping the past message history in the prompt verbatim would take up too many tokens.
|
|
|
|
Let's first explore the basic functionality of this type of memory.
|
|
|
|
import Example from "@snippets/modules/memory/how_to/summary.mdx"
|
|
|
|
<Example/>
|