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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user