- Update MistralChatRequest to remove unused properties (User, Stop, FrequencyPenalty, PresencePenalty) causing 422 errors - Add explicit JsonPropertyName attributes to ensure correct JSON serialization - Update MistralService to send minimal requests matching Mistral API expectations - Pass SegmentCount and CustomPrompt through StoryGenerationService to build proper prompts - Add request logging in MistralConnector to debug API calls - Update default model to mistral-small-latest - Enhance error handling to log raw JSON responses Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
44 lines
1.4 KiB
Text
44 lines
1.4 KiB
Text
# DeutschLernen Environment Configuration
|
|
# Copy this file to .env and fill in your actual values
|
|
# This file is in .gitignore and will NOT be committed to git
|
|
|
|
# ============================================
|
|
# JWT Configuration
|
|
# ============================================
|
|
JWT_KEY=your-super-secret-key-at-least-32-characters-long
|
|
JWT_ISSUER=DeutschLernen
|
|
JWT_AUDIENCE=DeutschLernen
|
|
JWT_EXPIREHOURS=24
|
|
|
|
# ============================================
|
|
# Mistral AI Configuration
|
|
# Use the API key from appsettings.Development.json
|
|
# ============================================
|
|
MISTRAL_APIKEY=YOUR_MISTRAL_API_KEY_HERE
|
|
MISTRAL_BASEURL=https://api.mistral.ai/v1/
|
|
MISTRAL_DEFAULTMODEL=mistral-small-latest
|
|
MISTRAL_TIMEOUTSECONDS=30
|
|
MISTRAL_MAXRETRIES=3
|
|
MISTRAL_RATELIMITPERMINUTE=10
|
|
MISTRAL_ENABLECACHING=true
|
|
MISTRAL_CACHETTLMINUTES=60
|
|
MISTRAL_CIRCUITBREAKERFAILURETHRESHOLD=5
|
|
MISTRAL_CIRCUITBREAKERRESETMINUTES=1
|
|
|
|
# ============================================
|
|
# Vosk Speech Recognition Configuration
|
|
# ============================================
|
|
VOSK_PYTHONPATH=python3
|
|
VOSK_MODELPATH=./models/vosk-model-de-0.22
|
|
VOSK_SAMPLERATE=16000
|
|
VOSK_TIMEOUTSECONDS=30
|
|
VOSK_BEAMWIDTH=20
|
|
|
|
# ============================================
|
|
# Coqui TTS Configuration
|
|
# ============================================
|
|
COQUI_PYTHONPATH=python3
|
|
COQUI_MODELNAME=tts_models/de/deu/fairseq/vits
|
|
COQUI_AUDIOSTORAGEPATH=./tmp/tts-audio
|
|
COQUI_MAXTEXTLENGTH=5000
|
|
COQUI_TIMEOUTSECONDS=60
|