summaryrefslogtreecommitdiff
path: root/bot.go
diff options
context:
space:
mode:
authorGrail Finder (aider) <wohilas@gmail.com>2025-03-21 18:37:06 +0300
committerGrail Finder (aider) <wohilas@gmail.com>2025-03-21 18:37:06 +0300
commit954de708c51c52b810359854c68ff00d3ce956ab (patch)
treeecf60339b8521378ec1a67e65d3c9ea7ad5cf44e /bot.go
parent03095359da4214962f72cc0eb818ed695531a74c (diff)
fix: properly declare rm variable in removeThinking function
Diffstat (limited to 'bot.go')
-rw-r--r--bot.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot.go b/bot.go
index fa192ab..767e640 100644
--- a/bot.go
+++ b/bot.go
@@ -402,8 +402,10 @@ func removeThinking(chatBody *models.ChatBody) {
continue
}
// find thinking and remove it
- rm.Content = thinkRE.ReplaceAllString(msg.Content, "")
- rm.Role = msg.Role
+ rm := models.RoleMsg{
+ Role: msg.Role,
+ Content: thinkRE.ReplaceAllString(msg.Content, ""),
+ }
msgs = append(msgs, rm)
}
chatBody.Messages = msgs