public interface ChatMemoryStore
ChatMemory state.
Allows for flexibility in terms of where and how chat memory is stored.
Currently, the only implementation available is InMemoryChatMemoryStore. We are in the process of adding
ready implementations for popular stores like SQL DBs, document stores, etc.
In the meantime, you can implement this interface to connect to any storage of your choice.| Modifier and Type | Method and Description |
|---|---|
void |
deleteMessages(Object memoryId)
Deletes all messages for a specified chat memory.
|
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.
|
List<ChatMessage> getMessages(Object memoryId)
memoryId - The ID of the chat memory.ChatMessageDeserializer.void updateMessages(Object memoryId, List<ChatMessage> messages)
memoryId - The ID of the chat memory.messages - List of messages for the specified chat memory, that represent the current state of the ChatMemory.
Can be serialized to JSON using ChatMessageSerializer.void deleteMessages(Object memoryId)
memoryId - The ID of the chat memory.Copyright © 2023. All rights reserved.