FD900 commited on
Commit
fff4806
·
verified ·
1 Parent(s): 5cab9e2

Update api.py

Browse files
Files changed (1) hide show
  1. api.py +10 -2
api.py CHANGED
@@ -1,9 +1,17 @@
1
  import requests
2
 
3
- API_BASE = "https://gaia-benchmark.vercel.app"
4
 
5
  def get_all_questions():
6
- return requests.get(f"{API_BASE}/questions").json()
 
 
 
 
 
 
 
 
7
 
8
  def get_random_question():
9
  return requests.get(f"{API_BASE}/random-question").json()
 
1
  import requests
2
 
3
+ API_BASE = "https://gaia-agent-api.spacelab.dev" # Use your actual base here
4
 
5
  def get_all_questions():
6
+ print(f"[INFO] Fetching: {API_BASE}/questions")
7
+ response = requests.get(f"{API_BASE}/questions")
8
+
9
+ print("[DEBUG] Status Code:", response.status_code)
10
+ print("[DEBUG] Raw Response:", response.text[:500]) # limit to 500 chars
11
+
12
+ response.raise_for_status() # raise if 4xx/5xx
13
+
14
+ return response.json()
15
 
16
  def get_random_question():
17
  return requests.get(f"{API_BASE}/random-question").json()