()
| 51 | server.load_tool("stock", {"subscription_key": ALPHA_VANTAGE_KEY}) |
| 52 | |
| 53 | def load_map_tool(): |
| 54 | BING_MAP_KEY = os.environ.get('BING_MAP_KEY', None) |
| 55 | if not BING_MAP_KEY: |
| 56 | raise RuntimeError("Bing map key not provided, please register one from https://www.bingmapsportal.com/ and add it to environment variables.") |
| 57 | server.load_tool("bing_map", {"subscription_key": BING_MAP_KEY}) |
| 58 | |
| 59 | # baidu map tool |
| 60 | # BAIDU_SECRET_KEY = os.environ.get('BAIDU_SECRET_KEY', None) |
| 61 | # BAIDU_MAP_KEY = os.environ.get('BAIDU_MAP_KEY', None) |
| 62 | # if not BAIDU_SECRET_KEY or not BAIDU_MAP_KEY: |
| 63 | # raise RuntimeError("Baidu map key not provided, please register one from https://lbsyun.baidu.com/apiconsole/key and add it to environment variables.") |
| 64 | # server.load_tool("baidu_map", {"subscription_key": BAIDU_MAP_KEY, "baidu_secret_key": BAIDU_SECRET_KEY}) |
| 65 | |
| 66 | def load_rapidapi_tool(): |
| 67 | RAPIDAPI_KEY = os.environ.get('RAPIDAPI_KEY', None) |
no test coverage detected