秒开 AI 预测最高温:preview 事件提前下发确定性预测值

之前 predicted_max 只在 AI 流式 final 事件返回后才显示(10-25 秒),
但后端 fallback 早在 1ms 内就算好了 cluster median / DEB 中枢。
现在 preview 事件同步下发确定性 predicted_max + range_low/high,
前端也在 fallback payload 中自动从 multi_model + DEB 计算预测值,
用户点击城市后 ~100ms 即可看到 AI 预测最高温。
This commit is contained in:
2569718930@qq.com
2026-05-07 21:04:26 +08:00
parent 0f9469f3cb
commit 30faac989c
3 changed files with 124 additions and 7 deletions
+5
View File
@@ -635,6 +635,11 @@ def stream_scan_city_ai_forecast_payload(
"final_judgment_en": preview_raw.get("final_judgment_en"),
"model_cluster_note_zh": preview_raw.get("model_cluster_note_zh"),
"model_cluster_note_en": preview_raw.get("model_cluster_note_en"),
"predicted_max": preview_raw.get("predicted_max"),
"range_low": preview_raw.get("range_low"),
"range_high": preview_raw.get("range_high"),
"confidence": preview_raw.get("confidence"),
"unit": preview_raw.get("unit"),
},
)
yield _sse_event(