yooke commited on
Commit
f8364bb
·
verified ·
1 Parent(s): 20a28ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
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:要查询的天数(默认为1天,最大3天)
 
 
 
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