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

+2
View File
@@ -1,4 +1,5 @@
using System.Collections.Generic;
using Gott.Services;
namespace Gott.Models;
@@ -11,6 +12,7 @@ public class ChatContext
public string AgentId { get; set; }
public string SystemPromptText { get; set; }
public List<object> SystemPrompt { get; set; }
public List<PromptBlock> PromptBlocks { get; set; }
public string ToolChoice { get; set; }
public bool UseMemory { get; set; }
public string WebSearchVersion { get; set; }