Spaces:
Sleeping
Sleeping
Update back.py
Browse files
back.py
CHANGED
@@ -27,7 +27,7 @@ class ChatConfig:
|
|
27 |
embedding_model_name: str = 'all-MiniLM-L6-v2'
|
28 |
device: str = 'cuda' if torch.cuda.is_available() else 'cpu'
|
29 |
max_history: int = 3
|
30 |
-
gemini_api_key: str = "
|
31 |
log_file: str = "chat_history.txt"
|
32 |
user_data_file: str = "user_data.json"
|
33 |
|
@@ -93,7 +93,7 @@ class ChatLogger:
|
|
93 |
|
94 |
class ChatMemory:
|
95 |
"""Manages chat history"""
|
96 |
-
def __init__(self, max_history: int =
|
97 |
self.max_history = max_history
|
98 |
self.history = []
|
99 |
|
|
|
27 |
embedding_model_name: str = 'all-MiniLM-L6-v2'
|
28 |
device: str = 'cuda' if torch.cuda.is_available() else 'cpu'
|
29 |
max_history: int = 3
|
30 |
+
gemini_api_key: str = os.getenv("GEMINI_API") # Replace with your API key
|
31 |
log_file: str = "chat_history.txt"
|
32 |
user_data_file: str = "user_data.json"
|
33 |
|
|
|
93 |
|
94 |
class ChatMemory:
|
95 |
"""Manages chat history"""
|
96 |
+
def __init__(self, max_history: int = 10):
|
97 |
self.max_history = max_history
|
98 |
self.history = []
|
99 |
|