Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -26,12 +26,16 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
26 |
|
27 |
@tool
|
28 |
def query_weather(location: str, days: int = 1) -> str:
|
29 |
-
"""
|
30 |
|
31 |
-
|
32 |
-
location
|
33 |
-
days
|
|
|
|
|
|
|
34 |
"""
|
|
|
35 |
if days < 1 or days > 3:
|
36 |
return "查询天数必须在1-3之间"
|
37 |
|
|
|
26 |
|
27 |
@tool
|
28 |
def query_weather(location: str, days: int = 1) -> str:
|
29 |
+
"""查询指定地点的天气情况。
|
30 |
|
31 |
+
Args:
|
32 |
+
location (str): 要查询天气的地点名称,例如:"北京"、"上海"等城市名
|
33 |
+
days (int, optional): 要查询的天数,默认为1天,最大3天
|
34 |
+
|
35 |
+
Returns:
|
36 |
+
str: 包含天气信息的字符串,包括温度、湿度、风速等数据
|
37 |
"""
|
38 |
+
|
39 |
if days < 1 or days > 3:
|
40 |
return "查询天数必须在1-3之间"
|
41 |
|