api.py sherika
Browse files- utils/api.py +1 -1
utils/api.py
CHANGED
|
@@ -339,7 +339,7 @@ def chat_ai(query: str, lesson_id: int, level_slug: str, history=None) -> str:
|
|
| 339 |
try:
|
| 340 |
# Force the full path without relying on _prefixes
|
| 341 |
url = f"{BACKEND}/chat" # make sure BACKEND has no trailing slash
|
| 342 |
-
r = _session.post(url, json=payload, timeout=
|
| 343 |
r.raise_for_status()
|
| 344 |
d = r.json()
|
| 345 |
return d.get("answer", "")
|
|
|
|
| 339 |
try:
|
| 340 |
# Force the full path without relying on _prefixes
|
| 341 |
url = f"{BACKEND}/chat" # make sure BACKEND has no trailing slash
|
| 342 |
+
r = _session.post(url, json=payload, timeout=120)
|
| 343 |
r.raise_for_status()
|
| 344 |
d = r.json()
|
| 345 |
return d.get("answer", "")
|