Skip to content

Commit

Permalink
Fixing Add memories with functions (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
javipacheco authored Jul 27, 2023
1 parent 6c58cb2 commit e6f900a
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,12 @@ interface Chat : LLM {
Memory(
conversationId = conversationId,
content =
Message(role = role, content = firstChoice.message?.content ?: "", name = role.name),
Message(
role = role,
content = firstChoice.message?.content
?: firstChoice.message?.functionCall?.arguments ?: "",
name = role.name
), //
timestamp = getTimeMillis()
)
context.addMemories(listOf(requestMemory, firstChoiceMemory))
Expand Down

0 comments on commit e6f900a

Please sign in to comment.