ShravanHN commited on
Commit
d974af2
·
1 Parent(s): 0e289da

poped histroy

Browse files
Files changed (1) hide show
  1. app.py +4 -1
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}])