zyliu commited on
Commit
9f9fa2d
1 Parent(s): 06efa3b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -234,7 +234,8 @@ class InteractionLoop:
234
 
235
  def add_text(self, history, text, role="assistant", append=False):
236
  if history is None:
237
- return history, ""
 
238
  assert role in ["human", "assistant"]
239
  idx = 0
240
  if len(history) == 0 or role == "human":
 
234
 
235
  def add_text(self, history, text, role="assistant", append=False):
236
  if history is None:
237
+ history = []
238
+ # return history, ""
239
  assert role in ["human", "assistant"]
240
  idx = 0
241
  if len(history) == 0 or role == "human":