Update app.py
Browse files
app.py
CHANGED
|
@@ -46,7 +46,7 @@ def call_api(message):
|
|
| 46 |
if chunk.strip(): # Ensure the chunk is not empty
|
| 47 |
try:
|
| 48 |
# Parse JSON chunk
|
| 49 |
-
|
| 50 |
if "response" in data:
|
| 51 |
yield data["response"]
|
| 52 |
except json.JSONDecodeError:
|
|
|
|
| 46 |
if chunk.strip(): # Ensure the chunk is not empty
|
| 47 |
try:
|
| 48 |
# Parse JSON chunk
|
| 49 |
+
data = json.loads(chunk)
|
| 50 |
if "response" in data:
|
| 51 |
yield data["response"]
|
| 52 |
except json.JSONDecodeError:
|