Extraction: model in config, chatter gate, geocode cache (server-26#298, server-26#104, server-26#88)
EXTRACTION_MODEL / EMBEDDING_MODEL replace the gpt-4o-mini and text-embedding-3-small literals. gate_chatter (classify_chatter with roll_call narrowed to whole-transcript roll calls) skips correction, extraction, embedding and geocoding for housekeeping, writes skip_reason=non_event_chatter and still runs the free clearance/plate backstops; upload.py's no-scene fallback admits it like transcript_too_short. Ships OFF (CHATTER_GATE_ENABLED =false): a gated call has no units, so it takes the no-fit-check thin attach, and #127 requires a clean live shadow window first. In-process TTL cache (24h, negatives 1h, 5000 entries, LRU) in front of the Geocoding API, keyed by address+bounds; holds coordinates only, inside the Maps 30-day lat/lng caching limit; errors and key/quota statuses not cached. #104: the no-scene fallback passes the call doc's severity. #88: resolved/reassignment parsed by _llm_bool, not bool(). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d485eae41a
commit
240bbee5a4
@@ -501,7 +501,10 @@ async def _extract_and_correlate(
|
||||
if not scenes:
|
||||
_call_doc = await fstore.doc_get("calls", call_id)
|
||||
skip_reason = (_call_doc or {}).get("skip_reason")
|
||||
if not skip_reason or skip_reason == "transcript_too_short":
|
||||
# non_event_chatter (server-26#298) is the same population as
|
||||
# transcript_too_short, just longer: housekeeping that skipped the
|
||||
# paid extraction but may still be a same-talkgroup follow-up.
|
||||
if not skip_reason or skip_reason in ("transcript_too_short", "non_event_chatter"):
|
||||
incident_id = await _correlate_with_consensus(
|
||||
call_id=call_id,
|
||||
node_id=node_id,
|
||||
@@ -512,6 +515,11 @@ async def _extract_and_correlate(
|
||||
incident_type=None,
|
||||
location=None,
|
||||
location_coords=None,
|
||||
# server-26#104: the call doc's own severity, as
|
||||
# recorrelation_sweep passes it. None resolved to "routine",
|
||||
# which turned a reprocessed not-thin call into a thin one
|
||||
# that attaches with no fit check.
|
||||
severity=(_call_doc or {}).get("severity"),
|
||||
)
|
||||
if incident_id:
|
||||
incident_ids.append(incident_id)
|
||||
|
||||
Reference in New Issue
Block a user