änderungen von vorherigen Codexnutzung: sollte den Agent lassen die Aufgaben zu erzeugen

This commit is contained in:
Eugenius Naumenko
2026-09-22 16:14:41 +00:00
parent a7d8f72129
commit 74a4caa1c6
12 changed files with 457 additions and 239 deletions
+12 -8
View File
@@ -8,24 +8,28 @@ The Flowise agent acts as a precise A1 English teacher for German-speaking adult
- `target_language`
- `cefr_level`
- current exercise
- Azure scores
- learner profile
- progress summary
- weak words
- recent attempts
## Output
The backend expects valid JSON:
For task `next_exercise`, the backend expects valid JSON:
```json
{
"exercise_type": "repeat_sentence",
"target_text": "Hello, my name is Anna.",
"teacher_feedback": "Uebe besonders 'name'.",
"target_language": "en-US",
"cefr_level": "A1",
"reference_text": "Hello, my name is Anna.",
"display_prompt": "Sprich den Satz klar nach.",
"tts_text": "Hello, my name is Anna.",
"ssml": "",
"next_recommendation": "Sprich den Satz noch einmal langsam."
"focus_points": ["name"],
"success_criteria": ["accuracy above 80"],
"reason_for_choice": "Kurzer Satz fuer klare A1-Aussprache."
}
```
The agent must not create pronunciation scores. Azure is the scoring source.
The agent must not create pronunciation scores. Azure is the scoring source. Feedback and simple
conversation are local backend logic in this phase; Flowise is used only for exercise generation.
+9 -2
View File
@@ -13,13 +13,20 @@ FlowiseAI runs as a Docker container on the same VPS and Docker network. The fro
## Backend
The Go API is the system of record. It owns auth, learner profiles, language profiles, exercises, attempts, progress, Azure calls, and Flowise calls.
The Go API is the system of record. It owns auth, learner profiles, language profiles, generated exercises, attempts, progress, Azure calls, and Flowise calls.
Flowise owns the first version of the lesson logic: when the dashboard or `POST /lessons/next`
needs the next task, the API sends profile/progress context to Flowise with a stable
`sessionId`. Flowise returns one exercise JSON object. The API stores that exercise in PostgreSQL
for the current user and returns it to the frontend. If Flowise is unavailable or returns invalid
JSON, the API falls back to seeded A1 exercises. Feedback and the simple conversation screen stay
local backend behavior in this first Flowise-generation phase.
Important boundaries:
- `httpapi`: request/response handling.
- `services`: auth, Azure Speech, Flowise teacher logic.
- `store`: PostgreSQL schema, seed data, repositories.
- `store`: PostgreSQL schema, seed data, generated exercise persistence, repositories.
- `domain`: shared API/domain structs.
## Multilingual Design