Spaces:
Runtime error
Runtime error
poped histroy
Browse files
app.py
CHANGED
@@ -119,7 +119,10 @@ def combine_responses(responses):
|
|
119 |
|
120 |
def generate_response_for_chunk(chunk, history, temperature, max_new_tokens):
|
121 |
start_time = time.time()
|
122 |
-
|
|
|
|
|
|
|
123 |
conversation = [{"role": "system", "content": SYS_PROMPT}]
|
124 |
for user, assistant in history:
|
125 |
conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|
|
|
119 |
|
120 |
def generate_response_for_chunk(chunk, history, temperature, max_new_tokens):
|
121 |
start_time = time.time()
|
122 |
+
if len(history) == 0:
|
123 |
+
pass
|
124 |
+
else:
|
125 |
+
history.pop()
|
126 |
conversation = [{"role": "system", "content": SYS_PROMPT}]
|
127 |
for user, assistant in history:
|
128 |
conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
|