MCPcopy Create free account
hub / github.com/OpenBMB/BMTools / load_weather_tool

Function load_weather_tool

host_local_tools.py:5–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4def run_tool_server():
5 def load_weather_tool():
6 WEATHER_API_KEYS = os.environ.get('WEATHER_API_KEYS', None)
7 if not WEATHER_API_KEYS:
8 raise RuntimeError("WEATHER_API_KEYS not provided, please register one from https://www.weatherapi.com/ and add it to environment variables.")
9 server.load_tool("weather", {"subscription_key": WEATHER_API_KEYS})
10
11 # def load_database_tool():
12 # server.load_tool("database")

Callers 1

run_tool_serverFunction · 0.85

Calls 1

load_toolMethod · 0.80

Tested by

no test coverage detected