Skip to content

Commit

Permalink
Memory bug fixed (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
javipacheco authored Oct 2, 2023
1 parent c8bee11 commit b0eb6de
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal suspend fun List<Message>.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<Message>.toMemory(scope: Conversation): List<Memory> {
val cid = scope.conversationId
Expand Down

0 comments on commit b0eb6de

Please sign in to comment.