Chanjeans commited on
Commit
15ea7f6
Β·
verified Β·
1 Parent(s): cba48d1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -1343,15 +1343,16 @@ def chat_or_recommend(req: ChatOrRecommendRequest):
1343
 
1344
  # 5) μ΅œμ’… 응닡 κ²°ν•©
1345
  final_response = counseling_response + chatbot_msg
1346
- if recommendation_msg:
1347
- final_response += recommendation_msg
1348
 
1349
  # 6) 응닡 JSON ꡬ성
1350
  response_dict = {
1351
- "mode": "chat+recommend" if recommendation_msg else "chat",
1352
- "response": final_response,
1353
- "depression_label": depression_label
1354
- }
 
 
1355
  if recommendation_msg:
1356
  response_dict["recommendations"] = recommendations_list
1357
 
 
1343
 
1344
  # 5) μ΅œμ’… 응닡 κ²°ν•©
1345
  final_response = counseling_response + chatbot_msg
1346
+
 
1347
 
1348
  # 6) 응닡 JSON ꡬ성
1349
  response_dict = {
1350
+ "mode": "chat+recommend" if recommendation_msg else "chat",
1351
+ "response": final_response, # πŸ”Ή 챗봇 μ‘λ‹΅λ§Œ 포함
1352
+ "depression_label": depression_label,
1353
+ "recommendation_msg": recommendation_msg if recommendation_msg else None, # πŸ”Ή μΆ”μ²œ λ©”μ‹œμ§€ 별도 ν•„λ“œ
1354
+ "recommendations": recommendations_list if recommendations_list else None
1355
+ }
1356
  if recommendation_msg:
1357
  response_dict["recommendations"] = recommendations_list
1358