Interface ChatMemory

All Known Implementing Classes:
MessageWindowChatMemory

public interface ChatMemory
The contract for storing and managing the memory of chat conversations.
Since:
1.0.0
Author:
Christian Tzolov, Thomas Vitale
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    The key to retrieve the chat memory conversation id from the context.
    static final String
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    add(String conversationId, List<Message> messages)
    Save the specified messages in the chat memory for the specified conversation.
    default void
    add(String conversationId, Message message)
    Save the specified message in the chat memory for the specified conversation.
    void
    clear(String conversationId)
    Clear the chat memory for the specified conversation.
    get(String conversationId)
    Get the messages in the chat memory for the specified conversation.
  • Field Details

  • Method Details

    • add

      default void add(String conversationId, Message message)
      Save the specified message in the chat memory for the specified conversation.
    • add

      void add(String conversationId, List<Message> messages)
      Save the specified messages in the chat memory for the specified conversation.
    • get

      List<Message> get(String conversationId)
      Get the messages in the chat memory for the specified conversation.
    • clear

      void clear(String conversationId)
      Clear the chat memory for the specified conversation.