Class InMemoryChatMemoryStore

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      List<ChatMessage> getMessages(Object memoryId) Retrieves messages for a specified chat memory.
      void updateMessages(Object memoryId, List<ChatMessage> messages) Updates messages for a specified chat memory.
      void deleteMessages(Object memoryId) Deletes all messages for a specified chat memory.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getMessages

         List<ChatMessage> getMessages(Object memoryId)

        Retrieves messages for a specified chat memory.

        Parameters:
        memoryId - The ID of the chat memory.
        Returns:

        List of messages for the specified chat memory. Must not be null. Can be deserialized from JSON using ChatMessageDeserializer.

      • updateMessages

         void updateMessages(Object memoryId, List<ChatMessage> messages)

        Updates messages for a specified chat memory.

        Parameters:
        memoryId - The ID of the chat memory.
        messages - List of messages for the specified chat memory, that represent the current state of the ChatMemory.
      • deleteMessages

         void deleteMessages(Object memoryId)

        Deletes all messages for a specified chat memory.

        Parameters:
        memoryId - The ID of the chat memory.