Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -43,9 +43,10 @@ def chat():
|
|
| 43 |
role = data.get('role')
|
| 44 |
user_input = data.get('message')
|
| 45 |
company_code = data.get('companyCode')
|
|
|
|
| 46 |
|
| 47 |
-
if not role or not user_input or not company_code:
|
| 48 |
-
return jsonify({"error": "Missing role, message, or
|
| 49 |
|
| 50 |
print("🧠 Incoming user message:", user_input)
|
| 51 |
|
|
|
|
| 43 |
role = data.get('role')
|
| 44 |
user_input = data.get('message')
|
| 45 |
company_code = data.get('companyCode')
|
| 46 |
+
user_id = data.get('userId') # ✅
|
| 47 |
|
| 48 |
+
if not role or not user_input or not company_code or not user_id:
|
| 49 |
+
return jsonify({"error": "Missing role, message, companyCode, or userId"}), 400
|
| 50 |
|
| 51 |
print("🧠 Incoming user message:", user_input)
|
| 52 |
|