lanna_lalala;- commited on
Commit
d68de5a
·
1 Parent(s): 5962cb5

init frontend

Browse files
Files changed (1) hide show
  1. utils/api.py +5 -0
utils/api.py CHANGED
@@ -12,6 +12,11 @@ def start_agent(student_id:int, lesson_id:int, level_slug:str):
12
  r.raise_for_status()
13
  return r.json()
14
 
 
 
 
 
 
15
  def get_quiz(student_id:int, lesson_id:int, level_slug:str):
16
  r = requests.post(f"{BACKEND}/agent/quiz", json={"student_id":student_id,"lesson_id":lesson_id,"level_slug":level_slug})
17
  r.raise_for_status()
 
12
  r.raise_for_status()
13
  return r.json()
14
 
15
+ def health():
16
+ r = requests.get(f"{BACKEND}/", timeout=10)
17
+ r.raise_for_status()
18
+ return r.json()
19
+
20
  def get_quiz(student_id:int, lesson_id:int, level_slug:str):
21
  r = requests.post(f"{BACKEND}/agent/quiz", json={"student_id":student_id,"lesson_id":lesson_id,"level_slug":level_slug})
22
  r.raise_for_status()