feat: Konversationsgedaechtnis - Kurzzeit-Gespraechsverlauf pro Session
- Store: messages-Tabelle + append_message/get_recent_messages (mit Mandanten-Schutz) - LLMProvider.complete um history erweitert (openrouter + local bauen system+history+user) - Orchestrator.chat_text reicht den Verlauf ans LLM weiter - chat.py: bei session_id letzte HISTORY_MAX_MESSAGES laden, danach User-/Assistant-Turn speichern - ohne session_id weiterhin zustandslos; ?debug zeigt history_len - Config HISTORY_MAX_MESSAGES (Default 10) - Tests: 32 gruen (3 neue Gedaechtnis-Tests) - Doku aktualisiert (README, BEDIENUNGSANLEITUNG, Architektur) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
e0e69fdf15
commit
16a964032e
12 changed files with 225 additions and 40 deletions
|
|
@ -2,4 +2,9 @@ from abc import ABC, abstractmethod
|
|||
|
||||
class LLMProvider(ABC):
|
||||
@abstractmethod
|
||||
async def complete(self, text: str, session_id: str | None = None) -> str: ...
|
||||
async def complete(
|
||||
self,
|
||||
text: str,
|
||||
history: list[dict] | None = None,
|
||||
session_id: str | None = None,
|
||||
) -> str: ...
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue