Spaces:
Sleeping
Sleeping
YanBoChen
commited on
Commit
·
a50be9b
1
Parent(s):
f55b322
fix(OnCallAIInterface): conditionally return technical details based on DEBUG_MODE
Browse files
app.py
CHANGED
@@ -235,12 +235,20 @@ class OnCallAIInterface:
|
|
235 |
if not DEBUG_MODE:
|
236 |
technical_details = self._sanitize_technical_details(technical_details)
|
237 |
|
238 |
-
return
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
244 |
|
245 |
except Exception as e:
|
246 |
error_msg = f"❌ System error: {str(e)}"
|
|
|
235 |
if not DEBUG_MODE:
|
236 |
technical_details = self._sanitize_technical_details(technical_details)
|
237 |
|
238 |
+
# Conditional return based on DEBUG_MODE
|
239 |
+
if DEBUG_MODE:
|
240 |
+
return (
|
241 |
+
medical_advice,
|
242 |
+
'\n'.join(processing_steps),
|
243 |
+
guidelines_display,
|
244 |
+
json.dumps(technical_details, indent=2)
|
245 |
+
)
|
246 |
+
else:
|
247 |
+
return (
|
248 |
+
medical_advice,
|
249 |
+
'\n'.join(processing_steps),
|
250 |
+
guidelines_display
|
251 |
+
)
|
252 |
|
253 |
except Exception as e:
|
254 |
error_msg = f"❌ System error: {str(e)}"
|