Update app.py
Browse files
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)
|