Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -84,9 +84,9 @@ async def ask_ai(request: Request):
|
|
| 84 |
|
| 85 |
if start != -1 and end != -1:
|
| 86 |
try:
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
except json.JSONDecodeError:
|
| 90 |
reply = ""
|
| 91 |
|
| 92 |
|
|
|
|
| 84 |
|
| 85 |
if start != -1 and end != -1:
|
| 86 |
try:
|
| 87 |
+
parsed = json.loads(reply)
|
| 88 |
+
reply = parsed.get("response", "")
|
| 89 |
+
except json.JSONDecodeError:
|
| 90 |
reply = ""
|
| 91 |
|
| 92 |
|