Big updates

This commit is contained in:
Logan
2026-04-21 01:51:23 -04:00
parent 788afca339
commit 6612e4b683
13 changed files with 168 additions and 49 deletions
+4 -3
View File
@@ -71,10 +71,10 @@ async def patch_transcript(
if not call:
raise HTTPException(404, f"Call '{call_id}' not found.")
# Save new transcript, clear stale intelligence fields
# Save user correction as transcript_corrected; leave original transcript intact.
# Clear stale intelligence fields so re-extraction runs fresh.
await fstore.doc_set("calls", call_id, {
"transcript": body.transcript,
"transcript_corrected": None,
"transcript_corrected": body.transcript,
"tags": [],
"severity": "unknown",
"location": None,
@@ -93,5 +93,6 @@ async def patch_transcript(
talkgroup_name=call.get("talkgroup_name"),
transcript=body.transcript,
segments=call.get("segments"),
preserve_transcript_correction=True,
)
return {"ok": True, "call_id": call_id}
+2
View File
@@ -91,6 +91,7 @@ async def _run_extraction_pipeline(
talkgroup_name: Optional[str],
transcript: str,
segments: Optional[list] = None,
preserve_transcript_correction: bool = False,
) -> None:
"""Run steps 2-4 of the intelligence pipeline using an existing transcript."""
from app.internal import intelligence, incident_correlator, alerter
@@ -99,6 +100,7 @@ async def _run_extraction_pipeline(
call_id, transcript, talkgroup_name,
talkgroup_id=talkgroup_id, system_id=system_id, segments=segments,
node_id=node_id,
preserve_transcript_correction=preserve_transcript_correction,
)
incident_id = await incident_correlator.correlate_call(