Adaptiven A1-Kurs und statistisches Aussprachetraining integrieren

Direkte DeepSeek- und Mistral-Anbindung mit versionierten Aktionsprofilen,
Budgetreservierung, Tokenabrechnung und administrativen Qualitätsprüfungen
ersetzen die Flowise-Abhängigkeit im regulären Betrieb.

840 geprüfte A1-Aufgaben mit geschützter Testauswertung und konkreten offenen
Arbeitsaufträgen ergänzen den Kurs. Inhalts- und Sprachbewertung bleiben von
Azure-Aussprachewerten getrennt; historische Aufgaben und Antworten bleiben erhalten.

Echte Wort- und Phonemmessungen werden mit Herkunft, Aktualität und Nachweisdichte
gebündelt. Go bestimmt Trainingsziele und Wiederholungen, das Modell formuliert
dazu passende Nachsprechübungen. Profilansicht und Auswahlgründe werden angezeigt.

Validierung: Go-Race-Tests mit lokaler PostgreSQL-Integration, go vet,
Web-Build, Audit aller 840 Aufgaben und drei Browser-Smokes mit lokalen
Modell-/Speech-Fixtures bestanden. Keine Produktionsänderungen oder Live-Aufrufe.
This commit is contained in:
Eugenius Naumenko
2026-11-01 23:23:20 +00:00
parent 83944f791e
commit e274eaab2b
186 changed files with 46676 additions and 257 deletions
+37 -28
View File
@@ -7,38 +7,47 @@ import (
)
type Config struct {
Port string
DatabaseURL string
RedisURL string
JWTSecret string
CORSOrigins []string
AzureSpeechKey string
AzureRegion string
AzureMock bool
FlowiseBaseURL string
FlowiseChatflow string
FlowiseAPIKey string
DebugEnabled bool
DebugVerbose bool
LogLevel slog.Level
PronunciationStrategy string
CourseTaskMode string
DeepSeekAPIKey string
MistralAPIKey string
Port string
DatabaseURL string
RedisURL string
JWTSecret string
CORSOrigins []string
AzureSpeechKey string
AzureRegion string
AzureMock bool
FlowiseBaseURL string
FlowiseChatflow string
FlowiseAPIKey string
FlowiseCourseChatflow string
FlowiseCourseAPIKey string
FlowiseCourseTeacher string
FlowiseCourseTeacherAPIKey string
DebugEnabled bool
DebugVerbose bool
LogLevel slog.Level
}
func Load() Config {
return Config{
Port: env("API_PORT", "8080"),
DatabaseURL: env("DATABASE_URL", "postgres://speech:speech_dev_password@localhost:5432/speech?sslmode=disable"),
RedisURL: env("REDIS_URL", "redis://localhost:6379"),
JWTSecret: env("APP_JWT_SECRET", "dev-secret-change-me"),
CORSOrigins: splitCSV(env("CORS_ORIGINS", "http://localhost:5173,http://localhost:8080")),
AzureSpeechKey: os.Getenv("AZURE_SPEECH_KEY"),
AzureRegion: os.Getenv("AZURE_SPEECH_REGION"),
AzureMock: strings.EqualFold(env("AZURE_ENABLE_MOCK", "true"), "true"),
FlowiseBaseURL: env("FLOWISE_BASE_URL", "http://localhost:3000"),
FlowiseChatflow: os.Getenv("FLOWISE_CHATFLOW_ID"),
FlowiseAPIKey: os.Getenv("FLOWISE_API_KEY"),
DebugEnabled: strings.EqualFold(env("DEBUG_ENABLED", "false"), "true"),
DebugVerbose: strings.EqualFold(env("DEBUG_VERBOSE", "false"), "true"),
LogLevel: parseLogLevel(env("LOG_LEVEL", "info")),
PronunciationStrategy: env("PRONUNCIATION_STRATEGY", "statistical"),
CourseTaskMode: env("COURSE_TASK_MODE", "bank"),
DeepSeekAPIKey: os.Getenv("DEEPSEEK_API_KEY"),
MistralAPIKey: os.Getenv("MISTRAL_API_KEY"),
Port: env("API_PORT", "8080"),
DatabaseURL: env("DATABASE_URL", "postgres://speech:speech_dev_password@localhost:5432/speech?sslmode=disable"),
RedisURL: env("REDIS_URL", "redis://localhost:6379"),
JWTSecret: env("APP_JWT_SECRET", "dev-secret-change-me"),
CORSOrigins: splitCSV(env("CORS_ORIGINS", "http://localhost:5173,http://localhost:8080")),
AzureSpeechKey: os.Getenv("AZURE_SPEECH_KEY"),
AzureRegion: os.Getenv("AZURE_SPEECH_REGION"),
AzureMock: strings.EqualFold(env("AZURE_ENABLE_MOCK", "true"), "true"),
DebugEnabled: strings.EqualFold(env("DEBUG_ENABLED", "false"), "true"),
DebugVerbose: strings.EqualFold(env("DEBUG_VERBOSE", "false"), "true"),
LogLevel: parseLogLevel(env("LOG_LEVEL", "info")),
}
}