mirror of
https://github.com/tiennm99/goclaw.git
synced 2026-10-14 14:17:40 +00:00
feat: add a hint to bot reply bodies indicating full content is in session history for LLM context.
This commit is contained in:
1 parent
e9ab15bb09
commit
53db5165a3
1 file changed
+6
@@ -145,6 +145,12 @@ func extractReplyInfo(msg *telego.Message, botUsername string) *ReplyInfo {
|
||||
info.Body = info.Body[:500] + "..."
|
||||
}
|
||||
|
||||
// Hint for bot replies: the full response is already in session history,
|
||||
// so the LLM doesn't need the full text here — just enough to identify it.
|
||||
if info.IsBotReply && info.Body != "" {
|
||||
info.Body += "\n(This is your previous response — full content is in session history above)"
|
||||
}
|
||||
|
||||
return info
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user