fix: deterministic weather → one clean Korean sentence (no 'Celsius')

getWeather now returns only the Korean sentence (지금 <곳> 날씨는 <상태>, 기온 N도
(체감 M도)입니다) with no English/°C source. A deterministic weather path in the
engine returns it verbatim, bypassing the 7B which was rephrasing into multiple
sentences and leaking 'Celsius'.
This commit is contained in:
javis-bot
2026-06-14 22:46:03 +09:00
parent 54c3ce7d1b
commit c522e1b285
2 changed files with 43 additions and 11 deletions

View File

@@ -440,17 +440,11 @@ class WeatherTool(Tool):
_ko_parts.append(_t)
ko_sentence = ", ".join(_ko_parts) + "입니다."
# Build response text — concise current conditions (Korean sentence
# first so the model echoes it; English detail kept for any follow-up
# reasoning but the forecast firehose is dropped to curb rambling).
lines = [
f"한국어로 정확히 이 한 문장만 답하세요: {ko_sentence}",
f"(참고 데이터 — 답변에 추가하지 말 것: {location_display}, {weather_desc}, "
f"{temp_c}°C feels {feels_like_c}°C, humidity {humidity}%, wind {wind_speed}km/h)",
]
# Forecast (hourly / 7-day) is intentionally omitted from the default
# voice reply to keep it to one spoken sentence; current conditions
# are what "날씨 알려줘" asks for.
# The reply is the clean Korean sentence ONLY — no English/°C source
# for the model to echo ("25도 Celsius"), no forecast firehose to
# ramble over. The deterministic weather path in the engine returns
# this verbatim; on the LLM path the model just echoes one sentence.
lines = [ko_sentence]
reply_text = "\n".join(lines)