Files
2026-05-26 13:46:42 +00:00

31 lines
1.0 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
Utility tools used by the agent.
The assignment requires a single tool ``get_weather`` that returns a short
string describing the weather for a given city and date. In a real project this
would call an external API, but for the purposes of the homework we return a
hardcoded string so that the repository is selfcontained.
"""
import json
from typing import Dict
def get_weather(city: str = "Москва", date: str = "сегодня") -> str:
"""Return a mock weather description.
Parameters
----------
city : str, optional
Name of the city. Defaults to ``"Москва"``.
date : str, optional
Date for which the forecast is requested. Defaults to ``"сегодня"``.
Returns
-------
str
A short humanreadable weather report.
"""
# In a real implementation we would query an API here.
return f"В городе {city} на {date} ожидается солнечная погода с температурой 25°C."
__all__ = ["get_weather"]