Spaces:
Runtime error
Runtime error
Commit
·
a797463
1
Parent(s):
cdacab2
Update chat_completion.py
Browse files- chat_completion.py +1 -1
chat_completion.py
CHANGED
@@ -20,7 +20,7 @@ class ChatCompletion:
|
|
20 |
self.user_messages = []
|
21 |
|
22 |
def chat(self, msg: str, setting: Optional[str] = None, model: Optional[str] = None) -> str:
|
23 |
-
if self._context_length() >
|
24 |
self.reset()
|
25 |
if setting is not None:
|
26 |
if setting not in self.system_messages:
|
|
|
20 |
self.user_messages = []
|
21 |
|
22 |
def chat(self, msg: str, setting: Optional[str] = None, model: Optional[str] = None) -> str:
|
23 |
+
if self._context_length() > 2048:
|
24 |
self.reset()
|
25 |
if setting is not None:
|
26 |
if setting not in self.system_messages:
|