Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -37,14 +37,14 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
37 |
|
38 |
|
39 |
@tool
|
40 |
-
def get_city_id(city_name: str) ->
|
41 |
"""A tool that get city ID from city name.
|
42 |
|
43 |
Args:
|
44 |
city_name: The city name that you want to get city id written in Japanese.
|
45 |
|
46 |
Returns:
|
47 |
-
city_id. If not get, return None.
|
48 |
"""
|
49 |
|
50 |
# XMLのURL
|
@@ -70,14 +70,14 @@ def get_city_id(city_name: str) -> int:
|
|
70 |
return None
|
71 |
|
72 |
@tool
|
73 |
-
def get_weather(city_id:
|
74 |
"""Get city weather forecast from city id.
|
75 |
|
76 |
Args:
|
77 |
-
city_id: city id. (e.g., 140010)
|
78 |
|
79 |
Returns:
|
80 |
-
Weather forecast
|
81 |
"""
|
82 |
try:
|
83 |
url = f"https://weather.tsukumijima.net/api/forecast?city={city_id}"
|
|
|
37 |
|
38 |
|
39 |
@tool
|
40 |
+
def get_city_id(city_name: str) -> str:
|
41 |
"""A tool that get city ID from city name.
|
42 |
|
43 |
Args:
|
44 |
city_name: The city name that you want to get city id written in Japanese.
|
45 |
|
46 |
Returns:
|
47 |
+
city_id as string. If not get, return None.
|
48 |
"""
|
49 |
|
50 |
# XMLのURL
|
|
|
70 |
return None
|
71 |
|
72 |
@tool
|
73 |
+
def get_weather(city_id: str) -> str:
|
74 |
"""Get city weather forecast from city id.
|
75 |
|
76 |
Args:
|
77 |
+
city_id: A string that represent city id. (e.g., 140010)
|
78 |
|
79 |
Returns:
|
80 |
+
Weather forecast message
|
81 |
"""
|
82 |
try:
|
83 |
url = f"https://weather.tsukumijima.net/api/forecast?city={city_id}"
|