ECUiVADE commited on
Commit
d0e122e
1 Parent(s): edbff3a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -61,6 +61,16 @@ chat_log_name =""
61
  from llama_cpp import Llama
62
  llm = Llama(model_path=model_file, model_type="mistral",n_gpu_layers=-1,n_ctx = 2048)
63
 
 
 
 
 
 
 
 
 
 
 
64
  def get_drive_service():
65
  credentials = service_account.Credentials.from_service_account_file(
66
  SERVICE_ACCOUNT_FILE, scopes=SCOPES)
 
61
  from llama_cpp import Llama
62
  llm = Llama(model_path=model_file, model_type="mistral",n_gpu_layers=-1,n_ctx = 2048)
63
 
64
+
65
+ def reset_chat():
66
+ global chat_history, chat_log_history, isFirstRun, context, chat_log_name
67
+ chat_history = []
68
+ chat_log_history = []
69
+ isFirstRun = True
70
+ context = initContext # Assuming initContext is your initial context
71
+ chat_log_name = ""
72
+ return "Chat reset successfully. You can start a new chat now."
73
+
74
  def get_drive_service():
75
  credentials = service_account.Credentials.from_service_account_file(
76
  SERVICE_ACCOUNT_FILE, scopes=SCOPES)