Download toolbench/toolenv/tools/Other/active/api.py from Septzzz/gymcl-data: direct link, hf CLI and curl.
- Browser
- Download file 854 Bytes
-
https://huggingface.co/datasets/Septzzz/gymcl-data/resolve/main/toolbench/toolenv/tools/Other/active/api.py
- Command line
-
hf download hf://datasets/Septzzz/gymcl-data/toolbench/toolenv/tools/Other/active/api.py
-
curl -L -o api.py https://huggingface.co/datasets/Septzzz/gymcl-data/resolve/main/toolbench/toolenv/tools/Other/active/api.py
854 Bytes
| import requests | |
| import json | |
| from datetime import date, datetime, timedelta | |
| import os | |
| from typing import Optional, Dict, Union, List | |
| def search_v2(current_page: str, per_page: str, sort: str, exclude_children: str, toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'): | |
| """ | |
| "" | |
| """ | |
| url = f"https://community-active.p.rapidapi.com/search" | |
| querystring = {'current_page': current_page, 'per_page': per_page, 'sort': sort, 'exclude_children': exclude_children, } | |
| headers = { | |
| "X-RapidAPI-Key": toolbench_rapidapi_key, | |
| "X-RapidAPI-Host": "community-active.p.rapidapi.com" | |
| } | |
| response = requests.get(url, headers=headers, params=querystring) | |
| try: | |
| observation = response.json() | |
| except: | |
| observation = response.text | |
| return observation | |