WeatherTool: use Russian query for Celsius sources

'погода Балашиха сейчас' returns Russian weather sites (gismeteo,
meteotrend) that report in °C, vs English queries which return
Fahrenheit snippets that the model misreads as Celsius.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alvis
2026-03-13 06:25:53 +00:00
parent af181ba7ec
commit d2ca1926f8

View File

@@ -52,7 +52,7 @@ class WeatherTool(FastTool):
)
# Fixed query — always fetch home location weather
_SEARCH_QUERY = "weather Balashikha Moscow now"
_SEARCH_QUERY = "погода Балашиха сейчас" # Russian query → Celsius sources
def __init__(self, searxng_url: str):
self._searxng_url = searxng_url
@@ -81,7 +81,7 @@ class WeatherTool(FastTool):
return ""
# Prefer results whose snippets contain actual current conditions
lines = ["Current weather data for Balashikha, Moscow region:\n"]
lines = ["Current weather data for Balashikha, Moscow region (temperatures in °C):\n"]
for item in items:
snippet = item.get("content", "")
title = item.get("title", "")