Class BaseChatMessageHistory

java.lang.Object
com.hw.langchain.schema.BaseChatMessageHistory
Direct Known Subclasses:
ChatMessageHistory, DataBaseChatMessageHistory, RedisChatMessageHistory

public abstract class BaseChatMessageHistory extends Object
Base interface for chat message history, See `ChatMessageHistory` for default implementation.
Author:
HamaWhite
  • Field Details

  • Constructor Details

    • BaseChatMessageHistory

      public BaseChatMessageHistory()
  • Method Details

    • addUserMessage

      public void addUserMessage(String message)
      Add a user message to the store
      Parameters:
      message -
    • addAIMessage

      public void addAIMessage(String message)
      Add an AI message to the store
    • addMessage

      public abstract void addMessage(BaseMessage message)
      Add a self-created message to the store
    • clear

      public abstract void clear()
      Remove all messages from the store