feat: mode JSON natif Ollama + modèle gemma3:12b + retry
- Ajout format:"json" dans l'appel API Ollama (force sortie JSON valide) - Prompt restructuré : raisonnement en champs JSON structurés (analyse_clinique, codes_candidats, discrimination, regle_pmsi) - Parser simplifié : json.loads direct + reconstitution du raisonnement - Suppression du marqueur ###RESULT### (obsolète avec mode JSON) - Retry automatique (1 tentative) si parsing échoue - Stripping des blocs markdown ```json pour compatibilité multi-modèles - num_predict 1200→2500, modèle gemma3:12b (tient en 12Go VRAM) - Résultat : 0% échec parsing (était 11% avant) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -31,7 +31,7 @@ NER_CONFIDENCE_THRESHOLD = 0.80
|
||||
# --- Configuration Ollama ---
|
||||
|
||||
OLLAMA_URL = "http://localhost:11434"
|
||||
OLLAMA_MODEL = "mistral-large-3:675b-cloud"
|
||||
OLLAMA_MODEL = "gemma3:12b"
|
||||
OLLAMA_TIMEOUT = 120
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user