Although this is possible through memory storage, I’m wondering if it would be possible to add a method to access all entry IDs (i.e., all conversation IDs) directly through the ChatMemory
interface, to avoid injecting a ChatMemoryRepository
For example, in a RestController
:
private final ChatMemory chatMemory;
@GetMapping("/conversations")
public List<String> getConversations() {
ResponseEntity.ok().body(chatMemory.getConversationIds());
}