@@ -328,7 +328,7 @@ def regenerate(state, request: gr.Request):
328328 logger .info (f"regenerate. ip: { ip } " )
329329 if not state .regen_support :
330330 state .skip_next = True
331- return (state , state .to_gradio_chatbot (), "" , None ) + (no_change_btn ,) * 5
331+ return (state , state .to_gradio_chatbot (), "" ) + (no_change_btn ,) * 5
332332 state .conv .update_last_message (None )
333333 return (state , state .to_gradio_chatbot (), "" ) + (disable_btn ,) * 5
334334
@@ -361,7 +361,7 @@ def add_text(state, model_selector, text, request: gr.Request):
361361
362362 if len (text ) <= 0 :
363363 state .skip_next = True
364- return (state , state .to_gradio_chatbot (), "" , None ) + (no_change_btn ,) * 5
364+ return (state , state .to_gradio_chatbot (), "" ) + (no_change_btn ,) * 5
365365
366366 all_conv_text = state .conv .get_prompt ()
367367 all_conv_text = all_conv_text [- 2000 :] + "\n user: " + text
@@ -375,7 +375,7 @@ def add_text(state, model_selector, text, request: gr.Request):
375375 if (len (state .conv .messages ) - state .conv .offset ) // 2 >= CONVERSATION_TURN_LIMIT :
376376 logger .info (f"conversation turn limit. ip: { ip } . text: { text } " )
377377 state .skip_next = True
378- return (state , state .to_gradio_chatbot (), CONVERSATION_LIMIT_MSG , None ) + (
378+ return (state , state .to_gradio_chatbot (), CONVERSATION_LIMIT_MSG ) + (
379379 no_change_btn ,
380380 ) * 5
381381
0 commit comments