Download tools/fetch.py from chipling/api: direct link, hf CLI and curl.
- Browser
- Download file 1.17 kB
-
https://huggingface.co/spaces/chipling/api/resolve/f6ab7afc2fb30fd26744dd9904ebcaaf479b0ebe/tools/fetch.py
- Command line
-
hf download hf://spaces/chipling/api@f6ab7afc2fb30fd26744dd9904ebcaaf479b0ebe/tools/fetch.py
-
curl -L -o fetch.py https://huggingface.co/spaces/chipling/api/resolve/f6ab7afc2fb30fd26744dd9904ebcaaf479b0ebe/tools/fetch.py
1.17 kB
| class Tools: | |
| def fetch_tools(): | |
| data = [ | |
| { | |
| "name": "Google Search", | |
| "description": "A tool to perform Google searches and retrieve results.", | |
| "type": "search", | |
| "url": "/api/v1/tools/google-search", | |
| "method": "GET", | |
| "payload": { | |
| "query": "string", | |
| "num_results": 5, | |
| "api_key": "string", | |
| }, | |
| "response": { | |
| "results": [ | |
| { | |
| "title": "string", | |
| "url": "string", | |
| "description": "string", | |
| 'link': 'string', | |
| 'page_text': 'string' | |
| } | |
| ], | |
| "images": [ | |
| { | |
| "src": "string", | |
| "alt": "string", | |
| "class": ["string"] | |
| } | |
| ] | |
| } | |
| } | |
| ] | |
| return data | |