From 954de708c51c52b810359854c68ff00d3ce956ab Mon Sep 17 00:00:00 2001 From: "Grail Finder (aider)" Date: Fri, 21 Mar 2025 18:37:06 +0300 Subject: fix: properly declare rm variable in removeThinking function --- bot.go | 6 ++++-- 1 file 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 -- cgit v1.2.3