api.py change
Browse files- utils/api.py +1 -1
utils/api.py
CHANGED
|
@@ -337,7 +337,7 @@ def chat_ai(query: str, lesson_id: int, level_slug: str, history=None) -> str:
|
|
| 337 |
"history": history or [],
|
| 338 |
}
|
| 339 |
try:
|
| 340 |
-
d = _json_or_raise(_req("POST", "/chat", json=payload
|
| 341 |
return d.get("answer", "")
|
| 342 |
except Exception as e:
|
| 343 |
return f"(chat failed: {e})"
|
|
|
|
| 337 |
"history": history or [],
|
| 338 |
}
|
| 339 |
try:
|
| 340 |
+
d = _json_or_raise(_req("POST", "/chat", json=payload))
|
| 341 |
return d.get("answer", "")
|
| 342 |
except Exception as e:
|
| 343 |
return f"(chat failed: {e})"
|