Spaces:
Sleeping
Sleeping
File size: 633 Bytes
9cf3d4c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import requests
API_BASE = "https://gaia-benchmark.vercel.app"
def get_all_questions():
return requests.get(f"{API_BASE}/questions").json()
def get_random_question():
return requests.get(f"{API_BASE}/random-question").json()
def get_file(task_id, filename):
url = f"{API_BASE}/files/{task_id}/{filename}"
r = requests.get(url)
r.raise_for_status()
return r.content
def submit_answers(username, code_link, answers):
payload = {
"username": username,
"agent_code": code_link,
"answers": answers
}
r = requests.post(f"{API_BASE}/submit", json=payload)
return r.json() |