File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
spring-ai-model/src/main/java/org/springframework/ai/chat/memory Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -40,4 +40,15 @@ public interface ChatMemoryRepository {
4040
4141 void deleteByConversationId (String conversationId );
4242
43+ /**
44+ * Atomically removes the messages in {@code deletes} and adds the messages in {@code adds}
45+ * for the given conversation ID. This provides a more efficient way to update
46+ * the memory than reading the entire history and overwriting it.
47+ *
48+ * @param conversationId The ID of the conversation to update.
49+ * @param deletes A list of messages to be removed from the memory.
50+ * @param adds A list of new messages to be added to the memory.
51+ */
52+ void refresh (String conversationId , List <Message > deletes , List <Message > adds );
53+
4354}
You can’t perform that action at this time.
0 commit comments