Last answered:

12 Nov 2024

Posted on:

05 Nov 2024

0

Deprecated ConversationBufferMemory

Hi! I am getting a deprecated warning.
chat_memory = ConversationBufferMemory(memory_key = 'message_log', 
                                       chat_memory = background_info, 
                                       return_messages = True)

I get:
LangChainDeprecationWarning: Please see the migration guide at: https://python.langchain.com/docs/versions/migrating_memory/
  chat_memory = ConversationBufferMemory(memory_key = 'message_log',
1 answers ( 0 marked as helpful)
Instructor
Posted on:

12 Nov 2024

0
Hey Rui,

Thank you for reaching out!

Indeed, as of a LangChain update, the memory is now managed through a so-called LangGraph memory:
https://python.langchain.com/docs/versions/migrating_memory/

We hope to update the section on memory as soon as possible to cover this new way of managing memory. Still, the classes discussed in the section are not invalidated as these techniques are still used even in this new approach:
https://python.langchain.com/docs/versions/migrating_memory/

Regarding the warning you are getting, since this is a warning rather than an error, you should still be able to run the code smoothly.

Let me know if you run into other issues, I would be happy to assist.

Kind regards,
365 Hristina

Submit an answer