update
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import asyncio
|
||||
import json
|
||||
import logging
|
||||
import shutil
|
||||
import uuid
|
||||
from datetime import datetime, timedelta, timezone
|
||||
@@ -173,7 +174,20 @@ async def run_qa_route(req: QaRunRequest):
|
||||
if report is None:
|
||||
raise HTTPException(status_code=404, detail="keine fertigen Bausteine")
|
||||
await asyncio.to_thread(qa._write_report, report)
|
||||
return {"note": report["note"], "note_artefakte": report["note_artefakte"]}
|
||||
note_guide = None
|
||||
try: # fertiger Guide vorhanden → mitmessen (ein Klick, drei Noten); best-effort
|
||||
import guide_qa
|
||||
from database import list_guide_cards
|
||||
if any(c["stage"] == "done" and (c.get("md") or "").strip()
|
||||
for c in await list_guide_cards(req.topic)):
|
||||
grep = await guide_qa.guide_qa_report(req.topic, llm=req.llm)
|
||||
if grep:
|
||||
await asyncio.to_thread(guide_qa._write_report, grep)
|
||||
note_guide = grep["note_guide"]
|
||||
except Exception:
|
||||
logging.getLogger("creator.routes").exception("[%s] Guide-QA im QA-Button fehlgeschlagen", req.topic)
|
||||
return {"note": report["note"], "note_artefakte": report["note_artefakte"],
|
||||
"note_guide": note_guide}
|
||||
finally:
|
||||
_qa_laeuft.discard(req.topic)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user