Auto-Reminder alle 30 Messages + History-Limit 120

- SystemPromptBuilder.BuildReminder(): generiert automatisch Reminder-Text
  aus den aktiven Prompt-Blöcken (Identity, Workspace, Memory, etc.)
- Alle ~30 Messages wird ein [System Reminder]-Paar in die History injiziert
  (nur nach assistant-Messages, um user/assistant-Alternierung zu wahren)
- History auf maximal 120 Messages begrenzt (älteste werden entfernt)
- ChatContext um PromptBlocks-Property erweitert
- Alle Aufrufer (ChatEndpoint, TelegramService, CronjobService) übergeben
  promptBlocks an BuildHistoryFromDb
This commit is contained in:
Meleki committed 2026-03-09 06:35:35 +01:00
1 parent 83945689a6
commit 47d6f44e07
6 files changed
+91 -6

No files matched your search

+1 -1
View File
@@ -172,7 +172,7 @@ public class TelegramService
try
{
var history = await _chatService.BuildHistoryFromDb(session.SessionId);
var history = await _chatService.BuildHistoryFromDb(session.SessionId, promptBlocks: ctx.PromptBlocks);
history.Add(new Dictionary<string, object>
{
["role"] = "user",