0% found this document useful (0 votes)
20 views11 pages

04 Memory

memory

Uploaded by

Tamer Mostafa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views11 pages

04 Memory

memory

Uploaded by

Tamer Mostafa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 11

Memory

LangChain

● In this section we’ll briefly show you the memory


options LangChain provides.
● When LangChain refers to the term “memory”,
they are usually referring to keeping track of
message interaction history.
LangChain

● You can think of this as analogous to ChatGPT


being able to store a “memory” of your prior
conversations by tracking Human Inputs and AI
Outputs:
LangChain

● LangChain provides a few different options for


storing a conversation memory:
○ Storing all messages
○ Storing a limited number of interactions
○ Storing a limited number of tokens
LangChain

● LangChain provides a few different options for


storing a conversation memory:
○ Storing all messages
○ Storing a limited number of interactions
○ Storing a limited number of tokens
● It also comes with specialized chains that store a
memory with other transformations, such as a
vector store or auto-summarizing conversations.
LangChain

● Memory Section:
○ ChatMessageHistory
○ ConversationBufferMemory
○ ConversationBufferWindowMemory
○ ConversationSummaryMemory
ChatMessageHistory
ConversationBufferMemor
y
ConversationBuffer
WindowMemory
ConversationSummary
Memory

You might also like