kai119 commited on
Commit
2806576
·
verified ·
1 Parent(s): e358f31

Update lagent/actions/weather_query.py

Browse files
Files changed (1) hide show
  1. lagent/actions/weather_query.py +3 -3
lagent/actions/weather_query.py CHANGED
@@ -6,10 +6,10 @@ from lagent.schema import ActionReturn, ActionStatusCode
6
  class WeatherQuery(BaseAction):
7
  def __init__(self):
8
  super().__init__()
9
- self.api_key = "a2768242de3d4fd8ac415a2d8f2bcb12"
10
  #print(self.api_key)
11
- if self.api_key is None:
12
- raise EnvironmentError("未找到环境变量 'token'。请设置你的和风天气 API Key 到 'weather_token' 环境变量中,比如export weather_token='xxx' ")
13
 
14
  @tool_api
15
  def run(self, location: str) -> dict:
 
6
  class WeatherQuery(BaseAction):
7
  def __init__(self):
8
  super().__init__()
9
+ self.api_key = ""
10
  #print(self.api_key)
11
+ # if self.api_key is None:
12
+ # raise EnvironmentError("未找到环境变量 'token'。请设置你的和风天气 API Key 到 'weather_token' 环境变量中,比如export weather_token='xxx' ")
13
 
14
  @tool_api
15
  def run(self, location: str) -> dict: