Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -52,7 +52,7 @@ def chat():
|
|
| 52 |
return jsonify({"error": "Invalid token.", "details": token_message}), 401
|
| 53 |
|
| 54 |
# Forward the message to the PythonAnywhere endpoint
|
| 55 |
-
data = {"message": user_input}
|
| 56 |
response = requests.post(PYTHONANYWHERE_URL, json=data)
|
| 57 |
|
| 58 |
if response.status_code == 200:
|
|
|
|
| 52 |
return jsonify({"error": "Invalid token.", "details": token_message}), 401
|
| 53 |
|
| 54 |
# Forward the message to the PythonAnywhere endpoint
|
| 55 |
+
data = {"message": [{"role": "user", "content": user_input}]}
|
| 56 |
response = requests.post(PYTHONANYWHERE_URL, json=data)
|
| 57 |
|
| 58 |
if response.status_code == 200:
|