类 InMemoryChatMemoryStore
java.lang.Object
dev.langchain4j.store.memory.chat.InMemoryChatMemoryStore
- 所有已实现的接口:
ChatMemoryStore
Implementation of
ChatMemoryStore that stores state of ChatMemory (chat messages) in-memory.
This storage mechanism is transient and does not persist data across application restarts.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voiddeleteMessages(Object memoryId) Deletes all messages for a specified chat memory.getMessages(Object memoryId) Retrieves messages for a specified chat memory.voidupdateMessages(Object memoryId, List<ChatMessage> messages) Updates messages for a specified chat memory.
-
构造器详细资料
-
InMemoryChatMemoryStore
public InMemoryChatMemoryStore()Constructs a newInMemoryChatMemoryStore.
-
-
方法详细资料
-
getMessages
从接口复制的说明:ChatMemoryStoreRetrieves messages for a specified chat memory.- 指定者:
getMessages在接口中ChatMemoryStore- 参数:
memoryId- The ID of the chat memory.- 返回:
- List of messages for the specified chat memory. Must not be null. Can be deserialized from JSON using
ChatMessageDeserializer.
-
updateMessages
从接口复制的说明:ChatMemoryStoreUpdates messages for a specified chat memory.- 指定者:
updateMessages在接口中ChatMemoryStore- 参数:
memoryId- The ID of the chat memory.messages- List of messages for the specified chat memory, that represent the current state of theChatMemory. Can be serialized to JSON usingChatMessageSerializer.
-
deleteMessages
从接口复制的说明:ChatMemoryStoreDeletes all messages for a specified chat memory.- 指定者:
deleteMessages在接口中ChatMemoryStore- 参数:
memoryId- The ID of the chat memory.
-