feat: add a hint to bot reply bodies indicating full content is in session history for LLM context.

This commit is contained in:
viettranx committed 2026-03-02 16:41:20 +07:00
1 parent e9ab15bb09
commit 53db5165a3
1 file changed
+6
+6
View File
@@ -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
}