melk2025 commited on
Commit
85f7ad2
·
verified ·
1 Parent(s): 46a7ea3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
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") # Create a timestamp like 20250430-141522
277
- filename = f"chat_history_{timestamp}.json" # Unique filename
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: