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
|
|
@ -136,6 +136,19 @@ python chat_client.py "Erzähl mir einen guten Morgen-Spruch"
|
|||
> `chat_client.py` erwartet den Dienst auf Port **8003** — bei Bedarf im Skript
|
||||
> `GATEWAY_URL` anpassen oder den Dienst mit `PORT=8003 make run` starten.
|
||||
|
||||
**Fortlaufendes Gespräch (Gedächtnis):** Wird eine `session_id` mitgegeben, merkt
|
||||
sich der Assistent den Verlauf und bezieht ihn in die nächste Antwort ein:
|
||||
|
||||
```bash
|
||||
curl -X POST "http://localhost:8080/api/chat?session_id=oma-anna&debug=true" \
|
||||
-H 'Content-Type: application/json' -d '{"text":"Ich heiße Anna."}'
|
||||
curl -X POST "http://localhost:8080/api/chat?session_id=oma-anna&debug=true" \
|
||||
-H 'Content-Type: application/json' -d '{"text":"Wie war noch mein Name?"}'
|
||||
```
|
||||
|
||||
Ohne `session_id` ist jeder Aufruf eigenständig (kein Gedächtnis). Wie viele
|
||||
zurückliegende Nachrichten einfließen, steuert `HISTORY_MAX_MESSAGES` (Standard 10).
|
||||
|
||||
### c) Audio transkribieren (`/api/transcribe`)
|
||||
|
||||
```bash
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue