From acf0ece7d3686350412a9389ce2614546b2c927d Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Fri, 27 Feb 2026 18:36:48 +0800 Subject: [PATCH] fix(ai): explicitly feed current temp and daily max to AI to prevent misreading --- bot_listener.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bot_listener.py b/bot_listener.py index cabc540c..743cf871 100644 --- a/bot_listener.py +++ b/bot_listener.py @@ -267,6 +267,12 @@ def analyze_weather_trend(weather_data, temp_symbol, city_name=None): first_peak_h, last_peak_h = 13, 15 # === 其他 AI 专供的事实特征 === + # 明确告知 AI 当前实测温度和今日最高温,避免 AI 从趋势数据中误读 + current_temp = metar.get("current", {}).get("temp") + if current_temp is not None: + ai_features.append(f"🌡️ 当前实测温度: {current_temp}{temp_symbol}。") + if max_so_far is not None: + ai_features.append(f"🏔️ 今日实测最高温: {max_so_far}{temp_symbol} (WU结算={round(max_so_far)}{temp_symbol})。") if wind_speed: wind_dir = metar.get("current", {}).get("wind_dir", "未知") ai_features.append(f"🌬️ 当下风况: 约 {wind_speed}kt (方向 {wind_dir}°)。")