Update app.py
Browse files
app.py
CHANGED
@@ -273,11 +273,12 @@ def chatbot(query):
|
|
273 |
|
274 |
|
275 |
def save_chat_to_file(chat_history):
|
276 |
-
timestamp = time.strftime("%Y%m%d-%H%M%S")
|
277 |
-
filename = f"chat_history_{timestamp}.json"
|
278 |
with open(filename, "w", encoding="utf-8") as f:
|
279 |
json.dump(chat_history, f, ensure_ascii=False, indent=2)
|
280 |
print(f"Chat history saved to {filename}")
|
|
|
281 |
|
282 |
def ask(user_message, chat_history):
|
283 |
if not user_message:
|
|
|
273 |
|
274 |
|
275 |
def save_chat_to_file(chat_history):
|
276 |
+
timestamp = time.strftime("%Y%m%d-%H%M%S")
|
277 |
+
filename = f"chat_history_{timestamp}.json"
|
278 |
with open(filename, "w", encoding="utf-8") as f:
|
279 |
json.dump(chat_history, f, ensure_ascii=False, indent=2)
|
280 |
print(f"Chat history saved to {filename}")
|
281 |
+
return None
|
282 |
|
283 |
def ask(user_message, chat_history):
|
284 |
if not user_message:
|