From dd65adb9d8659bc42feb3485b012f9b01daed78c Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Sat, 23 May 2026 09:45:39 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=BA=E5=88=B6=E5=A4=A9=E6=B0=94=E6=97=A5?= =?UTF-8?q?=E6=8A=A5=E9=80=90=E5=9F=8E=E6=A0=BC=E5=BC=8F=EF=BC=9A=E5=A4=A9?= =?UTF-8?q?=E6=B0=94=E7=8E=B0=E8=B1=A1=20+=20=E6=9C=80=E9=AB=98=E6=B8=A9?= =?UTF-8?q?=20+=20=E4=BD=93=E6=84=9F=E5=BB=BA=E8=AE=AE=EF=BC=8C=E7=A6=81?= =?UTF-8?q?=E6=AD=A2=E7=BB=93=E5=B0=BE=E5=AE=A2=E5=A5=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/daily_weather_report.py | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/utils/daily_weather_report.py b/src/utils/daily_weather_report.py index 763b5e56..905af536 100644 --- a/src/utils/daily_weather_report.py +++ b/src/utils/daily_weather_report.py @@ -103,15 +103,14 @@ def _build_ai_prompt(cities_data: List[Dict[str, Any]], report_date: str) -> str return ( f"今天是 {report_date}。以下是今天中国主要城市的天气预报数据(JSON格式)。\n\n" f"{data_json}\n\n" - "请用自然、亲切的中文写一段天气日报,要求:\n" - "1. forecast_high 是今日预报最高温(℃),weather_code 是天气现象代码\n" - "2. 根据 weather_code 描述天气(晴/多云/雨/雾等),根据 forecast_high 描述冷热\n" - "3. 每个城市1-2句,语气轻松自然,像朋友聊天\n" - "4. 可以在城市描述后加一句简短的户外/穿衣建议\n" - "5. 城市名 用 HTML 加粗\n" - "6. 开头加问候语,例如「☀️ 早上好!」\n" - "7. 禁止写总结段落(如「总的来说…」)、免责声明(如「天气瞬息万变…」「请以当地最新发布为准」)\n" - "8. 总体控制在 300 字以内\n" + "请用自然亲切的中文写一段天气日报。每个城市必须用以下格式逐城播报:\n\n" + "城市名 天气,最高温。一句话体感/建议。\n\n" + "要求:\n" + "1. 「天气」必须是 weather_code 对应的中文(晴/多云/阴/雨/雾/雪/雷暴),不得省略\n" + "2. forecast_high 是预报最高温(℃)\n" + "3. 开头加问候语「☀️ 早上好!今天是x月x日」\n" + "4. 逐城播报完毕后直接结束,不写结尾祝福语、不写总结、不写免责声明\n" + "5. 总体控制在 250 字以内\n" "weather_code 参考:0=晴, 1-3=多云, 45-48=雾, 51-67=雨, 71-86=雪, 95-99=雷暴" )