Guide model setup consistently across categories

This commit is contained in:
Mikei386 committed 2026-10-02 11:59:31 +02:00
1 parent aee31359b6
commit 541101091d
6 files changed
+43 -7

No files matched your search

+15 -1
View File
@@ -50,7 +50,7 @@ def _assess(model, installed, profile=None):
return result
def assess(model, installed, profile=None):
def _assess_candidates(model, installed, profile=None):
result=_assess(model,installed,profile)
result['candidates']=[]
if result['state']=='component':return result
@@ -91,3 +91,17 @@ def assess(model, installed, profile=None):
add('category',label,key,route,'Option für diese Kategorie; Kompatibilität mit dieser unbekannten Modellfamilie NICHT bestätigt')
result['candidate_message']='Keine passende Laufzeit zuverlässig ermittelt. Modellkarte und Architektur müssen geprüft werden; keine automatische Installation auf Verdacht.'
return result
def assess(model, installed, profile=None):
result=_assess_candidates(model,installed,profile)
if result['state']=='component':return result
verified=result['state'] not in ('unsupported','workflow_missing')
runtime=(next((c for c in result['candidates'] if c['id'] in ('voxcpm','audio_cpp')),None) or next((c for c in result['candidates'] if c['id']!='category'),None)) if verified else None
worker_missing=result['state'] in ('adapter_missing','workflow_missing','unsupported')
result['setup_steps']=[
dict(label='Modell erkennen',state='complete' if verified else 'blocked',message='Modellfamilie erkannt' if verified else 'Noch kein geprüfter Einrichtungsweg'),
dict(label='Laufzeit bereitstellen',state=('complete' if runtime['installed'] else 'action') if runtime else 'blocked',message=('Vorhandene Laufzeit wird wiederverwendet' if runtime['installed'] else 'Passende Laufzeit einrichten') if runtime else 'Keine automatische Installation auf Verdacht',route=runtime['route'] if runtime else None),
dict(label='Zusatzdateien zuordnen',state='complete' if result['state']=='ready' or not result['components'] and verified else 'action' if verified else 'blocked',message='Unter Einrichtung & Komponenten: vorhandene Dateien verwenden, fehlende herunterladen' if result['components'] else 'Keine Pflichtdateien im geprüften Rezept' if verified else 'Komponentenbedarf noch nicht zuverlässig bekannt'),
dict(label='Ausführung prüfen',state='blocked' if worker_missing else 'complete' if result['state']=='ready' else 'action',message='Generierungsanbindung fehlt noch; Installation allein reicht nicht' if worker_missing else 'Profil bereit' if result['state']=='ready' else 'Nach Einrichtung im Testbereich prüfen')]
return result