langchain/docs
Shantanu Nair 53f3793504
Fast load conversationsummarymemory from existing summary (#7533)
- Description: Adds an optional buffer arg to the memory's
from_messages() method. If provided the existing memory will be loaded
instead of regenerating a summary from the loaded messages.
 
Why? If we have past messages to load from, it is likely we also have an
existing summary. This is particularly helpful in cases where the chat
is ephemeral and/or is backed by serverless where the chat history is
not stored but where the updated chat history is passed back and forth
between a backend/frontend.

Eg: Take a stateless qa backend implementation that loads messages on
every request and generates a response — without this addition, each
time the messages are loaded via from_messages, the summaries are
recomputed even though they may have just been computed during the
previous response. With this, the previously computed summary can be
passed in and avoid:
  1) spending extra $$$ on tokens, and 
2) increased response time by avoiding regenerating previously generated
summary.

Tag maintainer: @hwchase17
Twitter handle: https://twitter.com/ShantanuNair

---------

Co-authored-by: Harrison Chase <hw.chase.17@gmail.com>
2023-07-31 18:14:11 -07:00
..
api_reference Wfh/ref links (#8454) 2023-07-29 08:44:32 -07:00
docs_skeleton doc(prompts): Follow up on broken Prompt Sublink pages (#8530) 2023-07-31 16:46:13 -07:00
extras Fixed bug7445 where a duplicate restuld_id is added to the vectorstore. (#7573) 2023-07-31 18:00:01 -07:00
snippets Fast load conversationsummarymemory from existing summary (#7533) 2023-07-31 18:14:11 -07:00
.local_build.sh Update local script for docs build (#8377) 2023-07-27 13:13:59 -07:00
package-lock.json docs: New experimental UI for Mendable Search (#6558) 2023-07-03 20:52:13 +01:00
vercel_requirements.txt Add api cross ref linking (#8275) 2023-07-26 12:38:58 -07:00