Spaces:
Sleeping
Sleeping
Thomas Bartlett
commited on
Commit
·
16c0878
1
Parent(s):
d8b4697
fix tool annotation
Browse files
app.py
CHANGED
@@ -36,21 +36,16 @@ Adhere strictly to these rules:
|
|
36 |
Begin.
|
37 |
"""
|
38 |
|
39 |
-
@tool
|
40 |
-
name="gaia_file_fetch",
|
41 |
-
description=textwrap.dedent(
|
42 |
-
"""\
|
43 |
-
Download the file attached to a GAIA task.
|
44 |
-
• Input: task_id (string)
|
45 |
-
• Output: text content (truncated to 20 000 chars) or a notice for binary files.
|
46 |
-
"""
|
47 |
-
),
|
48 |
-
)
|
49 |
def gaia_file_fetch(task_id: str) -> str:
|
50 |
-
"""
|
|
|
|
|
|
|
|
|
|
|
51 |
url = f"https://{GAIA_HOST}/files/{task_id}"
|
52 |
resp = requests.get(url, timeout=15)
|
53 |
-
|
54 |
if resp.status_code != 200:
|
55 |
return f"ERROR {resp.status_code}: could not fetch file."
|
56 |
|
|
|
36 |
Begin.
|
37 |
"""
|
38 |
|
39 |
+
@tool
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
def gaia_file_fetch(task_id: str) -> str:
|
41 |
+
"""
|
42 |
+
Download the file attached to a GAIA task.
|
43 |
+
|
44 |
+
• Input: task_id (string)
|
45 |
+
• Output: text content (first 20 000 chars) or a notice if the file is binary.
|
46 |
+
"""
|
47 |
url = f"https://{GAIA_HOST}/files/{task_id}"
|
48 |
resp = requests.get(url, timeout=15)
|
|
|
49 |
if resp.status_code != 200:
|
50 |
return f"ERROR {resp.status_code}: could not fetch file."
|
51 |
|