Class ConversationBufferMemory

java.lang.Object
com.hw.langchain.memory.chat.memory.BaseChatMemory
com.hw.langchain.memory.buffer.ConversationBufferMemory
All Implemented Interfaces:
BaseMemory
Direct Known Subclasses:
ConversationBufferLimitedMemory

public class ConversationBufferMemory extends BaseChatMemory
Buffer for storing conversation memory.
Author:
HamaWhite
  • Constructor Details

    • ConversationBufferMemory

      public ConversationBufferMemory()
    • ConversationBufferMemory

      public ConversationBufferMemory(boolean returnMessages)
    • ConversationBufferMemory

      public ConversationBufferMemory(boolean returnMessages, BaseChatMessageHistory messageHistory)
  • Method Details

    • buffer

      public Object buffer()
      String buffer of memory.
    • getMemoryMessages

      protected List<BaseMessage> getMemoryMessages()
    • memoryVariables

      public List<String> memoryVariables()
      Will always return list of memory variables.
    • loadMemoryVariables

      public Map<String,Object> loadMemoryVariables(Map<String,Object> inputs)
      Return history buffer.