diff --git a/core/src/commonMain/kotlin/com/xebia/functional/xef/llm/MemoryManagement.kt b/core/src/commonMain/kotlin/com/xebia/functional/xef/llm/MemoryManagement.kt index ccc7d367f..2f17fe29f 100644 --- a/core/src/commonMain/kotlin/com/xebia/functional/xef/llm/MemoryManagement.kt +++ b/core/src/commonMain/kotlin/com/xebia/functional/xef/llm/MemoryManagement.kt @@ -18,7 +18,7 @@ internal suspend fun List.addToMemory(scope: Conversation) { } internal fun Message.toMemory(cid: ConversationId, index: Int): Memory = - Memory(conversationId = cid, content = this, index = index) + Memory(conversationId = cid, content = copy(name = role.name), index = index) internal fun List.toMemory(scope: Conversation): List { val cid = scope.conversationId