Spaces:
Sleeping
Sleeping
check log
Browse files- mongodb.py +1 -0
mongodb.py
CHANGED
@@ -56,6 +56,7 @@ def get_chat_history(user_id: int) -> str:
|
|
56 |
conversation_lines.append(f"Bot: {message}")
|
57 |
|
58 |
# Ghép các dòng thành chuỗi, mỗi dòng cách nhau bằng xuống dòng
|
|
|
59 |
return "\n".join(conversation_lines)
|
60 |
except Exception as e:
|
61 |
logger.error(f"Lỗi khi lấy lịch sử chat cho user_id {user_id}: {e}")
|
|
|
56 |
conversation_lines.append(f"Bot: {message}")
|
57 |
|
58 |
# Ghép các dòng thành chuỗi, mỗi dòng cách nhau bằng xuống dòng
|
59 |
+
logger.info("\n".join(conversation_lines))
|
60 |
return "\n".join(conversation_lines)
|
61 |
except Exception as e:
|
62 |
logger.error(f"Lỗi khi lấy lịch sử chat cho user_id {user_id}: {e}")
|