Big updates
This commit is contained in:
@@ -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}
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user